2 * OLSR ad-hoc routing table management protocol
3 * Copyright (C) 2003 Andreas Tønnesen (andreto@ifi.uio.no)
5 * This file is part of the olsr.org OLSR daemon.
7 * olsr.org is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * olsr.org is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with olsr.org; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * $Id: neighbor_table.h,v 1.6 2004/10/09 22:32:47 kattemat Exp $
27 #ifndef _OLSR_NEIGH_TBL
28 #define _OLSR_NEIGH_TBL
30 #include "olsr_protocol.h"
34 struct neighbor_2_list_entry
36 struct neighbor_2_entry *neighbor_2;
37 struct timeval neighbor_2_timer;
38 struct neighbor_2_list_entry *next;
39 struct neighbor_2_list_entry *prev;
46 union olsr_ip_addr neighbor_main_addr;
48 olsr_u8_t willingness;
50 olsr_u8_t was_mpr; /* Used to detect changes in MPR */
53 struct neighbor_2_list_entry neighbor_2_list;
54 struct neighbor_entry *next;
55 struct neighbor_entry *prev;
63 struct neighbor_entry neighbortable[HASHSIZE];
66 olsr_init_neighbor_table(void);
69 olsr_delete_neighbor_2_pointer(struct neighbor_entry *, union olsr_ip_addr *);
71 struct neighbor_2_list_entry *
72 olsr_lookup_my_neighbors(struct neighbor_entry *, union olsr_ip_addr *);
75 olsr_delete_neighbor_table(union olsr_ip_addr *);
77 struct neighbor_entry *
78 olsr_insert_neighbor_table(union olsr_ip_addr *);
80 struct neighbor_entry *
81 olsr_lookup_neighbor_table(union olsr_ip_addr *);
83 struct neighbor_entry *
84 olsr_lookup_neighbor_table_alias(union olsr_ip_addr *);
87 olsr_time_out_two_hop_neighbors(struct neighbor_entry *);
90 olsr_time_out_neighborhood_tables(void);
93 olsr_print_neighbor_table(void);
97 update_neighbor_status(struct neighbor_entry *, int);