Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1 | # Generated by h2py from /usr/include/netinet/in.h |
| 2 | |
| 3 | # Included from netinet/in_f.h |
| 4 | def IN_CLASSA(i): return (((long)(i) & 0x80000000) == 0) |
| 5 | |
| 6 | IN_CLASSA_NET = 0xff000000 |
| 7 | IN_CLASSA_NSHIFT = 24 |
| 8 | IN_CLASSA_HOST = 0x00ffffff |
| 9 | IN_CLASSA_MAX = 128 |
| 10 | def IN_CLASSB(i): return (((long)(i) & 0xc0000000) == 0x80000000) |
| 11 | |
| 12 | IN_CLASSB_NET = 0xffff0000 |
| 13 | IN_CLASSB_NSHIFT = 16 |
| 14 | IN_CLASSB_HOST = 0x0000ffff |
| 15 | IN_CLASSB_MAX = 65536 |
| 16 | def IN_CLASSC(i): return (((long)(i) & 0xe0000000) == 0xc0000000) |
| 17 | |
| 18 | IN_CLASSC_NET = 0xffffff00 |
| 19 | IN_CLASSC_NSHIFT = 8 |
| 20 | IN_CLASSC_HOST = 0x000000ff |
| 21 | def IN_CLASSD(i): return (((long)(i) & 0xf0000000) == 0xe0000000) |
| 22 | |
| 23 | IN_CLASSD_NET = 0xf0000000 |
| 24 | IN_CLASSD_NSHIFT = 28 |
| 25 | IN_CLASSD_HOST = 0x0fffffff |
| 26 | def IN_MULTICAST(i): return IN_CLASSD(i) |
| 27 | |
| 28 | def IN_EXPERIMENTAL(i): return (((long)(i) & 0xe0000000) == 0xe0000000) |
| 29 | |
| 30 | def IN_BADCLASS(i): return (((long)(i) & 0xf0000000) == 0xf0000000) |
| 31 | |
| 32 | INADDR_ANY = 0x00000000 |
| 33 | INADDR_LOOPBACK = 0x7f000001 |
| 34 | INADDR_BROADCAST = 0xffffffff |
| 35 | INADDR_NONE = 0xffffffff |
| 36 | IN_LOOPBACKNET = 127 |
| 37 | INADDR_UNSPEC_GROUP = 0xe0000000 |
| 38 | INADDR_ALLHOSTS_GROUP = 0xe0000001 |
| 39 | INADDR_ALLRTRS_GROUP = 0xe0000002 |
| 40 | INADDR_MAX_LOCAL_GROUP = 0xe00000ff |
| 41 | |
| 42 | # Included from netinet/in6.h |
| 43 | |
| 44 | # Included from sys/types.h |
| 45 | def quad_low(x): return x.val[0] |
| 46 | |
| 47 | ADT_EMASKSIZE = 8 |
| 48 | SHRT_MIN = -32768 |
| 49 | SHRT_MAX = 32767 |
| 50 | INT_MIN = (-2147483647-1) |
| 51 | INT_MAX = 2147483647 |
| 52 | LONG_MIN = (-2147483647-1) |
| 53 | LONG_MAX = 2147483647 |
| 54 | OFF32_MAX = LONG_MAX |
| 55 | ISTAT_ASSERTED = 0 |
| 56 | ISTAT_ASSUMED = 1 |
| 57 | ISTAT_NONE = 2 |
| 58 | OFF_MAX = OFF32_MAX |
| 59 | CLOCK_MAX = LONG_MAX |
| 60 | P_MYID = (-1) |
| 61 | P_MYHOSTID = (-1) |
| 62 | |
| 63 | # Included from sys/select.h |
| 64 | FD_SETSIZE = 4096 |
| 65 | NBBY = 8 |
| 66 | NULL = 0 |
| 67 | |
| 68 | # Included from sys/bitypes.h |
| 69 | |
| 70 | # Included from netinet/in6_f.h |
| 71 | def IN6_IS_ADDR_UNSPECIFIED(a): return IN6_ADDR_EQUAL_L(a, 0, 0, 0, 0) |
| 72 | |
| 73 | def IN6_SET_ADDR_UNSPECIFIED(a): return IN6_ADDR_COPY_L(a, 0, 0, 0, 0) |
| 74 | |
| 75 | def IN6_IS_ADDR_ANY(a): return IN6_ADDR_EQUAL_L(a, 0, 0, 0, 0) |
| 76 | |
| 77 | def IN6_SET_ADDR_ANY(a): return IN6_ADDR_COPY_L(a, 0, 0, 0, 0) |
| 78 | |
| 79 | def IN6_IS_ADDR_LOOPBACK(a): return IN6_ADDR_EQUAL_L(a, 0, 0, 0, 0x01000000) |
| 80 | |
| 81 | def IN6_SET_ADDR_LOOPBACK(a): return IN6_ADDR_COPY_L(a, 0, 0, 0, 0x01000000) |
| 82 | |
| 83 | IN6_MC_FLAG_PERMANENT = 0x0 |
| 84 | IN6_MC_FLAG_TRANSIENT = 0x1 |
| 85 | IN6_MC_SCOPE_NODELOCAL = 0x1 |
| 86 | IN6_MC_SCOPE_LINKLOCAL = 0x2 |
| 87 | IN6_MC_SCOPE_SITELOCAL = 0x5 |
| 88 | IN6_MC_SCOPE_ORGLOCAL = 0x8 |
| 89 | IN6_MC_SCOPE_GLOBAL = 0xE |
| 90 | def IN6_IS_ADDR_MC_NODELOCAL(a): return \ |
| 91 | |
| 92 | def IN6_IS_ADDR_MC_LINKLOCAL(a): return \ |
| 93 | |
| 94 | def IN6_IS_ADDR_MC_SITELOCAL(a): return \ |
| 95 | |
| 96 | def IN6_IS_ADDR_MC_ORGLOCAL(a): return \ |
| 97 | |
| 98 | def IN6_IS_ADDR_MC_GLOBAL(a): return \ |
| 99 | |
| 100 | |
| 101 | # Included from sys/convsa.h |
| 102 | __NETLIB_UW211_SVR4 = 1 |
| 103 | __NETLIB_UW211_XPG4 = 2 |
| 104 | __NETLIB_GEMINI_SVR4 = 3 |
| 105 | __NETLIB_GEMINI_XPG4 = 4 |
| 106 | __NETLIB_FP1_SVR4 = 5 |
| 107 | __NETLIB_FP1_XPG4 = 6 |
| 108 | __NETLIB_BASE_VERSION__ = __NETLIB_UW211_SVR4 |
| 109 | __NETLIB_VERSION__ = __NETLIB_FP1_SVR4 |
| 110 | __NETLIB_VERSION__ = __NETLIB_FP1_XPG4 |
| 111 | __NETLIB_VERSION__ = __NETLIB_GEMINI_SVR4 |
| 112 | __NETLIB_VERSION__ = __NETLIB_GEMINI_XPG4 |
| 113 | __NETLIB_VERSION__ = __NETLIB_UW211_SVR4 |
| 114 | __NETLIB_VERSION__ = __NETLIB_UW211_XPG4 |
| 115 | __NETLIB_VERSION__ = __NETLIB_FP1_XPG4 |
| 116 | |
| 117 | # Included from sys/byteorder.h |
| 118 | LITTLE_ENDIAN = 1234 |
| 119 | BIG_ENDIAN = 4321 |
| 120 | PDP_ENDIAN = 3412 |
| 121 | |
| 122 | # Included from sys/byteorder_f.h |
| 123 | BYTE_ORDER = LITTLE_ENDIAN |
| 124 | def htonl(hl): return __htonl(hl) |
| 125 | |
| 126 | def ntohl(nl): return __ntohl(nl) |
| 127 | |
| 128 | def htons(hs): return __htons(hs) |
| 129 | |
| 130 | def ntohs(ns): return __ntohs(ns) |
| 131 | |
| 132 | def ntohl(x): return (x) |
| 133 | |
| 134 | def ntohs(x): return (x) |
| 135 | |
| 136 | def htonl(x): return (x) |
| 137 | |
| 138 | def htons(x): return (x) |
| 139 | |
| 140 | def __NETLIB_VERSION_IS_XPG4(version): return (((version) % 2) == 0) |
| 141 | |
| 142 | def __NETLIB_VERSION_HAS_SALEN(version): return ((version) >= __NETLIB_GEMINI_SVR4) |
| 143 | |
| 144 | def __NETLIB_VERSION_IS_IKS(version): return ((version) >= __NETLIB_FP1_SVR4) |
| 145 | |
| 146 | def SA_FAMILY_GET(sa): return \ |
| 147 | |
| 148 | INET6_ADDRSTRLEN = 46 |
| 149 | IPV6_UNICAST_HOPS = 3 |
| 150 | IPV6_ADDRFORM = 24 |
| 151 | IPV6_MULTICAST_HOPS = 25 |
| 152 | IPV6_MULTICAST_IF = 26 |
| 153 | IPV6_MULTICAST_LOOP = 27 |
| 154 | IPV6_ADD_MEMBERSHIP = 28 |
| 155 | IPV6_DROP_MEMBERSHIP = 29 |
| 156 | |
| 157 | # Included from sys/insrem.h |
| 158 | def LIST_INIT(head): return \ |
| 159 | |
| 160 | def LIST_INIT(head): return \ |
| 161 | |
| 162 | def remque(a): return REMQUE(a) |
| 163 | |
| 164 | |
| 165 | # Included from sys/socket.h |
| 166 | |
| 167 | # Included from sys/uio.h |
| 168 | SHUT_RD = 0 |
| 169 | SHUT_WR = 1 |
| 170 | SHUT_RDWR = 2 |
| 171 | |
| 172 | # Included from sys/netconfig.h |
| 173 | |
| 174 | # Included from sys/cdefs.h |
| 175 | def __P(protos): return protos |
| 176 | |
| 177 | def __STRING(x): return #x |
| 178 | |
| 179 | def __P(protos): return () |
| 180 | |
| 181 | def __STRING(x): return "x" |
| 182 | |
| 183 | NETCONFIG = "/etc/netconfig" |
| 184 | NETPATH = "NETPATH" |
| 185 | NC_TPI_CLTS = 1 |
| 186 | NC_TPI_COTS = 2 |
| 187 | NC_TPI_COTS_ORD = 3 |
| 188 | NC_TPI_RAW = 4 |
| 189 | NC_NOFLAG = 00 |
| 190 | NC_VISIBLE = 01 |
| 191 | NC_BROADCAST = 02 |
| 192 | NC_NOPROTOFMLY = "-" |
| 193 | NC_LOOPBACK = "loopback" |
| 194 | NC_INET = "inet" |
| 195 | NC_INET6 = "inet6" |
| 196 | NC_IMPLINK = "implink" |
| 197 | NC_PUP = "pup" |
| 198 | NC_CHAOS = "chaos" |
| 199 | NC_NS = "ns" |
| 200 | NC_NBS = "nbs" |
| 201 | NC_ECMA = "ecma" |
| 202 | NC_DATAKIT = "datakit" |
| 203 | NC_CCITT = "ccitt" |
| 204 | NC_SNA = "sna" |
| 205 | NC_DECNET = "decnet" |
| 206 | NC_DLI = "dli" |
| 207 | NC_LAT = "lat" |
| 208 | NC_HYLINK = "hylink" |
| 209 | NC_APPLETALK = "appletalk" |
| 210 | NC_NIT = "nit" |
| 211 | NC_IEEE802 = "ieee802" |
| 212 | NC_OSI = "osi" |
| 213 | NC_X25 = "x25" |
| 214 | NC_OSINET = "osinet" |
| 215 | NC_GOSIP = "gosip" |
| 216 | NC_NETWARE = "netware" |
| 217 | NC_NOPROTO = "-" |
| 218 | NC_TCP = "tcp" |
| 219 | NC_UDP = "udp" |
| 220 | NC_ICMP = "icmp" |
| 221 | NC_IPX = "ipx" |
| 222 | NC_SPX = "spx" |
| 223 | NC_TPI_CLTS = 1 |
| 224 | NC_TPI_COTS = 2 |
| 225 | NC_TPI_COTS_ORD = 3 |
| 226 | NC_TPI_RAW = 4 |
| 227 | SOCK_STREAM = 2 |
| 228 | SOCK_DGRAM = 1 |
| 229 | SOCK_RAW = 4 |
| 230 | SOCK_RDM = 5 |
| 231 | SOCK_SEQPACKET = 6 |
| 232 | SO_DEBUG = 0x0001 |
| 233 | SO_ACCEPTCONN = 0x0002 |
| 234 | SO_REUSEADDR = 0x0004 |
| 235 | SO_KEEPALIVE = 0x0008 |
| 236 | SO_DONTROUTE = 0x0010 |
| 237 | SO_BROADCAST = 0x0020 |
| 238 | SO_USELOOPBACK = 0x0040 |
| 239 | SO_LINGER = 0x0080 |
| 240 | SO_OOBINLINE = 0x0100 |
| 241 | SO_ORDREL = 0x0200 |
| 242 | SO_IMASOCKET = 0x0400 |
| 243 | SO_MGMT = 0x0800 |
| 244 | SO_REUSEPORT = 0x1000 |
| 245 | SO_LISTENING = 0x2000 |
| 246 | SO_RDWR = 0x4000 |
| 247 | SO_SEMA = 0x8000 |
| 248 | SO_DONTLINGER = (~SO_LINGER) |
| 249 | SO_SNDBUF = 0x1001 |
| 250 | SO_RCVBUF = 0x1002 |
| 251 | SO_SNDLOWAT = 0x1003 |
| 252 | SO_RCVLOWAT = 0x1004 |
| 253 | SO_SNDTIMEO = 0x1005 |
| 254 | SO_RCVTIMEO = 0x1006 |
| 255 | SO_ERROR = 0x1007 |
| 256 | SO_TYPE = 0x1008 |
| 257 | SO_PROTOTYPE = 0x1009 |
| 258 | SO_ALLRAW = 0x100a |
| 259 | SOL_SOCKET = 0xffff |
| 260 | AF_UNSPEC = 0 |
| 261 | AF_UNIX = 1 |
| 262 | AF_LOCAL = AF_UNIX |
| 263 | AF_INET = 2 |
| 264 | AF_IMPLINK = 3 |
| 265 | AF_PUP = 4 |
| 266 | AF_CHAOS = 5 |
| 267 | AF_NS = 6 |
| 268 | AF_NBS = 7 |
| 269 | AF_ECMA = 8 |
| 270 | AF_DATAKIT = 9 |
| 271 | AF_CCITT = 10 |
| 272 | AF_SNA = 11 |
| 273 | AF_DECnet = 12 |
| 274 | AF_DLI = 13 |
| 275 | AF_LAT = 14 |
| 276 | AF_HYLINK = 15 |
| 277 | AF_APPLETALK = 16 |
| 278 | AF_NIT = 17 |
| 279 | AF_802 = 18 |
| 280 | AF_OSI = 19 |
| 281 | AF_ISO = AF_OSI |
| 282 | AF_X25 = 20 |
| 283 | AF_OSINET = 21 |
| 284 | AF_GOSIP = 22 |
| 285 | AF_YNET = 23 |
| 286 | AF_ROUTE = 24 |
| 287 | AF_LINK = 25 |
| 288 | pseudo_AF_XTP = 26 |
| 289 | AF_INET6 = 27 |
| 290 | AF_MAX = 27 |
| 291 | AF_INET_BSWAP = 0x0200 |
| 292 | PF_UNSPEC = AF_UNSPEC |
| 293 | PF_UNIX = AF_UNIX |
| 294 | PF_LOCAL = AF_LOCAL |
| 295 | PF_INET = AF_INET |
| 296 | PF_IMPLINK = AF_IMPLINK |
| 297 | PF_PUP = AF_PUP |
| 298 | PF_CHAOS = AF_CHAOS |
| 299 | PF_NS = AF_NS |
| 300 | PF_NBS = AF_NBS |
| 301 | PF_ECMA = AF_ECMA |
| 302 | PF_DATAKIT = AF_DATAKIT |
| 303 | PF_CCITT = AF_CCITT |
| 304 | PF_SNA = AF_SNA |
| 305 | PF_DECnet = AF_DECnet |
| 306 | PF_DLI = AF_DLI |
| 307 | PF_LAT = AF_LAT |
| 308 | PF_HYLINK = AF_HYLINK |
| 309 | PF_APPLETALK = AF_APPLETALK |
| 310 | PF_NIT = AF_NIT |
| 311 | PF_802 = AF_802 |
| 312 | PF_OSI = AF_OSI |
| 313 | PF_ISO = PF_OSI |
| 314 | PF_X25 = AF_X25 |
| 315 | PF_OSINET = AF_OSINET |
| 316 | PF_GOSIP = AF_GOSIP |
| 317 | PF_YNET = AF_YNET |
| 318 | PF_ROUTE = AF_ROUTE |
| 319 | PF_LINK = AF_LINK |
| 320 | pseudo_PF_XTP = pseudo_AF_XTP |
| 321 | PF_INET6 = AF_INET6 |
| 322 | PF_MAX = AF_MAX |
| 323 | SOMAXCONN = 5 |
| 324 | SCM_RIGHTS = 1 |
| 325 | MSG_OOB = 0x1 |
| 326 | MSG_PEEK = 0x2 |
| 327 | MSG_DONTROUTE = 0x4 |
| 328 | MSG_CTRUNC = 0x8 |
| 329 | MSG_TRUNC = 0x10 |
| 330 | MSG_EOR = 0x30 |
| 331 | MSG_WAITALL = 0x20 |
| 332 | MSG_MAXIOVLEN = 16 |
| 333 | def OPTLEN(x): return ((((x) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) |
| 334 | |
| 335 | GIARG = 0x1 |
| 336 | CONTI = 0x2 |
| 337 | GITAB = 0x4 |
| 338 | SOCKETSYS = 88 |
| 339 | SOCKETSYS = 83 |
| 340 | SO_ACCEPT = 1 |
| 341 | SO_BIND = 2 |
| 342 | SO_CONNECT = 3 |
| 343 | SO_GETPEERNAME = 4 |
| 344 | SO_GETSOCKNAME = 5 |
| 345 | SO_GETSOCKOPT = 6 |
| 346 | SO_LISTEN = 7 |
| 347 | SO_RECV = 8 |
| 348 | SO_RECVFROM = 9 |
| 349 | SO_SEND = 10 |
| 350 | SO_SENDTO = 11 |
| 351 | SO_SETSOCKOPT = 12 |
| 352 | SO_SHUTDOWN = 13 |
| 353 | SO_SOCKET = 14 |
| 354 | SO_SOCKPOLL = 15 |
| 355 | SO_GETIPDOMAIN = 16 |
| 356 | SO_SETIPDOMAIN = 17 |
| 357 | SO_ADJTIME = 18 |
| 358 | |
| 359 | # Included from sys/stream.h |
| 360 | |
| 361 | # Included from sys/cred.h |
| 362 | |
| 363 | # Included from sys/ksynch.h |
| 364 | |
| 365 | # Included from sys/dl.h |
| 366 | SIGNBIT = 0x80000000 |
| 367 | |
| 368 | # Included from sys/ipl.h |
| 369 | |
| 370 | # Included from sys/disp_p.h |
| 371 | |
| 372 | # Included from sys/trap.h |
| 373 | DIVERR = 0 |
| 374 | SGLSTP = 1 |
| 375 | NMIFLT = 2 |
| 376 | BPTFLT = 3 |
| 377 | INTOFLT = 4 |
| 378 | BOUNDFLT = 5 |
| 379 | INVOPFLT = 6 |
| 380 | NOEXTFLT = 7 |
| 381 | DBLFLT = 8 |
| 382 | EXTOVRFLT = 9 |
| 383 | INVTSSFLT = 10 |
| 384 | SEGNPFLT = 11 |
| 385 | STKFLT = 12 |
| 386 | GPFLT = 13 |
| 387 | PGFLT = 14 |
| 388 | EXTERRFLT = 16 |
| 389 | ALIGNFLT = 17 |
| 390 | MCEFLT = 18 |
| 391 | USERFLT = 0x100 |
| 392 | TRP_PREEMPT = 0x200 |
| 393 | TRP_UNUSED = 0x201 |
| 394 | PF_ERR_MASK = 0x01 |
| 395 | PF_ERR_PAGE = 0 |
| 396 | PF_ERR_PROT = 1 |
| 397 | PF_ERR_WRITE = 2 |
| 398 | PF_ERR_USER = 4 |
| 399 | EVT_STRSCHED = 0x04 |
| 400 | EVT_GLOBCALLOUT = 0x08 |
| 401 | EVT_LCLCALLOUT = 0x10 |
| 402 | EVT_SOFTINTMASK = (EVT_STRSCHED|EVT_GLOBCALLOUT|EVT_LCLCALLOUT) |
| 403 | PL0 = 0 |
| 404 | PL1 = 1 |
| 405 | PL2 = 2 |
| 406 | PL3 = 3 |
| 407 | PL4 = 4 |
| 408 | PL5 = 5 |
| 409 | PL6 = 6 |
| 410 | PLHI = 8 |
| 411 | PL7 = PLHI |
| 412 | PLBASE = PL0 |
| 413 | PLTIMEOUT = PL1 |
| 414 | PLDISK = PL5 |
| 415 | PLSTR = PL6 |
| 416 | PLTTY = PLSTR |
| 417 | PLMIN = PL0 |
| 418 | PLMIN = PL1 |
| 419 | MAX_INTR_LEVELS = 10 |
| 420 | MAX_INTR_NESTING = 50 |
| 421 | STRSCHED = EVT_STRSCHED |
| 422 | GLOBALSOFTINT = EVT_GLOBCALLOUT |
| 423 | LOCALSOFTINT = EVT_LCLCALLOUT |
| 424 | |
| 425 | # Included from sys/ksynch_p.h |
| 426 | def GET_TIME(timep): return \ |
| 427 | |
| 428 | LK_THRESHOLD = 500000 |
| 429 | |
| 430 | # Included from sys/list.h |
| 431 | |
| 432 | # Included from sys/listasm.h |
| 433 | def remque_null(e): return \ |
| 434 | |
| 435 | def LS_ISEMPTY(listp): return \ |
| 436 | |
| 437 | LK_BASIC = 0x1 |
| 438 | LK_SLEEP = 0x2 |
| 439 | LK_NOSTATS = 0x4 |
| 440 | def CYCLES_SINCE(c): return CYCLES_BETWEEN((c), CYCLES()) |
| 441 | |
| 442 | LSB_NLKDS = 92 |
| 443 | EVT_RUNRUN = 0x01 |
| 444 | EVT_KPRUNRUN = 0x02 |
| 445 | SP_UNLOCKED = 0 |
| 446 | SP_LOCKED = 1 |
| 447 | KS_LOCKTEST = 0x01 |
| 448 | KS_MPSTATS = 0x02 |
| 449 | KS_DEINITED = 0x04 |
| 450 | KS_NVLTTRACE = 0x08 |
| 451 | RWS_READ = (ord('r')) |
| 452 | RWS_WRITE = (ord('w')) |
| 453 | RWS_UNLOCKED = (ord('u')) |
| 454 | RWS_BUSY = (ord('b')) |
| 455 | def SLEEP_LOCKOWNED(lkp): return \ |
| 456 | |
| 457 | def SLEEP_DISOWN(lkp): return \ |
| 458 | |
| 459 | KS_NOPRMPT = 0x00000001 |
| 460 | __KS_LOCKTEST = KS_LOCKTEST |
| 461 | __KS_LOCKTEST = 0 |
| 462 | __KS_MPSTATS = KS_MPSTATS |
| 463 | __KS_MPSTATS = 0 |
| 464 | __KS_NVLTTRACE = KS_NVLTTRACE |
| 465 | __KS_NVLTTRACE = 0 |
| 466 | KSFLAGS = (__KS_LOCKTEST|__KS_MPSTATS|__KS_NVLTTRACE) |
| 467 | KSVUNIPROC = 1 |
| 468 | KSVMPDEBUG = 2 |
| 469 | KSVMPNODEBUG = 3 |
| 470 | KSVFLAG = KSVUNIPROC |
| 471 | KSVFLAG = KSVMPDEBUG |
| 472 | KSVFLAG = KSVMPNODEBUG |
| 473 | |
| 474 | # Included from sys/ksinline.h |
| 475 | _A_SP_LOCKED = 1 |
| 476 | _A_SP_UNLOCKED = 0 |
| 477 | _A_INVPL = -1 |
| 478 | def _ATOMIC_INT_INCR(atomic_intp): return \ |
| 479 | |
| 480 | def _ATOMIC_INT_DECR(atomic_intp): return \ |
| 481 | |
| 482 | def ATOMIC_INT_READ(atomic_intp): return _ATOMIC_INT_READ(atomic_intp) |
| 483 | |
| 484 | def ATOMIC_INT_INCR(atomic_intp): return _ATOMIC_INT_INCR(atomic_intp) |
| 485 | |
| 486 | def ATOMIC_INT_DECR(atomic_intp): return _ATOMIC_INT_DECR(atomic_intp) |
| 487 | |
| 488 | def FSPIN_INIT(lp): return |
| 489 | |
| 490 | def FSPIN_LOCK(l): return DISABLE() |
| 491 | |
| 492 | def FSPIN_TRYLOCK(l): return (DISABLE(), B_TRUE) |
| 493 | |
| 494 | def FSPIN_UNLOCK(l): return ENABLE() |
| 495 | |
| 496 | def LOCK_DEINIT(lp): return |
| 497 | |
| 498 | def LOCK_DEALLOC(lp): return |
| 499 | |
| 500 | def LOCK_OWNED(lp): return (B_TRUE) |
| 501 | |
| 502 | def RW_DEINIT(lp): return |
| 503 | |
| 504 | def RW_DEALLOC(lp): return |
| 505 | |
| 506 | def RW_OWNED(lp): return (B_TRUE) |
| 507 | |
| 508 | def IS_LOCKED(lockp): return B_FALSE |
| 509 | |
| 510 | def LOCK_PLMIN(lockp): return \ |
| 511 | |
| 512 | def TRYLOCK_PLMIN(lockp): return LOCK_PLMIN(lockp) |
| 513 | |
| 514 | def LOCK_SH_PLMIN(lockp): return LOCK_PLMIN(lockp) |
| 515 | |
| 516 | def RW_RDLOCK_PLMIN(lockp): return LOCK_PLMIN(lockp) |
| 517 | |
| 518 | def RW_WRLOCK_PLMIN(lockp): return LOCK_PLMIN(lockp) |
| 519 | |
| 520 | def LOCK_DEINIT(l): return |
| 521 | |
| 522 | def LOCK_PLMIN(lockp): return LOCK((lockp), PLMIN) |
| 523 | |
| 524 | def TRYLOCK_PLMIN(lockp): return TRYLOCK((lockp), PLMIN) |
| 525 | |
| 526 | def LOCK_SH_PLMIN(lockp): return LOCK_SH((lockp), PLMIN) |
| 527 | |
| 528 | def RW_RDLOCK_PLMIN(lockp): return RW_RDLOCK((lockp), PLMIN) |
| 529 | |
| 530 | def RW_WRLOCK_PLMIN(lockp): return RW_WRLOCK((lockp), PLMIN) |
| 531 | |
| 532 | def FSPIN_IS_LOCKED(fsp): return B_FALSE |
| 533 | |
| 534 | def SPIN_IS_LOCKED(lockp): return B_FALSE |
| 535 | |
| 536 | def FSPIN_OWNED(l): return (B_TRUE) |
| 537 | |
| 538 | CR_MLDREAL = 0x00000001 |
| 539 | CR_RDUMP = 0x00000002 |
| 540 | def crhold(credp): return crholdn((credp), 1) |
| 541 | |
| 542 | def crfree(credp): return crfreen((credp), 1) |
| 543 | |
| 544 | |
| 545 | # Included from sys/strmdep.h |
| 546 | def str_aligned(X): return (((uint)(X) & (sizeof(int) - 1)) == 0) |
| 547 | |
| 548 | |
| 549 | # Included from sys/engine.h |
| 550 | |
| 551 | # Included from sys/clock.h |
| 552 | |
| 553 | # Included from sys/time.h |
| 554 | DST_NONE = 0 |
| 555 | DST_USA = 1 |
| 556 | DST_AUST = 2 |
| 557 | DST_WET = 3 |
| 558 | DST_MET = 4 |
| 559 | DST_EET = 5 |
| 560 | DST_CAN = 6 |
| 561 | DST_GB = 7 |
| 562 | DST_RUM = 8 |
| 563 | DST_TUR = 9 |
| 564 | DST_AUSTALT = 10 |
| 565 | ITIMER_REAL = 0 |
| 566 | ITIMER_VIRTUAL = 1 |
| 567 | ITIMER_PROF = 2 |
| 568 | FD_SETSIZE = 4096 |
| 569 | FD_NBBY = 8 |
| 570 | |
| 571 | # Included from time.h |
| 572 | NULL = 0 |
| 573 | CLOCKS_PER_SEC = 1000000 |
| 574 | |
| 575 | # Included from sys/clock_p.h |
| 576 | CGBITS = 4 |
| 577 | IDBITS = 28 |
| 578 | def toid_unpackcg(idval): return (((idval) >> IDBITS) & 0xf) |
| 579 | |
| 580 | def toid_unpackid(idval): return ((idval) & 0xfffffff) |
| 581 | |
| 582 | def toid_unpackcg(idval): return 0 |
| 583 | |
| 584 | def toid_unpackid(idval): return (idval) |
| 585 | |
| 586 | NCALLOUT_HASH = 1024 |
| 587 | CALLOUT_MAXVAL = 0x7fffffff |
| 588 | TO_PERIODIC = 0x80000000 |
| 589 | TO_IMMEDIATE = 0x80000000 |
| 590 | SEC = 1 |
| 591 | MILLISEC = 1000 |
| 592 | MICROSEC = 1000000 |
| 593 | NANOSEC = 1000000000 |
| 594 | SECHR = (60*60) |
| 595 | SECDAY = (24*SECHR) |
| 596 | SECYR = (365*SECDAY) |
| 597 | def TIME_OWNED_R(cgnum): return (B_TRUE) |
| 598 | |
| 599 | LOOPSECONDS = 1800 |
| 600 | LOOPMICROSECONDS = (LOOPSECONDS * MICROSEC) |
| 601 | def TICKS_SINCE(t): return TICKS_BETWEEN(t, TICKS()) |
| 602 | |
| 603 | MAXRQS = 2 |
| 604 | E_OFFLINE = 0x01 |
| 605 | E_BAD = 0x02 |
| 606 | E_SHUTDOWN = 0x04 |
| 607 | E_DRIVER = 0x08 |
| 608 | E_DEFAULTKEEP = 0x100 |
| 609 | E_DRIVERBOUND = 0x200 |
| 610 | E_EXCLUSIVE = 0x400 |
| 611 | E_CGLEADER = 0x800 |
| 612 | E_NOWAY = (E_OFFLINE|E_BAD|E_SHUTDOWN) |
| 613 | E_BOUND = 0x01 |
| 614 | E_GLOBAL = 0x00 |
| 615 | E_UNAVAIL = -1 |
| 616 | ENGINE_ONLINE = 1 |
| 617 | def PROCESSOR_UNMAP(e): return ((e) - engine) |
| 618 | |
| 619 | BOOTENG = 0 |
| 620 | QMOVED = 0x0001 |
| 621 | QWANTR = 0x0002 |
| 622 | QWANTW = 0x0004 |
| 623 | QFULL = 0x0008 |
| 624 | QREADR = 0x0010 |
| 625 | QUSE = 0x0020 |
| 626 | QNOENB = 0x0040 |
| 627 | QUP = 0x0080 |
| 628 | QBACK = 0x0100 |
| 629 | QINTER = 0x0200 |
| 630 | QPROCSON = 0x0400 |
| 631 | QTOENAB = 0x0800 |
| 632 | QFREEZE = 0x1000 |
| 633 | QBOUND = 0x2000 |
| 634 | QDEFCNT = 0x4000 |
| 635 | QENAB = 0x0001 |
| 636 | QSVCBUSY = 0x0002 |
| 637 | STRM_PUTCNT_TABLES = 31 |
| 638 | def STRM_MYENG_PUTCNT(sdp): return STRM_PUTCNT(l.eng_num, sdp) |
| 639 | |
| 640 | QB_FULL = 0x01 |
| 641 | QB_WANTW = 0x02 |
| 642 | QB_BACK = 0x04 |
| 643 | NBAND = 256 |
| 644 | DB_WASDUPED = 0x1 |
| 645 | DB_2PIECE = 0x2 |
| 646 | STRLEAKHASHSZ = 1021 |
| 647 | MSGMARK = 0x01 |
| 648 | MSGNOLOOP = 0x02 |
| 649 | MSGDELIM = 0x04 |
| 650 | MSGNOGET = 0x08 |
| 651 | MSGLOG = 0x10 |
| 652 | M_DATA = 0x00 |
| 653 | M_PROTO = 0x01 |
| 654 | M_BREAK = 0x08 |
| 655 | M_PASSFP = 0x09 |
| 656 | M_SIG = 0x0b |
| 657 | M_DELAY = 0x0c |
| 658 | M_CTL = 0x0d |
| 659 | M_IOCTL = 0x0e |
| 660 | M_SETOPTS = 0x10 |
| 661 | M_RSE = 0x11 |
| 662 | M_TRAIL = 0x12 |
| 663 | M_IOCACK = 0x81 |
| 664 | M_IOCNAK = 0x82 |
| 665 | M_PCPROTO = 0x83 |
| 666 | M_PCSIG = 0x84 |
| 667 | M_READ = 0x85 |
| 668 | M_FLUSH = 0x86 |
| 669 | M_STOP = 0x87 |
| 670 | M_START = 0x88 |
| 671 | M_HANGUP = 0x89 |
| 672 | M_ERROR = 0x8a |
| 673 | M_COPYIN = 0x8b |
| 674 | M_COPYOUT = 0x8c |
| 675 | M_IOCDATA = 0x8d |
| 676 | M_PCRSE = 0x8e |
| 677 | M_STOPI = 0x8f |
| 678 | M_STARTI = 0x90 |
| 679 | M_PCCTL = 0x91 |
| 680 | M_PCSETOPTS = 0x92 |
| 681 | QNORM = 0x00 |
| 682 | QPCTL = 0x80 |
| 683 | STRCANON = 0x01 |
| 684 | RECOPY = 0x02 |
| 685 | SO_ALL = 0x003f |
| 686 | SO_READOPT = 0x0001 |
| 687 | SO_WROFF = 0x0002 |
| 688 | SO_MINPSZ = 0x0004 |
| 689 | SO_MAXPSZ = 0x0008 |
| 690 | SO_HIWAT = 0x0010 |
| 691 | SO_LOWAT = 0x0020 |
| 692 | SO_MREADON = 0x0040 |
| 693 | SO_MREADOFF = 0x0080 |
| 694 | SO_NDELON = 0x0100 |
| 695 | SO_NDELOFF = 0x0200 |
| 696 | SO_ISTTY = 0x0400 |
| 697 | SO_ISNTTY = 0x0800 |
| 698 | SO_TOSTOP = 0x1000 |
| 699 | SO_TONSTOP = 0x2000 |
| 700 | SO_BAND = 0x4000 |
| 701 | SO_DELIM = 0x8000 |
| 702 | SO_NODELIM = 0x010000 |
| 703 | SO_STRHOLD = 0x020000 |
| 704 | SO_LOOP = 0x040000 |
| 705 | DRVOPEN = 0x0 |
| 706 | MODOPEN = 0x1 |
| 707 | CLONEOPEN = 0x2 |
| 708 | OPENFAIL = -1 |
| 709 | BPRI_LO = 1 |
| 710 | BPRI_MED = 2 |
| 711 | BPRI_HI = 3 |
| 712 | INFPSZ = -1 |
| 713 | FLUSHALL = 1 |
| 714 | FLUSHDATA = 0 |
| 715 | STRHIGH = 5120 |
| 716 | STRLOW = 1024 |
| 717 | MAXIOCBSZ = 1024 |
| 718 | def straln(a): return (caddr_t)((long)(a) & ~(sizeof(int)-1)) |
| 719 | |
| 720 | IPM_ID = 200 |
| 721 | ICMPM_ID = 201 |
| 722 | TCPM_ID = 202 |
| 723 | UDPM_ID = 203 |
| 724 | ARPM_ID = 204 |
| 725 | APPM_ID = 205 |
| 726 | RIPM_ID = 206 |
| 727 | PPPM_ID = 207 |
| 728 | AHDLCM_ID = 208 |
| 729 | MHDLCRIPM_ID = 209 |
| 730 | HDLCM_ID = 210 |
| 731 | PPCID_ID = 211 |
| 732 | IGMPM_ID = 212 |
| 733 | IPIPM_ID = 213 |
| 734 | IPPROTO_IP = 0 |
| 735 | IPPROTO_HOPOPTS = 0 |
| 736 | IPPROTO_ICMP = 1 |
| 737 | IPPROTO_IGMP = 2 |
| 738 | IPPROTO_GGP = 3 |
| 739 | IPPROTO_IPIP = 4 |
| 740 | IPPROTO_TCP = 6 |
| 741 | IPPROTO_EGP = 8 |
| 742 | IPPROTO_PUP = 12 |
| 743 | IPPROTO_UDP = 17 |
| 744 | IPPROTO_IDP = 22 |
| 745 | IPPROTO_TP = 29 |
| 746 | IPPROTO_IPV6 = 41 |
| 747 | IPPROTO_ROUTING = 43 |
| 748 | IPPROTO_FRAGMENT = 44 |
| 749 | IPPROTO_ESP = 50 |
| 750 | IPPROTO_AH = 51 |
| 751 | IPPROTO_ICMPV6 = 58 |
| 752 | IPPROTO_NONE = 59 |
| 753 | IPPROTO_DSTOPTS = 60 |
| 754 | IPPROTO_HELLO = 63 |
| 755 | IPPROTO_ND = 77 |
| 756 | IPPROTO_EON = 80 |
| 757 | IPPROTO_RAW = 255 |
| 758 | IPPROTO_MAX = 256 |
| 759 | IPPORT_ECHO = 7 |
| 760 | IPPORT_DISCARD = 9 |
| 761 | IPPORT_SYSTAT = 11 |
| 762 | IPPORT_DAYTIME = 13 |
| 763 | IPPORT_NETSTAT = 15 |
| 764 | IPPORT_FTP = 21 |
| 765 | IPPORT_TELNET = 23 |
| 766 | IPPORT_SMTP = 25 |
| 767 | IPPORT_TIMESERVER = 37 |
| 768 | IPPORT_NAMESERVER = 42 |
| 769 | IPPORT_WHOIS = 43 |
| 770 | IPPORT_MTP = 57 |
| 771 | IPPORT_TFTP = 69 |
| 772 | IPPORT_RJE = 77 |
| 773 | IPPORT_FINGER = 79 |
| 774 | IPPORT_TTYLINK = 87 |
| 775 | IPPORT_SUPDUP = 95 |
| 776 | IPPORT_EXECSERVER = 512 |
| 777 | IPPORT_LOGINSERVER = 513 |
| 778 | IPPORT_CMDSERVER = 514 |
| 779 | IPPORT_EFSSERVER = 520 |
| 780 | IPPORT_BIFFUDP = 512 |
| 781 | IPPORT_WHOSERVER = 513 |
| 782 | IPPORT_ROUTESERVER = 520 |
| 783 | IPPORT_RESERVED = 1024 |
| 784 | IPPORT_USERRESERVED = 65535 |
| 785 | IPPORT_RESERVED_LOW = 512 |
| 786 | IPPORT_RESERVED_HIGH = 1023 |
| 787 | IPPORT_USERRESERVED_LOW = 32768 |
| 788 | IPPORT_USERRESERVED_HIGH = 65535 |
| 789 | INET_ADDRSTRLEN = 16 |
| 790 | IP_OPTIONS = 1 |
| 791 | IP_TOS = 2 |
| 792 | IP_TTL = 3 |
| 793 | IP_HDRINCL = 4 |
| 794 | IP_RECVOPTS = 5 |
| 795 | IP_RECVRETOPTS = 6 |
| 796 | IP_RECVDSTADDR = 7 |
| 797 | IP_RETOPTS = 8 |
| 798 | IP_MULTICAST_IF = 9 |
| 799 | IP_MULTICAST_LOOP = 10 |
| 800 | IP_ADD_MEMBERSHIP = 11 |
| 801 | IP_DROP_MEMBERSHIP = 12 |
| 802 | IP_BROADCAST_IF = 14 |
| 803 | IP_RECVIFINDEX = 15 |
| 804 | IP_MULTICAST_TTL = 16 |
| 805 | MRT_INIT = 17 |
| 806 | MRT_DONE = 18 |
| 807 | MRT_ADD_VIF = 19 |
| 808 | MRT_DEL_VIF = 20 |
| 809 | MRT_ADD_MFC = 21 |
| 810 | MRT_DEL_MFC = 22 |
| 811 | MRT_VERSION = 23 |
| 812 | IP_DEFAULT_MULTICAST_TTL = 1 |
| 813 | IP_DEFAULT_MULTICAST_LOOP = 1 |
| 814 | IP_MAX_MEMBERSHIPS = 20 |
| 815 | INADDR_UNSPEC_GROUP = 0xe0000000 |
| 816 | INADDR_ALLHOSTS_GROUP = 0xe0000001 |
| 817 | INADDR_ALLRTRS_GROUP = 0xe0000002 |
| 818 | INADDR_MAX_LOCAL_GROUP = 0xe00000ff |
| 819 | |
| 820 | # Included from netinet/in_mp.h |
| 821 | |
| 822 | # Included from netinet/in_mp_ddi.h |
| 823 | |
| 824 | # Included from sys/inline.h |
| 825 | IP_HIER_BASE = (20) |
| 826 | def ASSERT_LOCK(x): return |
| 827 | |
| 828 | def ASSERT_WRLOCK(x): return |
| 829 | |
| 830 | def ASSERT_UNLOCK(x): return |
| 831 | |
| 832 | def CANPUT(q): return canput((q)) |
| 833 | |
| 834 | def CANPUTNEXT(q): return canputnext((q)) |
| 835 | |
| 836 | INET_DEBUG = 1 |