File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1046,6 +1046,19 @@ The :mod:`socket` module also offers various network-related services:
1046
1046
.. versionchanged :: 3.8
1047
1047
Windows support was added.
1048
1048
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
+
1049
1062
1050
1063
.. function :: if_nametoindex(if_name)
1051
1064
@@ -1060,6 +1073,9 @@ The :mod:`socket` module also offers various network-related services:
1060
1073
.. versionchanged :: 3.8
1061
1074
Windows support was added.
1062
1075
1076
+ .. seealso ::
1077
+ "Interface name" is a name as documented in :func: `if_nameindex `.
1078
+
1063
1079
1064
1080
.. function :: if_indextoname(if_index)
1065
1081
@@ -1074,6 +1090,9 @@ The :mod:`socket` module also offers various network-related services:
1074
1090
.. versionchanged :: 3.8
1075
1091
Windows support was added.
1076
1092
1093
+ .. seealso ::
1094
+ "Interface name" is a name as documented in :func: `if_nameindex `.
1095
+
1077
1096
1078
1097
.. _socket-objects :
1079
1098
You can’t perform that action at this time.
0 commit comments