📄 kaodv-main.c
字号:
/***************************************************************************** * * Copyright (C) 2001 Uppsala University and Ericsson AB. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author: Erik Nordstr鰉, <erik.nordstrom@it.uu.se> * *****************************************************************************/#include <linux/config.h>#include <linux/version.h>#ifdef KERNEL26#include <linux/moduleparam.h>#endif#include <linux/module.h>#include <linux/kernel.h>#include <linux/init.h>#include <linux/proc_fs.h>#include <linux/if.h>#include <linux/skbuff.h>#include <linux/netdevice.h>#include <linux/inetdevice.h>#include <linux/netfilter_ipv4.h>#include <linux/in.h>#include <linux/ip.h>#include <linux/udp.h>#include <net/route.h>#include "kaodv-expl.h"#include "kaodv-netlink.h"#include "kaodv-queue.h"#include "kaodv-ipenc.h"#define AODV_PORT 654#define MAX_INTERFACES 10#define ACTIVE_ROUTE_TIMEOUT active_route_timeoutstruct netdev_info { __u32 ip_addr; __u32 bc_addr; int ifindex;};static struct netdev_info netdevs[MAX_INTERFACES];static int nif = 0;static int qual = 0;static unsigned long pkts_dropped = 0;int qual_th = 0;int is_gateway = 1;int active_route_timeout = 3000;//static unsigned int loindex = 0;MODULE_DESCRIPTION("AODV-UU kernel support.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -