bpo-37007: Implement socket.if_nametoindex(), if_indextoname() and if_nameindex() on Windows (GH-13522)

This commit is contained in:
Zackery Spytz 2019-05-29 15:02:37 -06:00 committed by Steve Dower
parent fecb75c1bb
commit 8f96c9f8ed
6 changed files with 79 additions and 28 deletions

View file

@ -1034,10 +1034,13 @@ The :mod:`socket` module also offers various network-related services:
(index int, name string) tuples.
:exc:`OSError` if the system call fails.
.. availability:: Unix.
.. availability:: Unix, Windows.
.. versionadded:: 3.3
.. versionchanged:: 3.8
Windows support was added.
.. function:: if_nametoindex(if_name)
@ -1045,10 +1048,13 @@ The :mod:`socket` module also offers various network-related services:
interface name.
:exc:`OSError` if no interface with the given name exists.
.. availability:: Unix.
.. availability:: Unix, Windows.
.. versionadded:: 3.3
.. versionchanged:: 3.8
Windows support was added.
.. function:: if_indextoname(if_index)
@ -1056,10 +1062,13 @@ The :mod:`socket` module also offers various network-related services:
interface index number.
:exc:`OSError` if no interface with the given index exists.
.. availability:: Unix.
.. availability:: Unix, Windows.
.. versionadded:: 3.3
.. versionchanged:: 3.8
Windows support was added.
.. _socket-objects: