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

📄 文件功能说明.txt

📁 此代码时基于Linux2.4内核的AODV路由协议
💻 TXT
字号:
-----------------------
Kernel AODV 2.2 Notes
Luke Klein-Berndt
kleinb@nist.gov
-----------------------

Overview
-----------------------
So there are really two sections of Kernel AODV, one that handles sending and processing message 
and another that handles interupts. Interupts can occur at any time. When they happen in the middle
of another process, that process gets "interupted" and suspended until the interupt finishes with 
its stuff. Because it is supposed to handle things quickly, you are not supposeded to do a lot of 
complex tasks. So instead of actaully processing events we get on interupts, we simply queue them up 
and process them when it is our turn.

There are two types of things that can generate interupts that Kernel AODV has to handles. The first 
type is from packets coming into or leaving a node. All incoming and outgoing packets are swept up by 
Netfilters and delivered by an interupt to a predefined function. The function for incoming packets is 
input_handler() in packet_in.c. Outgoing packets are handled by output_handler() in packet_out.c. 

The other type of interupts are from Timers. There are a bunch of timers running in Kernel AODV. 
There are timer to signal when to send out a Hello message and one to start cleaning up. Also every 
neighboring node has a timer that gets reset everytime you recieve a Hello from them. If you don't 
recieve a Hello and the timer goes off, you know there is a link break! wahooo!

Most of the real work goes on in the Kernel AODV process. The kernel process sleeps until it gets a 
kick from an interupt. The process then wakes up and takes a task out of the queue. Interupt copies 
all of the information that will be needed into the task so that the process has everything it needs 
to start working.

Files
-----------------------

aodv_dev - Handles initalizing the device you want to have AODV use.

aodv_neigh - Handles neighboring nodes. A neighboring node is one that is one hop away. 
						 If we lose communication we know there is a link break.

aodv_route - Everything needed for routes to other nodes. Neighbors also have associated routes. 
						 Routes are also created for yourself!

aodv_thread - This is the process that handles all the task. It is a loop that pulls tasks out of 
							the queue and then sends them to the right function.

flood_id - We have to make sure that we do not process broadcast AODV messages (RREQ) twice. 
					 We do this by recording the time the packet came in, the source of the packet and its unique id. 
					 If we recieve a packet from the same source with the same ID we know it is a repeate and we 
					 don't process it.

hello - Handles the sending and recieving of Hello messages. The sending of Hello messages is triggered 
				by a timer.

kernel_route - Is in charge of creating and deleting routes in the kernel routing table.

module - This is used when the module gets load and unload. All of the queues get initalized here. 
				 The proc filesystem is created here and netfilters are started and stopped.

packet_in - Incoming packets are handled here. If the packet has the AODV port number it goes through 
						other processing.

packet_out - All outgoing packets go through here. If they are not broadcast packets, AODV will check 
						 to see if there is a route to the destination in the AODV routing table.

rerr - Handles the creation and processing of route error messages. Route error messages get built 
			 based upon a broken link. Any link that uses this link as a next hop gets added into the Route error 
			 message and broadcast.

rrep_ack - A silly little packet that hasn't really been implemented. If you want you can send a packet 
					 back acknowlegding that you recieved a RREP.

rrep - Handles the RREP packets which contain new routes. Also looks at RREP packets to see if they are 
			 Hello messages and pass them onto the Hello functions.

rreq - When you don't have a route you send out a RREQ. This function handles that. It also looks at 
			 incoming RREQs to see if it should reply to a RREQ. It if does not reply to forwards it on. 
			 It also has a function to resend a RREQ.

signal - 

socket - 

task_queue - All major proccessing that needs to be done is  placed into the task queue. 

timer_queue - There is a queue of task that is ordered by the time they should be started. A timer is set 
							to go off when the first task is due. That task then gets passed off to the AODV thread.

utils - If you can not find a function anywhere else, it is probably here.

Variables
-----------------------

⌨️ 快捷键说明

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