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