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 01:58:30PM -0400, Marc Schneider wrote:
> Steve -
> 
> Thanks for the pointer to RTNETLINK.
> 
> I understand how to use IFLA_ADDRESS and RTNETLINK to obtain the
> hardware address of an interface. ioctl SIOCGIFHWADDR also seem to work
> fine, but the interface isn't getting returned by ioctl SIOCGIFCONF and
> I don't see how to use RTNETLINK to return a list of all interfaces. Am
> I missing something? Someone suggested parsing /proc/net/dev but I'd
> rather not do that.

Use a RTM_GETLINK request with NLMF_F_DUMP flags and struct rtgenmsg
payload with rtgen_family set to PF_PACKET.

Overall you'll find /proc/net/dev easier though.


-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