Subject: Re: ifwatcher written! [was Re: Getting laptop to auto-dhclient]
To: Todd Vierling <firstname.lastname@example.org>
From: Brian Grayson (home) <email@example.com>
Date: 10/12/2003 01:06:07
On Sun, Oct 12, 2003 at 01:23:41AM -0400, Todd Vierling wrote:
> On Sun, 12 Oct 2003, Brian Grayson (home) wrote:
> : I hacked, and now have a program (tentatively called ifwatcher)
> : that checks the status of the named interface, and when it changes,
> : runs /etc/ifwatch <interface> <active|inactive>.
> There's already something in NetBSD that is similar to this: ifwatchd(8).
> It bases up/down on addresses being added/deleted, but certainly it could
> monitor other types of interface state.
That's exactly what we were looking for!
It looks like link up/down are (both) type RTM_IFINFO. Where would I
find documentation about what to do with the rtm_* fields on a
link up/down message? It appears that on link down, the rtm_seq is 1,
and on link up, the rtm_seq is 2, but I don't see anything obvious
in the header files, and 'grep -r rtm.seq /usr/src/sys' turned up