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

📄 packet.h

📁 OLSR Implementation for XORP
💻 H
字号:
/* * Copyright (c) 2004 Ying Ge, Communication Research Center Canada. * * Copyright (c) 2002, 2003 Maoyu Wang, Communication Research Center Canada. * * By Ying Ge: * 1. Change the OLSR packet format and message processing procedure based  *    on the OLSR RFC. * 2. Add support of multiple interfaces to OLSR, including MID message  *    creating and processing procedure as specified in the OLSR RFC. * 3. Add QoS Support to OLSR * * By Maoyu Wang: * 1. Ported OLSR from IPv4 to IPv6. * 2. Added the Host and Network Association (HNA) functionality into OLSR. * 3. Added the default gateway functionality into OLSR by extending the HNA  *    message usage. The default gateway functionality supported the mobility *	  by cooperating with Mobile IPv6 for a mobile node as well as supported  * 	  Internet access for MANET nodes.  * * DISTRIBUTED WITH NO WARRANTY, EXPRESS OR IMPLIED. * See the GNU Library General Public License (file COPYING in the distribution) * for conditions of use and redistribution *//* * This Copyright notice is in French. An English summary is given * but the referee text is the French one. * * Copyright (c) 2000, 2001 Adokoe.Plakoo@inria.fr, INRIA Rocquencourt, *                          Anis.Laouiti@inria.fr, INRIA Rocquencourt. * * Ce logiciel informatique est disponible aux conditions * usuelles dans la recherche, c'est-à-dire qu'il peut * être utilisé, copié, modifié, distribué à l'unique * condition que ce texte soit conservé afin que * l'origine de ce logiciel soit reconnue. * Le nom de l'Institut National de Recherche en Informatique * et en Automatique (INRIA), ou d'une personne morale * ou physique ayant participé à l'élaboration de ce logiciel ne peut * être utilisé sans son accord préalable explicite. *  * Ce logiciel est fourni tel quel sans aucune garantie, * support ou responsabilité d'aucune sorte. * Certaines parties de ce logiciel sont dérivées de sources developpees par * University of California, Berkeley et ses contributeurs couvertes  * par des copyrights. * This software is available with usual "research" terms * with the aim of retain credits of the software.  * Permission to use, copy, modify and distribute this software for any * purpose and without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies, * and the name of INRIA, or any contributor not be used in advertising * or publicity pertaining to this material without the prior explicit * permission. The software is provided "as is" without any * warranties, support or liabilities of any kind. * This product includes software developed by the University of * California, Berkeley and its contributors protected by copyrights. * *	$Id: packet.h,v 1.2 2000/12/06 10:36:12 prima Exp $ *//* * Routing table management daemon. *//*This file was changed, those changes must be indicated to Adokoe*///CRC v4->v6 modifystruct hello_neighbor{	//olsr_u8_t          	status;	//commented by Y.Ge	olsr_u8_t            	neigh_status; //added  by Y.Ge	olsr_u8_t            	link_status; //added by Y.Ge            		struct olsr_ip_addr   address;	struct hello_neighbor *next;};//CRC v4->v6 modifystruct hello_message{	struct olsr_ip_addr   	source_addr; //Y.Ge: interface address of the hello sender	struct olsr_ip_addr  	originator_addr; //added by Y.Ge, main address of the hello message	struct olsr_ip_addr	my_addr; //added by Y.Ge	olsr_u8_t           	v_time; 	//added by Y.Ge	olsr_u8_t          	rcvd_h_time; //added by Y.Ge	olsr_u8_t            	willingness;  //added by Y.Ge       	olsr_u16_t           	packet_seq_number;	/*olsr_u16_t         	mpr_seq_number;*/	//commented by Y.Ge	struct hello_neighbor	*neighbors;  };//CRC v4->v6 modifystruct tc_mpr_addr{	struct olsr_ip_addr    address;	struct tc_mpr_addr     *next;};//CRC v4->v6 modifystruct tc_message{	struct olsr_ip_addr	source_addr; //Y.Ge:Y.Ge: interface address of the tc sender 	struct olsr_ip_addr	originator;	struct olsr_ip_addr	my_addr; //added by Y.Ge, receiving interface address	olsr_u8_t          	v_time;	//added by Y.Ge	olsr_u16_t         	packet_seq_number;	olsr_u8_t           	hop_count;	olsr_u8_t          	time_to_live;	//added by Y.Ge	olsr_u16_t         	mssn;	struct tc_mpr_addr 	*multipoint_relay_selector_address;};//CRC v4->v6 modifystruct rt_message{	struct olsr_ip_addr	destination;	struct olsr_ip_addr	next_hop;	olsr_u8_t          	hop_count;	olsr_u8_t          	time_to_live;  //added by Y.Ge	struct  rt_message  	*next; };/**************** added by Y.Ge **************/struct mid_iface_addr {	struct olsr_ip_addr	interface_address;	struct mid_iface_addr	*next;};struct mid_message{	struct olsr_ip_addr 	source_addr;	//sender interface address;	struct olsr_ip_addr 	originator_addr;  //originator main address;	struct olsr_ip_addr 	my_addr; 	olsr_u8_t               v_time; 	olsr_u16_t           	packet_seq_number;	olsr_u8_t            	hop_count;	olsr_u8_t            	time_to_live;	struct mid_iface_addr	*mid_interface_address;};/* qos OLSR */struct qos_hello_message{	struct olsr_ip_addr   	source_addr; //Y.Ge: interface address of the hello sender	struct olsr_ip_addr  	originator_addr; //added by Y.Ge, main address of the hello message	struct olsr_ip_addr	my_addr; //added by Y.Ge	olsr_u16_t           	packet_seq_number;	olsr_u32_t         	rcvd_busy_time; //busy time of the received node};struct tc_mpr_busy_time{	olsr_u32_t          	   busy_time;	struct tc_mpr_busy_time     *next;};struct qos_tc_message{	struct olsr_ip_addr	source_addr; //interface address of the tc sender 	struct olsr_ip_addr	originator;	struct olsr_ip_addr	my_addr; //receiving interface address	olsr_u32_t         	my_busy_time; //the busy time of the TC originator	olsr_u16_t         	packet_seq_number;	olsr_u8_t           	hop_count;	olsr_u8_t          	time_to_live;		olsr_u16_t         	mssn;	struct tc_mpr_busy_time	*multipoint_relay_selector_busy_time;};/**************** end of revision ***********///CRC HNA add/*-------------------------------------------------------------------------------*/struct hna_net_addr{	struct olsr_ip_addr	net_addr;	olsr_u16_t		prefix;	struct hna_net_addr	*next;};struct hna_message{	struct olsr_ip_addr	source_addr;	struct olsr_ip_addr	originator;	struct olsr_ip_addr 	my_addr; //added by Y.Ge	olsr_u8_t         	v_time;	//added by Y.Ge	olsr_u16_t         	packet_seq_number;	olsr_u8_t          	hop_count;	olsr_u8_t	   	time_to_live;	//added by Y.Ge	/*olsr_u16_t		msg_seq_number;*/ //commented by Y.Ge	struct hna_net_addr	*hna_net_addrs;};/*-------------------------------------------------------------------------------*/voidolsr_destroy_hello_message(struct hello_message *message);voidolsr_print_hello_message(struct hello_message *message);voidolsr_destroy_tc_message(struct tc_message *message);voidolsr_destroy_mid_message (struct mid_message *message); //added by Y.Ge/* qos OLSR */voidolsr_destroy_qos_tc_message(struct qos_tc_message *message); //added by Y.Geolsr_u8_tolsr_lookup_link_status(struct hello_message *message, int index); //"index" is added by Y.Geolsr_u8_tolsr_lookup_neighbor_status(struct hello_message *message, int index); //added by Y.Gevoidolsr_destroy_hna_message(struct hna_message *message);voidolsr_copy_mid_packet(struct mid_message *inmid, struct mid_message *outmid); //added by Y.Gevoidolsr_copy_tc_packet(struct tc_message  *intc, struct tc_message *outtc); //added by Y.Gevoidolsr_copy_hna_packet(struct hna_message *inhna, struct hna_message *outhna); //added by Y.Gevoidolsr_copy_qos_tc_packet(struct qos_tc_message  *inqostc, struct qos_tc_message *outqostc); //added by Y.Ge

⌨️ 快捷键说明

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