Skip to content

Commit 609a38a

Browse files
bpo-40901: Describe what "interface name" means on Windows (pythonGH-20694)
(cherry picked from commit f85658a) Co-authored-by: Jakub Stasiak <[email protected]>
1 parent 6e998fa commit 609a38a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Doc/library/socket.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,19 @@ The :mod:`socket` module also offers various network-related services:
10461046
.. versionchanged:: 3.8
10471047
Windows support was added.
10481048

1049+
.. note::
1050+
1051+
On Windows network interfaces have different names in different contexts
1052+
(all names are examples):
1053+
1054+
* UUID: ``{FB605B73-AAC2-49A6-9A2F-25416AEA0573}``
1055+
* name: ``ethernet_32770``
1056+
* friendly name: ``vEthernet (nat)``
1057+
* description: ``Hyper-V Virtual Ethernet Adapter``
1058+
1059+
This function returns names of the second form from the list, ``ethernet_32770``
1060+
in this example case.
1061+
10491062

10501063
.. function:: if_nametoindex(if_name)
10511064

@@ -1060,6 +1073,9 @@ The :mod:`socket` module also offers various network-related services:
10601073
.. versionchanged:: 3.8
10611074
Windows support was added.
10621075

1076+
.. seealso::
1077+
"Interface name" is a name as documented in :func:`if_nameindex`.
1078+
10631079

10641080
.. function:: if_indextoname(if_index)
10651081

@@ -1074,6 +1090,9 @@ The :mod:`socket` module also offers various network-related services:
10741090
.. versionchanged:: 3.8
10751091
Windows support was added.
10761092

1093+
.. seealso::
1094+
"Interface name" is a name as documented in :func:`if_nameindex`.
1095+
10771096

10781097
.. _socket-objects:
10791098

0 commit comments

Comments
 (0)