1*e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2607ca46eSDavid Howells /* 3607ca46eSDavid Howells * INET An implementation of the TCP/IP protocol suite for the LINUX 4607ca46eSDavid Howells * operating system. INET is implemented using the BSD Socket 5607ca46eSDavid Howells * interface as the means of communication with the user level. 6607ca46eSDavid Howells * 7607ca46eSDavid Howells * Global definitions for the IP router interface. 8607ca46eSDavid Howells * 9607ca46eSDavid Howells * Version: @(#)route.h 1.0.3 05/27/93 10607ca46eSDavid Howells * 11607ca46eSDavid Howells * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988 12607ca46eSDavid Howells * for the purposes of compatibility only. 13607ca46eSDavid Howells * 14607ca46eSDavid Howells * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 15607ca46eSDavid Howells * 16607ca46eSDavid Howells * Changes: 17607ca46eSDavid Howells * Mike McLagan : Routing by source 18607ca46eSDavid Howells * 19607ca46eSDavid Howells * This program is free software; you can redistribute it and/or 20607ca46eSDavid Howells * modify it under the terms of the GNU General Public License 21607ca46eSDavid Howells * as published by the Free Software Foundation; either version 22607ca46eSDavid Howells * 2 of the License, or (at your option) any later version. 23607ca46eSDavid Howells */ 24607ca46eSDavid Howells #ifndef _LINUX_ROUTE_H 25607ca46eSDavid Howells #define _LINUX_ROUTE_H 26607ca46eSDavid Howells 27607ca46eSDavid Howells #include <linux/if.h> 28607ca46eSDavid Howells #include <linux/compiler.h> 29607ca46eSDavid Howells 30607ca46eSDavid Howells /* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ 31607ca46eSDavid Howells struct rtentry { 32607ca46eSDavid Howells unsigned long rt_pad1; 33607ca46eSDavid Howells struct sockaddr rt_dst; /* target address */ 34607ca46eSDavid Howells struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */ 35607ca46eSDavid Howells struct sockaddr rt_genmask; /* target network mask (IP) */ 36607ca46eSDavid Howells unsigned short rt_flags; 37607ca46eSDavid Howells short rt_pad2; 38607ca46eSDavid Howells unsigned long rt_pad3; 39607ca46eSDavid Howells void *rt_pad4; 40607ca46eSDavid Howells short rt_metric; /* +1 for binary compatibility! */ 41607ca46eSDavid Howells char __user *rt_dev; /* forcing the device at add */ 42607ca46eSDavid Howells unsigned long rt_mtu; /* per route MTU/Window */ 43607ca46eSDavid Howells #ifndef __KERNEL__ 44607ca46eSDavid Howells #define rt_mss rt_mtu /* Compatibility :-( */ 45607ca46eSDavid Howells #endif 46607ca46eSDavid Howells unsigned long rt_window; /* Window clamping */ 47607ca46eSDavid Howells unsigned short rt_irtt; /* Initial RTT */ 48607ca46eSDavid Howells }; 49607ca46eSDavid Howells 50607ca46eSDavid Howells 51607ca46eSDavid Howells #define RTF_UP 0x0001 /* route usable */ 52607ca46eSDavid Howells #define RTF_GATEWAY 0x0002 /* destination is a gateway */ 53607ca46eSDavid Howells #define RTF_HOST 0x0004 /* host entry (net otherwise) */ 54607ca46eSDavid Howells #define RTF_REINSTATE 0x0008 /* reinstate route after tmout */ 55607ca46eSDavid Howells #define RTF_DYNAMIC 0x0010 /* created dyn. (by redirect) */ 56607ca46eSDavid Howells #define RTF_MODIFIED 0x0020 /* modified dyn. (by redirect) */ 57607ca46eSDavid Howells #define RTF_MTU 0x0040 /* specific MTU for this route */ 58607ca46eSDavid Howells #define RTF_MSS RTF_MTU /* Compatibility :-( */ 59607ca46eSDavid Howells #define RTF_WINDOW 0x0080 /* per route window clamping */ 60607ca46eSDavid Howells #define RTF_IRTT 0x0100 /* Initial round trip time */ 61607ca46eSDavid Howells #define RTF_REJECT 0x0200 /* Reject route */ 62607ca46eSDavid Howells 63607ca46eSDavid Howells /* 64607ca46eSDavid Howells * <linux/ipv6_route.h> uses RTF values >= 64k 65607ca46eSDavid Howells */ 66607ca46eSDavid Howells 67607ca46eSDavid Howells 68607ca46eSDavid Howells 69607ca46eSDavid Howells #endif /* _LINUX_ROUTE_H */ 70607ca46eSDavid Howells 71