psutil
psutil copied to clipboard
net_if_() functions should provide info about the gateway
Original discussion: https://groups.google.com/forum/#!topic/psutil/GLKNvgSGs28
It works ?
from the Windows API documentation for the GetAdaptersAddresses() function:
GAA_FLAG_INCLUDE_GATEWAYS
0x0080
Return the addresses of default gateways. This flag is supported on Windows Vista and later.
This is this function used in windows/net.c to get the IP, netmask, etc info. It looks like the same function can also return the default gateway info