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 * Definitions for the IP router. 7 * 8 * Version: @(#)route.h 1.0.4 05/27/93 9 * 10 * Authors: Ross Biro, <bir7@leland.Stanford.Edu> 11 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 12 * Fixes: 13 * Alan Cox : Reformatted. Added ip_rt_local() 14 * 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. 19 */ 20 #ifndef_ROUTE_H 21 #define_ROUTE_H 22
23
24 #include <linux/route.h>
25
26
27 /* This is an entry in the IP routing table. */ 28 structrtable 29 { 30 structrtable *rt_next;
31 unsignedlongrt_dst;
32 unsignedlongrt_mask;
33 unsignedlongrt_gateway;
34 unsignedcharrt_flags;
35 unsignedcharrt_metric;
36 shortrt_refcnt;
37 unsignedlongrt_use;
38 unsignedshort rt_mss, rt_mtu;
39 structdevice *rt_dev;
40 };
41
42
43 externvoidip_rt_flush(structdevice *dev);
44 externvoidip_rt_add(shortflags, unsignedlongaddr, unsignedlongmask,
45 unsignedlonggw, structdevice *dev);
46 externstructrtable *ip_rt_route(unsignedlongdaddr, structoptions *opt, unsignedlong *src_addr);
47 externstructrtable *ip_rt_local(unsignedlongdaddr, structoptions *opt, unsignedlong *src_addr);
48 externintrt_get_info(char * buffer, char **start, off_toffset, intlength);
49 externintip_rt_ioctl(unsignedintcmd, void *arg);
50
51 #endif/* _ROUTE_H */