Ronald Oussoren | 03cfa73 | 2009-03-04 23:21:07 +0000 | [diff] [blame] | 1 | # Generated by h2py from /usr/include/netinet/in.h |
| 2 | |
| 3 | # Included from sys/appleapiopts.h |
| 4 | |
| 5 | # Included from sys/_types.h |
| 6 | |
| 7 | # Included from sys/cdefs.h |
| 8 | def __P(protos): return protos |
| 9 | |
| 10 | def __STRING(x): return #x |
| 11 | |
| 12 | def __P(protos): return () |
| 13 | |
| 14 | def __STRING(x): return "x" |
| 15 | |
| 16 | def __attribute__(x): return |
| 17 | |
| 18 | def __COPYRIGHT(s): return __IDSTRING(copyright,s) |
| 19 | |
| 20 | def __RCSID(s): return __IDSTRING(rcsid,s) |
| 21 | |
| 22 | def __SCCSID(s): return __IDSTRING(sccsid,s) |
| 23 | |
| 24 | def __PROJECT_VERSION(s): return __IDSTRING(project_version,s) |
| 25 | |
| 26 | __DARWIN_UNIX03 = 1 |
| 27 | __DARWIN_UNIX03 = 0 |
| 28 | __DARWIN_UNIX03 = 0 |
| 29 | __DARWIN_UNIX03 = 1 |
| 30 | __DARWIN_64_BIT_INO_T = 1 |
| 31 | __DARWIN_64_BIT_INO_T = 0 |
| 32 | __DARWIN_64_BIT_INO_T = 0 |
| 33 | __DARWIN_NON_CANCELABLE = 0 |
| 34 | __DARWIN_VERS_1050 = 1 |
| 35 | __DARWIN_VERS_1050 = 0 |
| 36 | __DARWIN_SUF_UNIX03 = "$UNIX2003" |
| 37 | __DARWIN_SUF_UNIX03_SET = 1 |
| 38 | __DARWIN_SUF_UNIX03_SET = 0 |
| 39 | __DARWIN_SUF_64_BIT_INO_T = "$INODE64" |
| 40 | __DARWIN_SUF_NON_CANCELABLE = "$NOCANCEL" |
| 41 | __DARWIN_SUF_1050 = "$1050" |
| 42 | __DARWIN_SUF_UNIX03_SET = 0 |
| 43 | __DARWIN_SUF_EXTSN = "$DARWIN_EXTSN" |
| 44 | __DARWIN_LONG_DOUBLE_IS_DOUBLE = 0 |
| 45 | def __DARWIN_LDBL_COMPAT(x): return |
| 46 | |
| 47 | def __DARWIN_LDBL_COMPAT2(x): return |
| 48 | |
| 49 | __DARWIN_LONG_DOUBLE_IS_DOUBLE = 1 |
| 50 | def __DARWIN_LDBL_COMPAT(x): return |
| 51 | |
| 52 | def __DARWIN_LDBL_COMPAT2(x): return |
| 53 | |
| 54 | __DARWIN_LONG_DOUBLE_IS_DOUBLE = 0 |
| 55 | _DARWIN_FEATURE_LONG_DOUBLE_IS_DOUBLE = 1 |
| 56 | _DARWIN_FEATURE_UNIX_CONFORMANCE = 3 |
| 57 | _DARWIN_FEATURE_64_BIT_INODE = 1 |
| 58 | |
| 59 | # Included from machine/_types.h |
| 60 | __PTHREAD_SIZE__ = 1168 |
| 61 | __PTHREAD_ATTR_SIZE__ = 56 |
| 62 | __PTHREAD_MUTEXATTR_SIZE__ = 8 |
| 63 | __PTHREAD_MUTEX_SIZE__ = 56 |
| 64 | __PTHREAD_CONDATTR_SIZE__ = 8 |
| 65 | __PTHREAD_COND_SIZE__ = 40 |
| 66 | __PTHREAD_ONCE_SIZE__ = 8 |
| 67 | __PTHREAD_RWLOCK_SIZE__ = 192 |
| 68 | __PTHREAD_RWLOCKATTR_SIZE__ = 16 |
| 69 | __PTHREAD_SIZE__ = 596 |
| 70 | __PTHREAD_ATTR_SIZE__ = 36 |
| 71 | __PTHREAD_MUTEXATTR_SIZE__ = 8 |
| 72 | __PTHREAD_MUTEX_SIZE__ = 40 |
| 73 | __PTHREAD_CONDATTR_SIZE__ = 4 |
| 74 | __PTHREAD_COND_SIZE__ = 24 |
| 75 | __PTHREAD_ONCE_SIZE__ = 4 |
| 76 | __PTHREAD_RWLOCK_SIZE__ = 124 |
| 77 | __PTHREAD_RWLOCKATTR_SIZE__ = 12 |
| 78 | __DARWIN_NULL = 0 |
| 79 | |
| 80 | # Included from stdint.h |
| 81 | __WORDSIZE = 64 |
| 82 | __WORDSIZE = 32 |
| 83 | INT8_MAX = 127 |
| 84 | INT16_MAX = 32767 |
| 85 | INT32_MAX = 2147483647 |
| 86 | INT8_MIN = -128 |
| 87 | INT16_MIN = -32768 |
| 88 | INT32_MIN = (-INT32_MAX-1) |
| 89 | UINT8_MAX = 255 |
| 90 | UINT16_MAX = 65535 |
| 91 | INT_LEAST8_MIN = INT8_MIN |
| 92 | INT_LEAST16_MIN = INT16_MIN |
| 93 | INT_LEAST32_MIN = INT32_MIN |
| 94 | INT_LEAST8_MAX = INT8_MAX |
| 95 | INT_LEAST16_MAX = INT16_MAX |
| 96 | INT_LEAST32_MAX = INT32_MAX |
| 97 | UINT_LEAST8_MAX = UINT8_MAX |
| 98 | UINT_LEAST16_MAX = UINT16_MAX |
| 99 | INT_FAST8_MIN = INT8_MIN |
| 100 | INT_FAST16_MIN = INT16_MIN |
| 101 | INT_FAST32_MIN = INT32_MIN |
| 102 | INT_FAST8_MAX = INT8_MAX |
| 103 | INT_FAST16_MAX = INT16_MAX |
| 104 | INT_FAST32_MAX = INT32_MAX |
| 105 | UINT_FAST8_MAX = UINT8_MAX |
| 106 | UINT_FAST16_MAX = UINT16_MAX |
| 107 | INTPTR_MIN = INT32_MIN |
| 108 | INTPTR_MAX = INT32_MAX |
| 109 | PTRDIFF_MIN = INT32_MIN |
| 110 | PTRDIFF_MAX = INT32_MAX |
| 111 | WCHAR_MAX = 0x7fffffff |
| 112 | WCHAR_MIN = 0 |
| 113 | WCHAR_MIN = (-WCHAR_MAX-1) |
| 114 | WINT_MIN = INT32_MIN |
| 115 | WINT_MAX = INT32_MAX |
| 116 | SIG_ATOMIC_MIN = INT32_MIN |
| 117 | SIG_ATOMIC_MAX = INT32_MAX |
| 118 | def INT8_C(v): return (v) |
| 119 | |
| 120 | def INT16_C(v): return (v) |
| 121 | |
| 122 | def INT32_C(v): return (v) |
| 123 | |
| 124 | |
| 125 | # Included from sys/socket.h |
| 126 | |
| 127 | # Included from machine/_param.h |
| 128 | SOCK_STREAM = 1 |
| 129 | SOCK_DGRAM = 2 |
| 130 | SOCK_RAW = 3 |
| 131 | SOCK_RDM = 4 |
| 132 | SOCK_SEQPACKET = 5 |
| 133 | SO_DEBUG = 0x0001 |
| 134 | SO_ACCEPTCONN = 0x0002 |
| 135 | SO_REUSEADDR = 0x0004 |
| 136 | SO_KEEPALIVE = 0x0008 |
| 137 | SO_DONTROUTE = 0x0010 |
| 138 | SO_BROADCAST = 0x0020 |
| 139 | SO_USELOOPBACK = 0x0040 |
| 140 | SO_LINGER = 0x0080 |
| 141 | SO_LINGER = 0x1080 |
| 142 | SO_OOBINLINE = 0x0100 |
| 143 | SO_REUSEPORT = 0x0200 |
| 144 | SO_TIMESTAMP = 0x0400 |
| 145 | SO_ACCEPTFILTER = 0x1000 |
| 146 | SO_DONTTRUNC = 0x2000 |
| 147 | SO_WANTMORE = 0x4000 |
| 148 | SO_WANTOOBFLAG = 0x8000 |
| 149 | SO_SNDBUF = 0x1001 |
| 150 | SO_RCVBUF = 0x1002 |
| 151 | SO_SNDLOWAT = 0x1003 |
| 152 | SO_RCVLOWAT = 0x1004 |
| 153 | SO_SNDTIMEO = 0x1005 |
| 154 | SO_RCVTIMEO = 0x1006 |
| 155 | SO_ERROR = 0x1007 |
| 156 | SO_TYPE = 0x1008 |
| 157 | SO_NREAD = 0x1020 |
| 158 | SO_NKE = 0x1021 |
| 159 | SO_NOSIGPIPE = 0x1022 |
| 160 | SO_NOADDRERR = 0x1023 |
| 161 | SO_NWRITE = 0x1024 |
| 162 | SO_REUSESHAREUID = 0x1025 |
| 163 | SO_NOTIFYCONFLICT = 0x1026 |
| 164 | SO_LINGER_SEC = 0x1080 |
| 165 | SO_RESTRICTIONS = 0x1081 |
| 166 | SO_RESTRICT_DENYIN = 0x00000001 |
| 167 | SO_RESTRICT_DENYOUT = 0x00000002 |
| 168 | SO_RESTRICT_DENYSET = (-2147483648) |
| 169 | SO_LABEL = 0x1010 |
| 170 | SO_PEERLABEL = 0x1011 |
| 171 | SOL_SOCKET = 0xffff |
| 172 | AF_UNSPEC = 0 |
| 173 | AF_UNIX = 1 |
| 174 | AF_LOCAL = AF_UNIX |
| 175 | AF_INET = 2 |
| 176 | AF_IMPLINK = 3 |
| 177 | AF_PUP = 4 |
| 178 | AF_CHAOS = 5 |
| 179 | AF_NS = 6 |
| 180 | AF_ISO = 7 |
| 181 | AF_OSI = AF_ISO |
| 182 | AF_ECMA = 8 |
| 183 | AF_DATAKIT = 9 |
| 184 | AF_CCITT = 10 |
| 185 | AF_SNA = 11 |
| 186 | AF_DECnet = 12 |
| 187 | AF_DLI = 13 |
| 188 | AF_LAT = 14 |
| 189 | AF_HYLINK = 15 |
| 190 | AF_APPLETALK = 16 |
| 191 | AF_ROUTE = 17 |
| 192 | AF_LINK = 18 |
| 193 | pseudo_AF_XTP = 19 |
| 194 | AF_COIP = 20 |
| 195 | AF_CNT = 21 |
| 196 | pseudo_AF_RTIP = 22 |
| 197 | AF_IPX = 23 |
| 198 | AF_SIP = 24 |
| 199 | pseudo_AF_PIP = 25 |
| 200 | AF_NDRV = 27 |
| 201 | AF_ISDN = 28 |
| 202 | AF_E164 = AF_ISDN |
| 203 | pseudo_AF_KEY = 29 |
| 204 | AF_INET6 = 30 |
| 205 | AF_NATM = 31 |
| 206 | AF_SYSTEM = 32 |
| 207 | AF_NETBIOS = 33 |
| 208 | AF_PPP = 34 |
| 209 | AF_ATM = 30 |
| 210 | pseudo_AF_HDRCMPLT = 35 |
| 211 | AF_RESERVED_36 = 36 |
| 212 | AF_NETGRAPH = 32 |
| 213 | AF_MAX = 37 |
| 214 | SOCK_MAXADDRLEN = 255 |
| 215 | _SS_MAXSIZE = 128 |
| 216 | PF_UNSPEC = AF_UNSPEC |
| 217 | PF_LOCAL = AF_LOCAL |
| 218 | PF_UNIX = PF_LOCAL |
| 219 | PF_INET = AF_INET |
| 220 | PF_IMPLINK = AF_IMPLINK |
| 221 | PF_PUP = AF_PUP |
| 222 | PF_CHAOS = AF_CHAOS |
| 223 | PF_NS = AF_NS |
| 224 | PF_ISO = AF_ISO |
| 225 | PF_OSI = AF_ISO |
| 226 | PF_ECMA = AF_ECMA |
| 227 | PF_DATAKIT = AF_DATAKIT |
| 228 | PF_CCITT = AF_CCITT |
| 229 | PF_SNA = AF_SNA |
| 230 | PF_DECnet = AF_DECnet |
| 231 | PF_DLI = AF_DLI |
| 232 | PF_LAT = AF_LAT |
| 233 | PF_HYLINK = AF_HYLINK |
| 234 | PF_APPLETALK = AF_APPLETALK |
| 235 | PF_ROUTE = AF_ROUTE |
| 236 | PF_LINK = AF_LINK |
| 237 | PF_XTP = pseudo_AF_XTP |
| 238 | PF_COIP = AF_COIP |
| 239 | PF_CNT = AF_CNT |
| 240 | PF_SIP = AF_SIP |
| 241 | PF_IPX = AF_IPX |
| 242 | PF_RTIP = pseudo_AF_RTIP |
| 243 | PF_PIP = pseudo_AF_PIP |
| 244 | PF_NDRV = AF_NDRV |
| 245 | PF_ISDN = AF_ISDN |
| 246 | PF_KEY = pseudo_AF_KEY |
| 247 | PF_INET6 = AF_INET6 |
| 248 | PF_NATM = AF_NATM |
| 249 | PF_SYSTEM = AF_SYSTEM |
| 250 | PF_NETBIOS = AF_NETBIOS |
| 251 | PF_PPP = AF_PPP |
| 252 | PF_RESERVED_36 = AF_RESERVED_36 |
| 253 | PF_ATM = AF_ATM |
| 254 | PF_NETGRAPH = AF_NETGRAPH |
| 255 | PF_MAX = AF_MAX |
| 256 | NET_MAXID = AF_MAX |
| 257 | NET_RT_DUMP = 1 |
| 258 | NET_RT_FLAGS = 2 |
| 259 | NET_RT_IFLIST = 3 |
| 260 | NET_RT_STAT = 4 |
| 261 | NET_RT_TRASH = 5 |
| 262 | NET_RT_IFLIST2 = 6 |
| 263 | NET_RT_DUMP2 = 7 |
| 264 | NET_RT_MAXID = 8 |
| 265 | SOMAXCONN = 128 |
| 266 | MSG_OOB = 0x1 |
| 267 | MSG_PEEK = 0x2 |
| 268 | MSG_DONTROUTE = 0x4 |
| 269 | MSG_EOR = 0x8 |
| 270 | MSG_TRUNC = 0x10 |
| 271 | MSG_CTRUNC = 0x20 |
| 272 | MSG_WAITALL = 0x40 |
| 273 | MSG_DONTWAIT = 0x80 |
| 274 | MSG_EOF = 0x100 |
| 275 | MSG_WAITSTREAM = 0x200 |
| 276 | MSG_FLUSH = 0x400 |
| 277 | MSG_HOLD = 0x800 |
| 278 | MSG_SEND = 0x1000 |
| 279 | MSG_HAVEMORE = 0x2000 |
| 280 | MSG_RCVMORE = 0x4000 |
| 281 | MSG_NEEDSA = 0x10000 |
| 282 | CMGROUP_MAX = 16 |
| 283 | SCM_RIGHTS = 0x01 |
| 284 | SCM_TIMESTAMP = 0x02 |
| 285 | SCM_CREDS = 0x03 |
| 286 | SHUT_RD = 0 |
| 287 | SHUT_WR = 1 |
| 288 | SHUT_RDWR = 2 |
| 289 | |
| 290 | # Included from machine/endian.h |
| 291 | |
| 292 | # Included from sys/_endian.h |
| 293 | def ntohl(x): return (x) |
| 294 | |
| 295 | def ntohs(x): return (x) |
| 296 | |
| 297 | def htonl(x): return (x) |
| 298 | |
| 299 | def htons(x): return (x) |
| 300 | |
| 301 | def NTOHL(x): return (x) |
| 302 | |
| 303 | def NTOHS(x): return (x) |
| 304 | |
| 305 | def HTONL(x): return (x) |
| 306 | |
| 307 | def HTONS(x): return (x) |
| 308 | |
| 309 | |
| 310 | # Included from libkern/_OSByteOrder.h |
| 311 | def __DARWIN_OSSwapConstInt16(x): return \ |
| 312 | |
| 313 | def __DARWIN_OSSwapConstInt32(x): return \ |
| 314 | |
| 315 | def __DARWIN_OSSwapConstInt64(x): return \ |
| 316 | |
| 317 | |
| 318 | # Included from libkern/i386/_OSByteOrder.h |
| 319 | def __DARWIN_OSSwapInt16(x): return \ |
| 320 | |
| 321 | def __DARWIN_OSSwapInt32(x): return \ |
| 322 | |
| 323 | def __DARWIN_OSSwapInt64(x): return \ |
| 324 | |
| 325 | def __DARWIN_OSSwapInt16(x): return _OSSwapInt16(x) |
| 326 | |
| 327 | def __DARWIN_OSSwapInt32(x): return _OSSwapInt32(x) |
| 328 | |
| 329 | def __DARWIN_OSSwapInt64(x): return _OSSwapInt64(x) |
| 330 | |
| 331 | def ntohs(x): return __DARWIN_OSSwapInt16(x) |
| 332 | |
| 333 | def htons(x): return __DARWIN_OSSwapInt16(x) |
| 334 | |
| 335 | def ntohl(x): return __DARWIN_OSSwapInt32(x) |
| 336 | |
| 337 | def htonl(x): return __DARWIN_OSSwapInt32(x) |
| 338 | |
| 339 | IPPROTO_IP = 0 |
| 340 | IPPROTO_HOPOPTS = 0 |
| 341 | IPPROTO_ICMP = 1 |
| 342 | IPPROTO_IGMP = 2 |
| 343 | IPPROTO_GGP = 3 |
| 344 | IPPROTO_IPV4 = 4 |
| 345 | IPPROTO_IPIP = IPPROTO_IPV4 |
| 346 | IPPROTO_TCP = 6 |
| 347 | IPPROTO_ST = 7 |
| 348 | IPPROTO_EGP = 8 |
| 349 | IPPROTO_PIGP = 9 |
| 350 | IPPROTO_RCCMON = 10 |
| 351 | IPPROTO_NVPII = 11 |
| 352 | IPPROTO_PUP = 12 |
| 353 | IPPROTO_ARGUS = 13 |
| 354 | IPPROTO_EMCON = 14 |
| 355 | IPPROTO_XNET = 15 |
| 356 | IPPROTO_CHAOS = 16 |
| 357 | IPPROTO_UDP = 17 |
| 358 | IPPROTO_MUX = 18 |
| 359 | IPPROTO_MEAS = 19 |
| 360 | IPPROTO_HMP = 20 |
| 361 | IPPROTO_PRM = 21 |
| 362 | IPPROTO_IDP = 22 |
| 363 | IPPROTO_TRUNK1 = 23 |
| 364 | IPPROTO_TRUNK2 = 24 |
| 365 | IPPROTO_LEAF1 = 25 |
| 366 | IPPROTO_LEAF2 = 26 |
| 367 | IPPROTO_RDP = 27 |
| 368 | IPPROTO_IRTP = 28 |
| 369 | IPPROTO_TP = 29 |
| 370 | IPPROTO_BLT = 30 |
| 371 | IPPROTO_NSP = 31 |
| 372 | IPPROTO_INP = 32 |
| 373 | IPPROTO_SEP = 33 |
| 374 | IPPROTO_3PC = 34 |
| 375 | IPPROTO_IDPR = 35 |
| 376 | IPPROTO_XTP = 36 |
| 377 | IPPROTO_DDP = 37 |
| 378 | IPPROTO_CMTP = 38 |
| 379 | IPPROTO_TPXX = 39 |
| 380 | IPPROTO_IL = 40 |
| 381 | IPPROTO_IPV6 = 41 |
| 382 | IPPROTO_SDRP = 42 |
| 383 | IPPROTO_ROUTING = 43 |
| 384 | IPPROTO_FRAGMENT = 44 |
| 385 | IPPROTO_IDRP = 45 |
| 386 | IPPROTO_RSVP = 46 |
| 387 | IPPROTO_GRE = 47 |
| 388 | IPPROTO_MHRP = 48 |
| 389 | IPPROTO_BHA = 49 |
| 390 | IPPROTO_ESP = 50 |
| 391 | IPPROTO_AH = 51 |
| 392 | IPPROTO_INLSP = 52 |
| 393 | IPPROTO_SWIPE = 53 |
| 394 | IPPROTO_NHRP = 54 |
| 395 | IPPROTO_ICMPV6 = 58 |
| 396 | IPPROTO_NONE = 59 |
| 397 | IPPROTO_DSTOPTS = 60 |
| 398 | IPPROTO_AHIP = 61 |
| 399 | IPPROTO_CFTP = 62 |
| 400 | IPPROTO_HELLO = 63 |
| 401 | IPPROTO_SATEXPAK = 64 |
| 402 | IPPROTO_KRYPTOLAN = 65 |
| 403 | IPPROTO_RVD = 66 |
| 404 | IPPROTO_IPPC = 67 |
| 405 | IPPROTO_ADFS = 68 |
| 406 | IPPROTO_SATMON = 69 |
| 407 | IPPROTO_VISA = 70 |
| 408 | IPPROTO_IPCV = 71 |
| 409 | IPPROTO_CPNX = 72 |
| 410 | IPPROTO_CPHB = 73 |
| 411 | IPPROTO_WSN = 74 |
| 412 | IPPROTO_PVP = 75 |
| 413 | IPPROTO_BRSATMON = 76 |
| 414 | IPPROTO_ND = 77 |
| 415 | IPPROTO_WBMON = 78 |
| 416 | IPPROTO_WBEXPAK = 79 |
| 417 | IPPROTO_EON = 80 |
| 418 | IPPROTO_VMTP = 81 |
| 419 | IPPROTO_SVMTP = 82 |
| 420 | IPPROTO_VINES = 83 |
| 421 | IPPROTO_TTP = 84 |
| 422 | IPPROTO_IGP = 85 |
| 423 | IPPROTO_DGP = 86 |
| 424 | IPPROTO_TCF = 87 |
| 425 | IPPROTO_IGRP = 88 |
| 426 | IPPROTO_OSPFIGP = 89 |
| 427 | IPPROTO_SRPC = 90 |
| 428 | IPPROTO_LARP = 91 |
| 429 | IPPROTO_MTP = 92 |
| 430 | IPPROTO_AX25 = 93 |
| 431 | IPPROTO_IPEIP = 94 |
| 432 | IPPROTO_MICP = 95 |
| 433 | IPPROTO_SCCSP = 96 |
| 434 | IPPROTO_ETHERIP = 97 |
| 435 | IPPROTO_ENCAP = 98 |
| 436 | IPPROTO_APES = 99 |
| 437 | IPPROTO_GMTP = 100 |
| 438 | IPPROTO_IPCOMP = 108 |
| 439 | IPPROTO_PIM = 103 |
| 440 | IPPROTO_PGM = 113 |
| 441 | IPPROTO_DIVERT = 254 |
| 442 | IPPROTO_RAW = 255 |
| 443 | IPPROTO_MAX = 256 |
| 444 | IPPROTO_DONE = 257 |
| 445 | __DARWIN_IPPORT_RESERVED = 1024 |
| 446 | IPPORT_RESERVED = __DARWIN_IPPORT_RESERVED |
| 447 | IPPORT_USERRESERVED = 5000 |
| 448 | IPPORT_HIFIRSTAUTO = 49152 |
| 449 | IPPORT_HILASTAUTO = 65535 |
| 450 | IPPORT_RESERVEDSTART = 600 |
| 451 | def IN_CLASSA(i): return (((u_int32_t)(i) & (-2147483648)) == 0) |
| 452 | |
| 453 | IN_CLASSA_NET = (-16777216) |
| 454 | IN_CLASSA_NSHIFT = 24 |
| 455 | IN_CLASSA_HOST = 0x00ffffff |
| 456 | IN_CLASSA_MAX = 128 |
| 457 | def IN_CLASSB(i): return (((u_int32_t)(i) & (-1073741824)) == (-2147483648)) |
| 458 | |
| 459 | IN_CLASSB_NET = (-65536) |
| 460 | IN_CLASSB_NSHIFT = 16 |
| 461 | IN_CLASSB_HOST = 0x0000ffff |
| 462 | IN_CLASSB_MAX = 65536 |
| 463 | def IN_CLASSC(i): return (((u_int32_t)(i) & (-536870912)) == (-1073741824)) |
| 464 | |
| 465 | IN_CLASSC_NET = (-256) |
| 466 | IN_CLASSC_NSHIFT = 8 |
| 467 | IN_CLASSC_HOST = 0x000000ff |
| 468 | def IN_CLASSD(i): return (((u_int32_t)(i) & (-268435456)) == (-536870912)) |
| 469 | |
| 470 | IN_CLASSD_NET = (-268435456) |
| 471 | IN_CLASSD_NSHIFT = 28 |
| 472 | IN_CLASSD_HOST = 0x0fffffff |
| 473 | def IN_MULTICAST(i): return IN_CLASSD(i) |
| 474 | |
| 475 | def IN_EXPERIMENTAL(i): return (((u_int32_t)(i) & (-268435456)) == (-268435456)) |
| 476 | |
| 477 | def IN_BADCLASS(i): return (((u_int32_t)(i) & (-268435456)) == (-268435456)) |
| 478 | |
| 479 | INADDR_NONE = (-1) |
| 480 | def IN_LINKLOCAL(i): return (((u_int32_t)(i) & IN_CLASSB_NET) == IN_LINKLOCALNETNUM) |
| 481 | |
| 482 | IN_LOOPBACKNET = 127 |
| 483 | INET_ADDRSTRLEN = 16 |
| 484 | IP_OPTIONS = 1 |
| 485 | IP_HDRINCL = 2 |
| 486 | IP_TOS = 3 |
| 487 | IP_TTL = 4 |
| 488 | IP_RECVOPTS = 5 |
| 489 | IP_RECVRETOPTS = 6 |
| 490 | IP_RECVDSTADDR = 7 |
| 491 | IP_RETOPTS = 8 |
| 492 | IP_MULTICAST_IF = 9 |
| 493 | IP_MULTICAST_TTL = 10 |
| 494 | IP_MULTICAST_LOOP = 11 |
| 495 | IP_ADD_MEMBERSHIP = 12 |
| 496 | IP_DROP_MEMBERSHIP = 13 |
| 497 | IP_MULTICAST_VIF = 14 |
| 498 | IP_RSVP_ON = 15 |
| 499 | IP_RSVP_OFF = 16 |
| 500 | IP_RSVP_VIF_ON = 17 |
| 501 | IP_RSVP_VIF_OFF = 18 |
| 502 | IP_PORTRANGE = 19 |
| 503 | IP_RECVIF = 20 |
| 504 | IP_IPSEC_POLICY = 21 |
| 505 | IP_FAITH = 22 |
| 506 | IP_STRIPHDR = 23 |
| 507 | IP_RECVTTL = 24 |
| 508 | IP_FW_ADD = 40 |
| 509 | IP_FW_DEL = 41 |
| 510 | IP_FW_FLUSH = 42 |
| 511 | IP_FW_ZERO = 43 |
| 512 | IP_FW_GET = 44 |
| 513 | IP_FW_RESETLOG = 45 |
| 514 | IP_OLD_FW_ADD = 50 |
| 515 | IP_OLD_FW_DEL = 51 |
| 516 | IP_OLD_FW_FLUSH = 52 |
| 517 | IP_OLD_FW_ZERO = 53 |
| 518 | IP_OLD_FW_GET = 54 |
| 519 | IP_NAT__XXX = 55 |
| 520 | IP_OLD_FW_RESETLOG = 56 |
| 521 | IP_DUMMYNET_CONFIGURE = 60 |
| 522 | IP_DUMMYNET_DEL = 61 |
| 523 | IP_DUMMYNET_FLUSH = 62 |
| 524 | IP_DUMMYNET_GET = 64 |
| 525 | IP_TRAFFIC_MGT_BACKGROUND = 65 |
| 526 | IP_FORCE_OUT_IFP = 69 |
| 527 | TRAFFIC_MGT_SO_BACKGROUND = 0x0001 |
| 528 | TRAFFIC_MGT_SO_BG_SUPPRESSED = 0x0002 |
| 529 | IP_DEFAULT_MULTICAST_TTL = 1 |
| 530 | IP_DEFAULT_MULTICAST_LOOP = 1 |
| 531 | IP_MAX_MEMBERSHIPS = 20 |
| 532 | IP_PORTRANGE_DEFAULT = 0 |
| 533 | IP_PORTRANGE_HIGH = 1 |
| 534 | IP_PORTRANGE_LOW = 2 |
| 535 | IPPROTO_MAXID = (IPPROTO_AH + 1) |
| 536 | IPCTL_FORWARDING = 1 |
| 537 | IPCTL_SENDREDIRECTS = 2 |
| 538 | IPCTL_DEFTTL = 3 |
| 539 | IPCTL_DEFMTU = 4 |
| 540 | IPCTL_RTEXPIRE = 5 |
| 541 | IPCTL_RTMINEXPIRE = 6 |
| 542 | IPCTL_RTMAXCACHE = 7 |
| 543 | IPCTL_SOURCEROUTE = 8 |
| 544 | IPCTL_DIRECTEDBROADCAST = 9 |
| 545 | IPCTL_INTRQMAXLEN = 10 |
| 546 | IPCTL_INTRQDROPS = 11 |
| 547 | IPCTL_STATS = 12 |
| 548 | IPCTL_ACCEPTSOURCEROUTE = 13 |
| 549 | IPCTL_FASTFORWARDING = 14 |
| 550 | IPCTL_KEEPFAITH = 15 |
| 551 | IPCTL_GIF_TTL = 16 |
| 552 | IPCTL_MAXID = 17 |
| 553 | |
| 554 | # Included from netinet6/in6.h |
| 555 | __KAME_VERSION = "20010528/apple-darwin" |
| 556 | IPV6PORT_RESERVED = 1024 |
| 557 | IPV6PORT_ANONMIN = 49152 |
| 558 | IPV6PORT_ANONMAX = 65535 |
| 559 | IPV6PORT_RESERVEDMIN = 600 |
| 560 | IPV6PORT_RESERVEDMAX = (IPV6PORT_RESERVED-1) |
| 561 | INET6_ADDRSTRLEN = 46 |
| 562 | def IN6_IS_ADDR_UNSPECIFIED(a): return \ |
| 563 | |
| 564 | def IN6_IS_ADDR_LOOPBACK(a): return \ |
| 565 | |
| 566 | def IN6_IS_ADDR_V4COMPAT(a): return \ |
| 567 | |
| 568 | def IN6_IS_ADDR_V4MAPPED(a): return \ |
| 569 | |
| 570 | __IPV6_ADDR_SCOPE_NODELOCAL = 0x01 |
| 571 | __IPV6_ADDR_SCOPE_LINKLOCAL = 0x02 |
| 572 | __IPV6_ADDR_SCOPE_SITELOCAL = 0x05 |
| 573 | __IPV6_ADDR_SCOPE_ORGLOCAL = 0x08 |
| 574 | __IPV6_ADDR_SCOPE_GLOBAL = 0x0e |
| 575 | def IN6_IS_ADDR_LINKLOCAL(a): return \ |
| 576 | |
| 577 | def IN6_IS_ADDR_SITELOCAL(a): return \ |
| 578 | |
| 579 | def IN6_IS_ADDR_MC_NODELOCAL(a): return \ |
| 580 | |
| 581 | def IN6_IS_ADDR_MC_LINKLOCAL(a): return \ |
| 582 | |
| 583 | def IN6_IS_ADDR_MC_SITELOCAL(a): return \ |
| 584 | |
| 585 | def IN6_IS_ADDR_MC_ORGLOCAL(a): return \ |
| 586 | |
| 587 | def IN6_IS_ADDR_MC_GLOBAL(a): return \ |
| 588 | |
| 589 | IPV6_OPTIONS = 1 |
| 590 | IPV6_RECVOPTS = 5 |
| 591 | IPV6_RECVRETOPTS = 6 |
| 592 | IPV6_RECVDSTADDR = 7 |
| 593 | IPV6_RETOPTS = 8 |
| 594 | IPV6_SOCKOPT_RESERVED1 = 3 |
| 595 | IPV6_UNICAST_HOPS = 4 |
| 596 | IPV6_MULTICAST_IF = 9 |
| 597 | IPV6_MULTICAST_HOPS = 10 |
| 598 | IPV6_MULTICAST_LOOP = 11 |
| 599 | IPV6_JOIN_GROUP = 12 |
| 600 | IPV6_LEAVE_GROUP = 13 |
| 601 | IPV6_PORTRANGE = 14 |
| 602 | ICMP6_FILTER = 18 |
| 603 | IPV6_PKTINFO = 19 |
| 604 | IPV6_HOPLIMIT = 20 |
| 605 | IPV6_NEXTHOP = 21 |
| 606 | IPV6_HOPOPTS = 22 |
| 607 | IPV6_DSTOPTS = 23 |
| 608 | IPV6_RTHDR = 24 |
| 609 | IPV6_PKTOPTIONS = 25 |
| 610 | IPV6_CHECKSUM = 26 |
| 611 | IPV6_V6ONLY = 27 |
| 612 | IPV6_BINDV6ONLY = IPV6_V6ONLY |
| 613 | IPV6_IPSEC_POLICY = 28 |
| 614 | IPV6_FAITH = 29 |
| 615 | IPV6_FW_ADD = 30 |
| 616 | IPV6_FW_DEL = 31 |
| 617 | IPV6_FW_FLUSH = 32 |
| 618 | IPV6_FW_ZERO = 33 |
| 619 | IPV6_FW_GET = 34 |
| 620 | IPV6_RTHDR_LOOSE = 0 |
| 621 | IPV6_RTHDR_STRICT = 1 |
| 622 | IPV6_RTHDR_TYPE_0 = 0 |
| 623 | IPV6_DEFAULT_MULTICAST_HOPS = 1 |
| 624 | IPV6_DEFAULT_MULTICAST_LOOP = 1 |
| 625 | IPV6_PORTRANGE_DEFAULT = 0 |
| 626 | IPV6_PORTRANGE_HIGH = 1 |
| 627 | IPV6_PORTRANGE_LOW = 2 |
| 628 | IPV6PROTO_MAXID = (IPPROTO_PIM + 1) |
| 629 | IPV6CTL_FORWARDING = 1 |
| 630 | IPV6CTL_SENDREDIRECTS = 2 |
| 631 | IPV6CTL_DEFHLIM = 3 |
| 632 | IPV6CTL_DEFMTU = 4 |
| 633 | IPV6CTL_FORWSRCRT = 5 |
| 634 | IPV6CTL_STATS = 6 |
| 635 | IPV6CTL_MRTSTATS = 7 |
| 636 | IPV6CTL_MRTPROTO = 8 |
| 637 | IPV6CTL_MAXFRAGPACKETS = 9 |
| 638 | IPV6CTL_SOURCECHECK = 10 |
| 639 | IPV6CTL_SOURCECHECK_LOGINT = 11 |
| 640 | IPV6CTL_ACCEPT_RTADV = 12 |
| 641 | IPV6CTL_KEEPFAITH = 13 |
| 642 | IPV6CTL_LOG_INTERVAL = 14 |
| 643 | IPV6CTL_HDRNESTLIMIT = 15 |
| 644 | IPV6CTL_DAD_COUNT = 16 |
| 645 | IPV6CTL_AUTO_FLOWLABEL = 17 |
| 646 | IPV6CTL_DEFMCASTHLIM = 18 |
| 647 | IPV6CTL_GIF_HLIM = 19 |
| 648 | IPV6CTL_KAME_VERSION = 20 |
| 649 | IPV6CTL_USE_DEPRECATED = 21 |
| 650 | IPV6CTL_RR_PRUNE = 22 |
| 651 | IPV6CTL_MAPPED_ADDR = 23 |
| 652 | IPV6CTL_V6ONLY = 24 |
| 653 | IPV6CTL_RTEXPIRE = 25 |
| 654 | IPV6CTL_RTMINEXPIRE = 26 |
| 655 | IPV6CTL_RTMAXCACHE = 27 |
| 656 | IPV6CTL_USETEMPADDR = 32 |
| 657 | IPV6CTL_TEMPPLTIME = 33 |
| 658 | IPV6CTL_TEMPVLTIME = 34 |
| 659 | IPV6CTL_AUTO_LINKLOCAL = 35 |
| 660 | IPV6CTL_RIP6STATS = 36 |
| 661 | IPV6CTL_MAXFRAGS = 41 |
| 662 | IPV6CTL_MAXID = 42 |