Guido van Rossum | d44e0c3 | 1996-08-08 18:24:58 +0000 | [diff] [blame] | 1 | # Generated by h2py from /usr/include/netinet/in.h |
| 2 | |
| 3 | # Included from net/nh.h |
| 4 | |
| 5 | # Included from sys/machine.h |
| 6 | LITTLE_ENDIAN = 1234 |
| 7 | BIG_ENDIAN = 4321 |
| 8 | PDP_ENDIAN = 3412 |
| 9 | BYTE_ORDER = BIG_ENDIAN |
| 10 | DEFAULT_GPR = 0xDEADBEEF |
| 11 | MSR_EE = 0x8000 |
| 12 | MSR_PR = 0x4000 |
| 13 | MSR_FP = 0x2000 |
| 14 | MSR_ME = 0x1000 |
| 15 | MSR_FE = 0x0800 |
| 16 | MSR_FE0 = 0x0800 |
| 17 | MSR_SE = 0x0400 |
| 18 | MSR_BE = 0x0200 |
| 19 | MSR_IE = 0x0100 |
| 20 | MSR_FE1 = 0x0100 |
| 21 | MSR_AL = 0x0080 |
| 22 | MSR_IP = 0x0040 |
| 23 | MSR_IR = 0x0020 |
| 24 | MSR_DR = 0x0010 |
| 25 | MSR_PM = 0x0004 |
| 26 | DEFAULT_MSR = (MSR_EE | MSR_ME | MSR_AL | MSR_IR | MSR_DR) |
| 27 | DEFAULT_USER_MSR = (DEFAULT_MSR | MSR_PR) |
| 28 | CR_LT = 0x80000000 |
| 29 | CR_GT = 0x40000000 |
| 30 | CR_EQ = 0x20000000 |
| 31 | CR_SO = 0x10000000 |
| 32 | CR_FX = 0x08000000 |
| 33 | CR_FEX = 0x04000000 |
| 34 | CR_VX = 0x02000000 |
| 35 | CR_OX = 0x01000000 |
| 36 | XER_SO = 0x80000000 |
| 37 | XER_OV = 0x40000000 |
| 38 | XER_CA = 0x20000000 |
| 39 | def XER_COMP_BYTE(xer): return ((xer >> 8) & 0x000000FF) |
| 40 | |
| 41 | def XER_LENGTH(xer): return (xer & 0x0000007F) |
| 42 | |
| 43 | DSISR_IO = 0x80000000 |
| 44 | DSISR_PFT = 0x40000000 |
| 45 | DSISR_LOCK = 0x20000000 |
| 46 | DSISR_FPIO = 0x10000000 |
| 47 | DSISR_PROT = 0x08000000 |
| 48 | DSISR_LOOP = 0x04000000 |
| 49 | DSISR_DRST = 0x04000000 |
| 50 | DSISR_ST = 0x02000000 |
| 51 | DSISR_SEGB = 0x01000000 |
| 52 | DSISR_DABR = 0x00400000 |
| 53 | DSISR_EAR = 0x00100000 |
| 54 | SRR_IS_PFT = 0x40000000 |
| 55 | SRR_IS_ISPEC = 0x20000000 |
| 56 | SRR_IS_IIO = 0x10000000 |
| 57 | SRR_IS_PROT = 0x08000000 |
| 58 | SRR_IS_LOOP = 0x04000000 |
| 59 | SRR_PR_FPEN = 0x00100000 |
| 60 | SRR_PR_INVAL = 0x00080000 |
| 61 | SRR_PR_PRIV = 0x00040000 |
| 62 | SRR_PR_TRAP = 0x00020000 |
| 63 | SRR_PR_IMPRE = 0x00010000 |
| 64 | def ntohl(x): return (x) |
| 65 | |
| 66 | def ntohs(x): return (x) |
| 67 | |
| 68 | def htonl(x): return (x) |
| 69 | |
| 70 | def htons(x): return (x) |
| 71 | |
| 72 | IPPROTO_IP = 0 |
| 73 | IPPROTO_ICMP = 1 |
| 74 | IPPROTO_GGP = 3 |
| 75 | IPPROTO_TCP = 6 |
| 76 | IPPROTO_EGP = 8 |
| 77 | IPPROTO_PUP = 12 |
| 78 | IPPROTO_UDP = 17 |
| 79 | IPPROTO_IDP = 22 |
| 80 | IPPROTO_TP = 29 |
| 81 | IPPROTO_LOCAL = 63 |
| 82 | IPPROTO_EON = 80 |
| 83 | IPPROTO_BIP = 0x53 |
| 84 | IPPROTO_RAW = 255 |
| 85 | IPPROTO_MAX = 256 |
| 86 | IPPORT_RESERVED = 1024 |
| 87 | IPPORT_USERRESERVED = 5000 |
| 88 | IPPORT_TIMESERVER = 37 |
| 89 | def IN_CLASSA(i): return (((long)(i) & 0x80000000) == 0) |
| 90 | |
| 91 | IN_CLASSA_NET = 0xff000000 |
| 92 | IN_CLASSA_NSHIFT = 24 |
| 93 | IN_CLASSA_HOST = 0x00ffffff |
| 94 | IN_CLASSA_MAX = 128 |
| 95 | def IN_CLASSB(i): return (((long)(i) & 0xc0000000) == 0x80000000) |
| 96 | |
| 97 | IN_CLASSB_NET = 0xffff0000 |
| 98 | IN_CLASSB_NSHIFT = 16 |
| 99 | IN_CLASSB_HOST = 0x0000ffff |
| 100 | IN_CLASSB_MAX = 65536 |
| 101 | def IN_CLASSC(i): return (((long)(i) & 0xe0000000) == 0xc0000000) |
| 102 | |
| 103 | IN_CLASSC_NET = 0xffffff00 |
| 104 | IN_CLASSC_NSHIFT = 8 |
| 105 | IN_CLASSC_HOST = 0x000000ff |
| 106 | def IN_CLASSD(i): return (((long)(i) & 0xf0000000) == 0xe0000000) |
| 107 | |
| 108 | def IN_MULTICAST(i): return IN_CLASSD(i) |
| 109 | |
| 110 | def IN_EXPERIMENTAL(i): return (((long)(i) & 0xe0000000) == 0xe0000000) |
| 111 | |
| 112 | def IN_BADCLASS(i): return (((long)(i) & 0xf0000000) == 0xf0000000) |
| 113 | |
| 114 | INADDR_ANY = 0x00000000 |
| 115 | INADDR_LOOPBACK = 0x7f000001 |
| 116 | INADDR_BROADCAST = 0xffffffff |
| 117 | INADDR_NONE = 0xffffffff |
| 118 | IN_LOOPBACKNET = 127 |
| 119 | IP_OPTIONS = 1 |
| 120 | IP_HDRINCL = 2 |
| 121 | IP_TOS = 3 |
| 122 | IP_TTL = 4 |
| 123 | IP_RECVOPTS = 5 |
| 124 | IP_RECVRETOPTS = 6 |
| 125 | IP_RECVDSTADDR = 7 |
| 126 | IP_RETOPTS = 8 |