Enumerating network interfaces and querying their properties

Kenneth Porter via Boost-users <[email protected]>
Newsgroups gmane.comp.lib.boost.user
Message-ID <[email protected]>
Is there a portable way to enumerate network interfaces and query their 
properties? I don't see anything in ASIO for that. Any recommendations 
for other libraries? So far the closest I've come is Python's netifaces 
library. (Maybe someone would like to fork the Python library's C source 
and bring it into Boost?)

<https://github.com/al45tair/netifaces>

I've got an app that configures a remote IoT device on the same segment 
and then opens UDP listeners to listen for a stream of data from the 
device. The user specifies the hostname or address of the device. I'd 
like to be able to restrict the listeners to just the interface that the 
device is connected to. I have two interfaces, one for the LAN and one 
for devices, and I don't want to listen on the LAN interface. So ideally 
I'd get the list of interfaces and their addresses and netmasks. I think 
I also need the routing table. I can then identify which interface will 
receive the incoming UDP stream.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.