As a user, I would like to be able to communicate to NetworkInterface the IP address I'm trying to reach. You can determine which is the best interface based on the routing table.
The code should look something like:
ipaddr = '127.1.1.1'
NetworkInterface.pick_interface(ipaddr) # => 'lo'
ipaddr = '10.0.0.1'
NetworkInterface.pick_interface(ipaddr) # => 'eth0'
ipaddr = '8.8.8.8'
NetworkInterface.pick_interface(ipaddr) # => 'wlan0'
Something like that.
cc @sho-luv
As a user, I would like to be able to communicate to NetworkInterface the IP address I'm trying to reach. You can determine which is the best interface based on the routing table.
The code should look something like:
Something like that.
cc @sho-luv