Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 1 | # Generated by h2py from /usr/include/netinet/in.h |
| 2 | _NETINET_IN_H = 1 |
| 3 | |
| 4 | # Included from features.h |
| 5 | _FEATURES_H = 1 |
| 6 | _GNU_SOURCE = 1 |
| 7 | __USE_ANSI = 1 |
| 8 | __FAVOR_BSD = 1 |
| 9 | _BSD_SOURCE = 1 |
| 10 | _SVID_SOURCE = 1 |
| 11 | _POSIX_SOURCE = 1 |
| 12 | _POSIX_C_SOURCE = 2 |
| 13 | __USE_POSIX = 1 |
| 14 | __USE_POSIX2 = 1 |
| 15 | __USE_MISC = 1 |
| 16 | __USE_BSD = 1 |
| 17 | __USE_SVID = 1 |
| 18 | __USE_GNU = 1 |
| 19 | __GNU_LIBRARY__ = 1 |
| 20 | |
| 21 | # Included from sys/cdefs.h |
| 22 | _SYS_CDEFS_H = 1 |
| 23 | def __P(args): return args |
| 24 | |
| 25 | def __P(args): return args |
| 26 | |
| 27 | def __P(args): return () |
| 28 | |
| 29 | def __STRING(x): return #x |
| 30 | |
| 31 | def __STRING(x): return "x" |
| 32 | |
| 33 | |
| 34 | # Included from sys/socket.h |
| 35 | |
| 36 | # Included from linux/socket.h |
| 37 | |
Guido van Rossum | 15c4fec | 1996-01-26 17:43:46 +0000 | [diff] [blame] | 38 | # Included from asm/socket.h |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 39 | FIOSETOWN = 0x8901 |
| 40 | SIOCSPGRP = 0x8902 |
| 41 | FIOGETOWN = 0x8903 |
| 42 | SIOCGPGRP = 0x8904 |
| 43 | SIOCATMARK = 0x8905 |
| 44 | SIOCGSTAMP = 0x8906 |
Guido van Rossum | 15c4fec | 1996-01-26 17:43:46 +0000 | [diff] [blame] | 45 | SOL_SOCKET = 1 |
| 46 | SO_DEBUG = 1 |
| 47 | SO_REUSEADDR = 2 |
| 48 | SO_TYPE = 3 |
| 49 | SO_ERROR = 4 |
| 50 | SO_DONTROUTE = 5 |
| 51 | SO_BROADCAST = 6 |
| 52 | SO_SNDBUF = 7 |
| 53 | SO_RCVBUF = 8 |
| 54 | SO_KEEPALIVE = 9 |
| 55 | SO_OOBINLINE = 10 |
| 56 | SO_NO_CHECK = 11 |
| 57 | SO_PRIORITY = 12 |
| 58 | SO_LINGER = 13 |
| 59 | |
| 60 | # Included from linux/sockios.h |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 61 | SIOCADDRT = 0x890B |
| 62 | SIOCDELRT = 0x890C |
| 63 | SIOCGIFNAME = 0x8910 |
| 64 | SIOCSIFLINK = 0x8911 |
| 65 | SIOCGIFCONF = 0x8912 |
| 66 | SIOCGIFFLAGS = 0x8913 |
| 67 | SIOCSIFFLAGS = 0x8914 |
| 68 | SIOCGIFADDR = 0x8915 |
| 69 | SIOCSIFADDR = 0x8916 |
| 70 | SIOCGIFDSTADDR = 0x8917 |
| 71 | SIOCSIFDSTADDR = 0x8918 |
| 72 | SIOCGIFBRDADDR = 0x8919 |
| 73 | SIOCSIFBRDADDR = 0x891a |
| 74 | SIOCGIFNETMASK = 0x891b |
| 75 | SIOCSIFNETMASK = 0x891c |
| 76 | SIOCGIFMETRIC = 0x891d |
| 77 | SIOCSIFMETRIC = 0x891e |
| 78 | SIOCGIFMEM = 0x891f |
| 79 | SIOCSIFMEM = 0x8920 |
| 80 | SIOCGIFMTU = 0x8921 |
| 81 | SIOCSIFMTU = 0x8922 |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 82 | SIOCSIFHWADDR = 0x8924 |
| 83 | SIOCGIFENCAP = 0x8925 |
| 84 | SIOCSIFENCAP = 0x8926 |
| 85 | SIOCGIFHWADDR = 0x8927 |
| 86 | SIOCGIFSLAVE = 0x8929 |
| 87 | SIOCSIFSLAVE = 0x8930 |
| 88 | SIOCADDMULTI = 0x8931 |
| 89 | SIOCDELMULTI = 0x8932 |
Guido van Rossum | 15c4fec | 1996-01-26 17:43:46 +0000 | [diff] [blame] | 90 | OLD_SIOCDARP = 0x8950 |
| 91 | OLD_SIOCGARP = 0x8951 |
| 92 | OLD_SIOCSARP = 0x8952 |
| 93 | SIOCDARP = 0x8953 |
| 94 | SIOCGARP = 0x8954 |
| 95 | SIOCSARP = 0x8955 |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 96 | SIOCDRARP = 0x8960 |
| 97 | SIOCGRARP = 0x8961 |
| 98 | SIOCSRARP = 0x8962 |
| 99 | SIOCGIFMAP = 0x8970 |
| 100 | SIOCSIFMAP = 0x8971 |
| 101 | SIOCDEVPRIVATE = 0x89F0 |
| 102 | SIOCPROTOPRIVATE = 0x89E0 |
Guido van Rossum | 15c4fec | 1996-01-26 17:43:46 +0000 | [diff] [blame] | 103 | |
| 104 | # Included from linux/uio.h |
| 105 | MAX_IOVEC = 8 |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 106 | SOCK_STREAM = 1 |
| 107 | SOCK_DGRAM = 2 |
| 108 | SOCK_RAW = 3 |
| 109 | SOCK_RDM = 4 |
| 110 | SOCK_SEQPACKET = 5 |
| 111 | SOCK_PACKET = 10 |
| 112 | AF_UNSPEC = 0 |
| 113 | AF_UNIX = 1 |
| 114 | AF_INET = 2 |
| 115 | AF_AX25 = 3 |
| 116 | AF_IPX = 4 |
| 117 | AF_APPLETALK = 5 |
Guido van Rossum | 15c4fec | 1996-01-26 17:43:46 +0000 | [diff] [blame] | 118 | AF_NETROM = 6 |
| 119 | AF_BRIDGE = 7 |
| 120 | AF_AAL5 = 8 |
| 121 | AF_X25 = 9 |
| 122 | AF_INET6 = 10 |
| 123 | AF_MAX = 12 |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 124 | PF_UNSPEC = AF_UNSPEC |
| 125 | PF_UNIX = AF_UNIX |
| 126 | PF_INET = AF_INET |
| 127 | PF_AX25 = AF_AX25 |
| 128 | PF_IPX = AF_IPX |
| 129 | PF_APPLETALK = AF_APPLETALK |
Guido van Rossum | 15c4fec | 1996-01-26 17:43:46 +0000 | [diff] [blame] | 130 | PF_NETROM = AF_NETROM |
| 131 | PF_BRIDGE = AF_BRIDGE |
| 132 | PF_AAL5 = AF_AAL5 |
| 133 | PF_X25 = AF_X25 |
| 134 | PF_INET6 = AF_INET6 |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 135 | PF_MAX = AF_MAX |
Guido van Rossum | 15c4fec | 1996-01-26 17:43:46 +0000 | [diff] [blame] | 136 | SOMAXCONN = 128 |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 137 | MSG_OOB = 1 |
| 138 | MSG_PEEK = 2 |
| 139 | MSG_DONTROUTE = 4 |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 140 | SOL_IP = 0 |
| 141 | SOL_IPX = 256 |
| 142 | SOL_AX25 = 257 |
| 143 | SOL_ATALK = 258 |
Guido van Rossum | 15c4fec | 1996-01-26 17:43:46 +0000 | [diff] [blame] | 144 | SOL_NETROM = 259 |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 145 | SOL_TCP = 6 |
| 146 | SOL_UDP = 17 |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 147 | IP_TOS = 1 |
| 148 | IPTOS_LOWDELAY = 0x10 |
| 149 | IPTOS_THROUGHPUT = 0x08 |
| 150 | IPTOS_RELIABILITY = 0x04 |
| 151 | IP_TTL = 2 |
Guido van Rossum | 15c4fec | 1996-01-26 17:43:46 +0000 | [diff] [blame] | 152 | IP_HDRINCL = 3 |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 153 | IP_OPTIONS = 4 |
| 154 | IP_MULTICAST_IF = 32 |
| 155 | IP_MULTICAST_TTL = 33 |
| 156 | IP_MULTICAST_LOOP = 34 |
| 157 | IP_ADD_MEMBERSHIP = 35 |
| 158 | IP_DROP_MEMBERSHIP = 36 |
| 159 | IP_DEFAULT_MULTICAST_TTL = 1 |
| 160 | IP_DEFAULT_MULTICAST_LOOP = 1 |
| 161 | IP_MAX_MEMBERSHIPS = 20 |
| 162 | IPX_TYPE = 1 |
| 163 | TCP_NODELAY = 1 |
| 164 | TCP_MAXSEG = 2 |
| 165 | SOPRI_INTERACTIVE = 0 |
| 166 | SOPRI_NORMAL = 1 |
| 167 | SOPRI_BACKGROUND = 2 |
Guido van Rossum | 15c4fec | 1996-01-26 17:43:46 +0000 | [diff] [blame] | 168 | |
| 169 | # Included from sys/types.h |
| 170 | |
| 171 | # Included from linux/types.h |
| 172 | __FD_SETSIZE = 256 |
| 173 | |
| 174 | # Included from asm/types.h |
| 175 | def __FD_ZERO(fdsetp): return \ |
| 176 | |
| 177 | |
| 178 | # Included from sys/bitypes.h |
| 179 | |
| 180 | # Included from pthread/mit/posix.h |
| 181 | |
| 182 | # Included from pthread/mit/types.h |
| 183 | |
| 184 | # Included from pthread/mit/xtypes.h |
| 185 | |
| 186 | # Included from pthread/mit/sys/types.h |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 187 | IMPLINK_IP = 155 |
| 188 | IMPLINK_LOWEXPER = 156 |
| 189 | IMPLINK_HIGHEXPER = 158 |
| 190 | |
| 191 | # Included from linux/in.h |
| 192 | __SOCK_SIZE__ = 16 |
| 193 | IN_CLASSA_NET = 0xff000000 |
| 194 | IN_CLASSA_NSHIFT = 24 |
| 195 | IN_CLASSA_HOST = (0xffffffff & ~IN_CLASSA_NET) |
| 196 | IN_CLASSA_MAX = 128 |
| 197 | IN_CLASSB_NET = 0xffff0000 |
| 198 | IN_CLASSB_NSHIFT = 16 |
| 199 | IN_CLASSB_HOST = (0xffffffff & ~IN_CLASSB_NET) |
| 200 | IN_CLASSB_MAX = 65536 |
| 201 | IN_CLASSC_NET = 0xffffff00 |
| 202 | IN_CLASSC_NSHIFT = 8 |
| 203 | IN_CLASSC_HOST = (0xffffffff & ~IN_CLASSC_NET) |
| 204 | def IN_MULTICAST(a): return IN_CLASSD(a) |
| 205 | |
| 206 | IN_MULTICAST_NET = 0xF0000000 |
| 207 | INADDR_NONE = 0xffffffff |
| 208 | IN_LOOPBACKNET = 127 |
| 209 | INADDR_LOOPBACK = 0x7f000001 |
| 210 | INADDR_UNSPEC_GROUP = 0xe0000000 |
| 211 | INADDR_ALLHOSTS_GROUP = 0xe0000001 |
| 212 | INADDR_MAX_LOCAL_GROUP = 0xe00000ff |
| 213 | |
| 214 | # Included from asm/byteorder.h |
Guido van Rossum | 15c4fec | 1996-01-26 17:43:46 +0000 | [diff] [blame] | 215 | __LITTLE_ENDIAN = 1234 |
Guido van Rossum | 9a707e8 | 1995-04-05 09:44:56 +0000 | [diff] [blame] | 216 | def __constant_ntohl(x): return \ |
| 217 | |
| 218 | def __constant_ntohs(x): return \ |
| 219 | |
| 220 | def __htonl(x): return __ntohl(x) |
| 221 | |
| 222 | def __htons(x): return __ntohs(x) |
| 223 | |
| 224 | def __constant_htonl(x): return __constant_ntohl(x) |
| 225 | |
| 226 | def __constant_htons(x): return __constant_ntohs(x) |
| 227 | |
| 228 | def ntohl(x): return \ |
| 229 | |
| 230 | def ntohs(x): return \ |
| 231 | |
| 232 | def htonl(x): return \ |
| 233 | |
| 234 | def htons(x): return \ |
| 235 | |
Guido van Rossum | 15c4fec | 1996-01-26 17:43:46 +0000 | [diff] [blame] | 236 | def LOOPBACK(x): return (((x) & htonl(0xff000000)) == htonl(0x7f000000)) |
| 237 | |
| 238 | def MULTICAST(x): return (((x) & htonl(0xf0000000)) == htonl(0xe0000000)) |
| 239 | |