Go to the documentation of this file.
18 #ifndef _UAPI_LINUX_IN_H
19 #define _UAPI_LINUX_IN_H
21 #include <linux/types.h>
22 #include <linux/socket.h>
64 #define IP_ROUTER_ALERT 5
68 #define IP_PKTOPTIONS 9
69 #define IP_MTU_DISCOVER 10
74 #define IP_FREEBIND 15
75 #define IP_IPSEC_POLICY 16
76 #define IP_XFRM_POLICY 17
78 #define IP_TRANSPARENT 19
81 #define IP_RECVRETOPTS IP_RETOPTS
84 #define IP_ORIGDSTADDR 20
85 #define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
88 #define IP_NODEFRAG 22
91 #define IP_PMTUDISC_DONT 0
92 #define IP_PMTUDISC_WANT 1
93 #define IP_PMTUDISC_DO 2
94 #define IP_PMTUDISC_PROBE 3
96 #define IP_MULTICAST_IF 32
97 #define IP_MULTICAST_TTL 33
98 #define IP_MULTICAST_LOOP 34
99 #define IP_ADD_MEMBERSHIP 35
100 #define IP_DROP_MEMBERSHIP 36
101 #define IP_UNBLOCK_SOURCE 37
102 #define IP_BLOCK_SOURCE 38
103 #define IP_ADD_SOURCE_MEMBERSHIP 39
104 #define IP_DROP_SOURCE_MEMBERSHIP 40
105 #define IP_MSFILTER 41
106 #define MCAST_JOIN_GROUP 42
107 #define MCAST_BLOCK_SOURCE 43
108 #define MCAST_UNBLOCK_SOURCE 44
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 #define IP_MULTICAST_ALL 49
114 #define IP_UNICAST_IF 50
116 #define MCAST_EXCLUDE 0
117 #define MCAST_INCLUDE 1
120 #define IP_DEFAULT_MULTICAST_TTL 1
121 #define IP_DEFAULT_MULTICAST_LOOP 1
150 #define IP_MSFILTER_SIZE(numsrc) \
151 (sizeof(struct ip_msfilter) - sizeof(__u32) \
152 + (numsrc) * sizeof(__u32))
173 #define GROUP_FILTER_SIZE(numsrc) \
174 (sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) \
175 + (numsrc) * sizeof(struct __kernel_sockaddr_storage))
184 #define __SOCK_SIZE__ 16
192 sizeof(
unsigned short int) -
sizeof(
struct in_addr)];
194 #define sin_zero __pad
202 #define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0)
203 #define IN_CLASSA_NET 0xff000000
204 #define IN_CLASSA_NSHIFT 24
205 #define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET)
206 #define IN_CLASSA_MAX 128
208 #define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000)
209 #define IN_CLASSB_NET 0xffff0000
210 #define IN_CLASSB_NSHIFT 16
211 #define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET)
212 #define IN_CLASSB_MAX 65536
214 #define IN_CLASSC(a) ((((long int) (a)) & 0xe0000000) == 0xc0000000)
215 #define IN_CLASSC_NET 0xffffff00
216 #define IN_CLASSC_NSHIFT 8
217 #define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET)
219 #define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000)
220 #define IN_MULTICAST(a) IN_CLASSD(a)
221 #define IN_MULTICAST_NET 0xF0000000
223 #define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
224 #define IN_BADCLASS(a) IN_EXPERIMENTAL((a))
227 #define INADDR_ANY ((unsigned long int) 0x00000000)
230 #define INADDR_BROADCAST ((unsigned long int) 0xffffffff)
233 #define INADDR_NONE ((unsigned long int) 0xffffffff)
236 #define IN_LOOPBACKNET 127
239 #define INADDR_LOOPBACK 0x7f000001
240 #define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000)
243 #define INADDR_UNSPEC_GROUP 0xe0000000U
244 #define INADDR_ALLHOSTS_GROUP 0xe0000001U
245 #define INADDR_ALLRTRS_GROUP 0xe0000002U
246 #define INADDR_MAX_LOCAL_GROUP 0xe00000ffU
250 #include <asm/byteorder.h>