1# Generated by h2py from /usr/include/netinet/in.h
2
3# Included from sys/appleapiopts.h
4IPPROTO_IP = 0
5IPPROTO_HOPOPTS = 0
6IPPROTO_ICMP = 1
7IPPROTO_IGMP = 2
8IPPROTO_GGP = 3
9IPPROTO_IPV4 = 4
10IPPROTO_IPIP = IPPROTO_IPV4
11IPPROTO_TCP = 6
12IPPROTO_ST = 7
13IPPROTO_EGP = 8
14IPPROTO_PIGP = 9
15IPPROTO_RCCMON = 10
16IPPROTO_NVPII = 11
17IPPROTO_PUP = 12
18IPPROTO_ARGUS = 13
19IPPROTO_EMCON = 14
20IPPROTO_XNET = 15
21IPPROTO_CHAOS = 16
22IPPROTO_UDP = 17
23IPPROTO_MUX = 18
24IPPROTO_MEAS = 19
25IPPROTO_HMP = 20
26IPPROTO_PRM = 21
27IPPROTO_IDP = 22
28IPPROTO_TRUNK1 = 23
29IPPROTO_TRUNK2 = 24
30IPPROTO_LEAF1 = 25
31IPPROTO_LEAF2 = 26
32IPPROTO_RDP = 27
33IPPROTO_IRTP = 28
34IPPROTO_TP = 29
35IPPROTO_BLT = 30
36IPPROTO_NSP = 31
37IPPROTO_INP = 32
38IPPROTO_SEP = 33
39IPPROTO_3PC = 34
40IPPROTO_IDPR = 35
41IPPROTO_XTP = 36
42IPPROTO_DDP = 37
43IPPROTO_CMTP = 38
44IPPROTO_TPXX = 39
45IPPROTO_IL = 40
46IPPROTO_IPV6 = 41
47IPPROTO_SDRP = 42
48IPPROTO_ROUTING = 43
49IPPROTO_FRAGMENT = 44
50IPPROTO_IDRP = 45
51IPPROTO_RSVP = 46
52IPPROTO_GRE = 47
53IPPROTO_MHRP = 48
54IPPROTO_BHA = 49
55IPPROTO_ESP = 50
56IPPROTO_AH = 51
57IPPROTO_INLSP = 52
58IPPROTO_SWIPE = 53
59IPPROTO_NHRP = 54
60IPPROTO_ICMPV6 = 58
61IPPROTO_NONE = 59
62IPPROTO_DSTOPTS = 60
63IPPROTO_AHIP = 61
64IPPROTO_CFTP = 62
65IPPROTO_HELLO = 63
66IPPROTO_SATEXPAK = 64
67IPPROTO_KRYPTOLAN = 65
68IPPROTO_RVD = 66
69IPPROTO_IPPC = 67
70IPPROTO_ADFS = 68
71IPPROTO_SATMON = 69
72IPPROTO_VISA = 70
73IPPROTO_IPCV = 71
74IPPROTO_CPNX = 72
75IPPROTO_CPHB = 73
76IPPROTO_WSN = 74
77IPPROTO_PVP = 75
78IPPROTO_BRSATMON = 76
79IPPROTO_ND = 77
80IPPROTO_WBMON = 78
81IPPROTO_WBEXPAK = 79
82IPPROTO_EON = 80
83IPPROTO_VMTP = 81
84IPPROTO_SVMTP = 82
85IPPROTO_VINES = 83
86IPPROTO_TTP = 84
87IPPROTO_IGP = 85
88IPPROTO_DGP = 86
89IPPROTO_TCF = 87
90IPPROTO_IGRP = 88
91IPPROTO_OSPFIGP = 89
92IPPROTO_SRPC = 90
93IPPROTO_LARP = 91
94IPPROTO_MTP = 92
95IPPROTO_AX25 = 93
96IPPROTO_IPEIP = 94
97IPPROTO_MICP = 95
98IPPROTO_SCCSP = 96
99IPPROTO_ETHERIP = 97
100IPPROTO_ENCAP = 98
101IPPROTO_APES = 99
102IPPROTO_GMTP = 100
103IPPROTO_IPCOMP = 108
104IPPROTO_PIM = 103
105IPPROTO_PGM = 113
106IPPROTO_DIVERT = 254
107IPPROTO_RAW = 255
108IPPROTO_MAX = 256
109IPPROTO_DONE = 257
110IPPORT_RESERVED = 1024
111IPPORT_USERRESERVED = 5000
112IPPORT_HIFIRSTAUTO = 49152
113IPPORT_HILASTAUTO = 65535
114IPPORT_RESERVEDSTART = 600
115def IN_CLASSA(i): return (((u_int32_t)(i) & 0x80000000) == 0)
116
117IN_CLASSA_NET = 0xff000000
118IN_CLASSA_NSHIFT = 24
119IN_CLASSA_HOST = 0x00ffffff
120IN_CLASSA_MAX = 128
121def IN_CLASSB(i): return (((u_int32_t)(i) & 0xc0000000) == 0x80000000)
122
123IN_CLASSB_NET = 0xffff0000
124IN_CLASSB_NSHIFT = 16
125IN_CLASSB_HOST = 0x0000ffff
126IN_CLASSB_MAX = 65536
127def IN_CLASSC(i): return (((u_int32_t)(i) & 0xe0000000) == 0xc0000000)
128
129IN_CLASSC_NET = 0xffffff00
130IN_CLASSC_NSHIFT = 8
131IN_CLASSC_HOST = 0x000000ff
132def IN_CLASSD(i): return (((u_int32_t)(i) & 0xf0000000) == 0xe0000000)
133
134IN_CLASSD_NET = 0xf0000000
135IN_CLASSD_NSHIFT = 28
136IN_CLASSD_HOST = 0x0fffffff
137def IN_MULTICAST(i): return IN_CLASSD(i)
138
139def IN_EXPERIMENTAL(i): return (((u_int32_t)(i) & 0xf0000000) == 0xf0000000)
140
141def IN_BADCLASS(i): return (((u_int32_t)(i) & 0xf0000000) == 0xf0000000)
142
143INADDR_NONE = 0xffffffff
144def IN_LINKLOCAL(i): return (((u_int32_t)(i) & IN_CLASSB_NET) == IN_LINKLOCALNETNUM)
145
146IN_LOOPBACKNET = 127
147INET_ADDRSTRLEN = 16
148IP_OPTIONS = 1
149IP_HDRINCL = 2
150IP_TOS = 3
151IP_TTL = 4
152IP_RECVOPTS = 5
153IP_RECVRETOPTS = 6
154IP_RECVDSTADDR = 7
155IP_RETOPTS = 8
156IP_MULTICAST_IF = 9
157IP_MULTICAST_TTL = 10
158IP_MULTICAST_LOOP = 11
159IP_ADD_MEMBERSHIP = 12
160IP_DROP_MEMBERSHIP = 13
161IP_MULTICAST_VIF = 14
162IP_RSVP_ON = 15
163IP_RSVP_OFF = 16
164IP_RSVP_VIF_ON = 17
165IP_RSVP_VIF_OFF = 18
166IP_PORTRANGE = 19
167IP_RECVIF = 20
168IP_IPSEC_POLICY = 21
169IP_FAITH = 22
170IP_STRIPHDR = 23
171IP_FW_ADD = 40
172IP_FW_DEL = 41
173IP_FW_FLUSH = 42
174IP_FW_ZERO = 43
175IP_FW_GET = 44
176IP_FW_RESETLOG = 45
177IP_OLD_FW_ADD = 50
178IP_OLD_FW_DEL = 51
179IP_OLD_FW_FLUSH = 52
180IP_OLD_FW_ZERO = 53
181IP_OLD_FW_GET = 54
182IP_NAT__XXX = 55
183IP_OLD_FW_RESETLOG = 56
184IP_DUMMYNET_CONFIGURE = 60
185IP_DUMMYNET_DEL = 61
186IP_DUMMYNET_FLUSH = 62
187IP_DUMMYNET_GET = 64
188IP_DEFAULT_MULTICAST_TTL = 1
189IP_DEFAULT_MULTICAST_LOOP = 1
190IP_MAX_MEMBERSHIPS = 20
191IP_PORTRANGE_DEFAULT = 0
192IP_PORTRANGE_HIGH = 1
193IP_PORTRANGE_LOW = 2
194IPPROTO_MAXID = (IPPROTO_AH + 1)
195IPCTL_FORWARDING = 1
196IPCTL_SENDREDIRECTS = 2
197IPCTL_DEFTTL = 3
198IPCTL_DEFMTU = 4
199IPCTL_RTEXPIRE = 5
200IPCTL_RTMINEXPIRE = 6
201IPCTL_RTMAXCACHE = 7
202IPCTL_SOURCEROUTE = 8
203IPCTL_DIRECTEDBROADCAST = 9
204IPCTL_INTRQMAXLEN = 10
205IPCTL_INTRQDROPS = 11
206IPCTL_STATS = 12
207IPCTL_ACCEPTSOURCEROUTE = 13
208IPCTL_FASTFORWARDING = 14
209IPCTL_KEEPFAITH = 15
210IPCTL_GIF_TTL = 16
211IPCTL_MAXID = 17
212
213# Included from netinet6/in6.h
214__KAME_VERSION = "20010528/apple-darwin"
215IPV6PORT_RESERVED = 1024
216IPV6PORT_ANONMIN = 49152
217IPV6PORT_ANONMAX = 65535
218IPV6PORT_RESERVEDMIN = 600
219IPV6PORT_RESERVEDMAX = (IPV6PORT_RESERVED-1)
220INET6_ADDRSTRLEN = 46
221IPV6_ADDR_INT32_ONE = 1
222IPV6_ADDR_INT32_TWO = 2
223IPV6_ADDR_INT32_MNL = 0xff010000
224IPV6_ADDR_INT32_MLL = 0xff020000
225IPV6_ADDR_INT32_SMP = 0x0000ffff
226IPV6_ADDR_INT16_ULL = 0xfe80
227IPV6_ADDR_INT16_USL = 0xfec0
228IPV6_ADDR_INT16_MLL = 0xff02
229IPV6_ADDR_INT32_ONE = 0x01000000
230IPV6_ADDR_INT32_TWO = 0x02000000
231IPV6_ADDR_INT32_MNL = 0x000001ff
232IPV6_ADDR_INT32_MLL = 0x000002ff
233IPV6_ADDR_INT32_SMP = 0xffff0000
234IPV6_ADDR_INT16_ULL = 0x80fe
235IPV6_ADDR_INT16_USL = 0xc0fe
236IPV6_ADDR_INT16_MLL = 0x02ff
237def IN6_IS_ADDR_UNSPECIFIED(a): return \
238
239def IN6_IS_ADDR_LOOPBACK(a): return \
240
241def IN6_IS_ADDR_V4COMPAT(a): return \
242
243def IN6_IS_ADDR_V4MAPPED(a): return \
244
245IPV6_ADDR_SCOPE_NODELOCAL = 0x01
246IPV6_ADDR_SCOPE_LINKLOCAL = 0x02
247IPV6_ADDR_SCOPE_SITELOCAL = 0x05
248IPV6_ADDR_SCOPE_ORGLOCAL = 0x08
249IPV6_ADDR_SCOPE_GLOBAL = 0x0e
250__IPV6_ADDR_SCOPE_NODELOCAL = 0x01
251__IPV6_ADDR_SCOPE_LINKLOCAL = 0x02
252__IPV6_ADDR_SCOPE_SITELOCAL = 0x05
253__IPV6_ADDR_SCOPE_ORGLOCAL = 0x08
254__IPV6_ADDR_SCOPE_GLOBAL = 0x0e
255def IN6_IS_ADDR_LINKLOCAL(a): return \
256
257def IN6_IS_ADDR_SITELOCAL(a): return \
258
259def IN6_IS_ADDR_MC_NODELOCAL(a): return \
260
261def IN6_IS_ADDR_MC_LINKLOCAL(a): return \
262
263def IN6_IS_ADDR_MC_SITELOCAL(a): return \
264
265def IN6_IS_ADDR_MC_ORGLOCAL(a): return \
266
267def IN6_IS_ADDR_MC_GLOBAL(a): return \
268
269def IN6_IS_ADDR_MC_NODELOCAL(a): return \
270
271def IN6_IS_ADDR_MC_LINKLOCAL(a): return \
272
273def IN6_IS_ADDR_MC_SITELOCAL(a): return \
274
275def IN6_IS_ADDR_MC_ORGLOCAL(a): return \
276
277def IN6_IS_ADDR_MC_GLOBAL(a): return \
278
279def IN6_IS_SCOPE_LINKLOCAL(a): return \
280
281def IFA6_IS_DEPRECATED(a): return \
282
283def IFA6_IS_INVALID(a): return \
284
285IPV6_OPTIONS = 1
286IPV6_RECVOPTS = 5
287IPV6_RECVRETOPTS = 6
288IPV6_RECVDSTADDR = 7
289IPV6_RETOPTS = 8
290IPV6_SOCKOPT_RESERVED1 = 3
291IPV6_UNICAST_HOPS = 4
292IPV6_MULTICAST_IF = 9
293IPV6_MULTICAST_HOPS = 10
294IPV6_MULTICAST_LOOP = 11
295IPV6_JOIN_GROUP = 12
296IPV6_LEAVE_GROUP = 13
297IPV6_PORTRANGE = 14
298ICMP6_FILTER = 18
299IPV6_PKTINFO = 19
300IPV6_HOPLIMIT = 20
301IPV6_NEXTHOP = 21
302IPV6_HOPOPTS = 22
303IPV6_DSTOPTS = 23
304IPV6_RTHDR = 24
305IPV6_PKTOPTIONS = 25
306IPV6_CHECKSUM = 26
307IPV6_V6ONLY = 27
308IPV6_BINDV6ONLY = IPV6_V6ONLY
309IPV6_IPSEC_POLICY = 28
310IPV6_FAITH = 29
311IPV6_FW_ADD = 30
312IPV6_FW_DEL = 31
313IPV6_FW_FLUSH = 32
314IPV6_FW_ZERO = 33
315IPV6_FW_GET = 34
316IPV6_RTHDR_LOOSE = 0
317IPV6_RTHDR_STRICT = 1
318IPV6_RTHDR_TYPE_0 = 0
319IPV6_DEFAULT_MULTICAST_HOPS = 1
320IPV6_DEFAULT_MULTICAST_LOOP = 1
321IPV6_PORTRANGE_DEFAULT = 0
322IPV6_PORTRANGE_HIGH = 1
323IPV6_PORTRANGE_LOW = 2
324IPV6PROTO_MAXID = (IPPROTO_PIM + 1)
325IPV6CTL_FORWARDING = 1
326IPV6CTL_SENDREDIRECTS = 2
327IPV6CTL_DEFHLIM = 3
328IPV6CTL_DEFMTU = 4
329IPV6CTL_FORWSRCRT = 5
330IPV6CTL_STATS = 6
331IPV6CTL_MRTSTATS = 7
332IPV6CTL_MRTPROTO = 8
333IPV6CTL_MAXFRAGPACKETS = 9
334IPV6CTL_SOURCECHECK = 10
335IPV6CTL_SOURCECHECK_LOGINT = 11
336IPV6CTL_ACCEPT_RTADV = 12
337IPV6CTL_KEEPFAITH = 13
338IPV6CTL_LOG_INTERVAL = 14
339IPV6CTL_HDRNESTLIMIT = 15
340IPV6CTL_DAD_COUNT = 16
341IPV6CTL_AUTO_FLOWLABEL = 17
342IPV6CTL_DEFMCASTHLIM = 18
343IPV6CTL_GIF_HLIM = 19
344IPV6CTL_KAME_VERSION = 20
345IPV6CTL_USE_DEPRECATED = 21
346IPV6CTL_RR_PRUNE = 22
347IPV6CTL_MAPPED_ADDR = 23
348IPV6CTL_V6ONLY = 24
349IPV6CTL_RTEXPIRE = 25
350IPV6CTL_RTMINEXPIRE = 26
351IPV6CTL_RTMAXCACHE = 27
352IPV6CTL_USETEMPADDR = 32
353IPV6CTL_TEMPPLTIME = 33
354IPV6CTL_TEMPVLTIME = 34
355IPV6CTL_AUTO_LINKLOCAL = 35
356IPV6CTL_RIP6STATS = 36
357IPV6CTL_MAXID = 37
358