⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changelog

📁 Adhoc无线网络路由协议源码
💻
字号:
------0.12 -------------Mostly bug fixes and code cleanup.It now runs with all 2.4 kernels.------ 0.11 -------------1. In demo_router/demo_router.c added some sysctls to confgure routing.	This is the cut paste:demo_router.c: /* set some parameters in /proc necessary for ad-hoc routing */	/* enable ip forwarding */	system("sysctl -w net/ipv4/ip_forward=1");	/* disable sending and accepting of ICMP redirects */	system("sysctl -w net/ipv4/conf/all/accept_redirects=0");	system("sysctl -w net/ipv4/conf/all/send_redirects=0");		/* In the Linux kernel, a route cache is not flushed immediately after	* a route change. There is some delay, which is controlled by three 	* parameters min_delay, max_delay, and flush in /proc/sys/net/ipv4/route	* Read more in Documentation/filesystems/proc.txt of your kernel source.	* Here I am changing the min_delay from default value of 2 sec to 0,	* so that route changes are immediately reflected in the route cache.	* Without this, packets continue to loop on the tun device for 2 seconds 	* even after the new route is added. Writing to the flush file, also 	* achieves the same thing, but has to be done everytime a route is changed.	* 	* Thanks to Matt Miller <mjmille2@crhc.uiuc.edu> for pointing out this issue	* , investigating it and  providing the solution.	*/  2. Fixed a bug in the route_cache module : route_cache/route_cache.c There wasan extra strcat in read_route_cache_proc() casusing in to coredump somtimes.--vikas-------------------------------------------------------------------------------- Version a-0.5 -------------------1. Some change in the ASL API and the route_check module was forced to supporta subtle optimization in the AODV draft. If your routing daemon does not needthis optimization, you are advised to stick with standard ASL, version 0.11 currently. Use ASL-a only if this optimization really bothers you.This optimization quoted from the AODV draft is this :"Each time a route is used to forward a data packet, its Active Route Lifetimefield of both the destination and the next hop on the path to the destinationis updated to be no less than the current time plus ACTIVE_ROUTE_TIMEOUT. Sincethe route between each originator and destination pair are expected to besymmetric, the Active Route Lifetime for the previous hop, along the reversepath back to the IP source, is also updated to be no less than the current timeplus ACTIVE_ROUTE_TIMEOUT. "This means : Suppose you forward a packet whose destination is D and source S.Suppose next hop for D in my routing table is N and next_hop for S is P. Ibelieve P is what they call prev_hop. So whenever I forward a packet for D, Iupdate the lifetime for 3 entries in my routing table, that is for D, N and P.P is updated because since a packet came from S, it probably came through P(routes assumed to be symmetric) and so that route is also good.Thus the issue is how to update the lifetime values associated with prev hopand next hop nodes. The prev hop and next hop information is not available in the packet, but only in the routing table. This is how we handle this.In ASL-a-0.5, an additional flag has been introduced for every entry logged bythe route_check module. Whenever a packet is routed inside the kernel,route_check module enters two entries into the /proc file. One for thedestination to which the packet is forwarded, with flag 1. Other for the sourcefrom which the packet was received with flag 0.AODV utilises these entries as follows:1) Whenever any route table entry expires, AODV first queries the route_checkmodule for that destination, with the following call (note the flag passed is1):time_idle = query_route_idle_time(iter->second.getDestIP(),1);It records the value of idle_time in time_idle variable.2) Then it checks if this destination is just one hop away. If that is thecase, it goes through the entire routing table, looking for the nodes for whichthis destination acts as the next hop. This is the prev hop. It then queriesroute_check module for the idle_time corresponding to these nodes (with flag0).temp_time_idle = query_route_idle_time(iter_temp2->second.getDestIP(),0);The node selects the minimum idle_time of all the recorded time. It thencompares this time with the ACTIVE_ROUTE_TIMEOUT. If the idle_time is less thanthe ACTIVE_ROUTE_TIMEOUT, it resets the lifetime for the destination node andany next hop (NEXTHOP) associated with the destination, else it expires theroute table entry.----------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -