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

📄 two_hop_neighbor_table.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: two_hop_neighbor_table.h,v 1.2 2000/12/06 10:36:12 prima Exp $ *//* * Routing table management daemon. *//* *Two hops neighbor table structure. */struct neighbor_list_entry {	struct	neighbor_list_entry	*neighbor_next;	struct	neighbor_entry     	*neighbor;};struct neighbor_2_info {	olsr_u32_t                	neighbor_2_hash;	struct olsr_ip_addr       	neighbor_2_addr;	olsr_u8_t                 	neighbor_2_state;    /*used in mpr calculation*/	olsr_16_t                 	neighbor_2_pointer;	struct neighbor_list_entry	*neighbor_2_nblist; };struct neighbor_2_entry {	struct	neighbor_2_entry	*neighbor_2_forw;	struct	neighbor_2_entry	*neighbor_2_back;	struct	neighbor_2_info 	neighbor_2_infos;};#define	neighbor_2_hash   	neighbor_2_infos.neighbor_2_hash#define	neighbor_2_addr   	neighbor_2_infos.neighbor_2_addr   	/* two hops neighbor address */#define	neighbor_2_pointer	neighbor_2_infos.neighbor_2_pointer	/* number of one hop neighbor pointing to this two hops neighbor */#define	neighbor_2_state  	neighbor_2_infos.neighbor_2_state  	/* see bellow */#define	neighbor_2_nblist 	neighbor_2_infos.neighbor_2_nblist 	/* list of the one hop neighbor, neighbor to this two hops neighbor */#define	HASHSIZE	32           	/* must be a power of 2 */#define	HASHMASK	(HASHSIZE - 1)struct neighbor2_hash {	struct	neighbor_2_entry	*neighbor2_forw;	struct	neighbor_2_entry	*neighbor2_back;};/* * "State" of two hops neighbor. */#define	NB2S_COVERED 	0x1		/* node has been covered by a MPR */voidolsr_delete_neighbor_pointer(struct neighbor_2_entry *two_hop_entry,struct olsr_ip_addr *address);voidolsr_delete_two_hop_neighbor_table(struct neighbor_2_entry *two_hop_neighbor);voidolsr_insert_two_hop_neighbor_table(struct neighbor_2_entry *two_hop_neighbor);struct neighbor_2_entry *olsr_lookup_two_hop_neighbor_table(struct olsr_ip_addr *dest);voidolsr_release_two_hop_neighbor_table();voidolsr_print_two_hop_neighbor_table();struct neighbor_entry*olsr_find_highest_willingness_neighbor(struct neighbor_2_entry *neighbor_2); //added by Y.Ge, used in routing table calculation

⌨️ 快捷键说明

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