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 */ 24 enum { 25 IPPROTO_IP = 0, 26 IPPROTO_ICMP = 1, 27 IPPROTO_IGMP = 2, 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 IPPROTO_IPIP = 4, 30 IPPROTO_TCP = 6, 31 IPPROTO_EGP = 8, 32 IPPROTO_PUP = 12, 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 IPPROTO_UDP = 17, 35 IPPROTO_IDP = 22, 36 IPPROTO_DCCP = 33, 37 IPPROTO_RSVP = 46, 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 IPPROTO_GRE = 47, 40 IPPROTO_IPV6 = 41, 41 IPPROTO_ESP = 50, 42 IPPROTO_AH = 51, 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 IPPROTO_BEETPH = 94, 45 IPPROTO_PIM = 103, 46 IPPROTO_COMP = 108, 47 IPPROTO_SCTP = 132, 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 IPPROTO_UDPLITE = 136, 50 IPPROTO_RAW = 255, 51 IPPROTO_MAX 52 }; 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 struct in_addr { 55 __be32 s_addr; 56 }; 57 #define IP_TOS 1 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 #define IP_TTL 2 60 #define IP_HDRINCL 3 61 #define IP_OPTIONS 4 62 #define IP_ROUTER_ALERT 5 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 #define IP_RECVOPTS 6 65 #define IP_RETOPTS 7 66 #define IP_PKTINFO 8 67 #define IP_PKTOPTIONS 9 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 #define IP_MTU_DISCOVER 10 70 #define IP_RECVERR 11 71 #define IP_RECVTTL 12 72 #define IP_RECVTOS 13 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 #define IP_MTU 14 75 #define IP_FREEBIND 15 76 #define IP_IPSEC_POLICY 16 77 #define IP_XFRM_POLICY 17 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 #define IP_PASSSEC 18 80 #define IP_TRANSPARENT 19 81 #define IP_RECVRETOPTS IP_RETOPTS 82 #define IP_ORIGDSTADDR 20 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 #define IP_RECVORIGDSTADDR IP_ORIGDSTADDR 85 #define IP_MINTTL 21 86 #define IP_NODEFRAG 22 87 #define IP_PMTUDISC_DONT 0 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 #define IP_PMTUDISC_WANT 1 90 #define IP_PMTUDISC_DO 2 91 #define IP_PMTUDISC_PROBE 3 92 #define IP_MULTICAST_IF 32 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 #define IP_MULTICAST_TTL 33 95 #define IP_MULTICAST_LOOP 34 96 #define IP_ADD_MEMBERSHIP 35 97 #define IP_DROP_MEMBERSHIP 36 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 #define IP_UNBLOCK_SOURCE 37 100 #define IP_BLOCK_SOURCE 38 101 #define IP_ADD_SOURCE_MEMBERSHIP 39 102 #define IP_DROP_SOURCE_MEMBERSHIP 40 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 #define IP_MSFILTER 41 105 #define MCAST_JOIN_GROUP 42 106 #define MCAST_BLOCK_SOURCE 43 107 #define MCAST_UNBLOCK_SOURCE 44 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 #define MCAST_LEAVE_GROUP 45 110 #define MCAST_JOIN_SOURCE_GROUP 46 111 #define MCAST_LEAVE_SOURCE_GROUP 47 112 #define MCAST_MSFILTER 48 113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 #define IP_MULTICAST_ALL 49 115 #define IP_UNICAST_IF 50 116 #define MCAST_EXCLUDE 0 117 #define MCAST_INCLUDE 1 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 #define IP_DEFAULT_MULTICAST_TTL 1 120 #define IP_DEFAULT_MULTICAST_LOOP 1 121 struct ip_mreq { 122 struct in_addr imr_multiaddr; 123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 struct in_addr imr_interface; 125 }; 126 struct ip_mreqn { 127 struct in_addr imr_multiaddr; 128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 struct in_addr imr_address; 130 int imr_ifindex; 131 }; 132 struct ip_mreq_source { 133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 __be32 imr_multiaddr; 135 __be32 imr_interface; 136 __be32 imr_sourceaddr; 137 }; 138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 struct ip_msfilter { 140 __be32 imsf_multiaddr; 141 __be32 imsf_interface; 142 __u32 imsf_fmode; 143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 __u32 imsf_numsrc; 145 __be32 imsf_slist[1]; 146 }; 147 #define IP_MSFILTER_SIZE(numsrc) (sizeof(struct ip_msfilter) - sizeof(__u32) + (numsrc) * sizeof(__u32)) 148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 struct group_req { 150 __u32 gr_interface; 151 struct __kernel_sockaddr_storage gr_group; 152 }; 153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 struct group_source_req { 155 __u32 gsr_interface; 156 struct __kernel_sockaddr_storage gsr_group; 157 struct __kernel_sockaddr_storage gsr_source; 158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 }; 160 struct group_filter { 161 __u32 gf_interface; 162 struct __kernel_sockaddr_storage gf_group; 163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 __u32 gf_fmode; 165 __u32 gf_numsrc; 166 struct __kernel_sockaddr_storage gf_slist[1]; 167 }; 168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169 #define GROUP_FILTER_SIZE(numsrc) (sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) + (numsrc) * sizeof(struct __kernel_sockaddr_storage)) 170 struct in_pktinfo { 171 int ipi_ifindex; 172 struct in_addr ipi_spec_dst; 173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174 struct in_addr ipi_addr; 175 }; 176 #define __SOCK_SIZE__ 16 177 struct sockaddr_in { 178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179 __kernel_sa_family_t sin_family; 180 __be16 sin_port; 181 struct in_addr sin_addr; 182 unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) - 183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184 sizeof(unsigned short int) - sizeof(struct in_addr)]; 185 }; 186 #define sin_zero __pad 187 #define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0) 188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189 #define IN_CLASSA_NET 0xff000000 190 #define IN_CLASSA_NSHIFT 24 191 #define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET) 192 #define IN_CLASSA_MAX 128 193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194 #define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000) 195 #define IN_CLASSB_NET 0xffff0000 196 #define IN_CLASSB_NSHIFT 16 197 #define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET) 198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199 #define IN_CLASSB_MAX 65536 200 #define IN_CLASSC(a) ((((long int) (a)) & 0xe0000000) == 0xc0000000) 201 #define IN_CLASSC_NET 0xffffff00 202 #define IN_CLASSC_NSHIFT 8 203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 204 #define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET) 205 #define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000) 206 #define IN_MULTICAST(a) IN_CLASSD(a) 207 #define IN_MULTICAST_NET 0xF0000000 208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 209 #define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000) 210 #define IN_BADCLASS(a) IN_EXPERIMENTAL((a)) 211 #define INADDR_ANY ((unsigned long int) 0x00000000) 212 #define INADDR_BROADCAST ((unsigned long int) 0xffffffff) 213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 214 #define INADDR_NONE ((unsigned long int) 0xffffffff) 215 #define IN_LOOPBACKNET 127 216 #define INADDR_LOOPBACK 0x7f000001 217 #define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000) 218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 219 #define INADDR_UNSPEC_GROUP 0xe0000000U 220 #define INADDR_ALLHOSTS_GROUP 0xe0000001U 221 #define INADDR_ALLRTRS_GROUP 0xe0000002U 222 #define INADDR_MAX_LOCAL_GROUP 0xe00000ffU 223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 224 #include <asm/byteorder.h> 225 #endif 226