lkml.org 
[lkml]   [2001]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Network hardware: "Network Media Detection"
john slee wrote:
>
> On Sat, Nov 24, 2001 at 05:47:04PM -0800, H. Peter Anvin wrote:
> > > Hi
> > > I was wondering if there was any way in linux to use what redmond calls
> > > "Network Media Detection"?
> > This is basically taking the interface down when the link disappears
> > (and vice versa.) Rather useful for portable systems. Don't think
> > anyone has implemented it, but it should be easy enough to do.
>
> is there a common field in net_device{} for link state (not just up or
> down, but media type too)?
>
> all the various ethernet drivers seem to handle link changes rather
> differently. being able to notify userspace of media changes in a
> not-driver-specific manner would be nice as links flapping from 10 to
> 100Mbps and back often means problems are afoot.
>
> also i am undecided on _how_ to tell userspace about it... the current
> hotplug system only seems to handle plug/unplug, whereas this is a
> device state change and as such doesn't really fit the mould...

Functions provided by kernel that net drivers should be using:
netif_carrier_on
netif_carrier_off
netif_carrier_ok

ioctl that should be handled by net drivers, to provide link status to
userspace:
ETHTOOL_GLINK

Long term, we want to send a netlink message when link status changes.

Jeff


--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.088 / U:3.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site