Guido van Rossum | 77c29a1 | 1996-07-22 21:50:43 +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 | |
| 38 | # Included from asm/socket.h |
Guido van Rossum | 54afb3b | 1996-07-22 23:46:00 +0000 | [diff] [blame] | 39 | |
| 40 | # Included from asm/sockios.h |
Guido van Rossum | 77c29a1 | 1996-07-22 21:50:43 +0000 | [diff] [blame] | 41 | FIOSETOWN = 0x8901 |
| 42 | SIOCSPGRP = 0x8902 |
| 43 | FIOGETOWN = 0x8903 |
| 44 | SIOCGPGRP = 0x8904 |
| 45 | SIOCATMARK = 0x8905 |
| 46 | SIOCGSTAMP = 0x8906 |
| 47 | SOL_SOCKET = 1 |
| 48 | SO_DEBUG = 1 |
| 49 | SO_REUSEADDR = 2 |
| 50 | SO_TYPE = 3 |
| 51 | SO_ERROR = 4 |
| 52 | SO_DONTROUTE = 5 |
| 53 | SO_BROADCAST = 6 |
| 54 | SO_SNDBUF = 7 |
| 55 | SO_RCVBUF = 8 |
| 56 | SO_KEEPALIVE = 9 |
| 57 | SO_OOBINLINE = 10 |
| 58 | SO_NO_CHECK = 11 |
| 59 | SO_PRIORITY = 12 |
| 60 | SO_LINGER = 13 |
Guido van Rossum | 54afb3b | 1996-07-22 23:46:00 +0000 | [diff] [blame] | 61 | SO_BSDCOMPAT = 14 |
Guido van Rossum | 77c29a1 | 1996-07-22 21:50:43 +0000 | [diff] [blame] | 62 | |
| 63 | # Included from linux/sockios.h |
| 64 | SIOCADDRT = 0x890B |
| 65 | SIOCDELRT = 0x890C |
| 66 | SIOCGIFNAME = 0x8910 |
| 67 | SIOCSIFLINK = 0x8911 |
| 68 | SIOCGIFCONF = 0x8912 |
| 69 | SIOCGIFFLAGS = 0x8913 |
| 70 | SIOCSIFFLAGS = 0x8914 |
| 71 | SIOCGIFADDR = 0x8915 |
| 72 | SIOCSIFADDR = 0x8916 |
| 73 | SIOCGIFDSTADDR = 0x8917 |
| 74 | SIOCSIFDSTADDR = 0x8918 |
| 75 | SIOCGIFBRDADDR = 0x8919 |
| 76 | SIOCSIFBRDADDR = 0x891a |
| 77 | SIOCGIFNETMASK = 0x891b |
| 78 | SIOCSIFNETMASK = 0x891c |
| 79 | SIOCGIFMETRIC = 0x891d |
| 80 | SIOCSIFMETRIC = 0x891e |
| 81 | SIOCGIFMEM = 0x891f |
| 82 | SIOCSIFMEM = 0x8920 |
| 83 | SIOCGIFMTU = 0x8921 |
| 84 | SIOCSIFMTU = 0x8922 |
| 85 | SIOCSIFHWADDR = 0x8924 |
| 86 | SIOCGIFENCAP = 0x8925 |
| 87 | SIOCSIFENCAP = 0x8926 |
| 88 | SIOCGIFHWADDR = 0x8927 |
| 89 | SIOCGIFSLAVE = 0x8929 |
| 90 | SIOCSIFSLAVE = 0x8930 |
| 91 | SIOCADDMULTI = 0x8931 |
| 92 | SIOCDELMULTI = 0x8932 |
Guido van Rossum | 54afb3b | 1996-07-22 23:46:00 +0000 | [diff] [blame] | 93 | SIOCGIFBR = 0x8940 |
| 94 | SIOCSIFBR = 0x8941 |
Guido van Rossum | 77c29a1 | 1996-07-22 21:50:43 +0000 | [diff] [blame] | 95 | OLD_SIOCDARP = 0x8950 |
| 96 | OLD_SIOCGARP = 0x8951 |
| 97 | OLD_SIOCSARP = 0x8952 |
| 98 | SIOCDARP = 0x8953 |
| 99 | SIOCGARP = 0x8954 |
| 100 | SIOCSARP = 0x8955 |
| 101 | SIOCDRARP = 0x8960 |
| 102 | SIOCGRARP = 0x8961 |
| 103 | SIOCSRARP = 0x8962 |
| 104 | SIOCGIFMAP = 0x8970 |
| 105 | SIOCSIFMAP = 0x8971 |
Guido van Rossum | 54afb3b | 1996-07-22 23:46:00 +0000 | [diff] [blame] | 106 | SIOCADDDLCI = 0x8980 |
| 107 | SIOCDELDLCI = 0x8981 |
Guido van Rossum | 77c29a1 | 1996-07-22 21:50:43 +0000 | [diff] [blame] | 108 | SIOCDEVPRIVATE = 0x89F0 |
| 109 | SIOCPROTOPRIVATE = 0x89E0 |
| 110 | |
| 111 | # Included from linux/uio.h |
Guido van Rossum | 54afb3b | 1996-07-22 23:46:00 +0000 | [diff] [blame] | 112 | UIO_MAXIOV = 16 |
| 113 | SCM_RIGHTS = 1 |
Guido van Rossum | 77c29a1 | 1996-07-22 21:50:43 +0000 | [diff] [blame] | 114 | SOCK_STREAM = 1 |
| 115 | SOCK_DGRAM = 2 |
| 116 | SOCK_RAW = 3 |
| 117 | SOCK_RDM = 4 |
| 118 | SOCK_SEQPACKET = 5 |
| 119 | SOCK_PACKET = 10 |
| 120 | AF_UNSPEC = 0 |
| 121 | AF_UNIX = 1 |
| 122 | AF_INET = 2 |
| 123 | AF_AX25 = 3 |
| 124 | AF_IPX = 4 |
| 125 | AF_APPLETALK = 5 |
| 126 | AF_NETROM = 6 |
| 127 | AF_BRIDGE = 7 |
| 128 | AF_AAL5 = 8 |
| 129 | AF_X25 = 9 |
| 130 | AF_INET6 = 10 |
| 131 | AF_MAX = 12 |
| 132 | PF_UNSPEC = AF_UNSPEC |
| 133 | PF_UNIX = AF_UNIX |
| 134 | PF_INET = AF_INET |
| 135 | PF_AX25 = AF_AX25 |
| 136 | PF_IPX = AF_IPX |
| 137 | PF_APPLETALK = AF_APPLETALK |
| 138 | PF_NETROM = AF_NETROM |
| 139 | PF_BRIDGE = AF_BRIDGE |
| 140 | PF_AAL5 = AF_AAL5 |
| 141 | PF_X25 = AF_X25 |
| 142 | PF_INET6 = AF_INET6 |
| 143 | PF_MAX = AF_MAX |
| 144 | SOMAXCONN = 128 |
| 145 | MSG_OOB = 1 |
| 146 | MSG_PEEK = 2 |
| 147 | MSG_DONTROUTE = 4 |
Guido van Rossum | 54afb3b | 1996-07-22 23:46:00 +0000 | [diff] [blame] | 148 | MSG_PROXY = 16 |
Guido van Rossum | 77c29a1 | 1996-07-22 21:50:43 +0000 | [diff] [blame] | 149 | SOL_IP = 0 |
| 150 | SOL_IPX = 256 |
| 151 | SOL_AX25 = 257 |
| 152 | SOL_ATALK = 258 |
| 153 | SOL_NETROM = 259 |
| 154 | SOL_TCP = 6 |
| 155 | SOL_UDP = 17 |
| 156 | IP_TOS = 1 |
| 157 | IPTOS_LOWDELAY = 0x10 |
| 158 | IPTOS_THROUGHPUT = 0x08 |
| 159 | IPTOS_RELIABILITY = 0x04 |
Guido van Rossum | 54afb3b | 1996-07-22 23:46:00 +0000 | [diff] [blame] | 160 | IPTOS_MINCOST = 0x02 |
Guido van Rossum | 77c29a1 | 1996-07-22 21:50:43 +0000 | [diff] [blame] | 161 | IP_TTL = 2 |
| 162 | IP_HDRINCL = 3 |
| 163 | IP_OPTIONS = 4 |
| 164 | IP_MULTICAST_IF = 32 |
| 165 | IP_MULTICAST_TTL = 33 |
| 166 | IP_MULTICAST_LOOP = 34 |
| 167 | IP_ADD_MEMBERSHIP = 35 |
| 168 | IP_DROP_MEMBERSHIP = 36 |
| 169 | IP_DEFAULT_MULTICAST_TTL = 1 |
| 170 | IP_DEFAULT_MULTICAST_LOOP = 1 |
| 171 | IP_MAX_MEMBERSHIPS = 20 |
| 172 | IPX_TYPE = 1 |
| 173 | TCP_NODELAY = 1 |
| 174 | TCP_MAXSEG = 2 |
| 175 | SOPRI_INTERACTIVE = 0 |
| 176 | SOPRI_NORMAL = 1 |
| 177 | SOPRI_BACKGROUND = 2 |
| 178 | |
| 179 | # Included from sys/types.h |
| 180 | |
| 181 | # Included from linux/types.h |
Guido van Rossum | 77c29a1 | 1996-07-22 21:50:43 +0000 | [diff] [blame] | 182 | |
Guido van Rossum | 54afb3b | 1996-07-22 23:46:00 +0000 | [diff] [blame] | 183 | # Included from linux/posix_types.h |
| 184 | __FD_SETSIZE = 1024 |
| 185 | def __FDELT(d): return ((d) / __NFDBITS) |
| 186 | |
| 187 | |
| 188 | # Included from asm/posix_types.h |
Guido van Rossum | 77c29a1 | 1996-07-22 21:50:43 +0000 | [diff] [blame] | 189 | def __FD_ZERO(fdsetp): return \ |
| 190 | |
| 191 | |
Guido van Rossum | 54afb3b | 1996-07-22 23:46:00 +0000 | [diff] [blame] | 192 | # Included from asm/types.h |
| 193 | |
Guido van Rossum | 77c29a1 | 1996-07-22 21:50:43 +0000 | [diff] [blame] | 194 | # Included from sys/bitypes.h |
| 195 | |
| 196 | # Included from pthread/mit/posix.h |
| 197 | |
| 198 | # Included from pthread/mit/types.h |
| 199 | |
| 200 | # Included from pthread/mit/xtypes.h |
| 201 | |
| 202 | # Included from pthread/mit/sys/types.h |
| 203 | IMPLINK_IP = 155 |
| 204 | IMPLINK_LOWEXPER = 156 |
| 205 | IMPLINK_HIGHEXPER = 158 |
| 206 | |
| 207 | # Included from linux/in.h |
| 208 | __SOCK_SIZE__ = 16 |
| 209 | IN_CLASSA_NET = 0xff000000 |
| 210 | IN_CLASSA_NSHIFT = 24 |
| 211 | IN_CLASSA_HOST = (0xffffffff & ~IN_CLASSA_NET) |
| 212 | IN_CLASSA_MAX = 128 |
| 213 | IN_CLASSB_NET = 0xffff0000 |
| 214 | IN_CLASSB_NSHIFT = 16 |
| 215 | IN_CLASSB_HOST = (0xffffffff & ~IN_CLASSB_NET) |
| 216 | IN_CLASSB_MAX = 65536 |
| 217 | IN_CLASSC_NET = 0xffffff00 |
| 218 | IN_CLASSC_NSHIFT = 8 |
| 219 | IN_CLASSC_HOST = (0xffffffff & ~IN_CLASSC_NET) |
| 220 | def IN_MULTICAST(a): return IN_CLASSD(a) |
| 221 | |
| 222 | IN_MULTICAST_NET = 0xF0000000 |
Guido van Rossum | 77c29a1 | 1996-07-22 21:50:43 +0000 | [diff] [blame] | 223 | IN_LOOPBACKNET = 127 |
| 224 | INADDR_LOOPBACK = 0x7f000001 |
| 225 | INADDR_UNSPEC_GROUP = 0xe0000000 |
| 226 | INADDR_ALLHOSTS_GROUP = 0xe0000001 |
| 227 | INADDR_MAX_LOCAL_GROUP = 0xe00000ff |
| 228 | |
| 229 | # Included from asm/byteorder.h |
| 230 | __LITTLE_ENDIAN = 1234 |
Guido van Rossum | 54afb3b | 1996-07-22 23:46:00 +0000 | [diff] [blame] | 231 | |
| 232 | # Included from linux/config.h |
| 233 | |
| 234 | # Included from linux/autoconf.h |
| 235 | CONFIG_MODULES = 1 |
| 236 | CONFIG_KERNELD = 1 |
| 237 | CONFIG_NET = 1 |
| 238 | CONFIG_PCI = 1 |
| 239 | CONFIG_SYSVIPC = 1 |
| 240 | CONFIG_BINFMT_AOUT = 1 |
| 241 | CONFIG_BINFMT_ELF = 1 |
| 242 | CONFIG_KERNEL_ELF = 1 |
| 243 | CONFIG_M586 = 1 |
| 244 | CONFIG_BLK_DEV_FD = 1 |
| 245 | CONFIG_BLK_DEV_IDE = 1 |
| 246 | CONFIG_BLK_DEV_IDECD = 1 |
| 247 | CONFIG_INET = 1 |
| 248 | CONFIG_IP_NOSR = 1 |
| 249 | CONFIG_SKB_LARGE = 1 |
| 250 | CONFIG_SCSI = 1 |
| 251 | CONFIG_BLK_DEV_SD = 1 |
| 252 | CONFIG_BLK_DEV_SR = 1 |
| 253 | CONFIG_SCSI_AHA152X = 1 |
| 254 | CONFIG_NETDEVICES = 1 |
| 255 | CONFIG_DUMMY_MODULE = 1 |
| 256 | CONFIG_NET_ETHERNET = 1 |
| 257 | CONFIG_NET_VENDOR_3COM = 1 |
| 258 | CONFIG_EL3 = 1 |
| 259 | CONFIG_EXT2_FS = 1 |
| 260 | CONFIG_FAT_FS_MODULE = 1 |
| 261 | CONFIG_MSDOS_FS_MODULE = 1 |
| 262 | CONFIG_VFAT_FS_MODULE = 1 |
| 263 | CONFIG_PROC_FS = 1 |
| 264 | CONFIG_NFS_FS_MODULE = 1 |
| 265 | CONFIG_ISO9660_FS_MODULE = 1 |
| 266 | CONFIG_SERIAL = 1 |
| 267 | CONFIG_MOUSE = 1 |
| 268 | CONFIG_PSMOUSE = 1 |
| 269 | UTS_SYSNAME = "Linux" |
| 270 | UTS_MACHINE = "unknown" |
| 271 | UTS_NODENAME = "(none)" |
| 272 | UTS_DOMAINNAME = "(none)" |
| 273 | DEF_INITSEG = 0x9000 |
| 274 | DEF_SYSSEG = 0x1000 |
| 275 | DEF_SETUPSEG = 0x9020 |
| 276 | DEF_SYSSIZE = 0x7F00 |
| 277 | NORMAL_VGA = 0xffff |
| 278 | EXTENDED_VGA = 0xfffe |
| 279 | ASK_VGA = 0xfffd |
Guido van Rossum | 77c29a1 | 1996-07-22 21:50:43 +0000 | [diff] [blame] | 280 | def __constant_ntohl(x): return \ |
| 281 | |
| 282 | def __constant_ntohs(x): return \ |
| 283 | |
| 284 | def __htonl(x): return __ntohl(x) |
| 285 | |
| 286 | def __htons(x): return __ntohs(x) |
| 287 | |
| 288 | def __constant_htonl(x): return __constant_ntohl(x) |
| 289 | |
| 290 | def __constant_htons(x): return __constant_ntohs(x) |
| 291 | |
| 292 | def ntohl(x): return \ |
| 293 | |
| 294 | def ntohs(x): return \ |
| 295 | |
| 296 | def htonl(x): return \ |
| 297 | |
| 298 | def htons(x): return \ |
| 299 | |
| 300 | def LOOPBACK(x): return (((x) & htonl(0xff000000)) == htonl(0x7f000000)) |
| 301 | |
| 302 | def MULTICAST(x): return (((x) & htonl(0xf0000000)) == htonl(0xe0000000)) |
| 303 | |