netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: Hasso Tepper <hasso@estpak.ee>
Cc: netdev@oss.sgi.com
Subject: Re: Link detection
Date: Mon, 14 Mar 2005 17:54:28 +0100	[thread overview]
Message-ID: <20050314165428.GR31837@postel.suug.ch> (raw)
In-Reply-To: <200503141641.33510.hasso@estpak.ee>

* Hasso Tepper <200503141641.33510.hasso@estpak.ee> 2005-03-14 16:41
> > > 1) What's the proper way to detect carrier in Linux for user space
> > > application like Quagga?
> > >
> > > True, IFF_RUNNING is from BSD, but as long as the code in
> > > net/core/dev.c:dev_get_flags() is there, it gives nice clean way to get
> > > carrier status from user space (AFAIK it's used in same way in
> > > Solaris). Especially for applications using rtnetlink - ie. without it
> > > there is no all info in the netlink message any more. If these
> > > applications will receive RTM_NEWLINK, they have to poll kernel "look,
> > > maybe carrier status is changed" every time?

I've been looking into it more deeply. Sorry for the wrong information at first,
I thought IFF_RUNNING was unused after the link state was introduced, especially
after seeing IFF_RUNNING being ignored in iproue2 source. I'm fixing up the
drivers still doing it wrong, after that IFF_RUNNING should be accurate and with
no races. The way you're checking carrier at the moment is absolutely correct.

  parent reply	other threads:[~2005-03-14 16:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-14 12:35 Link detection Hasso Tepper
2005-03-14 13:32 ` Thomas Graf
2005-03-14 14:05   ` Hasso Tepper
2005-03-14 14:57     ` Thomas Graf
2005-03-14 18:41       ` Hasso Tepper
2005-03-14 14:41   ` Hasso Tepper
2005-03-14 15:03     ` Thomas Graf
2005-03-14 16:54     ` Thomas Graf [this message]
2005-03-14 16:16 ` [PATCH] ip link should print NO-CARRIER for !IFF_RUNNING && IFF_UP Thomas Graf

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=20050314165428.GR31837@postel.suug.ch \
    --to=tgraf@suug.ch \
    --cc=hasso@estpak.ee \
    --cc=netdev@oss.sgi.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).