1*723f57f2SPedro Giffuni--- misc/Python-2.7.3/Lib/plat-freebsd9/IN.py 1969-12-31 19:00:00.000000000 -0500 2*723f57f2SPedro Giffuni+++ misc/build/Python-2.7.3/Lib/plat-freebsd9/IN.py 2012-08-01 18:56:04.000000000 -0500 3*723f57f2SPedro Giffuni@@ -0,0 +1,612 @@ 4*723f57f2SPedro Giffuni+# Generated by h2py from /usr/include/netinet/in.h 5*723f57f2SPedro Giffuni+ 6*723f57f2SPedro Giffuni+# Included from sys/cdefs.h 7*723f57f2SPedro Giffuni+__GNUCLIKE_ASM = 3 8*723f57f2SPedro Giffuni+__GNUCLIKE_ASM = 2 9*723f57f2SPedro Giffuni+__GNUCLIKE___TYPEOF = 1 10*723f57f2SPedro Giffuni+__GNUCLIKE___OFFSETOF = 1 11*723f57f2SPedro Giffuni+__GNUCLIKE___SECTION = 1 12*723f57f2SPedro Giffuni+__GNUCLIKE_CTOR_SECTION_HANDLING = 1 13*723f57f2SPedro Giffuni+__GNUCLIKE_BUILTIN_CONSTANT_P = 1 14*723f57f2SPedro Giffuni+__GNUCLIKE_BUILTIN_VARARGS = 1 15*723f57f2SPedro Giffuni+__GNUCLIKE_BUILTIN_STDARG = 1 16*723f57f2SPedro Giffuni+__GNUCLIKE_BUILTIN_VAALIST = 1 17*723f57f2SPedro Giffuni+__GNUC_VA_LIST_COMPATIBILITY = 1 18*723f57f2SPedro Giffuni+__GNUCLIKE_BUILTIN_NEXT_ARG = 1 19*723f57f2SPedro Giffuni+__GNUCLIKE_BUILTIN_MEMCPY = 1 20*723f57f2SPedro Giffuni+__CC_SUPPORTS_INLINE = 1 21*723f57f2SPedro Giffuni+__CC_SUPPORTS___INLINE = 1 22*723f57f2SPedro Giffuni+__CC_SUPPORTS___INLINE__ = 1 23*723f57f2SPedro Giffuni+__CC_SUPPORTS___FUNC__ = 1 24*723f57f2SPedro Giffuni+__CC_SUPPORTS_WARNING = 1 25*723f57f2SPedro Giffuni+__CC_SUPPORTS_VARADIC_XXX = 1 26*723f57f2SPedro Giffuni+__CC_SUPPORTS_DYNAMIC_ARRAY_INIT = 1 27*723f57f2SPedro Giffuni+def __P(protos): return protos 28*723f57f2SPedro Giffuni+ 29*723f57f2SPedro Giffuni+def __STRING(x): return #x 30*723f57f2SPedro Giffuni+ 31*723f57f2SPedro Giffuni+def __XSTRING(x): return __STRING(x) 32*723f57f2SPedro Giffuni+ 33*723f57f2SPedro Giffuni+def __P(protos): return () 34*723f57f2SPedro Giffuni+ 35*723f57f2SPedro Giffuni+def __STRING(x): return "x" 36*723f57f2SPedro Giffuni+ 37*723f57f2SPedro Giffuni+def __aligned(x): return __attribute__((__aligned__(x))) 38*723f57f2SPedro Giffuni+ 39*723f57f2SPedro Giffuni+def __section(x): return __attribute__((__section__(x))) 40*723f57f2SPedro Giffuni+ 41*723f57f2SPedro Giffuni+def __aligned(x): return __attribute__((__aligned__(x))) 42*723f57f2SPedro Giffuni+ 43*723f57f2SPedro Giffuni+def __section(x): return __attribute__((__section__(x))) 44*723f57f2SPedro Giffuni+ 45*723f57f2SPedro Giffuni+def _Alignas(e): return alignas(e) 46*723f57f2SPedro Giffuni+ 47*723f57f2SPedro Giffuni+def _Alignof(e): return alignof(e) 48*723f57f2SPedro Giffuni+ 49*723f57f2SPedro Giffuni+def _Alignas(x): return __aligned(x) 50*723f57f2SPedro Giffuni+ 51*723f57f2SPedro Giffuni+def _Alignof(x): return __alignof(x) 52*723f57f2SPedro Giffuni+ 53*723f57f2SPedro Giffuni+def __nonnull(x): return __attribute__((__nonnull__(x))) 54*723f57f2SPedro Giffuni+ 55*723f57f2SPedro Giffuni+def __predict_true(exp): return __builtin_expect((exp), 1) 56*723f57f2SPedro Giffuni+ 57*723f57f2SPedro Giffuni+def __predict_false(exp): return __builtin_expect((exp), 0) 58*723f57f2SPedro Giffuni+ 59*723f57f2SPedro Giffuni+def __predict_true(exp): return (exp) 60*723f57f2SPedro Giffuni+ 61*723f57f2SPedro Giffuni+def __predict_false(exp): return (exp) 62*723f57f2SPedro Giffuni+ 63*723f57f2SPedro Giffuni+def __format_arg(fmtarg): return __attribute__((__format_arg__ (fmtarg))) 64*723f57f2SPedro Giffuni+ 65*723f57f2SPedro Giffuni+def __GLOBL(sym): return __GLOBL1(sym) 66*723f57f2SPedro Giffuni+ 67*723f57f2SPedro Giffuni+def __FBSDID(s): return __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) 68*723f57f2SPedro Giffuni+ 69*723f57f2SPedro Giffuni+def __RCSID(s): return __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) 70*723f57f2SPedro Giffuni+ 71*723f57f2SPedro Giffuni+def __RCSID_SOURCE(s): return __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s) 72*723f57f2SPedro Giffuni+ 73*723f57f2SPedro Giffuni+def __SCCSID(s): return __IDSTRING(__CONCAT(__sccsid_,__LINE__),s) 74*723f57f2SPedro Giffuni+ 75*723f57f2SPedro Giffuni+def __COPYRIGHT(s): return __IDSTRING(__CONCAT(__copyright_,__LINE__),s) 76*723f57f2SPedro Giffuni+ 77*723f57f2SPedro Giffuni+_POSIX_C_SOURCE = 199009 78*723f57f2SPedro Giffuni+_POSIX_C_SOURCE = 199209 79*723f57f2SPedro Giffuni+__XSI_VISIBLE = 700 80*723f57f2SPedro Giffuni+_POSIX_C_SOURCE = 200809 81*723f57f2SPedro Giffuni+__XSI_VISIBLE = 600 82*723f57f2SPedro Giffuni+_POSIX_C_SOURCE = 200112 83*723f57f2SPedro Giffuni+__XSI_VISIBLE = 500 84*723f57f2SPedro Giffuni+_POSIX_C_SOURCE = 199506 85*723f57f2SPedro Giffuni+_POSIX_C_SOURCE = 198808 86*723f57f2SPedro Giffuni+__POSIX_VISIBLE = 200809 87*723f57f2SPedro Giffuni+__ISO_C_VISIBLE = 1999 88*723f57f2SPedro Giffuni+__POSIX_VISIBLE = 200112 89*723f57f2SPedro Giffuni+__ISO_C_VISIBLE = 1999 90*723f57f2SPedro Giffuni+__POSIX_VISIBLE = 199506 91*723f57f2SPedro Giffuni+__ISO_C_VISIBLE = 1990 92*723f57f2SPedro Giffuni+__POSIX_VISIBLE = 199309 93*723f57f2SPedro Giffuni+__ISO_C_VISIBLE = 1990 94*723f57f2SPedro Giffuni+__POSIX_VISIBLE = 199209 95*723f57f2SPedro Giffuni+__ISO_C_VISIBLE = 1990 96*723f57f2SPedro Giffuni+__POSIX_VISIBLE = 199009 97*723f57f2SPedro Giffuni+__ISO_C_VISIBLE = 1990 98*723f57f2SPedro Giffuni+__POSIX_VISIBLE = 198808 99*723f57f2SPedro Giffuni+__ISO_C_VISIBLE = 0 100*723f57f2SPedro Giffuni+__POSIX_VISIBLE = 0 101*723f57f2SPedro Giffuni+__XSI_VISIBLE = 0 102*723f57f2SPedro Giffuni+__BSD_VISIBLE = 0 103*723f57f2SPedro Giffuni+__ISO_C_VISIBLE = 1990 104*723f57f2SPedro Giffuni+__POSIX_VISIBLE = 0 105*723f57f2SPedro Giffuni+__XSI_VISIBLE = 0 106*723f57f2SPedro Giffuni+__BSD_VISIBLE = 0 107*723f57f2SPedro Giffuni+__ISO_C_VISIBLE = 1999 108*723f57f2SPedro Giffuni+__POSIX_VISIBLE = 200809 109*723f57f2SPedro Giffuni+__XSI_VISIBLE = 700 110*723f57f2SPedro Giffuni+__BSD_VISIBLE = 1 111*723f57f2SPedro Giffuni+__ISO_C_VISIBLE = 1999 112*723f57f2SPedro Giffuni+def __has_feature(x): return 0 113*723f57f2SPedro Giffuni+ 114*723f57f2SPedro Giffuni+def __has_include(x): return 0 115*723f57f2SPedro Giffuni+ 116*723f57f2SPedro Giffuni+def __has_builtin(x): return 0 117*723f57f2SPedro Giffuni+ 118*723f57f2SPedro Giffuni+__NO_TLS = 1 119*723f57f2SPedro Giffuni+ 120*723f57f2SPedro Giffuni+# Included from sys/_types.h 121*723f57f2SPedro Giffuni+ 122*723f57f2SPedro Giffuni+# Included from machine/_types.h 123*723f57f2SPedro Giffuni+ 124*723f57f2SPedro Giffuni+# Included from machine/endian.h 125*723f57f2SPedro Giffuni+_QUAD_HIGHWORD = 1 126*723f57f2SPedro Giffuni+_QUAD_LOWWORD = 0 127*723f57f2SPedro Giffuni+_LITTLE_ENDIAN = 1234 128*723f57f2SPedro Giffuni+_BIG_ENDIAN = 4321 129*723f57f2SPedro Giffuni+_PDP_ENDIAN = 3412 130*723f57f2SPedro Giffuni+_BYTE_ORDER = _LITTLE_ENDIAN 131*723f57f2SPedro Giffuni+LITTLE_ENDIAN = _LITTLE_ENDIAN 132*723f57f2SPedro Giffuni+BIG_ENDIAN = _BIG_ENDIAN 133*723f57f2SPedro Giffuni+PDP_ENDIAN = _PDP_ENDIAN 134*723f57f2SPedro Giffuni+BYTE_ORDER = _BYTE_ORDER 135*723f57f2SPedro Giffuni+def __bswap64_const(_x): return \ 136*723f57f2SPedro Giffuni+ 137*723f57f2SPedro Giffuni+def __bswap32_const(_x): return \ 138*723f57f2SPedro Giffuni+ 139*723f57f2SPedro Giffuni+def __bswap16_const(_x): return (__uint16_t)((_x) << 8 | (_x) >> 8) 140*723f57f2SPedro Giffuni+ 141*723f57f2SPedro Giffuni+def __bswap64(_x): return \ 142*723f57f2SPedro Giffuni+ 143*723f57f2SPedro Giffuni+def __bswap32(_x): return \ 144*723f57f2SPedro Giffuni+ 145*723f57f2SPedro Giffuni+def __bswap16(_x): return \ 146*723f57f2SPedro Giffuni+ 147*723f57f2SPedro Giffuni+def __htonl(x): return __bswap32(x) 148*723f57f2SPedro Giffuni+ 149*723f57f2SPedro Giffuni+def __htons(x): return __bswap16(x) 150*723f57f2SPedro Giffuni+ 151*723f57f2SPedro Giffuni+def __ntohl(x): return __bswap32(x) 152*723f57f2SPedro Giffuni+ 153*723f57f2SPedro Giffuni+def __ntohs(x): return __bswap16(x) 154*723f57f2SPedro Giffuni+ 155*723f57f2SPedro Giffuni+IPPROTO_IP = 0 156*723f57f2SPedro Giffuni+IPPROTO_ICMP = 1 157*723f57f2SPedro Giffuni+IPPROTO_TCP = 6 158*723f57f2SPedro Giffuni+IPPROTO_UDP = 17 159*723f57f2SPedro Giffuni+ 160*723f57f2SPedro Giffuni+# Included from sys/_sockaddr_storage.h 161*723f57f2SPedro Giffuni+def htonl(x): return __htonl(x) 162*723f57f2SPedro Giffuni+ 163*723f57f2SPedro Giffuni+def htons(x): return __htons(x) 164*723f57f2SPedro Giffuni+ 165*723f57f2SPedro Giffuni+def ntohl(x): return __ntohl(x) 166*723f57f2SPedro Giffuni+ 167*723f57f2SPedro Giffuni+def ntohs(x): return __ntohs(x) 168*723f57f2SPedro Giffuni+ 169*723f57f2SPedro Giffuni+IPPROTO_RAW = 255 170*723f57f2SPedro Giffuni+INET_ADDRSTRLEN = 16 171*723f57f2SPedro Giffuni+IPPROTO_HOPOPTS = 0 172*723f57f2SPedro Giffuni+IPPROTO_IGMP = 2 173*723f57f2SPedro Giffuni+IPPROTO_GGP = 3 174*723f57f2SPedro Giffuni+IPPROTO_IPV4 = 4 175*723f57f2SPedro Giffuni+IPPROTO_IPIP = IPPROTO_IPV4 176*723f57f2SPedro Giffuni+IPPROTO_ST = 7 177*723f57f2SPedro Giffuni+IPPROTO_EGP = 8 178*723f57f2SPedro Giffuni+IPPROTO_PIGP = 9 179*723f57f2SPedro Giffuni+IPPROTO_RCCMON = 10 180*723f57f2SPedro Giffuni+IPPROTO_NVPII = 11 181*723f57f2SPedro Giffuni+IPPROTO_PUP = 12 182*723f57f2SPedro Giffuni+IPPROTO_ARGUS = 13 183*723f57f2SPedro Giffuni+IPPROTO_EMCON = 14 184*723f57f2SPedro Giffuni+IPPROTO_XNET = 15 185*723f57f2SPedro Giffuni+IPPROTO_CHAOS = 16 186*723f57f2SPedro Giffuni+IPPROTO_MUX = 18 187*723f57f2SPedro Giffuni+IPPROTO_MEAS = 19 188*723f57f2SPedro Giffuni+IPPROTO_HMP = 20 189*723f57f2SPedro Giffuni+IPPROTO_PRM = 21 190*723f57f2SPedro Giffuni+IPPROTO_IDP = 22 191*723f57f2SPedro Giffuni+IPPROTO_TRUNK1 = 23 192*723f57f2SPedro Giffuni+IPPROTO_TRUNK2 = 24 193*723f57f2SPedro Giffuni+IPPROTO_LEAF1 = 25 194*723f57f2SPedro Giffuni+IPPROTO_LEAF2 = 26 195*723f57f2SPedro Giffuni+IPPROTO_RDP = 27 196*723f57f2SPedro Giffuni+IPPROTO_IRTP = 28 197*723f57f2SPedro Giffuni+IPPROTO_TP = 29 198*723f57f2SPedro Giffuni+IPPROTO_BLT = 30 199*723f57f2SPedro Giffuni+IPPROTO_NSP = 31 200*723f57f2SPedro Giffuni+IPPROTO_INP = 32 201*723f57f2SPedro Giffuni+IPPROTO_SEP = 33 202*723f57f2SPedro Giffuni+IPPROTO_3PC = 34 203*723f57f2SPedro Giffuni+IPPROTO_IDPR = 35 204*723f57f2SPedro Giffuni+IPPROTO_XTP = 36 205*723f57f2SPedro Giffuni+IPPROTO_DDP = 37 206*723f57f2SPedro Giffuni+IPPROTO_CMTP = 38 207*723f57f2SPedro Giffuni+IPPROTO_TPXX = 39 208*723f57f2SPedro Giffuni+IPPROTO_IL = 40 209*723f57f2SPedro Giffuni+IPPROTO_IPV6 = 41 210*723f57f2SPedro Giffuni+IPPROTO_SDRP = 42 211*723f57f2SPedro Giffuni+IPPROTO_ROUTING = 43 212*723f57f2SPedro Giffuni+IPPROTO_FRAGMENT = 44 213*723f57f2SPedro Giffuni+IPPROTO_IDRP = 45 214*723f57f2SPedro Giffuni+IPPROTO_RSVP = 46 215*723f57f2SPedro Giffuni+IPPROTO_GRE = 47 216*723f57f2SPedro Giffuni+IPPROTO_MHRP = 48 217*723f57f2SPedro Giffuni+IPPROTO_BHA = 49 218*723f57f2SPedro Giffuni+IPPROTO_ESP = 50 219*723f57f2SPedro Giffuni+IPPROTO_AH = 51 220*723f57f2SPedro Giffuni+IPPROTO_INLSP = 52 221*723f57f2SPedro Giffuni+IPPROTO_SWIPE = 53 222*723f57f2SPedro Giffuni+IPPROTO_NHRP = 54 223*723f57f2SPedro Giffuni+IPPROTO_MOBILE = 55 224*723f57f2SPedro Giffuni+IPPROTO_TLSP = 56 225*723f57f2SPedro Giffuni+IPPROTO_SKIP = 57 226*723f57f2SPedro Giffuni+IPPROTO_ICMPV6 = 58 227*723f57f2SPedro Giffuni+IPPROTO_NONE = 59 228*723f57f2SPedro Giffuni+IPPROTO_DSTOPTS = 60 229*723f57f2SPedro Giffuni+IPPROTO_AHIP = 61 230*723f57f2SPedro Giffuni+IPPROTO_CFTP = 62 231*723f57f2SPedro Giffuni+IPPROTO_HELLO = 63 232*723f57f2SPedro Giffuni+IPPROTO_SATEXPAK = 64 233*723f57f2SPedro Giffuni+IPPROTO_KRYPTOLAN = 65 234*723f57f2SPedro Giffuni+IPPROTO_RVD = 66 235*723f57f2SPedro Giffuni+IPPROTO_IPPC = 67 236*723f57f2SPedro Giffuni+IPPROTO_ADFS = 68 237*723f57f2SPedro Giffuni+IPPROTO_SATMON = 69 238*723f57f2SPedro Giffuni+IPPROTO_VISA = 70 239*723f57f2SPedro Giffuni+IPPROTO_IPCV = 71 240*723f57f2SPedro Giffuni+IPPROTO_CPNX = 72 241*723f57f2SPedro Giffuni+IPPROTO_CPHB = 73 242*723f57f2SPedro Giffuni+IPPROTO_WSN = 74 243*723f57f2SPedro Giffuni+IPPROTO_PVP = 75 244*723f57f2SPedro Giffuni+IPPROTO_BRSATMON = 76 245*723f57f2SPedro Giffuni+IPPROTO_ND = 77 246*723f57f2SPedro Giffuni+IPPROTO_WBMON = 78 247*723f57f2SPedro Giffuni+IPPROTO_WBEXPAK = 79 248*723f57f2SPedro Giffuni+IPPROTO_EON = 80 249*723f57f2SPedro Giffuni+IPPROTO_VMTP = 81 250*723f57f2SPedro Giffuni+IPPROTO_SVMTP = 82 251*723f57f2SPedro Giffuni+IPPROTO_VINES = 83 252*723f57f2SPedro Giffuni+IPPROTO_TTP = 84 253*723f57f2SPedro Giffuni+IPPROTO_IGP = 85 254*723f57f2SPedro Giffuni+IPPROTO_DGP = 86 255*723f57f2SPedro Giffuni+IPPROTO_TCF = 87 256*723f57f2SPedro Giffuni+IPPROTO_IGRP = 88 257*723f57f2SPedro Giffuni+IPPROTO_OSPFIGP = 89 258*723f57f2SPedro Giffuni+IPPROTO_SRPC = 90 259*723f57f2SPedro Giffuni+IPPROTO_LARP = 91 260*723f57f2SPedro Giffuni+IPPROTO_MTP = 92 261*723f57f2SPedro Giffuni+IPPROTO_AX25 = 93 262*723f57f2SPedro Giffuni+IPPROTO_IPEIP = 94 263*723f57f2SPedro Giffuni+IPPROTO_MICP = 95 264*723f57f2SPedro Giffuni+IPPROTO_SCCSP = 96 265*723f57f2SPedro Giffuni+IPPROTO_ETHERIP = 97 266*723f57f2SPedro Giffuni+IPPROTO_ENCAP = 98 267*723f57f2SPedro Giffuni+IPPROTO_APES = 99 268*723f57f2SPedro Giffuni+IPPROTO_GMTP = 100 269*723f57f2SPedro Giffuni+IPPROTO_IPCOMP = 108 270*723f57f2SPedro Giffuni+IPPROTO_SCTP = 132 271*723f57f2SPedro Giffuni+IPPROTO_MH = 135 272*723f57f2SPedro Giffuni+IPPROTO_PIM = 103 273*723f57f2SPedro Giffuni+IPPROTO_CARP = 112 274*723f57f2SPedro Giffuni+IPPROTO_PGM = 113 275*723f57f2SPedro Giffuni+IPPROTO_PFSYNC = 240 276*723f57f2SPedro Giffuni+IPPROTO_OLD_DIVERT = 254 277*723f57f2SPedro Giffuni+IPPROTO_MAX = 256 278*723f57f2SPedro Giffuni+IPPROTO_DONE = 257 279*723f57f2SPedro Giffuni+IPPROTO_DIVERT = 258 280*723f57f2SPedro Giffuni+IPPROTO_SEND = 259 281*723f57f2SPedro Giffuni+IPPROTO_SPACER = 32767 282*723f57f2SPedro Giffuni+IPPORT_RESERVED = 1024 283*723f57f2SPedro Giffuni+IPPORT_EPHEMERALFIRST = 10000 284*723f57f2SPedro Giffuni+IPPORT_EPHEMERALLAST = 65535 285*723f57f2SPedro Giffuni+IPPORT_HIFIRSTAUTO = 49152 286*723f57f2SPedro Giffuni+IPPORT_HILASTAUTO = 65535 287*723f57f2SPedro Giffuni+IPPORT_RESERVEDSTART = 600 288*723f57f2SPedro Giffuni+IPPORT_MAX = 65535 289*723f57f2SPedro Giffuni+def IN_CLASSA(i): return (((u_int32_t)(i) & 0x80000000) == 0) 290*723f57f2SPedro Giffuni+ 291*723f57f2SPedro Giffuni+IN_CLASSA_NET = 0xff000000 292*723f57f2SPedro Giffuni+IN_CLASSA_NSHIFT = 24 293*723f57f2SPedro Giffuni+IN_CLASSA_HOST = 0x00ffffff 294*723f57f2SPedro Giffuni+IN_CLASSA_MAX = 128 295*723f57f2SPedro Giffuni+def IN_CLASSB(i): return (((u_int32_t)(i) & 0xc0000000) == 0x80000000) 296*723f57f2SPedro Giffuni+ 297*723f57f2SPedro Giffuni+IN_CLASSB_NET = 0xffff0000 298*723f57f2SPedro Giffuni+IN_CLASSB_NSHIFT = 16 299*723f57f2SPedro Giffuni+IN_CLASSB_HOST = 0x0000ffff 300*723f57f2SPedro Giffuni+IN_CLASSB_MAX = 65536 301*723f57f2SPedro Giffuni+def IN_CLASSC(i): return (((u_int32_t)(i) & 0xe0000000) == 0xc0000000) 302*723f57f2SPedro Giffuni+ 303*723f57f2SPedro Giffuni+IN_CLASSC_NET = 0xffffff00 304*723f57f2SPedro Giffuni+IN_CLASSC_NSHIFT = 8 305*723f57f2SPedro Giffuni+IN_CLASSC_HOST = 0x000000ff 306*723f57f2SPedro Giffuni+def IN_CLASSD(i): return (((u_int32_t)(i) & 0xf0000000) == 0xe0000000) 307*723f57f2SPedro Giffuni+ 308*723f57f2SPedro Giffuni+IN_CLASSD_NET = 0xf0000000 309*723f57f2SPedro Giffuni+IN_CLASSD_NSHIFT = 28 310*723f57f2SPedro Giffuni+IN_CLASSD_HOST = 0x0fffffff 311*723f57f2SPedro Giffuni+def IN_MULTICAST(i): return IN_CLASSD(i) 312*723f57f2SPedro Giffuni+ 313*723f57f2SPedro Giffuni+def IN_EXPERIMENTAL(i): return (((u_int32_t)(i) & 0xf0000000) == 0xf0000000) 314*723f57f2SPedro Giffuni+ 315*723f57f2SPedro Giffuni+def IN_BADCLASS(i): return (((u_int32_t)(i) & 0xf0000000) == 0xf0000000) 316*723f57f2SPedro Giffuni+ 317*723f57f2SPedro Giffuni+def IN_LINKLOCAL(i): return (((u_int32_t)(i) & 0xffff0000) == 0xa9fe0000) 318*723f57f2SPedro Giffuni+ 319*723f57f2SPedro Giffuni+def IN_LOOPBACK(i): return (((u_int32_t)(i) & 0xff000000) == 0x7f000000) 320*723f57f2SPedro Giffuni+ 321*723f57f2SPedro Giffuni+def IN_ZERONET(i): return (((u_int32_t)(i) & 0xff000000) == 0) 322*723f57f2SPedro Giffuni+ 323*723f57f2SPedro Giffuni+def IN_LOCAL_GROUP(i): return (((u_int32_t)(i) & 0xffffff00) == 0xe0000000) 324*723f57f2SPedro Giffuni+ 325*723f57f2SPedro Giffuni+INADDR_NONE = 0xffffffff 326*723f57f2SPedro Giffuni+IN_LOOPBACKNET = 127 327*723f57f2SPedro Giffuni+IP_OPTIONS = 1 328*723f57f2SPedro Giffuni+IP_HDRINCL = 2 329*723f57f2SPedro Giffuni+IP_TOS = 3 330*723f57f2SPedro Giffuni+IP_TTL = 4 331*723f57f2SPedro Giffuni+IP_RECVOPTS = 5 332*723f57f2SPedro Giffuni+IP_RECVRETOPTS = 6 333*723f57f2SPedro Giffuni+IP_RECVDSTADDR = 7 334*723f57f2SPedro Giffuni+IP_SENDSRCADDR = IP_RECVDSTADDR 335*723f57f2SPedro Giffuni+IP_RETOPTS = 8 336*723f57f2SPedro Giffuni+IP_MULTICAST_IF = 9 337*723f57f2SPedro Giffuni+IP_MULTICAST_TTL = 10 338*723f57f2SPedro Giffuni+IP_MULTICAST_LOOP = 11 339*723f57f2SPedro Giffuni+IP_ADD_MEMBERSHIP = 12 340*723f57f2SPedro Giffuni+IP_DROP_MEMBERSHIP = 13 341*723f57f2SPedro Giffuni+IP_MULTICAST_VIF = 14 342*723f57f2SPedro Giffuni+IP_RSVP_ON = 15 343*723f57f2SPedro Giffuni+IP_RSVP_OFF = 16 344*723f57f2SPedro Giffuni+IP_RSVP_VIF_ON = 17 345*723f57f2SPedro Giffuni+IP_RSVP_VIF_OFF = 18 346*723f57f2SPedro Giffuni+IP_PORTRANGE = 19 347*723f57f2SPedro Giffuni+IP_RECVIF = 20 348*723f57f2SPedro Giffuni+IP_IPSEC_POLICY = 21 349*723f57f2SPedro Giffuni+IP_FAITH = 22 350*723f57f2SPedro Giffuni+IP_ONESBCAST = 23 351*723f57f2SPedro Giffuni+IP_BINDANY = 24 352*723f57f2SPedro Giffuni+IP_FW_TABLE_ADD = 40 353*723f57f2SPedro Giffuni+IP_FW_TABLE_DEL = 41 354*723f57f2SPedro Giffuni+IP_FW_TABLE_FLUSH = 42 355*723f57f2SPedro Giffuni+IP_FW_TABLE_GETSIZE = 43 356*723f57f2SPedro Giffuni+IP_FW_TABLE_LIST = 44 357*723f57f2SPedro Giffuni+IP_FW3 = 48 358*723f57f2SPedro Giffuni+IP_DUMMYNET3 = 49 359*723f57f2SPedro Giffuni+IP_FW_ADD = 50 360*723f57f2SPedro Giffuni+IP_FW_DEL = 51 361*723f57f2SPedro Giffuni+IP_FW_FLUSH = 52 362*723f57f2SPedro Giffuni+IP_FW_ZERO = 53 363*723f57f2SPedro Giffuni+IP_FW_GET = 54 364*723f57f2SPedro Giffuni+IP_FW_RESETLOG = 55 365*723f57f2SPedro Giffuni+IP_FW_NAT_CFG = 56 366*723f57f2SPedro Giffuni+IP_FW_NAT_DEL = 57 367*723f57f2SPedro Giffuni+IP_FW_NAT_GET_CONFIG = 58 368*723f57f2SPedro Giffuni+IP_FW_NAT_GET_LOG = 59 369*723f57f2SPedro Giffuni+IP_DUMMYNET_CONFIGURE = 60 370*723f57f2SPedro Giffuni+IP_DUMMYNET_DEL = 61 371*723f57f2SPedro Giffuni+IP_DUMMYNET_FLUSH = 62 372*723f57f2SPedro Giffuni+IP_DUMMYNET_GET = 64 373*723f57f2SPedro Giffuni+IP_RECVTTL = 65 374*723f57f2SPedro Giffuni+IP_MINTTL = 66 375*723f57f2SPedro Giffuni+IP_DONTFRAG = 67 376*723f57f2SPedro Giffuni+IP_ADD_SOURCE_MEMBERSHIP = 70 377*723f57f2SPedro Giffuni+IP_DROP_SOURCE_MEMBERSHIP = 71 378*723f57f2SPedro Giffuni+IP_BLOCK_SOURCE = 72 379*723f57f2SPedro Giffuni+IP_UNBLOCK_SOURCE = 73 380*723f57f2SPedro Giffuni+IP_MSFILTER = 74 381*723f57f2SPedro Giffuni+MCAST_JOIN_GROUP = 80 382*723f57f2SPedro Giffuni+MCAST_LEAVE_GROUP = 81 383*723f57f2SPedro Giffuni+MCAST_JOIN_SOURCE_GROUP = 82 384*723f57f2SPedro Giffuni+MCAST_LEAVE_SOURCE_GROUP = 83 385*723f57f2SPedro Giffuni+MCAST_BLOCK_SOURCE = 84 386*723f57f2SPedro Giffuni+MCAST_UNBLOCK_SOURCE = 85 387*723f57f2SPedro Giffuni+IP_DEFAULT_MULTICAST_TTL = 1 388*723f57f2SPedro Giffuni+IP_DEFAULT_MULTICAST_LOOP = 1 389*723f57f2SPedro Giffuni+IP_MIN_MEMBERSHIPS = 31 390*723f57f2SPedro Giffuni+IP_MAX_MEMBERSHIPS = 4095 391*723f57f2SPedro Giffuni+IP_MAX_SOURCE_FILTER = 1024 392*723f57f2SPedro Giffuni+IP_MAX_GROUP_SRC_FILTER = 512 393*723f57f2SPedro Giffuni+IP_MAX_SOCK_SRC_FILTER = 128 394*723f57f2SPedro Giffuni+IP_MAX_SOCK_MUTE_FILTER = 128 395*723f57f2SPedro Giffuni+MCAST_UNDEFINED = 0 396*723f57f2SPedro Giffuni+MCAST_INCLUDE = 1 397*723f57f2SPedro Giffuni+MCAST_EXCLUDE = 2 398*723f57f2SPedro Giffuni+IP_PORTRANGE_DEFAULT = 0 399*723f57f2SPedro Giffuni+IP_PORTRANGE_HIGH = 1 400*723f57f2SPedro Giffuni+IP_PORTRANGE_LOW = 2 401*723f57f2SPedro Giffuni+IPPROTO_MAXID = (IPPROTO_AH + 1) 402*723f57f2SPedro Giffuni+IPCTL_FORWARDING = 1 403*723f57f2SPedro Giffuni+IPCTL_SENDREDIRECTS = 2 404*723f57f2SPedro Giffuni+IPCTL_DEFTTL = 3 405*723f57f2SPedro Giffuni+IPCTL_DEFMTU = 4 406*723f57f2SPedro Giffuni+IPCTL_RTEXPIRE = 5 407*723f57f2SPedro Giffuni+IPCTL_RTMINEXPIRE = 6 408*723f57f2SPedro Giffuni+IPCTL_RTMAXCACHE = 7 409*723f57f2SPedro Giffuni+IPCTL_SOURCEROUTE = 8 410*723f57f2SPedro Giffuni+IPCTL_DIRECTEDBROADCAST = 9 411*723f57f2SPedro Giffuni+IPCTL_INTRQMAXLEN = 10 412*723f57f2SPedro Giffuni+IPCTL_INTRQDROPS = 11 413*723f57f2SPedro Giffuni+IPCTL_STATS = 12 414*723f57f2SPedro Giffuni+IPCTL_ACCEPTSOURCEROUTE = 13 415*723f57f2SPedro Giffuni+IPCTL_FASTFORWARDING = 14 416*723f57f2SPedro Giffuni+IPCTL_KEEPFAITH = 15 417*723f57f2SPedro Giffuni+IPCTL_GIF_TTL = 16 418*723f57f2SPedro Giffuni+IPCTL_MAXID = 17 419*723f57f2SPedro Giffuni+def in_nullhost(x): return ((x).s_addr == INADDR_ANY) 420*723f57f2SPedro Giffuni+ 421*723f57f2SPedro Giffuni+def in_allhosts(x): return ((x).s_addr == htonl(INADDR_ALLHOSTS_GROUP)) 422*723f57f2SPedro Giffuni+ 423*723f57f2SPedro Giffuni+ 424*723f57f2SPedro Giffuni+# Included from netinet6/in6.h 425*723f57f2SPedro Giffuni+__KAME_VERSION = "FreeBSD" 426*723f57f2SPedro Giffuni+IPV6PORT_RESERVED = 1024 427*723f57f2SPedro Giffuni+IPV6PORT_ANONMIN = 49152 428*723f57f2SPedro Giffuni+IPV6PORT_ANONMAX = 65535 429*723f57f2SPedro Giffuni+IPV6PORT_RESERVEDMIN = 600 430*723f57f2SPedro Giffuni+IPV6PORT_RESERVEDMAX = (IPV6PORT_RESERVED-1) 431*723f57f2SPedro Giffuni+INET6_ADDRSTRLEN = 46 432*723f57f2SPedro Giffuni+IPV6_ADDR_INT32_ONE = 1 433*723f57f2SPedro Giffuni+IPV6_ADDR_INT32_TWO = 2 434*723f57f2SPedro Giffuni+IPV6_ADDR_INT32_MNL = 0xff010000 435*723f57f2SPedro Giffuni+IPV6_ADDR_INT32_MLL = 0xff020000 436*723f57f2SPedro Giffuni+IPV6_ADDR_INT32_SMP = 0x0000ffff 437*723f57f2SPedro Giffuni+IPV6_ADDR_INT16_ULL = 0xfe80 438*723f57f2SPedro Giffuni+IPV6_ADDR_INT16_USL = 0xfec0 439*723f57f2SPedro Giffuni+IPV6_ADDR_INT16_MLL = 0xff02 440*723f57f2SPedro Giffuni+IPV6_ADDR_INT32_ONE = 0x01000000 441*723f57f2SPedro Giffuni+IPV6_ADDR_INT32_TWO = 0x02000000 442*723f57f2SPedro Giffuni+IPV6_ADDR_INT32_MNL = 0x000001ff 443*723f57f2SPedro Giffuni+IPV6_ADDR_INT32_MLL = 0x000002ff 444*723f57f2SPedro Giffuni+IPV6_ADDR_INT32_SMP = 0xffff0000 445*723f57f2SPedro Giffuni+IPV6_ADDR_INT16_ULL = 0x80fe 446*723f57f2SPedro Giffuni+IPV6_ADDR_INT16_USL = 0xc0fe 447*723f57f2SPedro Giffuni+IPV6_ADDR_INT16_MLL = 0x02ff 448*723f57f2SPedro Giffuni+def IN6_IS_ADDR_UNSPECIFIED(a): return \ 449*723f57f2SPedro Giffuni+ 450*723f57f2SPedro Giffuni+def IN6_IS_ADDR_LOOPBACK(a): return \ 451*723f57f2SPedro Giffuni+ 452*723f57f2SPedro Giffuni+def IN6_IS_ADDR_V4COMPAT(a): return \ 453*723f57f2SPedro Giffuni+ 454*723f57f2SPedro Giffuni+def IN6_IS_ADDR_V4MAPPED(a): return \ 455*723f57f2SPedro Giffuni+ 456*723f57f2SPedro Giffuni+IPV6_ADDR_SCOPE_NODELOCAL = 0x01 457*723f57f2SPedro Giffuni+IPV6_ADDR_SCOPE_INTFACELOCAL = 0x01 458*723f57f2SPedro Giffuni+IPV6_ADDR_SCOPE_LINKLOCAL = 0x02 459*723f57f2SPedro Giffuni+IPV6_ADDR_SCOPE_SITELOCAL = 0x05 460*723f57f2SPedro Giffuni+IPV6_ADDR_SCOPE_ORGLOCAL = 0x08 461*723f57f2SPedro Giffuni+IPV6_ADDR_SCOPE_GLOBAL = 0x0e 462*723f57f2SPedro Giffuni+__IPV6_ADDR_SCOPE_NODELOCAL = 0x01 463*723f57f2SPedro Giffuni+__IPV6_ADDR_SCOPE_INTFACELOCAL = 0x01 464*723f57f2SPedro Giffuni+__IPV6_ADDR_SCOPE_LINKLOCAL = 0x02 465*723f57f2SPedro Giffuni+__IPV6_ADDR_SCOPE_SITELOCAL = 0x05 466*723f57f2SPedro Giffuni+__IPV6_ADDR_SCOPE_ORGLOCAL = 0x08 467*723f57f2SPedro Giffuni+__IPV6_ADDR_SCOPE_GLOBAL = 0x0e 468*723f57f2SPedro Giffuni+def IN6_IS_ADDR_LINKLOCAL(a): return \ 469*723f57f2SPedro Giffuni+ 470*723f57f2SPedro Giffuni+def IN6_IS_ADDR_SITELOCAL(a): return \ 471*723f57f2SPedro Giffuni+ 472*723f57f2SPedro Giffuni+def IN6_IS_ADDR_MC_NODELOCAL(a): return \ 473*723f57f2SPedro Giffuni+ 474*723f57f2SPedro Giffuni+def IN6_IS_ADDR_MC_INTFACELOCAL(a): return \ 475*723f57f2SPedro Giffuni+ 476*723f57f2SPedro Giffuni+def IN6_IS_ADDR_MC_LINKLOCAL(a): return \ 477*723f57f2SPedro Giffuni+ 478*723f57f2SPedro Giffuni+def IN6_IS_ADDR_MC_SITELOCAL(a): return \ 479*723f57f2SPedro Giffuni+ 480*723f57f2SPedro Giffuni+def IN6_IS_ADDR_MC_ORGLOCAL(a): return \ 481*723f57f2SPedro Giffuni+ 482*723f57f2SPedro Giffuni+def IN6_IS_ADDR_MC_GLOBAL(a): return \ 483*723f57f2SPedro Giffuni+ 484*723f57f2SPedro Giffuni+def IN6_IS_ADDR_MC_NODELOCAL(a): return \ 485*723f57f2SPedro Giffuni+ 486*723f57f2SPedro Giffuni+def IN6_IS_ADDR_MC_LINKLOCAL(a): return \ 487*723f57f2SPedro Giffuni+ 488*723f57f2SPedro Giffuni+def IN6_IS_ADDR_MC_SITELOCAL(a): return \ 489*723f57f2SPedro Giffuni+ 490*723f57f2SPedro Giffuni+def IN6_IS_ADDR_MC_ORGLOCAL(a): return \ 491*723f57f2SPedro Giffuni+ 492*723f57f2SPedro Giffuni+def IN6_IS_ADDR_MC_GLOBAL(a): return \ 493*723f57f2SPedro Giffuni+ 494*723f57f2SPedro Giffuni+def IN6_IS_SCOPE_LINKLOCAL(a): return \ 495*723f57f2SPedro Giffuni+ 496*723f57f2SPedro Giffuni+def IN6_IS_SCOPE_EMBED(a): return \ 497*723f57f2SPedro Giffuni+ 498*723f57f2SPedro Giffuni+def IFA6_IS_DEPRECATED(a): return \ 499*723f57f2SPedro Giffuni+ 500*723f57f2SPedro Giffuni+def IFA6_IS_INVALID(a): return \ 501*723f57f2SPedro Giffuni+ 502*723f57f2SPedro Giffuni+IPV6_OPTIONS = 1 503*723f57f2SPedro Giffuni+IPV6_RECVOPTS = 5 504*723f57f2SPedro Giffuni+IPV6_RECVRETOPTS = 6 505*723f57f2SPedro Giffuni+IPV6_RECVDSTADDR = 7 506*723f57f2SPedro Giffuni+IPV6_RETOPTS = 8 507*723f57f2SPedro Giffuni+IPV6_SOCKOPT_RESERVED1 = 3 508*723f57f2SPedro Giffuni+IPV6_UNICAST_HOPS = 4 509*723f57f2SPedro Giffuni+IPV6_MULTICAST_IF = 9 510*723f57f2SPedro Giffuni+IPV6_MULTICAST_HOPS = 10 511*723f57f2SPedro Giffuni+IPV6_MULTICAST_LOOP = 11 512*723f57f2SPedro Giffuni+IPV6_JOIN_GROUP = 12 513*723f57f2SPedro Giffuni+IPV6_LEAVE_GROUP = 13 514*723f57f2SPedro Giffuni+IPV6_PORTRANGE = 14 515*723f57f2SPedro Giffuni+ICMP6_FILTER = 18 516*723f57f2SPedro Giffuni+IPV6_2292PKTINFO = 19 517*723f57f2SPedro Giffuni+IPV6_2292HOPLIMIT = 20 518*723f57f2SPedro Giffuni+IPV6_2292NEXTHOP = 21 519*723f57f2SPedro Giffuni+IPV6_2292HOPOPTS = 22 520*723f57f2SPedro Giffuni+IPV6_2292DSTOPTS = 23 521*723f57f2SPedro Giffuni+IPV6_2292RTHDR = 24 522*723f57f2SPedro Giffuni+IPV6_2292PKTOPTIONS = 25 523*723f57f2SPedro Giffuni+IPV6_CHECKSUM = 26 524*723f57f2SPedro Giffuni+IPV6_V6ONLY = 27 525*723f57f2SPedro Giffuni+IPV6_BINDV6ONLY = IPV6_V6ONLY 526*723f57f2SPedro Giffuni+IPV6_IPSEC_POLICY = 28 527*723f57f2SPedro Giffuni+IPV6_FAITH = 29 528*723f57f2SPedro Giffuni+IPV6_FW_ADD = 30 529*723f57f2SPedro Giffuni+IPV6_FW_DEL = 31 530*723f57f2SPedro Giffuni+IPV6_FW_FLUSH = 32 531*723f57f2SPedro Giffuni+IPV6_FW_ZERO = 33 532*723f57f2SPedro Giffuni+IPV6_FW_GET = 34 533*723f57f2SPedro Giffuni+IPV6_RTHDRDSTOPTS = 35 534*723f57f2SPedro Giffuni+IPV6_RECVPKTINFO = 36 535*723f57f2SPedro Giffuni+IPV6_RECVHOPLIMIT = 37 536*723f57f2SPedro Giffuni+IPV6_RECVRTHDR = 38 537*723f57f2SPedro Giffuni+IPV6_RECVHOPOPTS = 39 538*723f57f2SPedro Giffuni+IPV6_RECVDSTOPTS = 40 539*723f57f2SPedro Giffuni+IPV6_RECVRTHDRDSTOPTS = 41 540*723f57f2SPedro Giffuni+IPV6_USE_MIN_MTU = 42 541*723f57f2SPedro Giffuni+IPV6_RECVPATHMTU = 43 542*723f57f2SPedro Giffuni+IPV6_PATHMTU = 44 543*723f57f2SPedro Giffuni+IPV6_REACHCONF = 45 544*723f57f2SPedro Giffuni+IPV6_PKTINFO = 46 545*723f57f2SPedro Giffuni+IPV6_HOPLIMIT = 47 546*723f57f2SPedro Giffuni+IPV6_NEXTHOP = 48 547*723f57f2SPedro Giffuni+IPV6_HOPOPTS = 49 548*723f57f2SPedro Giffuni+IPV6_DSTOPTS = 50 549*723f57f2SPedro Giffuni+IPV6_RTHDR = 51 550*723f57f2SPedro Giffuni+IPV6_PKTOPTIONS = 52 551*723f57f2SPedro Giffuni+IPV6_RECVTCLASS = 57 552*723f57f2SPedro Giffuni+IPV6_AUTOFLOWLABEL = 59 553*723f57f2SPedro Giffuni+IPV6_TCLASS = 61 554*723f57f2SPedro Giffuni+IPV6_DONTFRAG = 62 555*723f57f2SPedro Giffuni+IPV6_PREFER_TEMPADDR = 63 556*723f57f2SPedro Giffuni+IPV6_BINDANY = 64 557*723f57f2SPedro Giffuni+IPV6_MSFILTER = 74 558*723f57f2SPedro Giffuni+IPV6_RTHDR_LOOSE = 0 559*723f57f2SPedro Giffuni+IPV6_RTHDR_STRICT = 1 560*723f57f2SPedro Giffuni+IPV6_RTHDR_TYPE_0 = 0 561*723f57f2SPedro Giffuni+IPV6_DEFAULT_MULTICAST_HOPS = 1 562*723f57f2SPedro Giffuni+IPV6_DEFAULT_MULTICAST_LOOP = 1 563*723f57f2SPedro Giffuni+IPV6_MIN_MEMBERSHIPS = 31 564*723f57f2SPedro Giffuni+IPV6_MAX_MEMBERSHIPS = 4095 565*723f57f2SPedro Giffuni+IPV6_MAX_GROUP_SRC_FILTER = 512 566*723f57f2SPedro Giffuni+IPV6_MAX_SOCK_SRC_FILTER = 128 567*723f57f2SPedro Giffuni+IPV6_PORTRANGE_DEFAULT = 0 568*723f57f2SPedro Giffuni+IPV6_PORTRANGE_HIGH = 1 569*723f57f2SPedro Giffuni+IPV6_PORTRANGE_LOW = 2 570*723f57f2SPedro Giffuni+IPV6PROTO_MAXID = (IPPROTO_PIM + 1) 571*723f57f2SPedro Giffuni+IPV6CTL_FORWARDING = 1 572*723f57f2SPedro Giffuni+IPV6CTL_SENDREDIRECTS = 2 573*723f57f2SPedro Giffuni+IPV6CTL_DEFHLIM = 3 574*723f57f2SPedro Giffuni+IPV6CTL_DEFMTU = 4 575*723f57f2SPedro Giffuni+IPV6CTL_FORWSRCRT = 5 576*723f57f2SPedro Giffuni+IPV6CTL_STATS = 6 577*723f57f2SPedro Giffuni+IPV6CTL_MRTSTATS = 7 578*723f57f2SPedro Giffuni+IPV6CTL_MRTPROTO = 8 579*723f57f2SPedro Giffuni+IPV6CTL_MAXFRAGPACKETS = 9 580*723f57f2SPedro Giffuni+IPV6CTL_SOURCECHECK = 10 581*723f57f2SPedro Giffuni+IPV6CTL_SOURCECHECK_LOGINT = 11 582*723f57f2SPedro Giffuni+IPV6CTL_ACCEPT_RTADV = 12 583*723f57f2SPedro Giffuni+IPV6CTL_KEEPFAITH = 13 584*723f57f2SPedro Giffuni+IPV6CTL_LOG_INTERVAL = 14 585*723f57f2SPedro Giffuni+IPV6CTL_HDRNESTLIMIT = 15 586*723f57f2SPedro Giffuni+IPV6CTL_DAD_COUNT = 16 587*723f57f2SPedro Giffuni+IPV6CTL_AUTO_FLOWLABEL = 17 588*723f57f2SPedro Giffuni+IPV6CTL_DEFMCASTHLIM = 18 589*723f57f2SPedro Giffuni+IPV6CTL_GIF_HLIM = 19 590*723f57f2SPedro Giffuni+IPV6CTL_KAME_VERSION = 20 591*723f57f2SPedro Giffuni+IPV6CTL_USE_DEPRECATED = 21 592*723f57f2SPedro Giffuni+IPV6CTL_RR_PRUNE = 22 593*723f57f2SPedro Giffuni+IPV6CTL_MAPPED_ADDR = 23 594*723f57f2SPedro Giffuni+IPV6CTL_V6ONLY = 24 595*723f57f2SPedro Giffuni+IPV6CTL_RTEXPIRE = 25 596*723f57f2SPedro Giffuni+IPV6CTL_RTMINEXPIRE = 26 597*723f57f2SPedro Giffuni+IPV6CTL_RTMAXCACHE = 27 598*723f57f2SPedro Giffuni+IPV6CTL_USETEMPADDR = 32 599*723f57f2SPedro Giffuni+IPV6CTL_TEMPPLTIME = 33 600*723f57f2SPedro Giffuni+IPV6CTL_TEMPVLTIME = 34 601*723f57f2SPedro Giffuni+IPV6CTL_AUTO_LINKLOCAL = 35 602*723f57f2SPedro Giffuni+IPV6CTL_RIP6STATS = 36 603*723f57f2SPedro Giffuni+IPV6CTL_PREFER_TEMPADDR = 37 604*723f57f2SPedro Giffuni+IPV6CTL_ADDRCTLPOLICY = 38 605*723f57f2SPedro Giffuni+IPV6CTL_USE_DEFAULTZONE = 39 606*723f57f2SPedro Giffuni+IPV6CTL_MAXFRAGS = 41 607*723f57f2SPedro Giffuni+IPV6CTL_IFQ = 42 608*723f57f2SPedro Giffuni+IPV6CTL_ISATAPRTR = 43 609*723f57f2SPedro Giffuni+IPV6CTL_MCAST_PMTU = 44 610*723f57f2SPedro Giffuni+IPV6CTL_STEALTH = 45 611*723f57f2SPedro Giffuni+ICMPV6CTL_ND6_ONLINKNSRFC4861 = 47 612*723f57f2SPedro Giffuni+IPV6CTL_NO_RADR = 48 613*723f57f2SPedro Giffuni+IPV6CTL_NORBIT_RAIF = 49 614*723f57f2SPedro Giffuni+IPV6CTL_RFC6204W3 = 50 615*723f57f2SPedro Giffuni+IPV6CTL_MAXID = 51 616*723f57f2SPedro Giffuni--- misc/Python-2.7.3/Lib/plat-freebsd9/regen 1969-12-31 19:00:00.000000000 -0500 617*723f57f2SPedro Giffuni+++ misc/build/Python-2.7.3/Lib/plat-freebsd9/regen 2012-08-01 18:55:27.000000000 -0500 618*723f57f2SPedro Giffuni@@ -0,0 +1,3 @@ 619*723f57f2SPedro Giffuni+#! /bin/sh 620*723f57f2SPedro Giffuni+set -v 621*723f57f2SPedro Giffuni+python ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h 6220a45483eSPedro Giffuni--- misc/Python-2.7.3/Lib/test/test_threading.py 2012-04-09 18:07:32.000000000 -0500 623*723f57f2SPedro Giffuni+++ misc/build/Python-2.7.3/Lib/test/test_threading.py 2012-08-01 18:44:40.000000000 -0500 6240a45483eSPedro Giffuni@@ -421,7 +421,7 @@ 6250a45483eSPedro Giffuni # #12316 and #11870), and fork() from a worker thread is known to trigger 6260a45483eSPedro Giffuni # problems with some operating systems (issue #3863): skip problematic tests 6270a45483eSPedro Giffuni # on platforms known to behave badly. 6280a45483eSPedro Giffuni- platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'netbsd5', 6290a45483eSPedro Giffuni+ platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8', 'freebsd9', 'netbsd5', 6300a45483eSPedro Giffuni 'os2emx') 6310a45483eSPedro Giffuni 6320a45483eSPedro Giffuni def _run_and_join(self, script): 6330a45483eSPedro Giffuni--- misc/Python-2.7.3/Modules/_ctypes/libffi/configure 2012-04-09 18:07:33.000000000 -0500 634*723f57f2SPedro Giffuni+++ misc/build/Python-2.7.3/Modules/_ctypes/libffi/configure 2012-08-01 18:53:21.000000000 -0500 6350a45483eSPedro Giffuni@@ -6289,7 +6289,7 @@ 6360a45483eSPedro Giffuni rm -rf conftest* 6370a45483eSPedro Giffuni ;; 6380a45483eSPedro Giffuni 6390a45483eSPedro Giffuni-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 6400a45483eSPedro Giffuni+amd64-*-freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 6410a45483eSPedro Giffuni s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 6420a45483eSPedro Giffuni # Find out which ABI we are using. 6430a45483eSPedro Giffuni echo 'int i;' > conftest.$ac_ext 644*723f57f2SPedro Giffuni@@ -11275,6 +11275,9 @@ 645*723f57f2SPedro Giffuni powerpc-*-freebsd*) 646*723f57f2SPedro Giffuni TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc 647*723f57f2SPedro Giffuni ;; 648*723f57f2SPedro Giffuni+ powerpc64-*-freebsd*) 649*723f57f2SPedro Giffuni+ TARGET=POWERPC; TARGETDIR=powerpc 650*723f57f2SPedro Giffuni+ ;; 651*723f57f2SPedro Giffuni powerpc*-*-rtems*) 652*723f57f2SPedro Giffuni TARGET=POWERPC; TARGETDIR=powerpc 653*723f57f2SPedro Giffuni ;; 654*723f57f2SPedro Giffuni--- misc/Python-2.7.3/Modules/fcntlmodule.c 2012-04-09 18:07:34.000000000 -0500 655*723f57f2SPedro Giffuni+++ misc/build/Python-2.7.3/Modules/fcntlmodule.c 2012-08-01 18:44:40.000000000 -0500 656*723f57f2SPedro Giffuni@@ -97,20 +97,15 @@ 657*723f57f2SPedro Giffuni { 658*723f57f2SPedro Giffuni #define IOCTL_BUFSZ 1024 659*723f57f2SPedro Giffuni int fd; 660*723f57f2SPedro Giffuni- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I' 661*723f57f2SPedro Giffuni+ /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k' 662*723f57f2SPedro Giffuni format for the 'code' parameter because Python turns 0x8000000 663*723f57f2SPedro Giffuni into either a large positive number (PyLong or PyInt on 64-bit 664*723f57f2SPedro Giffuni platforms) or a negative number on others (32-bit PyInt) 665*723f57f2SPedro Giffuni whereas the system expects it to be a 32bit bit field value 666*723f57f2SPedro Giffuni regardless of it being passed as an int or unsigned long on 667*723f57f2SPedro Giffuni- various platforms. See the termios.TIOCSWINSZ constant across 668*723f57f2SPedro Giffuni- platforms for an example of thise. 669*723f57f2SPedro Giffuni- 670*723f57f2SPedro Giffuni- If any of the 64bit platforms ever decide to use more than 32bits 671*723f57f2SPedro Giffuni- in their unsigned long ioctl codes this will break and need 672*723f57f2SPedro Giffuni- special casing based on the platform being built on. 673*723f57f2SPedro Giffuni+ various platforms. 674*723f57f2SPedro Giffuni */ 675*723f57f2SPedro Giffuni- unsigned int code; 676*723f57f2SPedro Giffuni+ unsigned long code; 677*723f57f2SPedro Giffuni int arg; 678*723f57f2SPedro Giffuni int ret; 679*723f57f2SPedro Giffuni char *str; 680*723f57f2SPedro Giffuni@@ -118,7 +113,7 @@ 681*723f57f2SPedro Giffuni int mutate_arg = 1; 682*723f57f2SPedro Giffuni char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */ 683*723f57f2SPedro Giffuni 684*723f57f2SPedro Giffuni- if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl", 685*723f57f2SPedro Giffuni+ if (PyArg_ParseTuple(args, "O&kw#|i:ioctl", 686*723f57f2SPedro Giffuni conv_descriptor, &fd, &code, 687*723f57f2SPedro Giffuni &str, &len, &mutate_arg)) { 688*723f57f2SPedro Giffuni char *arg; 689*723f57f2SPedro Giffuni@@ -169,7 +164,7 @@ 690*723f57f2SPedro Giffuni } 691*723f57f2SPedro Giffuni 692*723f57f2SPedro Giffuni PyErr_Clear(); 693*723f57f2SPedro Giffuni- if (PyArg_ParseTuple(args, "O&Is#:ioctl", 694*723f57f2SPedro Giffuni+ if (PyArg_ParseTuple(args, "O&ks#:ioctl", 695*723f57f2SPedro Giffuni conv_descriptor, &fd, &code, &str, &len)) { 696*723f57f2SPedro Giffuni if (len > IOCTL_BUFSZ) { 697*723f57f2SPedro Giffuni PyErr_SetString(PyExc_ValueError, 698*723f57f2SPedro Giffuni@@ -191,7 +186,7 @@ 699*723f57f2SPedro Giffuni PyErr_Clear(); 700*723f57f2SPedro Giffuni arg = 0; 701*723f57f2SPedro Giffuni if (!PyArg_ParseTuple(args, 702*723f57f2SPedro Giffuni- "O&I|i;ioctl requires a file or file descriptor," 703*723f57f2SPedro Giffuni+ "O&k|i;ioctl requires a file or file descriptor," 704*723f57f2SPedro Giffuni " an integer and optionally an integer or buffer argument", 705*723f57f2SPedro Giffuni conv_descriptor, &fd, &code, &arg)) { 706*723f57f2SPedro Giffuni return NULL; 7070a45483eSPedro Giffuni--- misc/Python-2.7.3/Python/thread_pthread.h 2012-04-09 18:07:35.000000000 -0500 708*723f57f2SPedro Giffuni+++ misc/build/Python-2.7.3/Python/thread_pthread.h 2012-08-01 18:44:40.000000000 -0500 709*723f57f2SPedro Giffuni@@ -38,13 +38,18 @@ 710*723f57f2SPedro Giffuni #endif 711*723f57f2SPedro Giffuni #endif 712*723f57f2SPedro Giffuni 713*723f57f2SPedro Giffuni+#ifdef __FreeBSD__ 714*723f57f2SPedro Giffuni+#include <osreldate.h> 715*723f57f2SPedro Giffuni+#endif 716*723f57f2SPedro Giffuni+ 717*723f57f2SPedro Giffuni /* The POSIX spec says that implementations supporting the sem_* 718*723f57f2SPedro Giffuni family of functions must indicate this by defining 719*723f57f2SPedro Giffuni _POSIX_SEMAPHORES. */ 720*723f57f2SPedro Giffuni #ifdef _POSIX_SEMAPHORES 721*723f57f2SPedro Giffuni /* On FreeBSD 4.x, _POSIX_SEMAPHORES is defined empty, so 722*723f57f2SPedro Giffuni we need to add 0 to make it work there as well. */ 723*723f57f2SPedro Giffuni-#if (_POSIX_SEMAPHORES+0) == -1 724*723f57f2SPedro Giffuni+#if defined(__FreeBSD__) && __FreeBSD_version < 701104 && \ 725*723f57f2SPedro Giffuni+ (_POSIX_SEMAPHORES+0) == -1 726*723f57f2SPedro Giffuni #define HAVE_BROKEN_POSIX_SEMAPHORES 727*723f57f2SPedro Giffuni #else 728*723f57f2SPedro Giffuni #include <semaphore.h> 729*723f57f2SPedro Giffuni@@ -56,7 +61,6 @@ 7300a45483eSPedro Giffuni in default setting. So the process scope is preferred to get 7310a45483eSPedro Giffuni enough number of threads to work. */ 7320a45483eSPedro Giffuni #ifdef __FreeBSD__ 7330a45483eSPedro Giffuni-#include <osreldate.h> 7340a45483eSPedro Giffuni #if __FreeBSD_version >= 500000 && __FreeBSD_version < 504101 7350a45483eSPedro Giffuni #undef PTHREAD_SYSTEM_SCHED_SUPPORTED 7360a45483eSPedro Giffuni #endif 737*723f57f2SPedro Giffuni@@ -161,6 +165,7 @@ 7380a45483eSPedro Giffuni { 7390a45483eSPedro Giffuni pthread_t th; 7400a45483eSPedro Giffuni int status; 7410a45483eSPedro Giffuni+ sigset_t set, oset; 7420a45483eSPedro Giffuni #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) 7430a45483eSPedro Giffuni pthread_attr_t attrs; 7440a45483eSPedro Giffuni #endif 745*723f57f2SPedro Giffuni@@ -189,6 +194,8 @@ 7460a45483eSPedro Giffuni #if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) 7470a45483eSPedro Giffuni pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM); 7480a45483eSPedro Giffuni #endif 7490a45483eSPedro Giffuni+ sigfillset(&set); 7500a45483eSPedro Giffuni+ SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset); 751*723f57f2SPedro Giffuni 7520a45483eSPedro Giffuni status = pthread_create(&th, 7530a45483eSPedro Giffuni #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) 754*723f57f2SPedro Giffuni@@ -200,6 +207,7 @@ 7550a45483eSPedro Giffuni (void *)arg 7560a45483eSPedro Giffuni ); 7570a45483eSPedro Giffuni 7580a45483eSPedro Giffuni+ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL); 7590a45483eSPedro Giffuni #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) 7600a45483eSPedro Giffuni pthread_attr_destroy(&attrs); 7610a45483eSPedro Giffuni #endif 762*723f57f2SPedro Giffunidiff -ruN misc/Python-2.7.3/configure misc/build/Python-2.7.3/configure 7630a45483eSPedro Giffuni--- misc/Python-2.7.3/configure 2012-04-09 18:07:36.000000000 -0500 764*723f57f2SPedro Giffuni+++ misc/build/Python-2.7.3/configure 2012-08-01 18:44:40.000000000 -0500 7650a45483eSPedro Giffuni@@ -4916,7 +4916,7 @@ 7660a45483eSPedro Giffuni ;; 7670a45483eSPedro Giffuni SunOS*) 7680a45483eSPedro Giffuni LDLIBRARY='libpython$(VERSION).so' 7690a45483eSPedro Giffuni- BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)' 7700a45483eSPedro Giffuni+ BLDLIBRARY=-R\'\$\$ORIGIN\'' -L. -lpython$(VERSION)' 7710a45483eSPedro Giffuni RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} 7720a45483eSPedro Giffuni INSTSONAME="$LDLIBRARY".$SOVERSION 7730a45483eSPedro Giffuni ;; 7740a45483eSPedro Giffuni@@ -4924,11 +4924,6 @@ 7750a45483eSPedro Giffuni LDLIBRARY='libpython$(VERSION).so' 7760a45483eSPedro Giffuni BLDLIBRARY='-L. -lpython$(VERSION)' 7770a45483eSPedro Giffuni RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} 7780a45483eSPedro Giffuni- case $ac_sys_system in 7790a45483eSPedro Giffuni- FreeBSD*) 7800a45483eSPedro Giffuni- SOVERSION=`echo $SOVERSION|cut -d "." -f 1` 7810a45483eSPedro Giffuni- ;; 7820a45483eSPedro Giffuni- esac 7830a45483eSPedro Giffuni INSTSONAME="$LDLIBRARY".$SOVERSION 7840a45483eSPedro Giffuni ;; 7850a45483eSPedro Giffuni hp*|HP*) 786*723f57f2SPedro Giffunidiff -ruN misc/Python-2.7.3/setup.py misc/build/Python-2.7.3/setup.py 7870a45483eSPedro Giffuni--- misc/Python-2.7.3/setup.py 2012-04-09 18:07:36.000000000 -0500 788*723f57f2SPedro Giffuni+++ misc/build/Python-2.7.3/setup.py 2012-08-01 18:44:40.000000000 -0500 7890a45483eSPedro Giffuni@@ -1432,7 +1432,7 @@ 7900a45483eSPedro Giffuni macros = dict() 7910a45483eSPedro Giffuni libraries = [] 7920a45483eSPedro Giffuni 7930a45483eSPedro Giffuni- elif platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'): 7940a45483eSPedro Giffuni+ elif platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8', 'freebsd9'): 7950a45483eSPedro Giffuni # FreeBSD's P1003.1b semaphore support is very experimental 7960a45483eSPedro Giffuni # and has many known problems. (as of June 2008) 7970a45483eSPedro Giffuni macros = dict() 7980a45483eSPedro Giffuni@@ -1484,7 +1484,7 @@ 7990a45483eSPedro Giffuni missing.append('linuxaudiodev') 8000a45483eSPedro Giffuni 8010a45483eSPedro Giffuni if (platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6', 8020a45483eSPedro Giffuni- 'freebsd7', 'freebsd8') 8030a45483eSPedro Giffuni+ 'freebsd7', 'freebsd8', 'freebsd9') 8040a45483eSPedro Giffuni or platform.startswith("gnukfreebsd")): 8050a45483eSPedro Giffuni exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) ) 8060a45483eSPedro Giffuni else: 807