Now, I'm trying to get the network device's MAC address and IP address
only with its interface name.
In BSD, I can do this by using 'sysctl' with the type of info,
'NET_RT_IFLIST' and then matching the interface name with the
How can I do like this in LINUX?
I tried to use LINUX's sysctl.
But, I cannot find the name structure similar with BSD's 'NET_RT_IFLIST'.
Moreover, the documentation about sysctl is too incomplete to know how to
use LINUX's 'sysctl': e.g, it was very hard to find out the naming
structure that 'sysctl' will search, and the data structure that 'sysctl'
So, I tried, in other way, to use 'routing socket' to do this.
But, it was also hard to do that: getting the network device's MAC address
and IP address only with its interface name.
Could anyone who has similar experience help me?
I'd very appreciate your help.
Thanks a lot.
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to firstname.lastname@example.org
This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:26 EST