root/include/linux/route.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   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  *              for the purposes of compatibility only.
  12  *
  13  *              Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  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 _LINUX_ROUTE_H
  21 #define _LINUX_ROUTE_H
  22 
  23 #include <linux/if.h>
  24 
  25 
  26 /* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
  27 struct rtentry 
  28 {
  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                  */
  42 };
  43 
  44 
  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                   */
  55 
  56 /*
  57  *      This structure is passed from the kernel to user space by netlink
  58  *      routing/device announcements
  59  */
  60 
  61 struct netlink_rtinfo
  62 {
  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];
  70 };
  71 
  72 #define RTMSG_NEWROUTE          0x01
  73 #define RTMSG_DELROUTE          0x02
  74 #define RTMSG_NEWDEVICE         0x11
  75 #define RTMSG_DELDEVICE         0x12
  76 
  77 #endif  /* _LINUX_ROUTE_H */
  78 

/* [previous][next][first][last][top][bottom][index][help] */