1 # Generated by h2py from /usr/include/netinet/in.h
2 from warnings
import warnpy3k
3 warnpy3k("the IN module has been removed in Python 3.0", stacklevel
=2)
6 # Included from sys/endian.h
10 BYTE_ORDER
= BIG_ENDIAN
11 BYTE_ORDER
= LITTLE_ENDIAN
12 def ntohl(x
): return (x
)
14 def ntohs(x
): return (x
)
16 def htonl(x
): return (x
)
18 def htons(x
): return (x
)
20 def htonl(x
): return ntohl(x
)
22 def htons(x
): return ntohs(x
)
25 # Included from sys/bsd_types.h
27 # Included from sys/mkdev.h
39 def major(dev
): return __major(MKDEV_VER
, dev
)
41 def minor(dev
): return __minor(MKDEV_VER
, dev
)
44 # Included from sys/select.h
64 IPPORT_RESERVED
= 1024
65 IPPORT_USERRESERVED
= 5000
66 IPPORT_MAXPORT
= 65535
67 def IN_CLASSA(i
): return (((long)(i
) & 0x80000000) == 0)
69 IN_CLASSA_NET
= 0xff000000
71 IN_CLASSA_HOST
= 0x00ffffff
73 def IN_CLASSB(i
): return (((long)(i
) & 0xc0000000) == 0x80000000)
75 IN_CLASSB_NET
= 0xffff0000
77 IN_CLASSB_HOST
= 0x0000ffff
79 def IN_CLASSC(i
): return (((long)(i
) & 0xe0000000) == 0xc0000000)
81 IN_CLASSC_NET
= 0xffffff00
83 IN_CLASSC_HOST
= 0x000000ff
84 def IN_CLASSD(i
): return (((long)(i
) & 0xf0000000) == 0xe0000000)
86 IN_CLASSD_NET
= 0xf0000000
88 IN_CLASSD_HOST
= 0x0fffffff
89 def IN_MULTICAST(i
): return IN_CLASSD(i
)
91 def IN_EXPERIMENTAL(i
): return (((long)(i
) & 0xf0000000) == 0xf0000000)
93 def IN_BADCLASS(i
): return (((long)(i
) & 0xf0000000) == 0xf0000000)
95 INADDR_ANY
= 0x00000000
96 INADDR_BROADCAST
= 0xffffffff
97 INADDR_LOOPBACK
= 0x7F000001
98 INADDR_UNSPEC_GROUP
= 0xe0000000
99 INADDR_ALLHOSTS_GROUP
= 0xe0000001
100 INADDR_MAX_LOCAL_GROUP
= 0xe00000ff
101 INADDR_NONE
= 0xffffffff
106 IP_MULTICAST_LOOP
= 4
107 IP_ADD_MEMBERSHIP
= 5
108 IP_DROP_MEMBERSHIP
= 6
125 IP_MULTICAST_TTL
= 21
126 IP_MULTICAST_LOOP
= 22
127 IP_ADD_MEMBERSHIP
= 23
128 IP_DROP_MEMBERSHIP
= 24
130 IRIX4_IP_MULTICAST_IF
= 2
131 IRIX4_IP_MULTICAST_TTL
= 3
132 IRIX4_IP_MULTICAST_LOOP
= 4
133 IRIX4_IP_ADD_MEMBERSHIP
= 5
134 IRIX4_IP_DROP_MEMBERSHIP
= 6
138 IRIX4_IP_RECVOPTS
= 10
139 IRIX4_IP_RECVRETOPTS
= 11
140 IRIX4_IP_RECVDSTADDR
= 12
141 IRIX4_IP_RETOPTS
= 13
142 IP_DEFAULT_MULTICAST_TTL
= 1
143 IP_DEFAULT_MULTICAST_LOOP
= 1
144 IP_MAX_MEMBERSHIPS
= 20