diff options
Diffstat (limited to 'Lib/plat-irix5/IN.py')
-rwxr-xr-x | Lib/plat-irix5/IN.py | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Lib/plat-irix5/IN.py b/Lib/plat-irix5/IN.py index 325a021..2d67892 100755 --- a/Lib/plat-irix5/IN.py +++ b/Lib/plat-irix5/IN.py @@ -1,8 +1,51 @@ # Generated by h2py from /usr/include/netinet/in.h + +# Included from sys/endian.h +LITTLE_ENDIAN = 1234 +BIG_ENDIAN = 4321 +PDP_ENDIAN = 3412 +BYTE_ORDER = BIG_ENDIAN +BYTE_ORDER = LITTLE_ENDIAN +def ntohl(x): return (x) + +def ntohs(x): return (x) + +def htonl(x): return (x) + +def htons(x): return (x) + +def htonl(x): return ntohl(x) + +def htons(x): return ntohs(x) + + +# Included from sys/bsd_types.h + +# Included from sys/mkdev.h +ONBITSMAJOR = 7 +ONBITSMINOR = 8 +OMAXMAJ = 0x7f +OMAXMIN = 0xff +NBITSMAJOR = 14 +NBITSMINOR = 18 +MAXMAJ = 0x1ff +MAXMIN = 0x3ffff +OLDDEV = 0 +NEWDEV = 1 +MKDEV_VER = NEWDEV +def major(dev): return __major(MKDEV_VER, dev) + +def minor(dev): return __minor(MKDEV_VER, dev) + + +# Included from sys/select.h +FD_SETSIZE = 1024 +NBBY = 8 IPPROTO_IP = 0 IPPROTO_ICMP = 1 IPPROTO_IGMP = 2 IPPROTO_GGP = 3 +IPPROTO_ENCAP = 4 IPPROTO_TCP = 6 IPPROTO_EGP = 8 IPPROTO_PUP = 12 @@ -17,20 +60,35 @@ IPPROTO_RAW = 255 IPPROTO_MAX = 256 IPPORT_RESERVED = 1024 IPPORT_USERRESERVED = 5000 +IPPORT_MAXPORT = 65535 +def IN_CLASSA(i): return (((long)(i) & 0x80000000) == 0) + IN_CLASSA_NET = 0xff000000 IN_CLASSA_NSHIFT = 24 IN_CLASSA_HOST = 0x00ffffff IN_CLASSA_MAX = 128 +def IN_CLASSB(i): return (((long)(i) & 0xc0000000) == 0x80000000) + IN_CLASSB_NET = 0xffff0000 IN_CLASSB_NSHIFT = 16 IN_CLASSB_HOST = 0x0000ffff IN_CLASSB_MAX = 65536 +def IN_CLASSC(i): return (((long)(i) & 0xe0000000) == 0xc0000000) + IN_CLASSC_NET = 0xffffff00 IN_CLASSC_NSHIFT = 8 IN_CLASSC_HOST = 0x000000ff +def IN_CLASSD(i): return (((long)(i) & 0xf0000000) == 0xe0000000) + IN_CLASSD_NET = 0xf0000000 IN_CLASSD_NSHIFT = 28 IN_CLASSD_HOST = 0x0fffffff +def IN_MULTICAST(i): return IN_CLASSD(i) + +def IN_EXPERIMENTAL(i): return (((long)(i) & 0xf0000000) == 0xf0000000) + +def IN_BADCLASS(i): return (((long)(i) & 0xf0000000) == 0xf0000000) + INADDR_ANY = 0x00000000 INADDR_BROADCAST = 0xffffffff INADDR_LOOPBACK = 0x7F000001 |