blob: 401de2bd34afa7b555d26a32443f76e7739cdefe [file] [log] [blame]
Guido van Rossumb6775db1994-08-01 11:34:53 +00001# Generated by h2py from /usr/include/sys/socket.h
Guido van Rossum8c1529d1996-06-11 15:03:14 +00002
3# Included from sys/bsd_types.h
4
5# Included from sys/mkdev.h
6ONBITSMAJOR = 7
7ONBITSMINOR = 8
8OMAXMAJ = 0x7f
9OMAXMIN = 0xff
10NBITSMAJOR = 14
11NBITSMINOR = 18
12MAXMAJ = 0x1ff
13MAXMIN = 0x3ffff
14OLDDEV = 0
15NEWDEV = 1
16MKDEV_VER = NEWDEV
17def major(dev): return __major(MKDEV_VER, dev)
18
19def minor(dev): return __minor(MKDEV_VER, dev)
20
21
22# Included from sys/select.h
23FD_SETSIZE = 1024
24NBBY = 8
Guido van Rossum70f14181993-12-29 16:35:41 +000025SOCK_STREAM = 1
26SOCK_DGRAM = 2
27SOCK_RAW = 3
28SOCK_RDM = 4
29SOCK_SEQPACKET = 5
Guido van Rossumb6775db1994-08-01 11:34:53 +000030NC_TPI_CLTS = 1
31NC_TPI_COTS = 2
32NC_TPI_COTS_ORD = 3
33NC_TPI_RAW = 4
34SOCK_DGRAM = NC_TPI_CLTS
35SOCK_STREAM = NC_TPI_COTS
36SOCK_RAW = NC_TPI_RAW
37SOCK_RDM = 5
38SOCK_SEQPACKET = 6
39IRIX4_SOCK_STREAM = 1
40IRIX4_SOCK_DGRAM = 2
41IRIX4_SOCK_RAW = 3
42IRIX4_SOCK_RDM = 4
43IRIX4_SOCK_SEQPACKET = 5
Guido van Rossum70f14181993-12-29 16:35:41 +000044SO_DEBUG = 0x0001
45SO_ACCEPTCONN = 0x0002
46SO_REUSEADDR = 0x0004
47SO_KEEPALIVE = 0x0008
48SO_DONTROUTE = 0x0010
49SO_BROADCAST = 0x0020
50SO_USELOOPBACK = 0x0040
51SO_LINGER = 0x0080
52SO_OOBINLINE = 0x0100
53SO_REUSEPORT = 0x0200
Guido van Rossumb6775db1994-08-01 11:34:53 +000054SO_ORDREL = 0x0200
55SO_IMASOCKET = 0x0400
56SO_CHAMELEON = 0x1000
Guido van Rossum70f14181993-12-29 16:35:41 +000057SO_SNDBUF = 0x1001
58SO_RCVBUF = 0x1002
59SO_SNDLOWAT = 0x1003
60SO_RCVLOWAT = 0x1004
61SO_SNDTIMEO = 0x1005
62SO_RCVTIMEO = 0x1006
63SO_ERROR = 0x1007
64SO_TYPE = 0x1008
Guido van Rossumb6775db1994-08-01 11:34:53 +000065SO_PROTOTYPE = 0x1009
Guido van Rossum70f14181993-12-29 16:35:41 +000066SOL_SOCKET = 0xffff
67AF_UNSPEC = 0
68AF_UNIX = 1
69AF_INET = 2
70AF_IMPLINK = 3
71AF_PUP = 4
72AF_CHAOS = 5
73AF_NS = 6
74AF_ISO = 7
Guido van Rossum70f14181993-12-29 16:35:41 +000075AF_ECMA = 8
76AF_DATAKIT = 9
77AF_CCITT = 10
78AF_SNA = 11
79AF_DECnet = 12
80AF_DLI = 13
81AF_LAT = 14
82AF_HYLINK = 15
83AF_APPLETALK = 16
84AF_ROUTE = 17
85AF_RAW = 18
86AF_LINK = 18
87pseudo_AF_XTP = 19
Guido van Rossumb6775db1994-08-01 11:34:53 +000088AF_NIT = 17
89AF_802 = 18
90AF_OSI = 19
91AF_X25 = 20
92AF_OSINET = 21
93AF_GOSIP = 22
94AF_SDL = 23
95AF_MAX = (AF_SDL+1)
Guido van Rossum8c1529d1996-06-11 15:03:14 +000096def OPTLEN(x): return ((((x) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
97
Guido van Rossum70f14181993-12-29 16:35:41 +000098PF_UNSPEC = AF_UNSPEC
99PF_UNIX = AF_UNIX
100PF_INET = AF_INET
101PF_IMPLINK = AF_IMPLINK
102PF_PUP = AF_PUP
103PF_CHAOS = AF_CHAOS
104PF_NS = AF_NS
105PF_ISO = AF_ISO
Guido van Rossum70f14181993-12-29 16:35:41 +0000106PF_ECMA = AF_ECMA
107PF_DATAKIT = AF_DATAKIT
108PF_CCITT = AF_CCITT
109PF_SNA = AF_SNA
110PF_DECnet = AF_DECnet
111PF_DLI = AF_DLI
112PF_LAT = AF_LAT
113PF_HYLINK = AF_HYLINK
114PF_APPLETALK = AF_APPLETALK
115PF_ROUTE = AF_ROUTE
116PF_LINK = AF_LINK
117PF_XTP = pseudo_AF_XTP
118PF_RAW = AF_RAW
Guido van Rossumb6775db1994-08-01 11:34:53 +0000119PF_NIT = AF_NIT
120PF_802 = AF_802
121PF_OSI = AF_OSI
122PF_X25 = AF_X25
123PF_OSINET = AF_OSINET
124PF_GOSIP = AF_GOSIP
Guido van Rossum70f14181993-12-29 16:35:41 +0000125PF_MAX = AF_MAX
126SOMAXCONN = 5
127MSG_OOB = 0x1
128MSG_PEEK = 0x2
129MSG_DONTROUTE = 0x4
Guido van Rossumb6775db1994-08-01 11:34:53 +0000130MSG_EOR = 0x8
Guido van Rossum70f14181993-12-29 16:35:41 +0000131MSG_BTAG = 0x40
132MSG_ETAG = 0x80
133MSG_MAXIOVLEN = 16