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_GUARD = 0x10000000 |
| 58 | SRR_IS_PROT = 0x08000000 |
| 59 | SRR_IS_LOOP = 0x04000000 |
| 60 | SRR_PR_FPEN = 0x00100000 |
| 61 | SRR_PR_INVAL = 0x00080000 |
| 62 | SRR_PR_PRIV = 0x00040000 |
| 63 | SRR_PR_TRAP = 0x00020000 |
| 64 | SRR_PR_IMPRE = 0x00010000 |
| 65 | def BUID_7F_SRVAL(raddr): return (0x87F00000 | (((uint)(raddr)) >> 28)) |
| 66 | |
| 67 | BT_256M = 0x1FFC |
| 68 | BT_128M = 0x0FFC |
| 69 | BT_64M = 0x07FC |
| 70 | BT_32M = 0x03FC |
| 71 | BT_16M = 0x01FC |
| 72 | BT_8M = 0x00FC |
| 73 | BT_4M = 0x007C |
| 74 | BT_2M = 0x003C |
| 75 | BT_1M = 0x001C |
| 76 | BT_512K = 0x000C |
| 77 | BT_256K = 0x0004 |
| 78 | BT_128K = 0x0000 |
| 79 | BT_NOACCESS = 0x0 |
| 80 | BT_RDONLY = 0x1 |
| 81 | BT_WRITE = 0x2 |
| 82 | BT_VS = 0x2 |
| 83 | BT_VP = 0x1 |
| 84 | def BAT_ESEG(dbatu): return (((uint)(dbatu) >> 28)) |
| 85 | |
| 86 | MIN_BAT_SIZE = 0x00020000 |
| 87 | MAX_BAT_SIZE = 0x10000000 |
| 88 | def ntohl(x): return (x) |
| 89 | |
| 90 | def ntohs(x): return (x) |
| 91 | |
| 92 | def htonl(x): return (x) |
| 93 | |
| 94 | def htons(x): return (x) |
| 95 | |
| 96 | IPPROTO_IP = 0 |
| 97 | IPPROTO_ICMP = 1 |
| 98 | IPPROTO_IGMP = 2 |
| 99 | IPPROTO_GGP = 3 |
| 100 | IPPROTO_TCP = 6 |
| 101 | IPPROTO_EGP = 8 |
| 102 | IPPROTO_PUP = 12 |
| 103 | IPPROTO_UDP = 17 |
| 104 | IPPROTO_IDP = 22 |
| 105 | IPPROTO_TP = 29 |
| 106 | IPPROTO_LOCAL = 63 |
| 107 | IPPROTO_EON = 80 |
| 108 | IPPROTO_BIP = 0x53 |
| 109 | IPPROTO_RAW = 255 |
| 110 | IPPROTO_MAX = 256 |
| 111 | IPPORT_RESERVED = 1024 |
| 112 | IPPORT_USERRESERVED = 5000 |
| 113 | IPPORT_TIMESERVER = 37 |
| 114 | def IN_CLASSA(i): return (((long)(i) & 0x80000000) == 0) |
| 115 | |
| 116 | IN_CLASSA_NET = 0xff000000 |
| 117 | IN_CLASSA_NSHIFT = 24 |
| 118 | IN_CLASSA_HOST = 0x00ffffff |
| 119 | IN_CLASSA_MAX = 128 |
| 120 | def IN_CLASSB(i): return (((long)(i) & 0xc0000000) == 0x80000000) |
| 121 | |
| 122 | IN_CLASSB_NET = 0xffff0000 |
| 123 | IN_CLASSB_NSHIFT = 16 |
| 124 | IN_CLASSB_HOST = 0x0000ffff |
| 125 | IN_CLASSB_MAX = 65536 |
| 126 | def IN_CLASSC(i): return (((long)(i) & 0xe0000000) == 0xc0000000) |
| 127 | |
| 128 | IN_CLASSC_NET = 0xffffff00 |
| 129 | IN_CLASSC_NSHIFT = 8 |
| 130 | IN_CLASSC_HOST = 0x000000ff |
| 131 | def IN_CLASSD(i): return (((long)(i) & 0xf0000000) == 0xe0000000) |
| 132 | |
| 133 | def IN_MULTICAST(i): return IN_CLASSD(i) |
| 134 | |
| 135 | IN_CLASSD_NET = 0xf0000000 |
| 136 | IN_CLASSD_NSHIFT = 28 |
| 137 | IN_CLASSD_HOST = 0x0fffffff |
| 138 | INADDR_UNSPEC_GROUP = 0xe0000000 |
| 139 | INADDR_ALLHOSTS_GROUP = 0xe0000001 |
| 140 | INADDR_MAX_LOCAL_GROUP = 0xe00000ff |
| 141 | def IN_EXPERIMENTAL(i): return (((long)(i) & 0xe0000000) == 0xe0000000) |
| 142 | |
| 143 | def IN_BADCLASS(i): return (((long)(i) & 0xf0000000) == 0xf0000000) |
| 144 | |
| 145 | INADDR_ANY = 0x00000000 |
| 146 | INADDR_BROADCAST = 0xffffffff |
| 147 | INADDR_LOOPBACK = 0x7f000001 |
| 148 | INADDR_NONE = 0xffffffff |
| 149 | IN_LOOPBACKNET = 127 |
| 150 | IP_OPTIONS = 1 |
| 151 | IP_HDRINCL = 2 |
| 152 | IP_TOS = 3 |
| 153 | IP_TTL = 4 |
| 154 | IP_RECVOPTS = 5 |
| 155 | IP_RECVRETOPTS = 6 |
| 156 | IP_RECVDSTADDR = 7 |
| 157 | IP_RETOPTS = 8 |
| 158 | IP_MULTICAST_IF = 9 |
| 159 | IP_MULTICAST_TTL = 10 |
| 160 | IP_MULTICAST_LOOP = 11 |
| 161 | IP_ADD_MEMBERSHIP = 12 |
| 162 | IP_DROP_MEMBERSHIP = 13 |
| 163 | IP_DEFAULT_MULTICAST_TTL = 1 |
| 164 | IP_DEFAULT_MULTICAST_LOOP = 1 |
| 165 | IP_MAX_MEMBERSHIPS = 20 |