[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100716113113.1e2b51c7@nehalam>
Date: Fri, 16 Jul 2010 11:31:13 -0700
From: Stephen Hemminger <shemminger@...tta.com>
To: "Loke, Chetan" <Chetan.Loke@...scout.com>
Cc: "Ben Hutchings" <bhutchings@...arflare.com>,
"Chetan Loke" <chetanloke@...il.com>, <netdev@...r.kernel.org>
Subject: Re: [RFC] Enhance dev_ioctl to return <hwaddr>:<if_name::if_index>
mapping
On Fri, 16 Jul 2010 14:12:24 -0400
"Loke, Chetan" <Chetan.Loke@...scout.com> wrote:
> > -----Original Message-----
> > From: Stephen Hemminger [mailto:shemminger@...tta.com]
> > Sent: July 16, 2010 2:04 PM
>
> > The additional API is not needed. It is trivial to find address for
> > device and do reverse mapping. Either with ioctl's
> Sorry, I might have missed it. But which ioctl would that be?
Simple way:
Use SIOCGIFCONF to get list of interfaces
Use SIOCGIFHWADDR to read device addresss
If you want to handle the case where device address is set
by bonding or other protocols, use ETHTOOL_GPERMADDR to read
the original ethernet address.
> > or /sys/class/net/XXX/addr
> So, is reading /sys/ nodes preferred over get-calls?
No difference
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists