Skip to content

Commit 9308173

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

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Doc/library/socket.rst

+19
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,19 @@ The :mod:`socket` module also offers various network-related services:
10911091
.. versionchanged:: 3.8
10921092
Windows support was added.
10931093

1094+
.. note::
1095+
1096+
On Windows network interfaces have different names in different contexts
1097+
(all names are examples):
1098+
1099+
* UUID: ``{FB605B73-AAC2-49A6-9A2F-25416AEA0573}``
1100+
* name: ``ethernet_32770``
1101+
* friendly name: ``vEthernet (nat)``
1102+
* description: ``Hyper-V Virtual Ethernet Adapter``
1103+
1104+
This function returns names of the second form from the list, ``ethernet_32770``
1105+
in this example case.
1106+
10941107

10951108
.. function:: if_nametoindex(if_name)
10961109

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

1121+
.. seealso::
1122+
"Interface name" is a name as documented in :func:`if_nameindex`.
1123+
11081124

11091125
.. function:: if_indextoname(if_index)
11101126

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

1138+
.. seealso::
1139+
"Interface name" is a name as documented in :func:`if_nameindex`.
1140+
11221141

11231142
.. _socket-objects:
11241143

0 commit comments

Comments
 (0)