C code to get the interface name for the IP address in Linux -
how can interface name ip address in linux c code ?
e.g. i'd interface name ( etho , eth1 , l0 ) assigned ip address 192.168.0.1
you can use getifaddrs
. see man 3 getifaddrs usage information. work on unix-like systems.
Comments
Post a Comment