summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-12-03 18:44:57 (GMT)
committerGuido van Rossum <guido@python.org>1997-12-03 18:44:57 (GMT)
commit98ee50b5a458b9aaa20ae6a19baea9ecc0d453fa (patch)
treea00cd740477743b1c085f141b538a9924405fa5e
parent9981d2226daa51ff3a46cb48f5276ae0e0fe5731 (diff)
downloadcpython-98ee50b5a458b9aaa20ae6a19baea9ecc0d453fa.zip
cpython-98ee50b5a458b9aaa20ae6a19baea9ecc0d453fa.tar.gz
cpython-98ee50b5a458b9aaa20ae6a19baea9ecc0d453fa.tar.bz2
More generated files for netbsd 1.x, by Anders Andersen.
-rw-r--r--Lib/plat-netbsd1/IN.py57
-rw-r--r--Lib/plat-netbsd1/SOCKET.py122
-rw-r--r--Lib/plat-netbsd1/TERMIOS.py191
-rwxr-xr-xLib/plat-netbsd1/regen6
4 files changed, 376 insertions, 0 deletions
diff --git a/Lib/plat-netbsd1/IN.py b/Lib/plat-netbsd1/IN.py
new file mode 100644
index 0000000..020f8e2
--- /dev/null
+++ b/Lib/plat-netbsd1/IN.py
@@ -0,0 +1,57 @@
+# Generated by h2py from /usr/include/netinet/in.h
+IPPROTO_IP = 0
+IPPROTO_ICMP = 1
+IPPROTO_IGMP = 2
+IPPROTO_GGP = 3
+IPPROTO_IPIP = 4
+IPPROTO_TCP = 6
+IPPROTO_EGP = 8
+IPPROTO_PUP = 12
+IPPROTO_UDP = 17
+IPPROTO_IDP = 22
+IPPROTO_TP = 29
+IPPROTO_EON = 80
+IPPROTO_ENCAP = 98
+IPPROTO_RAW = 255
+IPPROTO_MAX = 256
+IPPORT_RESERVED = 1024
+IPPORT_USERRESERVED = 5000
+def __IPADDR(x): return ((u_int32_t)(x))
+
+IN_CLASSA_NSHIFT = 24
+IN_CLASSA_MAX = 128
+IN_CLASSB_NSHIFT = 16
+IN_CLASSB_MAX = 65536
+IN_CLASSC_NSHIFT = 8
+IN_CLASSD_NSHIFT = 28
+def IN_MULTICAST(i): return IN_CLASSD(i)
+
+IN_LOOPBACKNET = 127
+IP_OPTIONS = 1
+IP_HDRINCL = 2
+IP_TOS = 3
+IP_TTL = 4
+IP_RECVOPTS = 5
+IP_RECVRETOPTS = 6
+IP_RECVDSTADDR = 7
+IP_RETOPTS = 8
+IP_MULTICAST_IF = 9
+IP_MULTICAST_TTL = 10
+IP_MULTICAST_LOOP = 11
+IP_ADD_MEMBERSHIP = 12
+IP_DROP_MEMBERSHIP = 13
+IP_RECVIF = 20
+IP_DEFAULT_MULTICAST_TTL = 1
+IP_DEFAULT_MULTICAST_LOOP = 1
+IP_MAX_MEMBERSHIPS = 20
+IPPROTO_MAXID = (IPPROTO_IDP + 1)
+IPCTL_FORWARDING = 1
+IPCTL_SENDREDIRECTS = 2
+IPCTL_DEFTTL = 3
+IPCTL_DEFMTU = 4
+IPCTL_FORWSRCRT = 5
+IPCTL_DIRECTEDBCAST = 6
+IPCTL_ALLOWSRCRT = 7
+IPCTL_MAXID = 8
+def in_nullhost(x): return ((x).s_addr == INADDR_ANY)
+
diff --git a/Lib/plat-netbsd1/SOCKET.py b/Lib/plat-netbsd1/SOCKET.py
new file mode 100644
index 0000000..e47a56b
--- /dev/null
+++ b/Lib/plat-netbsd1/SOCKET.py
@@ -0,0 +1,122 @@
+# Generated by h2py from /usr/include/sys/socket.h
+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_REUSEPORT = 0x0200
+SO_TIMESTAMP = 0x0400
+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_LOCAL = 1
+AF_UNIX = AF_LOCAL
+AF_INET = 2
+AF_IMPLINK = 3
+AF_PUP = 4
+AF_CHAOS = 5
+AF_NS = 6
+AF_ISO = 7
+AF_OSI = AF_ISO
+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_ROUTE = 17
+AF_LINK = 18
+pseudo_AF_XTP = 19
+AF_COIP = 20
+AF_CNT = 21
+pseudo_AF_RTIP = 22
+AF_IPX = 23
+AF_SIP = 24
+pseudo_AF_PIP = 25
+AF_ISDN = 26
+AF_E164 = AF_ISDN
+AF_NATM = 27
+AF_ARP = 28
+AF_MAX = 29
+PF_UNSPEC = AF_UNSPEC
+PF_LOCAL = AF_LOCAL
+PF_UNIX = PF_LOCAL
+PF_INET = AF_INET
+PF_IMPLINK = AF_IMPLINK
+PF_PUP = AF_PUP
+PF_CHAOS = AF_CHAOS
+PF_NS = AF_NS
+PF_ISO = AF_ISO
+PF_OSI = AF_ISO
+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_ROUTE = AF_ROUTE
+PF_LINK = AF_LINK
+PF_XTP = pseudo_AF_XTP
+PF_COIP = AF_COIP
+PF_CNT = AF_CNT
+PF_SIP = AF_SIP
+PF_IPX = AF_IPX
+PF_PIP = pseudo_AF_PIP
+PF_NATM = AF_NATM
+PF_ARP = AF_ARP
+PF_MAX = AF_MAX
+NET_MAXID = AF_MAX
+NET_RT_DUMP = 1
+NET_RT_FLAGS = 2
+NET_RT_IFLIST = 3
+NET_RT_MAXID = 4
+SOMAXCONN = 128
+MSG_OOB = 0x1
+MSG_PEEK = 0x2
+MSG_DONTROUTE = 0x4
+MSG_EOR = 0x8
+MSG_TRUNC = 0x10
+MSG_CTRUNC = 0x20
+MSG_WAITALL = 0x40
+MSG_DONTWAIT = 0x80
+SCM_RIGHTS = 0x01
+SCM_TIMESTAMP = 0x02
+
+# Included from sys/cdefs.h
+
+# Included from machine/cdefs.h
+def __P(protos): return protos
+
+def __STRING(x): return #x
+
+def __P(protos): return ()
+
+def __STRING(x): return "x"
+
+def __attribute__(x): return
+
+def __kprintf_attribute__(a): return __attribute__(a)
+
+MSG_COMPAT = 0x8000
diff --git a/Lib/plat-netbsd1/TERMIOS.py b/Lib/plat-netbsd1/TERMIOS.py
new file mode 100644
index 0000000..7ef6ea7
--- /dev/null
+++ b/Lib/plat-netbsd1/TERMIOS.py
@@ -0,0 +1,191 @@
+# Generated by h2py from /usr/include/termios.h
+VEOF = 0
+VEOL = 1
+VEOL2 = 2
+VERASE = 3
+VWERASE = 4
+VKILL = 5
+VREPRINT = 6
+VINTR = 8
+VQUIT = 9
+VSUSP = 10
+VDSUSP = 11
+VSTART = 12
+VSTOP = 13
+VLNEXT = 14
+VDISCARD = 15
+VMIN = 16
+VTIME = 17
+VSTATUS = 18
+NCCS = 20
+IGNBRK = 0x00000001
+BRKINT = 0x00000002
+IGNPAR = 0x00000004
+PARMRK = 0x00000008
+INPCK = 0x00000010
+ISTRIP = 0x00000020
+INLCR = 0x00000040
+IGNCR = 0x00000080
+ICRNL = 0x00000100
+IXON = 0x00000200
+IXOFF = 0x00000400
+IXANY = 0x00000800
+IMAXBEL = 0x00002000
+OPOST = 0x00000001
+ONLCR = 0x00000002
+OXTABS = 0x00000004
+ONOEOT = 0x00000008
+CIGNORE = 0x00000001
+CSIZE = 0x00000300
+CS5 = 0x00000000
+CS6 = 0x00000100
+CS7 = 0x00000200
+CS8 = 0x00000300
+CSTOPB = 0x00000400
+CREAD = 0x00000800
+PARENB = 0x00001000
+PARODD = 0x00002000
+HUPCL = 0x00004000
+CLOCAL = 0x00008000
+CRTSCTS = 0x00010000
+CRTS_IFLOW = CRTSCTS
+CCTS_OFLOW = CRTSCTS
+MDMBUF = 0x00100000
+CHWFLOW = (MDMBUF|CRTSCTS)
+ECHOKE = 0x00000001
+ECHOE = 0x00000002
+ECHOK = 0x00000004
+ECHO = 0x00000008
+ECHONL = 0x00000010
+ECHOPRT = 0x00000020
+ECHOCTL = 0x00000040
+ISIG = 0x00000080
+ICANON = 0x00000100
+ALTWERASE = 0x00000200
+IEXTEN = 0x00000400
+EXTPROC = 0x00000800
+TOSTOP = 0x00400000
+FLUSHO = 0x00800000
+NOKERNINFO = 0x02000000
+PENDIN = 0x20000000
+NOFLSH = 0x80000000
+TCSANOW = 0
+TCSADRAIN = 1
+TCSAFLUSH = 2
+TCSASOFT = 0x10
+B0 = 0
+B50 = 50
+B75 = 75
+B110 = 110
+B134 = 134
+B150 = 150
+B200 = 200
+B300 = 300
+B600 = 600
+B1200 = 1200
+B1800 = 1800
+B2400 = 2400
+B4800 = 4800
+B9600 = 9600
+B19200 = 19200
+B38400 = 38400
+B7200 = 7200
+B14400 = 14400
+B28800 = 28800
+B57600 = 57600
+B76800 = 76800
+B115200 = 115200
+B230400 = 230400
+EXTA = 19200
+EXTB = 38400
+TCIFLUSH = 1
+TCOFLUSH = 2
+TCIOFLUSH = 3
+TCOOFF = 1
+TCOON = 2
+TCIOFF = 3
+TCION = 4
+
+# Included from sys/cdefs.h
+
+# Included from machine/cdefs.h
+def __P(protos): return protos
+
+def __STRING(x): return #x
+
+def __P(protos): return ()
+
+def __STRING(x): return "x"
+
+def __attribute__(x): return
+
+def __kprintf_attribute__(a): return __attribute__(a)
+
+
+# Included from sys/ttycom.h
+
+# Included from sys/ioccom.h
+IOCPARM_MASK = 0x1fff
+def IOCPARM_LEN(x): return (((x) >> 16) & IOCPARM_MASK)
+
+def IOCBASECMD(x): return ((x) & ~(IOCPARM_MASK << 16))
+
+def IOCGROUP(x): return (((x) >> 8) & 0xff)
+
+TIOCM_LE = 0001
+TIOCM_DTR = 0002
+TIOCM_RTS = 0004
+TIOCM_ST = 0010
+TIOCM_SR = 0020
+TIOCM_CTS = 0040
+TIOCM_CAR = 0100
+TIOCM_CD = TIOCM_CAR
+TIOCM_RNG = 0200
+TIOCM_RI = TIOCM_RNG
+TIOCM_DSR = 0400
+TIOCPKT_DATA = 0x00
+TIOCPKT_FLUSHREAD = 0x01
+TIOCPKT_FLUSHWRITE = 0x02
+TIOCPKT_STOP = 0x04
+TIOCPKT_START = 0x08
+TIOCPKT_NOSTOP = 0x10
+TIOCPKT_DOSTOP = 0x20
+TIOCPKT_IOCTL = 0x40
+def UIOCCMD(n): return _IO(ord('u'), n)
+
+TIOCFLAG_SOFTCAR = 0x01
+TIOCFLAG_CLOCAL = 0x02
+TIOCFLAG_CRTSCTS = 0x04
+TIOCFLAG_MDMBUF = 0x08
+TTYDISC = 0
+TABLDISC = 3
+SLIPDISC = 4
+PPPDISC = 5
+STRIPDISC = 6
+
+# Included from sys/ttydefaults.h
+TTYDEF_IFLAG = (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
+TTYDEF_OFLAG = (OPOST | ONLCR | OXTABS)
+TTYDEF_LFLAG = (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
+TTYDEF_CFLAG = (CREAD | CS8 | HUPCL)
+TTYDEF_SPEED = (B9600)
+def CTRL(x): return (x&037)
+
+CEOF = CTRL(ord('d'))
+CERASE = 0177
+CINTR = CTRL(ord('c'))
+CKILL = CTRL(ord('u'))
+CMIN = 1
+CQUIT = 034
+CSUSP = CTRL(ord('z'))
+CTIME = 0
+CDSUSP = CTRL(ord('y'))
+CSTART = CTRL(ord('q'))
+CSTOP = CTRL(ord('s'))
+CLNEXT = CTRL(ord('v'))
+CDISCARD = CTRL(ord('o'))
+CWERASE = CTRL(ord('w'))
+CREPRINT = CTRL(ord('r'))
+CEOT = CEOF
+CRPRNT = CREPRINT
+CFLUSH = CDISCARD
diff --git a/Lib/plat-netbsd1/regen b/Lib/plat-netbsd1/regen
new file mode 100755
index 0000000..5c502c2
--- /dev/null
+++ b/Lib/plat-netbsd1/regen
@@ -0,0 +1,6 @@
+#! /bin/sh
+set -v
+python ../../Tools/scripts/h2py.py /usr/include/fcntl.h
+python ../../Tools/scripts/h2py.py /usr/include/sys/socket.h
+python ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
+python ../../Tools/scripts/h2py.py /usr/include/termios.h