[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

Dmitry Tantsur report at bugs.python.org
Fri May 24 03:48:17 EDT 2019


Dmitry Tantsur <divius.inside at gmail.com> added the comment:

That would be fantastic, but I did not dare asking for it :)

This is how the output of if_nameindex looks on my Fedora 29:

[(1, 'lo'), (2, 'enp0s31f6'), (3, 'wlp4s0'), (4, 'virbr0'), (5, 'virbr0-nic'), (12, 'tun0')]

It includes the loopback, two real adapters (ethernet and wifi) and devices apparently created by libvirt.

This is how it looks on my OpenStack testing environment:

[(1, 'lo'), (2, 'eth0'), (3, 'virbr0'), (4, 'virbr0-nic'), (5, 'ovs-system'), (6, 'br-int'), (7, 'br-ex'), (8, 'brbm'), (9, 'br-tun'), (14, 'ovs-node-0i1'), (15, 'tap-node-0i1'), (16, 'ovs-node-0i2'), (17, 'tap-node-0i2'), (18, 'ovs-node-1i1'), (19, 'tap-node-1i1'), (20, 'ovs-node-1i2'), (21, 'tap-node-1i2'), (22, 'ovs-node-2i1'), (23, 'tap-node-2i1'), (24, 'ovs-node-2i2'), (25, 'tap-node-2i2'), (26, 'ovs-tap'), (27, 'brbm-tap'), (34, 'br-inspector'), (35, 'brbm-inspector'), (55, 'macvtap2'), (56, 'macvtap3'), (79, 'macvtap0'), (80, 'macvtap1')]

It seems to actually include everything.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37007>
_______________________________________


More information about the Python-bugs-list mailing list