📄 duplicate_table.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: duplicate_table.h,v 1.2 2000/12/06 10:36:11 prima Exp $ *//* * Routing table management daemon. *//* *Duplicate table structure. *//* Y.Ge: the duplicate table stores the information about all message types - TC, MID, etc *//************* added by Y.Ge *************//* list of the node interface addresses that the message is received */struct rcving_interface { struct olsr_ip_addr rcvg_interface_address; struct rcving_interface *next;};/************* end of revision ***********/struct duplicateinfo { olsr_u32_t duplicate_hash; olsr_u8_t duplicate_type; //added by Y.Ge: message type struct olsr_ip_addr duplicate_addr; olsr_u16_t duplicate_seq; olsr_u8_t duplicate_retransmitted; //added by Y.Ge: if the message is re-transmitted struct timeval duplicate_timer; struct rcving_interface *duplicate_rcvg_iface_list; //added by Y.Ge: list of the node interface that the message is received };struct duplicate_entry { struct duplicate_entry *duplicate_forw; struct duplicate_entry *duplicate_back; struct duplicateinfo duplicate_infos;};#define duplicate_hash duplicate_infos.duplicate_hash#define duplicate_type duplicate_infos.duplicate_type#define duplicate_addr duplicate_infos.duplicate_addr /* originator address of the received packet */#define duplicate_seq duplicate_infos.duplicate_seq /* packet sequence number */#define duplicate_retransmitted duplicate_infos.duplicate_retransmitted#define duplicate_timer duplicate_infos.duplicate_timer /* for invalidation */#define duplicate_rcvg_iface_list duplicate_infos.duplicate_rcvg_iface_liststruct duplicatehash { struct duplicate_entry *duplicate_forw; struct duplicate_entry *duplicate_back;};voidolsr_delete_duplicate_table(struct duplicate_entry *dup_entry);/*voidolsr_insert_duplicate_table(struct tc_message *message);*/ //commented by Y.Gevoidolsr_insert_duplicate_table (int type, struct olsr_ip_addr org_addr, int sequence, int rcvd_if_index, int should_forward); //added by Y.Ge (insert different messages into duplicate table)/*struct duplicate_entry*olsr_lookup_duplicate_table(struct tc_message *message);*/ // commented by Y.Gestruct duplicate_entry*olsr_lookup_duplicate_table(int type, struct olsr_ip_addr org_addr, int sequence, int rcvd_if_index); //added by Y.Ge (find different messages into duplicate table)voidolsr_release_duplicate_table();voidolsr_time_out_duplicate_table();voidolsr_print_duplicate_table();voidolsr_print_trace_duplicate_table(); //added by Y.Geintolsr_lookup_interface_address_from_duplicate_entry(struct duplicate_entry *dup_entry, struct olsr_ip_addr *addr); //added by Y.Gevoidolsr_insert_interface_address_into_duplicate_entry(struct duplicate_entry *dup_entry, struct olsr_ip_addr *addr); //added by Y.Ge
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -