Re: Obtaining a list of MAC address for interfaces without IP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

You can use the rtnetlink interface to gather that information.
You can find sample code and a userland library with suitable functions
in it in Alexey Kuznetsov's iproute2 package on ftp.inr.ac.ru and mirrors,

Steve.

> 
> I am trying to get a list of the MAC address for all ethernet interfaces
> in a machine. I was doing this using ioctl SIOCGIFCONF and SIOCGIFHWADDR
> calls, but this seems to only work for interfaces which have an IP
> address configured for them. I would like to be able to obtain this
> information for all interfaces, any ideas on how to do this?
> 
> Marc
> -
> : send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.kernel.org
> 

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux