psutil
psutil copied to clipboard
net_if_addr should return interface index
Some socket options (e.g. IPV6_MULTICAST_IF) need the interface index.
In the current implementation of net_if_addr
this information get lost.
Please either add an "ifn" field to the snicaddr
tuple or return an OrderedDict
with the orignal iface order.
What's that? What's the use case? Does ifconfig
report it?
socket.IPV6_JOIN_GROUP needs the interface index.
@kochelmonster did you find a way to get the interface index? The interface names returned by psutil
don't match socket.if_nameindex
for me on Windows.
It's included in the table psutil
queries for interface info on Windows, but I'm not sure if that's true for other operating systems.