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

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

 



On Wed, Sep 13, 2000 at 11:41:58AM -0400, Marc Schneider wrote:
> 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?

Parse /proc/net/dev and call SIOCGIFHWADDR for each device.


-Andi

-
: 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