Xenomai 3.3.2
Loading...
Searching...
No Matches
route.h
1/***
2 *
3 * include/ipv4/route.h - real-time routing
4 *
5 * Copyright (C) 2004, 2005 Jan Kiszka <jan.kiszka@web.de>
6 *
7 * Rewritten version of the original route by David Schleef and Ulrich Marx
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 */
24
25#ifndef __RTNET_ROUTE_H_
26#define __RTNET_ROUTE_H_
27
28#include <linux/init.h>
29#include <linux/types.h>
30
31#include <rtdev.h>
32
33struct dest_route {
34 u32 ip;
35 unsigned char dev_addr[MAX_ADDR_LEN];
36 struct rtnet_device *rtdev;
37};
38
39int rt_ip_route_add_host(u32 addr, unsigned char *dev_addr,
40 struct rtnet_device *rtdev);
41void rt_ip_route_del_all(struct rtnet_device *rtdev);
42
43#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4_NETROUTING
44int rt_ip_route_add_net(u32 addr, u32 mask, u32 gw_addr);
45int rt_ip_route_del_net(u32 addr, u32 mask);
46#endif /* CONFIG_XENO_DRIVERS_NET_RTIPV4_NETROUTING */
47
48#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4_ROUTER
49int rt_ip_route_forward(struct rtskb *rtskb, u32 daddr);
50#endif /* CONFIG_XENO_DRIVERS_NET_RTIPV4_ROUTER */
51
52int rt_ip_route_del_host(u32 addr, struct rtnet_device *rtdev);
53int rt_ip_route_get_host(u32 addr, char *if_name, unsigned char *dev_addr,
54 struct rtnet_device *rtdev);
55int rt_ip_route_output(struct dest_route *rt_buf, u32 daddr, u32 saddr);
56
57int __init rt_ip_routing_init(void);
58void rt_ip_routing_release(void);
59
60#endif /* __RTNET_ROUTE_H_ */