On Mar 23, 2007, at 3:35 PM, Luis Martin Garcia wrote:

Is there any way, using libpcap or not, to get the IP of a network
interface in a portable and easy way?

With newer versions of libpcap/WinPcap, you could try using pcap_findalldevs() and look for the interface in question on the list of interfaces it returns. If you find an entry for that interface, it might include IP addresses for that interface.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.

Reply via email to