From: David Miller <davem@davemloft.net>
To: chetanloke@gmail.com
Cc: shemminger@vyatta.com, Chetan.Loke@netscout.com,
bhutchings@solarflare.com, netdev@vger.kernel.org
Subject: Re: [RFC] Enhance dev_ioctl to return <hwaddr>:<if_name::if_index> mapping
Date: Fri, 16 Jul 2010 12:33:06 -0700 (PDT) [thread overview]
Message-ID: <20100716.123306.232886890.davem@davemloft.net> (raw)
In-Reply-To: <AANLkTin3V7LtmhDAOktNF1UITM86sJwButxCQ3vo31lv@mail.gmail.com>
From: Chetan Loke <chetanloke@gmail.com>
Date: Fri, 16 Jul 2010 15:29:06 -0400
> On Fri, Jul 16, 2010 at 2:31 PM, Stephen Hemminger
> <shemminger@vyatta.com> wrote:
>> Simple way:
>> Use SIOCGIFCONF to get list of interfaces
>> Use SIOCGIFHWADDR to read device addresss
>>
> And interfaces that don't have IP's?
There is no requirement that an interface have configured IP addresses
in order to use those ioctl()'s.
You simply create an arbitrary socket, and use the resulting 'fd' to
run the ioctl's mentioned to fetch information about any and all
interfaces which exist in the system.
next prev parent reply other threads:[~2010-07-16 19:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-16 13:18 [RFC] Enhance dev_ioctl to return <hwaddr>:<if_name::if_index> mapping Chetan Loke
2010-07-16 17:10 ` Ben Hutchings
2010-07-16 18:04 ` Stephen Hemminger
2010-07-16 18:12 ` Loke, Chetan
2010-07-16 18:31 ` Stephen Hemminger
2010-07-16 19:29 ` Chetan Loke
2010-07-16 19:33 ` David Miller [this message]
2010-07-16 19:35 ` Chetan Loke
2010-07-16 19:40 ` David Miller
2010-07-16 20:02 ` Chetan Loke
2010-07-16 20:04 ` David Miller
2010-07-16 20:15 ` Chetan Loke
2010-07-16 20:18 ` David Miller
2010-07-16 20:49 ` Loke, Chetan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100716.123306.232886890.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Chetan.Loke@netscout.com \
--cc=bhutchings@solarflare.com \
--cc=chetanloke@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).