Subject: Re: How to detect net cable plug-in
To: None <>
From: Brian Grayson <>
List: tech-net
Date: 10/18/2003 21:20:22
On Wed, Oct 15, 2003 at 03:15:26AM -0500, David Young wrote:
> On Tue, Oct 14, 2003 at 08:56:45PM -0500, Nate Hill wrote:
> > On Tue October 14 2003 17:19, der Mouse wrote:
> > > > The problem is that link status is not really one of the exported
> > > > attributes of net interfaces
> > >
> > > Something like it must be; ifconfig prints things like "no carrier"
> > > when there's no carrier - it has to get that from somewhere....
> > 
> > Of course it's available, the problem is the manner that one should 
> > employ to obtain such information. This problem exists because there 
> > have never been any standards associated with such a thing (as far as 
> > I know), the homogeneity found in network interfaces today is 
> > unprecedented. The best that can be done in this situation is an 
> > internally consistent interface to networking data structures and 
> > events.
> How about adding the selected media word and media status word to struct
> if_data and calling rt_ifmsg on media changes? I guess that RTM_VERSION
> should be bumped with this change.

  I've looked into this a little bit, and I'm afraid any such changes
are way over my head.  Does anyone (who has the knowledge) have the
desire to fix this?  I'd be more than happy to test changes on my ex0
laptop, and a tlp0/rtk0 desktop.

  I'm not sure what to do with the ifwatchd changes in the meantime.
They work fine for me with ex0 if I just twiddle dhclient-script....
I'll probably file a PR with the patch, for folks to take a peek at.