summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-12-29 16:37:25 (GMT)
committerGuido van Rossum <guido@python.org>1993-12-29 16:37:25 (GMT)
commite30cb84ed2e7de876de160de2bd97575150fa747 (patch)
tree3b30da63451cacff1275af2c78aa95a972abcdd4
parent70f1418d35e7131a171ba872777074dab02e13d6 (diff)
downloadcpython-e30cb84ed2e7de876de160de2bd97575150fa747.zip
cpython-e30cb84ed2e7de876de160de2bd97575150fa747.tar.gz
cpython-e30cb84ed2e7de876de160de2bd97575150fa747.tar.bz2
Initial revision
-rwxr-xr-xLib/plat-sunos4/FCNTL.py64
-rwxr-xr-xLib/plat-sunos4/IN.py63
-rwxr-xr-xLib/plat-sunos4/SOCKET.py77
-rwxr-xr-xLib/sunos4/FCNTL.py64
-rwxr-xr-xLib/sunos4/IN.py63
-rwxr-xr-xLib/sunos4/SOCKET.py77
6 files changed, 408 insertions, 0 deletions
diff --git a/Lib/plat-sunos4/FCNTL.py b/Lib/plat-sunos4/FCNTL.py
new file mode 100755
index 0000000..0ba5e67
--- /dev/null
+++ b/Lib/plat-sunos4/FCNTL.py
@@ -0,0 +1,64 @@
+_FOPEN = (-1)
+_FREAD = 0x0001
+_FWRITE = 0x0002
+_FNDELAY = 0x0004
+_FAPPEND = 0x0008
+_FMARK = 0x0010
+_FDEFER = 0x0020
+_FASYNC = 0x0040
+_FSHLOCK = 0x0080
+_FEXLOCK = 0x0100
+_FCREAT = 0x0200
+_FTRUNC = 0x0400
+_FEXCL = 0x0800
+_FNBIO = 0x1000
+_FSYNC = 0x2000
+_FNONBLOCK = 0x4000
+_FNOCTTY = 0x8000
+O_RDONLY = 0
+O_WRONLY = 1
+O_RDWR = 2
+O_APPEND = _FAPPEND
+O_CREAT = _FCREAT
+O_TRUNC = _FTRUNC
+O_EXCL = _FEXCL
+O_NONBLOCK = _FNONBLOCK
+O_NOCTTY = _FNOCTTY
+O_SYNC = _FSYNC
+O_ACCMODE = (O_RDONLY|O_WRONLY|O_RDWR)
+FAPPEND = _FAPPEND
+FSYNC = _FSYNC
+FASYNC = _FASYNC
+FNBIO = _FNBIO
+FNONBIO = _FNONBLOCK
+FNDELAY = _FNDELAY
+FREAD = _FREAD
+FWRITE = _FWRITE
+FMARK = _FMARK
+FDEFER = _FDEFER
+FSHLOCK = _FSHLOCK
+FEXLOCK = _FEXLOCK
+FOPEN = _FOPEN
+FCREAT = _FCREAT
+FTRUNC = _FTRUNC
+FEXCL = _FEXCL
+FNOCTTY = _FNOCTTY
+FD_CLOEXEC = 1
+F_DUPFD = 0
+F_GETFD = 1
+F_SETFD = 2
+F_GETFL = 3
+F_SETFL = 4
+F_GETOWN = 5
+F_SETOWN = 6
+F_GETLK = 7
+F_SETLK = 8
+F_SETLKW = 9
+F_RGETLK = 10
+F_RSETLK = 11
+F_CNVT = 12
+F_RSETLKW = 13
+F_RDLCK = 1
+F_WRLCK = 2
+F_UNLCK = 3
+F_UNLKSYS = 4
diff --git a/Lib/plat-sunos4/IN.py b/Lib/plat-sunos4/IN.py
new file mode 100755
index 0000000..05188af
--- /dev/null
+++ b/Lib/plat-sunos4/IN.py
@@ -0,0 +1,63 @@
+# Symbolic constants from <netinet/in.h>.
+# These constants are SunOS specific! (Possibly even SunOS 4.1.1)
+# See demo/scripts/h2py.py for a tool to help generate a version for
+# your system.
+
+IPPROTO_IP = 0
+IPPROTO_ICMP = 1
+IPPROTO_IGMP = 2
+IPPROTO_GGP = 3
+IPPROTO_TCP = 6
+IPPROTO_EGP = 8
+IPPROTO_PUP = 12
+IPPROTO_UDP = 17
+IPPROTO_IDP = 22
+IPPROTO_HELLO = 63
+IPPROTO_ND = 77
+IPPROTO_RAW = 255
+IPPROTO_MAX = 256
+IPPORT_ECHO = 7
+IPPORT_DISCARD = 9
+IPPORT_SYSTAT = 11
+IPPORT_DAYTIME = 13
+IPPORT_NETSTAT = 15
+IPPORT_FTP = 21
+IPPORT_TELNET = 23
+IPPORT_SMTP = 25
+IPPORT_TIMESERVER = 37
+IPPORT_NAMESERVER = 42
+IPPORT_WHOIS = 43
+IPPORT_MTP = 57
+IPPORT_TFTP = 69
+IPPORT_RJE = 77
+IPPORT_FINGER = 79
+IPPORT_TTYLINK = 87
+IPPORT_SUPDUP = 95
+IPPORT_EXECSERVER = 512
+IPPORT_LOGINSERVER = 513
+IPPORT_CMDSERVER = 514
+IPPORT_EFSSERVER = 520
+IPPORT_BIFFUDP = 512
+IPPORT_WHOSERVER = 513
+IPPORT_ROUTESERVER = 520
+IPPORT_RESERVED = 1024
+IPPORT_USERRESERVED = 5000
+IMPLINK_IP = 155
+IMPLINK_LOWEXPER = 156
+IMPLINK_HIGHEXPER = 158
+IN_CLASSA_NET = 0xff000000
+IN_CLASSA_NSHIFT = 24
+IN_CLASSA_HOST = 0x00ffffff
+IN_CLASSA_MAX = 128
+IN_CLASSB_NET = 0xffff0000
+IN_CLASSB_NSHIFT = 16
+IN_CLASSB_HOST = 0x0000ffff
+IN_CLASSB_MAX = 65536
+IN_CLASSC_NET = 0xffffff00
+IN_CLASSC_NSHIFT = 8
+IN_CLASSC_HOST = 0x000000ff
+INADDR_ANY = 0x00000000
+INADDR_LOOPBACK = 0x7F000001
+INADDR_BROADCAST = 0xffffffff
+IN_LOOPBACKNET = 127
+IP_OPTIONS = 1
diff --git a/Lib/plat-sunos4/SOCKET.py b/Lib/plat-sunos4/SOCKET.py
new file mode 100755
index 0000000..c1b8542
--- /dev/null
+++ b/Lib/plat-sunos4/SOCKET.py
@@ -0,0 +1,77 @@
+SOCK_STREAM = 1
+SOCK_DGRAM = 2
+SOCK_RAW = 3
+SOCK_RDM = 4
+SOCK_SEQPACKET = 5
+SO_DEBUG = 0x0001
+SO_ACCEPTCONN = 0x0002
+SO_REUSEADDR = 0x0004
+SO_KEEPALIVE = 0x0008
+SO_DONTROUTE = 0x0010
+SO_BROADCAST = 0x0020
+SO_USELOOPBACK = 0x0040
+SO_LINGER = 0x0080
+SO_OOBINLINE = 0x0100
+SO_DONTLINGER = (~SO_LINGER)
+SO_SNDBUF = 0x1001
+SO_RCVBUF = 0x1002
+SO_SNDLOWAT = 0x1003
+SO_RCVLOWAT = 0x1004
+SO_SNDTIMEO = 0x1005
+SO_RCVTIMEO = 0x1006
+SO_ERROR = 0x1007
+SO_TYPE = 0x1008
+SOL_SOCKET = 0xffff
+AF_UNSPEC = 0
+AF_UNIX = 1
+AF_INET = 2
+AF_IMPLINK = 3
+AF_PUP = 4
+AF_CHAOS = 5
+AF_NS = 6
+AF_NBS = 7
+AF_ECMA = 8
+AF_DATAKIT = 9
+AF_CCITT = 10
+AF_SNA = 11
+AF_DECnet = 12
+AF_DLI = 13
+AF_LAT = 14
+AF_HYLINK = 15
+AF_APPLETALK = 16
+AF_NIT = 17
+AF_802 = 18
+AF_OSI = 19
+AF_X25 = 20
+AF_OSINET = 21
+AF_GOSIP = 22
+AF_MAX = 21
+PF_UNSPEC = AF_UNSPEC
+PF_UNIX = AF_UNIX
+PF_INET = AF_INET
+PF_IMPLINK = AF_IMPLINK
+PF_PUP = AF_PUP
+PF_CHAOS = AF_CHAOS
+PF_NS = AF_NS
+PF_NBS = AF_NBS
+PF_ECMA = AF_ECMA
+PF_DATAKIT = AF_DATAKIT
+PF_CCITT = AF_CCITT
+PF_SNA = AF_SNA
+PF_DECnet = AF_DECnet
+PF_DLI = AF_DLI
+PF_LAT = AF_LAT
+PF_HYLINK = AF_HYLINK
+PF_APPLETALK = AF_APPLETALK
+PF_NIT = AF_NIT
+PF_802 = AF_802
+PF_OSI = AF_OSI
+PF_X25 = AF_X25
+PF_OSINET = AF_OSINET
+PF_GOSIP = AF_GOSIP
+PF_MAX = AF_MAX
+SOMAXCONN = 5
+MSG_OOB = 0x1
+MSG_PEEK = 0x2
+MSG_DONTROUTE = 0x4
+MSG_MAXIOVLEN = 16
diff --git a/Lib/sunos4/FCNTL.py b/Lib/sunos4/FCNTL.py
new file mode 100755
index 0000000..0ba5e67
--- /dev/null
+++ b/Lib/sunos4/FCNTL.py
@@ -0,0 +1,64 @@
+_FOPEN = (-1)
+_FREAD = 0x0001
+_FWRITE = 0x0002
+_FNDELAY = 0x0004
+_FAPPEND = 0x0008
+_FMARK = 0x0010
+_FDEFER = 0x0020
+_FASYNC = 0x0040
+_FSHLOCK = 0x0080
+_FEXLOCK = 0x0100
+_FCREAT = 0x0200
+_FTRUNC = 0x0400
+_FEXCL = 0x0800
+_FNBIO = 0x1000
+_FSYNC = 0x2000
+_FNONBLOCK = 0x4000
+_FNOCTTY = 0x8000
+O_RDONLY = 0
+O_WRONLY = 1
+O_RDWR = 2
+O_APPEND = _FAPPEND
+O_CREAT = _FCREAT
+O_TRUNC = _FTRUNC
+O_EXCL = _FEXCL
+O_NONBLOCK = _FNONBLOCK
+O_NOCTTY = _FNOCTTY
+O_SYNC = _FSYNC
+O_ACCMODE = (O_RDONLY|O_WRONLY|O_RDWR)
+FAPPEND = _FAPPEND
+FSYNC = _FSYNC
+FASYNC = _FASYNC
+FNBIO = _FNBIO
+FNONBIO = _FNONBLOCK
+FNDELAY = _FNDELAY
+FREAD = _FREAD
+FWRITE = _FWRITE
+FMARK = _FMARK
+FDEFER = _FDEFER
+FSHLOCK = _FSHLOCK
+FEXLOCK = _FEXLOCK
+FOPEN = _FOPEN
+FCREAT = _FCREAT
+FTRUNC = _FTRUNC
+FEXCL = _FEXCL
+FNOCTTY = _FNOCTTY
+FD_CLOEXEC = 1
+F_DUPFD = 0
+F_GETFD = 1
+F_SETFD = 2
+F_GETFL = 3
+F_SETFL = 4
+F_GETOWN = 5
+F_SETOWN = 6
+F_GETLK = 7
+F_SETLK = 8
+F_SETLKW = 9
+F_RGETLK = 10
+F_RSETLK = 11
+F_CNVT = 12
+F_RSETLKW = 13
+F_RDLCK = 1
+F_WRLCK = 2
+F_UNLCK = 3
+F_UNLKSYS = 4
diff --git a/Lib/sunos4/IN.py b/Lib/sunos4/IN.py
new file mode 100755
index 0000000..05188af
--- /dev/null
+++ b/Lib/sunos4/IN.py
@@ -0,0 +1,63 @@
+# Symbolic constants from <netinet/in.h>.
+# These constants are SunOS specific! (Possibly even SunOS 4.1.1)
+# See demo/scripts/h2py.py for a tool to help generate a version for
+# your system.
+
+IPPROTO_IP = 0
+IPPROTO_ICMP = 1
+IPPROTO_IGMP = 2
+IPPROTO_GGP = 3
+IPPROTO_TCP = 6
+IPPROTO_EGP = 8
+IPPROTO_PUP = 12
+IPPROTO_UDP = 17
+IPPROTO_IDP = 22
+IPPROTO_HELLO = 63
+IPPROTO_ND = 77
+IPPROTO_RAW = 255
+IPPROTO_MAX = 256
+IPPORT_ECHO = 7
+IPPORT_DISCARD = 9
+IPPORT_SYSTAT = 11
+IPPORT_DAYTIME = 13
+IPPORT_NETSTAT = 15
+IPPORT_FTP = 21
+IPPORT_TELNET = 23
+IPPORT_SMTP = 25
+IPPORT_TIMESERVER = 37
+IPPORT_NAMESERVER = 42
+IPPORT_WHOIS = 43
+IPPORT_MTP = 57
+IPPORT_TFTP = 69
+IPPORT_RJE = 77
+IPPORT_FINGER = 79
+IPPORT_TTYLINK = 87
+IPPORT_SUPDUP = 95
+IPPORT_EXECSERVER = 512
+IPPORT_LOGINSERVER = 513
+IPPORT_CMDSERVER = 514
+IPPORT_EFSSERVER = 520
+IPPORT_BIFFUDP = 512
+IPPORT_WHOSERVER = 513
+IPPORT_ROUTESERVER = 520
+IPPORT_RESERVED = 1024
+IPPORT_USERRESERVED = 5000
+IMPLINK_IP = 155
+IMPLINK_LOWEXPER = 156
+IMPLINK_HIGHEXPER = 158
+IN_CLASSA_NET = 0xff000000
+IN_CLASSA_NSHIFT = 24
+IN_CLASSA_HOST = 0x00ffffff
+IN_CLASSA_MAX = 128
+IN_CLASSB_NET = 0xffff0000
+IN_CLASSB_NSHIFT = 16
+IN_CLASSB_HOST = 0x0000ffff
+IN_CLASSB_MAX = 65536
+IN_CLASSC_NET = 0xffffff00
+IN_CLASSC_NSHIFT = 8
+IN_CLASSC_HOST = 0x000000ff
+INADDR_ANY = 0x00000000
+INADDR_LOOPBACK = 0x7F000001
+INADDR_BROADCAST = 0xffffffff
+IN_LOOPBACKNET = 127
+IP_OPTIONS = 1
diff --git a/Lib/sunos4/SOCKET.py b/Lib/sunos4/SOCKET.py
new file mode 100755
index 0000000..c1b8542
--- /dev/null
+++ b/Lib/sunos4/SOCKET.py
@@ -0,0 +1,77 @@
+SOCK_STREAM = 1
+SOCK_DGRAM = 2
+SOCK_RAW = 3
+SOCK_RDM = 4
+SOCK_SEQPACKET = 5
+SO_DEBUG = 0x0001
+SO_ACCEPTCONN = 0x0002
+SO_REUSEADDR = 0x0004
+SO_KEEPALIVE = 0x0008
+SO_DONTROUTE = 0x0010
+SO_BROADCAST = 0x0020
+SO_USELOOPBACK = 0x0040
+SO_LINGER = 0x0080
+SO_OOBINLINE = 0x0100
+SO_DONTLINGER = (~SO_LINGER)
+SO_SNDBUF = 0x1001
+SO_RCVBUF = 0x1002
+SO_SNDLOWAT = 0x1003
+SO_RCVLOWAT = 0x1004
+SO_SNDTIMEO = 0x1005
+SO_RCVTIMEO = 0x1006
+SO_ERROR = 0x1007
+SO_TYPE = 0x1008
+SOL_SOCKET = 0xffff
+AF_UNSPEC = 0
+AF_UNIX = 1
+AF_INET = 2
+AF_IMPLINK = 3
+AF_PUP = 4
+AF_CHAOS = 5
+AF_NS = 6
+AF_NBS = 7
+AF_ECMA = 8
+AF_DATAKIT = 9
+AF_CCITT = 10
+AF_SNA = 11
+AF_DECnet = 12
+AF_DLI = 13
+AF_LAT = 14
+AF_HYLINK = 15
+AF_APPLETALK = 16
+AF_NIT = 17
+AF_802 = 18
+AF_OSI = 19
+AF_X25 = 20
+AF_OSINET = 21
+AF_GOSIP = 22
+AF_MAX = 21
+PF_UNSPEC = AF_UNSPEC
+PF_UNIX = AF_UNIX
+PF_INET = AF_INET
+PF_IMPLINK = AF_IMPLINK
+PF_PUP = AF_PUP
+PF_CHAOS = AF_CHAOS
+PF_NS = AF_NS
+PF_NBS = AF_NBS
+PF_ECMA = AF_ECMA
+PF_DATAKIT = AF_DATAKIT
+PF_CCITT = AF_CCITT
+PF_SNA = AF_SNA
+PF_DECnet = AF_DECnet
+PF_DLI = AF_DLI
+PF_LAT = AF_LAT
+PF_HYLINK = AF_HYLINK
+PF_APPLETALK = AF_APPLETALK
+PF_NIT = AF_NIT
+PF_802 = AF_802
+PF_OSI = AF_OSI
+PF_X25 = AF_X25
+PF_OSINET = AF_OSINET
+PF_GOSIP = AF_GOSIP
+PF_MAX = AF_MAX
+SOMAXCONN = 5
+MSG_OOB = 0x1
+MSG_PEEK = 0x2
+MSG_DONTROUTE = 0x4
+MSG_MAXIOVLEN = 16