move PPP_VERSION to ppp.c; don't use dev->tbusy as a lock
[mpls-ppp.git] / linux / route.h
blob5be4853e5a76c9fcab93136bfe9f1d8680e5339c
1 /*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
6 * Global definitions for the IP router interface.
8 * Version: @(#)route.h 1.0.3 05/27/93
10 * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988
11 * for the purposes of compatibility only.
13 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version
18 * 2 of the License, or (at your option) any later version.
20 #ifndef _LINUX_ROUTE_H
21 #define _LINUX_ROUTE_H
23 #include <linux/if.h>
26 /* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
27 struct rtentry
29 unsigned long rt_hash; /* hash key for lookups */
30 struct sockaddr rt_dst; /* target address */
31 struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */
32 struct sockaddr rt_genmask; /* target network mask (IP) */
33 short rt_flags;
34 short rt_refcnt;
35 unsigned long rt_use;
36 struct ifnet *rt_ifp;
37 short rt_metric; /* +1 for binary compatibility! */
38 char *rt_dev; /* forcing the device at add */
39 unsigned long rt_mss; /* per route MTU/Window */
40 unsigned long rt_window; /* Window clamping */
41 unsigned short rt_irtt; /* Initial RTT */
45 #define RTF_UP 0x0001 /* route usable */
46 #define RTF_GATEWAY 0x0002 /* destination is a gateway */
47 #define RTF_HOST 0x0004 /* host entry (net otherwise) */
48 #define RTF_REINSTATE 0x0008 /* reinstate route after tmout */
49 #define RTF_DYNAMIC 0x0010 /* created dyn. (by redirect) */
50 #define RTF_MODIFIED 0x0020 /* modified dyn. (by redirect) */
51 #define RTF_MSS 0x0040 /* specific MSS for this route */
52 #define RTF_WINDOW 0x0080 /* per route window clamping */
53 #define RTF_IRTT 0x0100 /* Initial round trip time */
54 #define RTF_REJECT 0x0200 /* Reject route */
57 * This structure is passed from the kernel to user space by netlink
58 * routing/device announcements
61 struct netlink_rtinfo
63 unsigned long rtmsg_type;
64 struct sockaddr rtmsg_dst;
65 struct sockaddr rtmsg_gateway;
66 struct sockaddr rtmsg_genmask;
67 short rtmsg_flags;
68 short rtmsg_metric;
69 char rtmsg_device[16];
72 #define RTMSG_NEWROUTE 0x01
73 #define RTMSG_DELROUTE 0x02
74 #define RTMSG_NEWDEVICE 0x11
75 #define RTMSG_DELDEVICE 0x12
77 #endif /* _LINUX_ROUTE_H */