The Netsukuku Project  0.0.9
An Alternative routing method
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
krnl_route.h
Go to the documentation of this file.
1 /* This file is part of Netsukuku
2  * (c) Copyright 2004 Andrea Lo Pumo aka AlpT <alpt@freaknet.org>
3  *
4  * This source code is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as published
6  * by the Free Software Foundation; either version 2 of the License,
7  * or (at your option) any later version.
8  *
9  * This source code is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12  * Please refer to the GNU Public License for more details.
13  *
14  * You should have received a copy of the GNU Public License along with
15  * this source code; if not, write to:
16  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  */
18 
19 #ifndef KRNL_ROUTE_H
20 #define KRNL_ROUTE_H
21 
22 #include "if.h"
23 
24 #define RTPROT_NETSUKUKU 15
25 
26 struct nexthop
27 {
29  char *dev;
30  u_char hops;
31 };
32 
33 struct rt_request {
34  struct nlmsghdr nh;
35  struct rtmsg rt;
36  char buf[1024];
37 };
38 
39 
40 #define ROUTE_CMD_VARS int type, int scope, inet_prefix *src, inet_prefix *to, \
41  struct nexthop *nhops, char *dev, u_char table
42 
49 int route_flush_cache(int family);
50 int route_ip_forward(int family, int enable);
51 int route_rp_filter(int family, char *dev, int enable);
52 int route_rp_filter_all_dev(int family, interface *ifs, int ifs_n, int enable);
53 
54 #endif /*KRNL_ROUTE_H*/
char buf[1024]
Definition: krnl_route.h:36
int route_rp_filter(int family, char *dev, int enable)
Definition: krnl_route.c:538
int route_flush_cache(int family)
Definition: krnl_route.c:460
u_char hops
Definition: krnl_route.h:30
#define ROUTE_CMD_VARS
Definition: krnl_route.h:40
Definition: inet.h:73
int route_add(int type, int scope, inet_prefix *src, inet_prefix *to, struct nexthop *nhops, char *dev, u_char table)
Definition: krnl_route.c:73
struct rtmsg rt
Definition: krnl_route.h:35
inet_prefix gw
Definition: krnl_route.h:28
int route_append(int type, int scope, inet_prefix *src, inet_prefix *to, struct nexthop *nhops, char *dev, u_char table)
Definition: krnl_route.c:97
Definition: if.h:29
int route_rp_filter_all_dev(int family, interface *ifs, int ifs_n, int enable)
Definition: krnl_route.c:594
char * dev
Definition: krnl_route.h:29
int route_del(int type, int scope, inet_prefix *src, inet_prefix *to, struct nexthop *nhops, char *dev, u_char table)
Definition: krnl_route.c:79
Definition: krnl_route.h:33
struct nlmsghdr nh
Definition: krnl_route.h:34
int route_change(int type, int scope, inet_prefix *src, inet_prefix *to, struct nexthop *nhops, char *dev, u_char table)
Definition: krnl_route.c:91
int route_ip_forward(int family, int enable)
Definition: krnl_route.c:493
int route_replace(int type, int scope, inet_prefix *src, inet_prefix *to, struct nexthop *nhops, char *dev, u_char table)
Definition: krnl_route.c:85
int family
Definition: if.c:34
Definition: krnl_route.h:26
int route_get_exact_prefix_dst(inet_prefix, inet_prefix *, char *)
Definition: krnl_route.c:421