Bit Twister <(E-Mail Removed)> wrote:
> On Wed, 10 Dec 2008 02:25:30 -0800 (PST), zix wrote:
> > Hi Everybody,
> > I have a module which is suposed to do some
> > work when the network(eth0) is up and running, so i guess some
> > where in the driver should be knowing when this is
> > happenning....so i want to declare a global variable and notify my
> > module about it in the driver.
>
> I have no idea about the kernel module, but when I want to hook into
> the network going up/down, I place my script in the interface
> up/down directory. You may want to look around in the */ifup and
> */ifdown directories. Then there is the possibility of using
> something like
> /sbin/ifup-local, /sbin/ifup-pre-local,....
That will cover administratively initiated up/down events. It won't
cover instances where the link goes up and down after the ifup but
before the ifdown. Also, will those hooks get run if someone does a
bare ifconfig command on an interface?
The linux bonding driver (in kernel) does some stuff with mii (? - the
bonding.txt file will have a high-level description) to get link
up/down notification from the drivers below it. There may be some
netlink magic one could use as well, but that is pure speculation on
my part.
rick jones
--
portable adj, code that compiles under more than one compiler
these opinions are mine, all mine; HP might not want them anyway...

feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...