Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2329e83d
Commit
2329e83d
authored
Aug 09, 1999
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch by Marc-Andre Lemburg to add a bunch more symbols.
parent
4351f415
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
2 deletions
+86
-2
Modules/socketmodule.c
Modules/socketmodule.c
+86
-2
No files found.
Modules/socketmodule.c
View file @
2329e83d
...
@@ -2007,10 +2007,44 @@ initsocket()
...
@@ -2007,10 +2007,44 @@ initsocket()
if
(
PyDict_SetItemString
(
d
,
"SocketType"
,
if
(
PyDict_SetItemString
(
d
,
"SocketType"
,
(
PyObject
*
)
&
PySocketSock_Type
)
!=
0
)
(
PyObject
*
)
&
PySocketSock_Type
)
!=
0
)
return
;
return
;
/* Address families (we only support AF_INET and AF_UNIX) */
#ifdef AF_UNSPEC
insint
(
d
,
"AF_UNSPEC"
,
AF_UNSPEC
);
#endif
insint
(
d
,
"AF_INET"
,
AF_INET
);
insint
(
d
,
"AF_INET"
,
AF_INET
);
#ifdef AF_UNIX
#ifdef AF_UNIX
insint
(
d
,
"AF_UNIX"
,
AF_UNIX
);
insint
(
d
,
"AF_UNIX"
,
AF_UNIX
);
#endif
/* AF_UNIX */
#endif
/* AF_UNIX */
#ifdef AF_AX25
insint
(
d
,
"AF_AX25"
,
AF_AX25
);
/* Amateur Radio AX.25 */
#endif
#ifdef AF_IPX
insint
(
d
,
"AF_IPX"
,
AF_IPX
);
/* Novell IPX */
#endif
#ifdef AF_APPLETALK
insint
(
d
,
"AF_APPLETALK"
,
AF_APPLETALK
);
/* Appletalk DDP */
#endif
#ifdef AF_NETROM
insint
(
d
,
"AF_NETROM"
,
AF_NETROM
);
/* Amateur radio NetROM */
#endif
#ifdef AF_BRIDGE
insint
(
d
,
"AF_BRIDGE"
,
AF_BRIDGE
);
/* Multiprotocol bridge */
#endif
#ifdef AF_AAL5
insint
(
d
,
"AF_AAL5"
,
AF_AAL5
);
/* Reserved for Werner's ATM */
#endif
#ifdef AF_X25
insint
(
d
,
"AF_X25"
,
AF_X25
);
/* Reserved for X.25 project */
#endif
#ifdef AF_INET6
insint
(
d
,
"AF_INET6"
,
AF_INET6
);
/* IP version 6 */
#endif
#ifdef AF_ROSE
insint
(
d
,
"AF_ROSE"
,
AF_ROSE
);
/* Amateur Radio X.25 PLP */
#endif
/* Socket types */
insint
(
d
,
"SOCK_STREAM"
,
SOCK_STREAM
);
insint
(
d
,
"SOCK_STREAM"
,
SOCK_STREAM
);
insint
(
d
,
"SOCK_DGRAM"
,
SOCK_DGRAM
);
insint
(
d
,
"SOCK_DGRAM"
,
SOCK_DGRAM
);
#ifndef __BEOS__
#ifndef __BEOS__
...
@@ -2050,7 +2084,6 @@ initsocket()
...
@@ -2050,7 +2084,6 @@ initsocket()
#ifdef SO_REUSEPORT
#ifdef SO_REUSEPORT
insint
(
d
,
"SO_REUSEPORT"
,
SO_REUSEPORT
);
insint
(
d
,
"SO_REUSEPORT"
,
SO_REUSEPORT
);
#endif
#endif
#ifdef SO_SNDBUF
#ifdef SO_SNDBUF
insint
(
d
,
"SO_SNDBUF"
,
SO_SNDBUF
);
insint
(
d
,
"SO_SNDBUF"
,
SO_SNDBUF
);
#endif
#endif
...
@@ -2113,10 +2146,39 @@ initsocket()
...
@@ -2113,10 +2146,39 @@ initsocket()
#endif
#endif
/* Protocol level and numbers, usable for [gs]etsockopt */
/* Protocol level and numbers, usable for [gs]etsockopt */
/* Sigh -- some systems (e.g. Linux) use enums for these. */
#ifdef SOL_SOCKET
#ifdef SOL_SOCKET
insint
(
d
,
"SOL_SOCKET"
,
SOL_SOCKET
);
insint
(
d
,
"SOL_SOCKET"
,
SOL_SOCKET
);
#endif
#endif
#ifdef SOL_IP
insint
(
d
,
"SOL_IP"
,
SOL_IP
);
#else
insint
(
d
,
"SOL_IP"
,
0
);
#endif
#ifdef SOL_IPX
insint
(
d
,
"SOL_IPX"
,
SOL_IPX
);
#endif
#ifdef SOL_AX25
insint
(
d
,
"SOL_AX25"
,
SOL_AX25
);
#endif
#ifdef SOL_ATALK
insint
(
d
,
"SOL_ATALK"
,
SOL_ATALK
);
#endif
#ifdef SOL_NETROM
insint
(
d
,
"SOL_NETROM"
,
SOL_NETROM
);
#endif
#ifdef SOL_ROSE
insint
(
d
,
"SOL_ROSE"
,
SOL_ROSE
);
#endif
#ifdef SOL_TCP
insint
(
d
,
"SOL_TCP"
,
SOL_TCP
);
#else
insint
(
d
,
"SOL_TCP"
,
6
);
#endif
#ifdef SOL_UDP
insint
(
d
,
"SOL_UDP"
,
SOL_UDP
);
#else
insint
(
d
,
"SOL_UDP"
,
17
);
#endif
#ifdef IPPROTO_IP
#ifdef IPPROTO_IP
insint
(
d
,
"IPPROTO_IP"
,
IPPROTO_IP
);
insint
(
d
,
"IPPROTO_IP"
,
IPPROTO_IP
);
#else
#else
...
@@ -2269,6 +2331,28 @@ initsocket()
...
@@ -2269,6 +2331,28 @@ initsocket()
#ifdef IP_DROP_MEMBERSHIP
#ifdef IP_DROP_MEMBERSHIP
insint
(
d
,
"IP_DROP_MEMBERSHIP"
,
IP_DROP_MEMBERSHIP
);
insint
(
d
,
"IP_DROP_MEMBERSHIP"
,
IP_DROP_MEMBERSHIP
);
#endif
#endif
#ifdef IP_DEFAULT_MULTICAST_TTL
insint
(
d
,
"IP_DEFAULT_MULTICAST_TTL"
,
IP_DEFAULT_MULTICAST_TTL
);
#endif
#ifdef IP_DEFAULT_MULTICAST_LOOP
insint
(
d
,
"IP_DEFAULT_MULTICAST_LOOP"
,
IP_DEFAULT_MULTICAST_LOOP
);
#endif
#ifdef IP_MAX_MEMBERSHIPS
insint
(
d
,
"IP_MAX_MEMBERSHIPS"
,
IP_MAX_MEMBERSHIPS
);
#endif
/* TCP options */
#ifdef TCP_NODELAY
insint
(
d
,
"TCP_NODELAY"
,
TCP_NODELAY
);
#endif
#ifdef TCP_MAXSEG
insint
(
d
,
"TCP_MAXSEG"
,
TCP_MAXSEG
);
#endif
/* IPX options */
#ifdef IPX_TYPE
insint
(
d
,
"IPX_TYPE"
,
IPX_TYPE
);
#endif
/* Initialize gethostbyname lock */
/* Initialize gethostbyname lock */
#ifdef USE_GETHOSTBYNAME_LOCK
#ifdef USE_GETHOSTBYNAME_LOCK
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment