2 * OLSR ad-hoc routing table management protocol
3 * Copyright (C) 2004 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: routing_table.h,v 1.8 2004/11/02 21:14:12 kattemat Exp $
26 #ifndef _OLSR_ROUTING_TABLE
27 #define _OLSR_ROUTING_TABLE
29 #include <net/route.h>
34 #define NETMASK_HOST 0xffffffff
35 #define NETMASK_DEFAULT 0x0
39 union olsr_ip_addr rt_dst;
40 union olsr_ip_addr rt_router;
41 union hna_netmask rt_mask;
44 struct interface *rt_if;
45 struct rt_entry *prev;
46 struct rt_entry *next;
52 struct rt_entry *destination;
53 struct destination_n *next;
58 * IPv4 <-> IPv6 wrapper
60 union olsr_kernel_route
67 struct rt_entry routingtable[HASHSIZE];
68 struct rt_entry hna_routes[HASHSIZE];
72 olsr_init_routing_table(void);
75 olsr_calculate_routing_table(void);
78 olsr_calculate_hna_routes(void);
81 olsr_print_routing_table(struct rt_entry *);