1/**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19#ifndef _UAPI_LINUX_IN_H 20#define _UAPI_LINUX_IN_H 21#include <linux/types.h> 22#include <linux/socket.h> 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24enum { 25 IPPROTO_IP = 0, 26#define IPPROTO_IP IPPROTO_IP 27 IPPROTO_ICMP = 1, 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29#define IPPROTO_ICMP IPPROTO_ICMP 30 IPPROTO_IGMP = 2, 31#define IPPROTO_IGMP IPPROTO_IGMP 32 IPPROTO_IPIP = 4, 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34#define IPPROTO_IPIP IPPROTO_IPIP 35 IPPROTO_TCP = 6, 36#define IPPROTO_TCP IPPROTO_TCP 37 IPPROTO_EGP = 8, 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39#define IPPROTO_EGP IPPROTO_EGP 40 IPPROTO_PUP = 12, 41#define IPPROTO_PUP IPPROTO_PUP 42 IPPROTO_UDP = 17, 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44#define IPPROTO_UDP IPPROTO_UDP 45 IPPROTO_IDP = 22, 46#define IPPROTO_IDP IPPROTO_IDP 47 IPPROTO_TP = 29, 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49#define IPPROTO_TP IPPROTO_TP 50 IPPROTO_DCCP = 33, 51#define IPPROTO_DCCP IPPROTO_DCCP 52 IPPROTO_IPV6 = 41, 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54#define IPPROTO_IPV6 IPPROTO_IPV6 55 IPPROTO_RSVP = 46, 56#define IPPROTO_RSVP IPPROTO_RSVP 57 IPPROTO_GRE = 47, 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59#define IPPROTO_GRE IPPROTO_GRE 60 IPPROTO_ESP = 50, 61#define IPPROTO_ESP IPPROTO_ESP 62 IPPROTO_AH = 51, 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64#define IPPROTO_AH IPPROTO_AH 65 IPPROTO_MTP = 92, 66#define IPPROTO_MTP IPPROTO_MTP 67 IPPROTO_BEETPH = 94, 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69#define IPPROTO_BEETPH IPPROTO_BEETPH 70 IPPROTO_ENCAP = 98, 71#define IPPROTO_ENCAP IPPROTO_ENCAP 72 IPPROTO_PIM = 103, 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74#define IPPROTO_PIM IPPROTO_PIM 75 IPPROTO_COMP = 108, 76#define IPPROTO_COMP IPPROTO_COMP 77 IPPROTO_SCTP = 132, 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79#define IPPROTO_SCTP IPPROTO_SCTP 80 IPPROTO_UDPLITE = 136, 81#define IPPROTO_UDPLITE IPPROTO_UDPLITE 82 IPPROTO_RAW = 255, 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84#define IPPROTO_RAW IPPROTO_RAW 85 IPPROTO_MAX 86}; 87struct in_addr { 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 __be32 s_addr; 90}; 91#define IP_TOS 1 92#define IP_TTL 2 93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94#define IP_HDRINCL 3 95#define IP_OPTIONS 4 96#define IP_ROUTER_ALERT 5 97#define IP_RECVOPTS 6 98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99#define IP_RETOPTS 7 100#define IP_PKTINFO 8 101#define IP_PKTOPTIONS 9 102#define IP_MTU_DISCOVER 10 103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104#define IP_RECVERR 11 105#define IP_RECVTTL 12 106#define IP_RECVTOS 13 107#define IP_MTU 14 108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109#define IP_FREEBIND 15 110#define IP_IPSEC_POLICY 16 111#define IP_XFRM_POLICY 17 112#define IP_PASSSEC 18 113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114#define IP_TRANSPARENT 19 115#define IP_RECVRETOPTS IP_RETOPTS 116#define IP_ORIGDSTADDR 20 117#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR 118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119#define IP_MINTTL 21 120#define IP_NODEFRAG 22 121#define IP_PMTUDISC_DONT 0 122#define IP_PMTUDISC_WANT 1 123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124#define IP_PMTUDISC_DO 2 125#define IP_PMTUDISC_PROBE 3 126#define IP_PMTUDISC_INTERFACE 4 127#define IP_MULTICAST_IF 32 128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129#define IP_MULTICAST_TTL 33 130#define IP_MULTICAST_LOOP 34 131#define IP_ADD_MEMBERSHIP 35 132#define IP_DROP_MEMBERSHIP 36 133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134#define IP_UNBLOCK_SOURCE 37 135#define IP_BLOCK_SOURCE 38 136#define IP_ADD_SOURCE_MEMBERSHIP 39 137#define IP_DROP_SOURCE_MEMBERSHIP 40 138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139#define IP_MSFILTER 41 140#define MCAST_JOIN_GROUP 42 141#define MCAST_BLOCK_SOURCE 43 142#define MCAST_UNBLOCK_SOURCE 44 143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144#define MCAST_LEAVE_GROUP 45 145#define MCAST_JOIN_SOURCE_GROUP 46 146#define MCAST_LEAVE_SOURCE_GROUP 47 147#define MCAST_MSFILTER 48 148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149#define IP_MULTICAST_ALL 49 150#define IP_UNICAST_IF 50 151#define MCAST_EXCLUDE 0 152#define MCAST_INCLUDE 1 153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154#define IP_DEFAULT_MULTICAST_TTL 1 155#define IP_DEFAULT_MULTICAST_LOOP 1 156struct ip_mreq { 157 struct in_addr imr_multiaddr; 158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 struct in_addr imr_interface; 160}; 161struct ip_mreqn { 162 struct in_addr imr_multiaddr; 163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 struct in_addr imr_address; 165 int imr_ifindex; 166}; 167struct ip_mreq_source { 168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169 __be32 imr_multiaddr; 170 __be32 imr_interface; 171 __be32 imr_sourceaddr; 172}; 173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174struct ip_msfilter { 175 __be32 imsf_multiaddr; 176 __be32 imsf_interface; 177 __u32 imsf_fmode; 178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179 __u32 imsf_numsrc; 180 __be32 imsf_slist[1]; 181}; 182#define IP_MSFILTER_SIZE(numsrc) (sizeof(struct ip_msfilter) - sizeof(__u32) + (numsrc) * sizeof(__u32)) 183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184struct group_req { 185 __u32 gr_interface; 186 struct __kernel_sockaddr_storage gr_group; 187}; 188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189struct group_source_req { 190 __u32 gsr_interface; 191 struct __kernel_sockaddr_storage gsr_group; 192 struct __kernel_sockaddr_storage gsr_source; 193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194}; 195struct group_filter { 196 __u32 gf_interface; 197 struct __kernel_sockaddr_storage gf_group; 198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199 __u32 gf_fmode; 200 __u32 gf_numsrc; 201 struct __kernel_sockaddr_storage gf_slist[1]; 202}; 203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 204#define GROUP_FILTER_SIZE(numsrc) (sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) + (numsrc) * sizeof(struct __kernel_sockaddr_storage)) 205struct in_pktinfo { 206 int ipi_ifindex; 207 struct in_addr ipi_spec_dst; 208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 209 struct in_addr ipi_addr; 210}; 211#define __SOCK_SIZE__ 16 212struct sockaddr_in { 213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 214 __kernel_sa_family_t sin_family; 215 __be16 sin_port; 216 struct in_addr sin_addr; 217 unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) - 218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 219 sizeof(unsigned short int) - sizeof(struct in_addr)]; 220}; 221#define sin_zero __pad 222#define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0) 223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 224#define IN_CLASSA_NET 0xff000000 225#define IN_CLASSA_NSHIFT 24 226#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET) 227#define IN_CLASSA_MAX 128 228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 229#define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000) 230#define IN_CLASSB_NET 0xffff0000 231#define IN_CLASSB_NSHIFT 16 232#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET) 233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 234#define IN_CLASSB_MAX 65536 235#define IN_CLASSC(a) ((((long int) (a)) & 0xe0000000) == 0xc0000000) 236#define IN_CLASSC_NET 0xffffff00 237#define IN_CLASSC_NSHIFT 8 238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 239#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET) 240#define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000) 241#define IN_MULTICAST(a) IN_CLASSD(a) 242#define IN_MULTICAST_NET 0xF0000000 243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 244#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000) 245#define IN_BADCLASS(a) IN_EXPERIMENTAL((a)) 246#define INADDR_ANY ((unsigned long int) 0x00000000) 247#define INADDR_BROADCAST ((unsigned long int) 0xffffffff) 248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 249#define INADDR_NONE ((unsigned long int) 0xffffffff) 250#define IN_LOOPBACKNET 127 251#define INADDR_LOOPBACK 0x7f000001 252#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000) 253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 254#define INADDR_UNSPEC_GROUP 0xe0000000U 255#define INADDR_ALLHOSTS_GROUP 0xe0000001U 256#define INADDR_ALLRTRS_GROUP 0xe0000002U 257#define INADDR_MAX_LOCAL_GROUP 0xe00000ffU 258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 259#include <asm/byteorder.h> 260#endif 261