Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
0002 /*
0003  * INET     An implementation of the TCP/IP protocol suite for the LINUX
0004  *      operating system.  INET is implemented using the  BSD Socket
0005  *      interface as the means of communication with the user level.
0006  *
0007  *      Global definitions for the IP router interface.
0008  *
0009  * Version: @(#)route.h 1.0.3   05/27/93
0010  *
0011  * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988
0012  *      for the purposes of compatibility only.
0013  *
0014  *      Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
0015  *
0016  * Changes:
0017  *              Mike McLagan    :       Routing by source
0018  *
0019  *      This program is free software; you can redistribute it and/or
0020  *      modify it under the terms of the GNU General Public License
0021  *      as published by the Free Software Foundation; either version
0022  *      2 of the License, or (at your option) any later version.
0023  */
0024 #ifndef _LINUX_ROUTE_H
0025 #define _LINUX_ROUTE_H
0026 
0027 #include <linux/if.h>
0028 #include <linux/compiler.h>
0029 
0030 /* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
0031 struct rtentry {
0032     unsigned long   rt_pad1;
0033     struct sockaddr rt_dst;     /* target address       */
0034     struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY)   */
0035     struct sockaddr rt_genmask; /* target network mask (IP) */
0036     unsigned short  rt_flags;
0037     short       rt_pad2;
0038     unsigned long   rt_pad3;
0039     void        *rt_pad4;
0040     short       rt_metric;  /* +1 for binary compatibility! */
0041     char __user *rt_dev;    /* forcing the device at add    */
0042     unsigned long   rt_mtu;     /* per route MTU/Window     */
0043 #ifndef __KERNEL__
0044 #define rt_mss  rt_mtu          /* Compatibility :-(            */
0045 #endif
0046     unsigned long   rt_window;  /* Window clamping      */
0047     unsigned short  rt_irtt;    /* Initial RTT          */
0048 };
0049 
0050 
0051 #define RTF_UP      0x0001      /* route usable         */
0052 #define RTF_GATEWAY 0x0002      /* destination is a gateway */
0053 #define RTF_HOST    0x0004      /* host entry (net otherwise)   */
0054 #define RTF_REINSTATE   0x0008      /* reinstate route after tmout  */
0055 #define RTF_DYNAMIC 0x0010      /* created dyn. (by redirect)   */
0056 #define RTF_MODIFIED    0x0020      /* modified dyn. (by redirect)  */
0057 #define RTF_MTU     0x0040      /* specific MTU for this route  */
0058 #define RTF_MSS     RTF_MTU     /* Compatibility :-(        */
0059 #define RTF_WINDOW  0x0080      /* per route window clamping    */
0060 #define RTF_IRTT    0x0100      /* Initial round trip time  */
0061 #define RTF_REJECT  0x0200      /* Reject route         */
0062 
0063 /*
0064  *  <linux/ipv6_route.h> uses RTF values >= 64k
0065  */
0066 
0067 
0068 
0069 #endif  /* _LINUX_ROUTE_H */
0070