summaryrefslogtreecommitdiffstats
path: root/Lib/plat-linux1
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-01-26 17:43:46 (GMT)
committerGuido van Rossum <guido@python.org>1996-01-26 17:43:46 (GMT)
commit15c4fecffc6cc3f51130dff942d7b8c4040ad423 (patch)
tree99c46360b01dd5edf93892368cab373faf64d83d /Lib/plat-linux1
parent8c8a02a2588b0219d88fb892635148f9467f6634 (diff)
downloadcpython-15c4fecffc6cc3f51130dff942d7b8c4040ad423.zip
cpython-15c4fecffc6cc3f51130dff942d7b8c4040ad423.tar.gz
cpython-15c4fecffc6cc3f51130dff942d7b8c4040ad423.tar.bz2
more recent linux header files
Diffstat (limited to 'Lib/plat-linux1')
-rwxr-xr-xLib/plat-linux1/FCNTL.py12
-rwxr-xr-xLib/plat-linux1/IN.py87
-rwxr-xr-xLib/plat-linux1/SOCKET.py82
-rwxr-xr-xLib/plat-linux1/TERMIOS.py31
4 files changed, 164 insertions, 48 deletions
diff --git a/Lib/plat-linux1/FCNTL.py b/Lib/plat-linux1/FCNTL.py
index 9d00fca..f65c4fa 100755
--- a/Lib/plat-linux1/FCNTL.py
+++ b/Lib/plat-linux1/FCNTL.py
@@ -35,12 +35,14 @@ def __STRING(x): return "x"
# Included from sys/types.h
# Included from linux/types.h
+__FD_SETSIZE = 256
# Included from asm/types.h
-__FDSET_LONGS = 8
def __FD_ZERO(fdsetp): return \
+# Included from sys/bitypes.h
+
# Included from gnu/types.h
_GNU_TYPES_H = 1
__FDSET_LONGS = 8
@@ -55,6 +57,8 @@ def __FD_ZERO(set): return \
# Included from linux/fcntl.h
+
+# Included from asm/fcntl.h
O_ACCMODE = 0003
O_RDONLY = 00
O_WRONLY = 01
@@ -84,6 +88,12 @@ F_WRLCK = 1
F_UNLCK = 2
F_EXLCK = 4
F_SHLCK = 8
+LOCK_SH = 1
+LOCK_EX = 2
+LOCK_NB = 4
+LOCK_UN = 8
+F_POSIX = 1
+F_FLOCK = 2
FNDELAY = O_NDELAY
F_ULOCK = 0
F_LOCK = 1
diff --git a/Lib/plat-linux1/IN.py b/Lib/plat-linux1/IN.py
index 2278653..86710d1 100755
--- a/Lib/plat-linux1/IN.py
+++ b/Lib/plat-linux1/IN.py
@@ -35,13 +35,29 @@ def __STRING(x): return "x"
# Included from linux/socket.h
-# Included from linux/sockios.h
+# Included from asm/socket.h
FIOSETOWN = 0x8901
SIOCSPGRP = 0x8902
FIOGETOWN = 0x8903
SIOCGPGRP = 0x8904
SIOCATMARK = 0x8905
SIOCGSTAMP = 0x8906
+SOL_SOCKET = 1
+SO_DEBUG = 1
+SO_REUSEADDR = 2
+SO_TYPE = 3
+SO_ERROR = 4
+SO_DONTROUTE = 5
+SO_BROADCAST = 6
+SO_SNDBUF = 7
+SO_RCVBUF = 8
+SO_KEEPALIVE = 9
+SO_OOBINLINE = 10
+SO_NO_CHECK = 11
+SO_PRIORITY = 12
+SO_LINGER = 13
+
+# Included from linux/sockios.h
SIOCADDRT = 0x890B
SIOCDELRT = 0x890C
SIOCGIFNAME = 0x8910
@@ -63,7 +79,6 @@ SIOCGIFMEM = 0x891f
SIOCSIFMEM = 0x8920
SIOCGIFMTU = 0x8921
SIOCSIFMTU = 0x8922
-OLD_SIOCGIFHWADDR = 0x8923
SIOCSIFHWADDR = 0x8924
SIOCGIFENCAP = 0x8925
SIOCSIFENCAP = 0x8926
@@ -72,11 +87,12 @@ SIOCGIFSLAVE = 0x8929
SIOCSIFSLAVE = 0x8930
SIOCADDMULTI = 0x8931
SIOCDELMULTI = 0x8932
-SIOCADDRTOLD = 0x8940
-SIOCDELRTOLD = 0x8941
-SIOCDARP = 0x8950
-SIOCGARP = 0x8951
-SIOCSARP = 0x8952
+OLD_SIOCDARP = 0x8950
+OLD_SIOCGARP = 0x8951
+OLD_SIOCSARP = 0x8952
+SIOCDARP = 0x8953
+SIOCGARP = 0x8954
+SIOCSARP = 0x8955
SIOCDRARP = 0x8960
SIOCGRARP = 0x8961
SIOCSRARP = 0x8962
@@ -84,6 +100,9 @@ SIOCGIFMAP = 0x8970
SIOCSIFMAP = 0x8971
SIOCDEVPRIVATE = 0x89F0
SIOCPROTOPRIVATE = 0x89E0
+
+# Included from linux/uio.h
+MAX_IOVEC = 8
SOCK_STREAM = 1
SOCK_DGRAM = 2
SOCK_RAW = 3
@@ -96,43 +115,41 @@ AF_INET = 2
AF_AX25 = 3
AF_IPX = 4
AF_APPLETALK = 5
-AF_MAX = 8
+AF_NETROM = 6
+AF_BRIDGE = 7
+AF_AAL5 = 8
+AF_X25 = 9
+AF_INET6 = 10
+AF_MAX = 12
PF_UNSPEC = AF_UNSPEC
PF_UNIX = AF_UNIX
PF_INET = AF_INET
PF_AX25 = AF_AX25
PF_IPX = AF_IPX
PF_APPLETALK = AF_APPLETALK
+PF_NETROM = AF_NETROM
+PF_BRIDGE = AF_BRIDGE
+PF_AAL5 = AF_AAL5
+PF_X25 = AF_X25
+PF_INET6 = AF_INET6
PF_MAX = AF_MAX
+SOMAXCONN = 128
MSG_OOB = 1
MSG_PEEK = 2
MSG_DONTROUTE = 4
-SOL_SOCKET = 1
SOL_IP = 0
SOL_IPX = 256
SOL_AX25 = 257
SOL_ATALK = 258
+SOL_NETROM = 259
SOL_TCP = 6
SOL_UDP = 17
-SO_DEBUG = 1
-SO_REUSEADDR = 2
-SO_TYPE = 3
-SO_ERROR = 4
-SO_DONTROUTE = 5
-SO_BROADCAST = 6
-SO_SNDBUF = 7
-SO_RCVBUF = 8
-SO_KEEPALIVE = 9
-SO_OOBINLINE = 10
-SO_NO_CHECK = 11
-SO_PRIORITY = 12
-SO_LINGER = 13
IP_TOS = 1
IPTOS_LOWDELAY = 0x10
IPTOS_THROUGHPUT = 0x08
IPTOS_RELIABILITY = 0x04
IP_TTL = 2
-IP_HRDINCL = 3
+IP_HDRINCL = 3
IP_OPTIONS = 4
IP_MULTICAST_IF = 32
IP_MULTICAST_TTL = 33
@@ -148,6 +165,25 @@ TCP_MAXSEG = 2
SOPRI_INTERACTIVE = 0
SOPRI_NORMAL = 1
SOPRI_BACKGROUND = 2
+
+# Included from sys/types.h
+
+# Included from linux/types.h
+__FD_SETSIZE = 256
+
+# Included from asm/types.h
+def __FD_ZERO(fdsetp): return \
+
+
+# Included from sys/bitypes.h
+
+# Included from pthread/mit/posix.h
+
+# Included from pthread/mit/types.h
+
+# Included from pthread/mit/xtypes.h
+
+# Included from pthread/mit/sys/types.h
IMPLINK_IP = 155
IMPLINK_LOWEXPER = 156
IMPLINK_HIGHEXPER = 158
@@ -176,6 +212,7 @@ INADDR_ALLHOSTS_GROUP = 0xe0000001
INADDR_MAX_LOCAL_GROUP = 0xe00000ff
# Included from asm/byteorder.h
+__LITTLE_ENDIAN = 1234
def __constant_ntohl(x): return \
def __constant_ntohs(x): return \
@@ -196,3 +233,7 @@ def htonl(x): return \
def htons(x): return \
+def LOOPBACK(x): return (((x) & htonl(0xff000000)) == htonl(0x7f000000))
+
+def MULTICAST(x): return (((x) & htonl(0xf0000000)) == htonl(0xe0000000))
+
diff --git a/Lib/plat-linux1/SOCKET.py b/Lib/plat-linux1/SOCKET.py
index 6943f26..71077c3 100755
--- a/Lib/plat-linux1/SOCKET.py
+++ b/Lib/plat-linux1/SOCKET.py
@@ -32,13 +32,29 @@ def __STRING(x): return "x"
# Included from linux/socket.h
-# Included from linux/sockios.h
+# Included from asm/socket.h
FIOSETOWN = 0x8901
SIOCSPGRP = 0x8902
FIOGETOWN = 0x8903
SIOCGPGRP = 0x8904
SIOCATMARK = 0x8905
SIOCGSTAMP = 0x8906
+SOL_SOCKET = 1
+SO_DEBUG = 1
+SO_REUSEADDR = 2
+SO_TYPE = 3
+SO_ERROR = 4
+SO_DONTROUTE = 5
+SO_BROADCAST = 6
+SO_SNDBUF = 7
+SO_RCVBUF = 8
+SO_KEEPALIVE = 9
+SO_OOBINLINE = 10
+SO_NO_CHECK = 11
+SO_PRIORITY = 12
+SO_LINGER = 13
+
+# Included from linux/sockios.h
SIOCADDRT = 0x890B
SIOCDELRT = 0x890C
SIOCGIFNAME = 0x8910
@@ -60,7 +76,6 @@ SIOCGIFMEM = 0x891f
SIOCSIFMEM = 0x8920
SIOCGIFMTU = 0x8921
SIOCSIFMTU = 0x8922
-OLD_SIOCGIFHWADDR = 0x8923
SIOCSIFHWADDR = 0x8924
SIOCGIFENCAP = 0x8925
SIOCSIFENCAP = 0x8926
@@ -69,11 +84,12 @@ SIOCGIFSLAVE = 0x8929
SIOCSIFSLAVE = 0x8930
SIOCADDMULTI = 0x8931
SIOCDELMULTI = 0x8932
-SIOCADDRTOLD = 0x8940
-SIOCDELRTOLD = 0x8941
-SIOCDARP = 0x8950
-SIOCGARP = 0x8951
-SIOCSARP = 0x8952
+OLD_SIOCDARP = 0x8950
+OLD_SIOCGARP = 0x8951
+OLD_SIOCSARP = 0x8952
+SIOCDARP = 0x8953
+SIOCGARP = 0x8954
+SIOCSARP = 0x8955
SIOCDRARP = 0x8960
SIOCGRARP = 0x8961
SIOCSRARP = 0x8962
@@ -81,6 +97,9 @@ SIOCGIFMAP = 0x8970
SIOCSIFMAP = 0x8971
SIOCDEVPRIVATE = 0x89F0
SIOCPROTOPRIVATE = 0x89E0
+
+# Included from linux/uio.h
+MAX_IOVEC = 8
SOCK_STREAM = 1
SOCK_DGRAM = 2
SOCK_RAW = 3
@@ -93,43 +112,41 @@ AF_INET = 2
AF_AX25 = 3
AF_IPX = 4
AF_APPLETALK = 5
-AF_MAX = 8
+AF_NETROM = 6
+AF_BRIDGE = 7
+AF_AAL5 = 8
+AF_X25 = 9
+AF_INET6 = 10
+AF_MAX = 12
PF_UNSPEC = AF_UNSPEC
PF_UNIX = AF_UNIX
PF_INET = AF_INET
PF_AX25 = AF_AX25
PF_IPX = AF_IPX
PF_APPLETALK = AF_APPLETALK
+PF_NETROM = AF_NETROM
+PF_BRIDGE = AF_BRIDGE
+PF_AAL5 = AF_AAL5
+PF_X25 = AF_X25
+PF_INET6 = AF_INET6
PF_MAX = AF_MAX
+SOMAXCONN = 128
MSG_OOB = 1
MSG_PEEK = 2
MSG_DONTROUTE = 4
-SOL_SOCKET = 1
SOL_IP = 0
SOL_IPX = 256
SOL_AX25 = 257
SOL_ATALK = 258
+SOL_NETROM = 259
SOL_TCP = 6
SOL_UDP = 17
-SO_DEBUG = 1
-SO_REUSEADDR = 2
-SO_TYPE = 3
-SO_ERROR = 4
-SO_DONTROUTE = 5
-SO_BROADCAST = 6
-SO_SNDBUF = 7
-SO_RCVBUF = 8
-SO_KEEPALIVE = 9
-SO_OOBINLINE = 10
-SO_NO_CHECK = 11
-SO_PRIORITY = 12
-SO_LINGER = 13
IP_TOS = 1
IPTOS_LOWDELAY = 0x10
IPTOS_THROUGHPUT = 0x08
IPTOS_RELIABILITY = 0x04
IP_TTL = 2
-IP_HRDINCL = 3
+IP_HDRINCL = 3
IP_OPTIONS = 4
IP_MULTICAST_IF = 32
IP_MULTICAST_TTL = 33
@@ -145,3 +162,22 @@ TCP_MAXSEG = 2
SOPRI_INTERACTIVE = 0
SOPRI_NORMAL = 1
SOPRI_BACKGROUND = 2
+
+# Included from sys/types.h
+
+# Included from linux/types.h
+__FD_SETSIZE = 256
+
+# Included from asm/types.h
+def __FD_ZERO(fdsetp): return \
+
+
+# Included from sys/bitypes.h
+
+# Included from pthread/mit/posix.h
+
+# Included from pthread/mit/types.h
+
+# Included from pthread/mit/xtypes.h
+
+# Included from pthread/mit/sys/types.h
diff --git a/Lib/plat-linux1/TERMIOS.py b/Lib/plat-linux1/TERMIOS.py
index 2e2bb8d..4b17df6 100755
--- a/Lib/plat-linux1/TERMIOS.py
+++ b/Lib/plat-linux1/TERMIOS.py
@@ -33,13 +33,17 @@ def __STRING(x): return "x"
# Included from sys/types.h
# Included from linux/types.h
+__FD_SETSIZE = 256
# Included from asm/types.h
-__FDSET_LONGS = 8
def __FD_ZERO(fdsetp): return \
+# Included from sys/bitypes.h
+
# Included from linux/termios.h
+
+# Included from asm/termios.h
TCGETS = 0x5401
TCSETS = 0x5402
TCSETSW = 0x5403
@@ -117,6 +121,7 @@ VDISCARD = 13
VWERASE = 14
VLNEXT = 15
VEOL2 = 16
+INIT_C_CC = "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
IGNBRK = 0000001
BRKINT = 0000002
IGNPAR = 0000004
@@ -239,3 +244,27 @@ N_TTY = 0
N_SLIP = 1
N_MOUSE = 2
N_PPP = 3
+def CTRL(ch): return ((ch)&0x1F)
+
+IBSHIFT = 16
+CNUL = 0
+CDEL = 0177
+CESC = ord('\\')
+CINTR = 0177
+CQUIT = 034
+CERASE = ord('#')
+CKILL = ord('@')
+CEOT = 04
+CEOL = 0
+CEOL2 = 0
+CEOF = 4
+CSTART = 021
+CSTOP = 023
+CSWTCH = 032
+NSWTCH = 0
+CSUSP = CTRL(ord('Z'))
+CDSUSP = CTRL(ord('Y'))
+CRPRNT = CTRL(ord('R'))
+CFLUSH = CTRL(ord('O'))
+CWERASE = CTRL(ord('W'))
+CLNEXT = CTRL(ord('V'))