File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1091,6 +1091,19 @@ The :mod:`socket` module also offers various network-related services:
1091
1091
.. versionchanged :: 3.8
1092
1092
Windows support was added.
1093
1093
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
+
1094
1107
1095
1108
.. function :: if_nametoindex(if_name)
1096
1109
@@ -1105,6 +1118,9 @@ The :mod:`socket` module also offers various network-related services:
1105
1118
.. versionchanged :: 3.8
1106
1119
Windows support was added.
1107
1120
1121
+ .. seealso ::
1122
+ "Interface name" is a name as documented in :func: `if_nameindex `.
1123
+
1108
1124
1109
1125
.. function :: if_indextoname(if_index)
1110
1126
@@ -1119,6 +1135,9 @@ The :mod:`socket` module also offers various network-related services:
1119
1135
.. versionchanged :: 3.8
1120
1136
Windows support was added.
1121
1137
1138
+ .. seealso ::
1139
+ "Interface name" is a name as documented in :func: `if_nameindex `.
1140
+
1122
1141
1123
1142
.. _socket-objects :
1124
1143
You can’t perform that action at this time.
0 commit comments