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 olsrd-unik.
7 * olsrd-unik 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 * olsrd-unik 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 olsrd-unik; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 * Link sensing database for the OLSR routing daemon
36 union olsr_ip_addr local_iface_addr;
37 union olsr_ip_addr neighbor_iface_addr;
38 struct timeval SYM_time;
39 struct timeval ASYM_time;
41 struct neighbor_entry *neighbor;
48 struct timeval L_LOST_LINK_time;
49 struct timeval hello_timeout; /* When we should receive a new HELLO */
51 olsr_u16_t olsr_seqno;
56 olsr_u8_t spy_activated;
58 struct link_entry *next;
62 /* The link sets - one pr. interface */
64 struct link_entry *link_set;
67 struct timeval hold_time_neighbor;
68 struct timeval hold_time_neighbor_nw;
70 /* Function prototypes */
76 add_new_entry(union olsr_ip_addr *, union olsr_ip_addr *, union olsr_ip_addr *, double, double);
79 lookup_link_status(struct link_entry *);
82 update_link_entry(union olsr_ip_addr *, union olsr_ip_addr *, struct hello_message *, struct interface *);
85 get_neighbor_nexthop(union olsr_ip_addr *);
88 lookup_link_entry(union olsr_ip_addr *, union olsr_ip_addr *);
91 replace_neighbor_link_set(struct neighbor_entry *,
92 struct neighbor_entry *);
95 check_link_status(struct hello_message *);
98 olsr_time_out_link_set();
101 get_interface_link_set(union olsr_ip_addr *);
104 check_neighbor_link(union olsr_ip_addr *);
107 get_neighbor_status(union olsr_ip_addr *);
110 olsr_time_out_hysteresis();