1*cda5da8dSAndroid Build Coastguard Worker /* 2*cda5da8dSAndroid Build Coastguard Worker * This file is auto-generated. Modifications will be lost. 3*cda5da8dSAndroid Build Coastguard Worker * 4*cda5da8dSAndroid Build Coastguard Worker * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5*cda5da8dSAndroid Build Coastguard Worker * for more information. 6*cda5da8dSAndroid Build Coastguard Worker */ 7*cda5da8dSAndroid Build Coastguard Worker #ifndef _UAPI_LINUX_IP_H 8*cda5da8dSAndroid Build Coastguard Worker #define _UAPI_LINUX_IP_H 9*cda5da8dSAndroid Build Coastguard Worker #include <linux/types.h> 10*cda5da8dSAndroid Build Coastguard Worker #include <linux/stddef.h> 11*cda5da8dSAndroid Build Coastguard Worker #include <asm/byteorder.h> 12*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_TOS_MASK 0x1E 13*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK) 14*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_LOWDELAY 0x10 15*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_THROUGHPUT 0x08 16*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_RELIABILITY 0x04 17*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_MINCOST 0x02 18*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_PREC_MASK 0xE0 19*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK) 20*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_PREC_NETCONTROL 0xe0 21*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_PREC_INTERNETCONTROL 0xc0 22*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_PREC_CRITIC_ECP 0xa0 23*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_PREC_FLASHOVERRIDE 0x80 24*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_PREC_FLASH 0x60 25*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_PREC_IMMEDIATE 0x40 26*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_PREC_PRIORITY 0x20 27*cda5da8dSAndroid Build Coastguard Worker #define IPTOS_PREC_ROUTINE 0x00 28*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_COPY 0x80 29*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_CLASS_MASK 0x60 30*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_NUMBER_MASK 0x1f 31*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_COPIED(o) ((o) & IPOPT_COPY) 32*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_CLASS(o) ((o) & IPOPT_CLASS_MASK) 33*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_NUMBER(o) ((o) & IPOPT_NUMBER_MASK) 34*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_CONTROL 0x00 35*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_RESERVED1 0x20 36*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_MEASUREMENT 0x40 37*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_RESERVED2 0x60 38*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_END (0 | IPOPT_CONTROL) 39*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_NOOP (1 | IPOPT_CONTROL) 40*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_SEC (2 | IPOPT_CONTROL | IPOPT_COPY) 41*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_LSRR (3 | IPOPT_CONTROL | IPOPT_COPY) 42*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_TIMESTAMP (4 | IPOPT_MEASUREMENT) 43*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_CIPSO (6 | IPOPT_CONTROL | IPOPT_COPY) 44*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_RR (7 | IPOPT_CONTROL) 45*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_SID (8 | IPOPT_CONTROL | IPOPT_COPY) 46*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_SSRR (9 | IPOPT_CONTROL | IPOPT_COPY) 47*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_RA (20 | IPOPT_CONTROL | IPOPT_COPY) 48*cda5da8dSAndroid Build Coastguard Worker #define IPVERSION 4 49*cda5da8dSAndroid Build Coastguard Worker #define MAXTTL 255 50*cda5da8dSAndroid Build Coastguard Worker #define IPDEFTTL 64 51*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_OPTVAL 0 52*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_OLEN 1 53*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_OFFSET 2 54*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_MINOFF 4 55*cda5da8dSAndroid Build Coastguard Worker #define MAX_IPOPTLEN 40 56*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_NOP IPOPT_NOOP 57*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_EOL IPOPT_END 58*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_TS IPOPT_TIMESTAMP 59*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_TS_TSONLY 0 60*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_TS_TSANDADDR 1 61*cda5da8dSAndroid Build Coastguard Worker #define IPOPT_TS_PRESPEC 3 62*cda5da8dSAndroid Build Coastguard Worker #define IPV4_BEET_PHMAXLEN 8 63*cda5da8dSAndroid Build Coastguard Worker struct iphdr { 64*cda5da8dSAndroid Build Coastguard Worker #ifdef __LITTLE_ENDIAN_BITFIELD 65*cda5da8dSAndroid Build Coastguard Worker __u8 ihl : 4, version : 4; 66*cda5da8dSAndroid Build Coastguard Worker #elif defined(__BIG_ENDIAN_BITFIELD) 67*cda5da8dSAndroid Build Coastguard Worker __u8 version : 4, ihl : 4; 68*cda5da8dSAndroid Build Coastguard Worker #else 69*cda5da8dSAndroid Build Coastguard Worker #error "Please fix <asm/byteorder.h>" 70*cda5da8dSAndroid Build Coastguard Worker #endif 71*cda5da8dSAndroid Build Coastguard Worker __u8 tos; 72*cda5da8dSAndroid Build Coastguard Worker __be16 tot_len; 73*cda5da8dSAndroid Build Coastguard Worker __be16 id; 74*cda5da8dSAndroid Build Coastguard Worker __be16 frag_off; 75*cda5da8dSAndroid Build Coastguard Worker __u8 ttl; 76*cda5da8dSAndroid Build Coastguard Worker __u8 protocol; 77*cda5da8dSAndroid Build Coastguard Worker __sum16 check; 78*cda5da8dSAndroid Build Coastguard Worker __struct_group(, addrs,, __be32 saddr; 79*cda5da8dSAndroid Build Coastguard Worker __be32 daddr; 80*cda5da8dSAndroid Build Coastguard Worker ); 81*cda5da8dSAndroid Build Coastguard Worker }; 82*cda5da8dSAndroid Build Coastguard Worker struct ip_auth_hdr { 83*cda5da8dSAndroid Build Coastguard Worker __u8 nexthdr; 84*cda5da8dSAndroid Build Coastguard Worker __u8 hdrlen; 85*cda5da8dSAndroid Build Coastguard Worker __be16 reserved; 86*cda5da8dSAndroid Build Coastguard Worker __be32 spi; 87*cda5da8dSAndroid Build Coastguard Worker __be32 seq_no; 88*cda5da8dSAndroid Build Coastguard Worker __u8 auth_data[]; 89*cda5da8dSAndroid Build Coastguard Worker }; 90*cda5da8dSAndroid Build Coastguard Worker struct ip_esp_hdr { 91*cda5da8dSAndroid Build Coastguard Worker __be32 spi; 92*cda5da8dSAndroid Build Coastguard Worker __be32 seq_no; 93*cda5da8dSAndroid Build Coastguard Worker __u8 enc_data[]; 94*cda5da8dSAndroid Build Coastguard Worker }; 95*cda5da8dSAndroid Build Coastguard Worker struct ip_comp_hdr { 96*cda5da8dSAndroid Build Coastguard Worker __u8 nexthdr; 97*cda5da8dSAndroid Build Coastguard Worker __u8 flags; 98*cda5da8dSAndroid Build Coastguard Worker __be16 cpi; 99*cda5da8dSAndroid Build Coastguard Worker }; 100*cda5da8dSAndroid Build Coastguard Worker struct ip_beet_phdr { 101*cda5da8dSAndroid Build Coastguard Worker __u8 nexthdr; 102*cda5da8dSAndroid Build Coastguard Worker __u8 hdrlen; 103*cda5da8dSAndroid Build Coastguard Worker __u8 padlen; 104*cda5da8dSAndroid Build Coastguard Worker __u8 reserved; 105*cda5da8dSAndroid Build Coastguard Worker }; 106*cda5da8dSAndroid Build Coastguard Worker enum { 107*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_FORWARDING = 1, 108*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_MC_FORWARDING, 109*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_PROXY_ARP, 110*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_ACCEPT_REDIRECTS, 111*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_SECURE_REDIRECTS, 112*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_SEND_REDIRECTS, 113*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_SHARED_MEDIA, 114*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_RP_FILTER, 115*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_ACCEPT_SOURCE_ROUTE, 116*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_BOOTP_RELAY, 117*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_LOG_MARTIANS, 118*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_TAG, 119*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_ARPFILTER, 120*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_MEDIUM_ID, 121*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_NOXFRM, 122*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_NOPOLICY, 123*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_FORCE_IGMP_VERSION, 124*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_ARP_ANNOUNCE, 125*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_ARP_IGNORE, 126*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_PROMOTE_SECONDARIES, 127*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_ARP_ACCEPT, 128*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_ARP_NOTIFY, 129*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_ACCEPT_LOCAL, 130*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_SRC_VMARK, 131*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_PROXY_ARP_PVLAN, 132*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_ROUTE_LOCALNET, 133*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_IGMPV2_UNSOLICITED_REPORT_INTERVAL, 134*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL, 135*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN, 136*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_DROP_UNICAST_IN_L2_MULTICAST, 137*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_DROP_GRATUITOUS_ARP, 138*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_BC_FORWARDING, 139*cda5da8dSAndroid Build Coastguard Worker IPV4_DEVCONF_ARP_EVICT_NOCARRIER, 140*cda5da8dSAndroid Build Coastguard Worker __IPV4_DEVCONF_MAX 141*cda5da8dSAndroid Build Coastguard Worker }; 142*cda5da8dSAndroid Build Coastguard Worker #define IPV4_DEVCONF_MAX (__IPV4_DEVCONF_MAX - 1) 143*cda5da8dSAndroid Build Coastguard Worker #endif 144