From: "Lejanson C. Go" <lejanson@ntsp.nec.co.jp>
To: Glynn Clements <glynn.clements@virgin.net>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: SIOCGMIIPHY and SIOCGIFCONF
Date: Wed, 07 Jul 2004 16:45:18 +0800 [thread overview]
Message-ID: <40EBB81E.2000409@hq.ntsp.nec.co.jp> (raw)
In-Reply-To: <16619.46077.597047.403056@cerise.nosuchdomain.co.uk>
Does most ethernet interface support MII interface? I also
tried SIOCGIFCONF but even if the cable is unplugged it will
still report LINK UP while SIOCGMIIPHY returns LINK DOWN when
the cable is unplugged.
How will I be able to override the SIOCGIFCONF so I can support
all network interfaces? I already tried using SIOCGMIIPHY and its
okay. But I am looking for ways to override the SIOCGIFCONF
behavior.
Thanks alot.
Glynn Clements wrote:
> Lejanson C. Go wrote:
>
>
>>I am a newbie in this list. I am bit confused in this 2 flags.
>>I am planning to make a network program which determines if the
>>interface is still up, down or unknown in real time.
>>Which of the 2 should I used? Which is more advisable?
>
>
> SIOCGIFCONF returns the "logical" status of the interface. SIOCGMIIPHY
> returns the contents of MII registers directly from the hardware.
>
> SIOCGIFCONF will tell you if the interface is enabled, but it won't
> tell you e.g. whether the ethernet cable is plugged in. OTOH,
> SIOCGIFCONF works on all network interfaces, while SIOCGMIIPHY only
> works on ethernet interfaces, and only on those which support the MII
> interface.
>
--
Revenge is best served when cold.
next prev parent reply other threads:[~2004-07-07 8:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-07 7:31 SIOCGMIIPHY and SIOCGIFCONF Lejanson C. Go
2004-07-07 8:27 ` Glynn Clements
2004-07-07 8:45 ` Lejanson C. Go [this message]
2004-07-07 21:34 ` John Richard Moser
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=40EBB81E.2000409@hq.ntsp.nec.co.jp \
--to=lejanson@ntsp.nec.co.jp \
--cc=glynn.clements@virgin.net \
--cc=linux-c-programming@vger.kernel.org \
/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).