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

From: Steve Whitehouse (steve@gw.chygwyn.com)
Date: Thu Sep 14 2000 - 03:40:27 EST


Hi,

[snip]
>
> SIOCGIFCONF is handled by a special handler for each protocol.
> ipv4 implements it in devinet.c in function inet_gifconf(). This is
> some kind of a fallback implementation if anything else failes (i.e.
> nobody else registered a gifconf-handler for the interface), but
> of cause it can only work if the interface is an IP interface (has an
> IP address). Every other protocol stack should implement the gifconf
> function on its own. If one does not, it's imho broken. Then you have
> two more solutions: 1.) parsing /proc/net/dev (ugly) or 2.) retrieving
> interface info via rtnetlink (complex).
>
> -- Jens

DECnet has SIOCGIFCONF support, but turned off by default... the reason
being that any protocol where the sockaddr_xx structure is larger
than a generic sockaddr requires each program using the SIOCGIFCONF call
to have explicit knowledge of the size of each sockaddr_xx greater than
the standard sockaddr size that may be returned. Turning support on for
DECnet (or indeed IPv6 for example) would break several userland programs.

Its not that I think that there shouldn't be a simpler way of getting
the interface information, but I'm not at all sure that SIOCGIFCONF
is the right solution,

Steve.

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



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:29 EST