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. 5 * 6 * Global definitions for the IP router interface. 7 * 8 * Version: @(#)route.h 1.0.3 05/27/93 9 * 10 * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988 11 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 12 * 13 * This program is free software; you can redistribute it and/or 14 * modify it under the terms of the GNU General Public License 15 * as published by the Free Software Foundation; either version 16 * 2 of the License, or (at your option) any later version. 17 */ 18 #ifndef _LINUX_ROUTE_H 19 #define _LINUX_ROUTE_H 20 21 #include <linux/if.h> 22 23 24 /* This structure gets passed by the SIOCADDRTOLD and SIOCDELRTOLD calls. */ 25 26 struct old_rtentry { 27 unsigned long rt_genmask; 28 struct sockaddr rt_dst; 29 struct sockaddr rt_gateway; 30 short rt_flags; 31 short rt_refcnt; 32 unsigned long rt_use; 33 char *rt_dev; 34 }; 35 36 /* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ 37 struct rtentry { 38 unsigned long rt_hash; /* hash key for lookups */ 39 struct sockaddr rt_dst; /* target address */ 40 struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */ 41 struct sockaddr rt_genmask; /* target network mask (IP) */ 42 short rt_flags; 43 short rt_refcnt; 44 unsigned long rt_use; 45 struct ifnet *rt_ifp; 46 short rt_metric; /* +1 for binary compatibility! */ 47 char *rt_dev; /* forcing the device at add */ 48 unsigned long rt_mss; /* per route MTU/Window */ 49 unsigned long rt_window; /* Window clamping */ 50 }; 51 52 53 #define RTF_UP 0x0001 /* route usable */ 54 #define RTF_GATEWAY 0x0002 /* destination is a gateway */ 55 #define RTF_HOST 0x0004 /* host entry (net otherwise) */ 56 #define RTF_REINSTATE 0x0008 /* reinstate route after tmout */ 57 #define RTF_DYNAMIC 0x0010 /* created dyn. (by redirect) */ 58 #define RTF_MODIFIED 0x0020 /* modified dyn. (by redirect) */ 59 #define RTF_MSS 0x0040 /* specific MSS for this route */ 60 #define RTF_WINDOW 0x0080 /* per route window clamping */ 61 62 /* 63 * REMOVE THESE BY 1.2.0 !!!!!!!!!!!!!!!!! 64 */ 65 66 #define RTF_MTU RTF_MSS 67 #define rt_mtu rt_mss 68 69 #endif /* _LINUX_ROUTE_H */