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
4710e226
Commit
4710e226
authored
Jun 04, 2011
by
Gregory P. Smith
Browse files
Options
Browse Files
Download
Plain Diff
merge heads.
parents
3d70d985
59f1f248
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
Doc/library/socket.rst
Doc/library/socket.rst
+7
-7
Misc/NEWS
Misc/NEWS
+2
-2
Modules/socketmodule.c
Modules/socketmodule.c
+2
-2
No files found.
Doc/library/socket.rst
View file @
4710e226
...
@@ -538,9 +538,9 @@ The module :mod:`socket` exports the following constants and functions:
...
@@ -538,9 +538,9 @@ The module :mod:`socket` exports the following constants and functions:
.. function:: if_nameindex()
.. function:: if_nameindex()
Return
s
a list of network interface information
Return a list of network interface information
(index
, name as a
string) tuples.
(index
int, name
string) tuples.
:exc:`socket.error` if the system call fails
for any reason
.
:exc:`socket.error` if the system call fails.
Availability: Unix.
Availability: Unix.
...
@@ -549,8 +549,8 @@ The module :mod:`socket` exports the following constants and functions:
...
@@ -549,8 +549,8 @@ The module :mod:`socket` exports the following constants and functions:
.. function:: if_nametoindex(if_name)
.. function:: if_nametoindex(if_name)
Return
s
a network interface index number corresponding to an
Return a network interface index number corresponding to an
interface name
string
.
interface name.
:exc:`socket.error` if no interface with the given name exists.
:exc:`socket.error` if no interface with the given name exists.
Availability: Unix.
Availability: Unix.
...
@@ -560,8 +560,8 @@ The module :mod:`socket` exports the following constants and functions:
...
@@ -560,8 +560,8 @@ The module :mod:`socket` exports the following constants and functions:
.. function:: if_indextoname(if_index)
.. function:: if_indextoname(if_index)
Return
s a network interface name string
corresponding to a
Return
a network interface name
corresponding to a
interface index.
interface index
number
.
:exc:`socket.error` if no interface with the given index exists.
:exc:`socket.error` if no interface with the given index exists.
Availability: Unix.
Availability: Unix.
...
...
Misc/NEWS
View file @
4710e226
...
@@ -44,8 +44,8 @@ Core and Builtins
...
@@ -44,8 +44,8 @@ Core and Builtins
- Issue #12060: Use sig_atomic_t type and volatile keyword in the signal
- Issue #12060: Use sig_atomic_t type and volatile keyword in the signal
module. Patch written by Charles-François Natali.
module. Patch written by Charles-François Natali.
-
Added the if_nameindex, if_indextoname, if_nametoindex methods to
-
Issue #1746656: Added the if_nameindex, if_indextoname, if_nametoindex
the socket module as requested in issue #1746656
.
methods to the socket module
.
- Issue #12044: Fixed subprocess.Popen when used as a context manager to
- Issue #12044: Fixed subprocess.Popen when used as a context manager to
wait for the process to end when exiting the context to avoid unintentionally
wait for the process to end when exiting the context to avoid unintentionally
...
...
Modules/socketmodule.c
View file @
4710e226
...
@@ -137,8 +137,8 @@ setsockopt(level, optname, value) -- set socket options\n\
...
@@ -137,8 +137,8 @@ setsockopt(level, optname, value) -- set socket options\n\
settimeout(None | float) -- set or clear the timeout
\n
\
settimeout(None | float) -- set or clear the timeout
\n
\
shutdown(how) -- shut down traffic in one or both directions
\n
\
shutdown(how) -- shut down traffic in one or both directions
\n
\
if_nameindex() -- return all network interface indices and names
\n
\
if_nameindex() -- return all network interface indices and names
\n
\
if_nametoindex(name) -- return
s
the corresponding interface index
\n
\
if_nametoindex(name) -- return the corresponding interface index
\n
\
if_indextoname(index) -- return
s
the corresponding interface name
\n
\
if_indextoname(index) -- return the corresponding interface name
\n
\
\n
\
\n
\
[*] not available on all platforms!"
);
[*] not available on all platforms!"
);
...
...
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