Skip to content

bpo-40901: Describe what "interface name" means on Windows #20694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Doc/library/socket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,19 @@ The :mod:`socket` module also offers various network-related services:
.. versionchanged:: 3.8
Windows support was added.

.. note::

On Windows network interfaces have different names in different contexts
(all names are examples):

* UUID: ``{FB605B73-AAC2-49A6-9A2F-25416AEA0573}``
* name: ``ethernet_32770``
* friendly name: ``vEthernet (nat)``
* description: ``Hyper-V Virtual Ethernet Adapter``

This function returns names of the second form from the list, ``ethernet_32770``
in this example case.


.. function:: if_nametoindex(if_name)

Expand All @@ -1105,6 +1118,9 @@ The :mod:`socket` module also offers various network-related services:
.. versionchanged:: 3.8
Windows support was added.

.. seealso::
"Interface name" is a name as documented in :func:`if_nameindex`.


.. function:: if_indextoname(if_index)

Expand All @@ -1119,6 +1135,9 @@ The :mod:`socket` module also offers various network-related services:
.. versionchanged:: 3.8
Windows support was added.

.. seealso::
"Interface name" is a name as documented in :func:`if_nameindex`.


.. _socket-objects:

Expand Down