strange pppd question
Strange what I'm doing; pppd works fine :)
I'm trying to write a daemon (in perl) that monitors the "health" of the
next hop on an ethernet port (think DSL or cable connection), and dials
a provider when the connection goes down. To do this, I need to invoke
pppd from my prgram ... pppd forks and disconnects to do this, so I have
no easy way to determine WHEN the link is up (I delete the eth default
route and add a ppp0 default route only once the dial-link is up, or
that's the plan). Right now I have to use sleep and that's plain ugly
(and doesn't always work when the dial server is cranky).
So, how to discover that pppd is up and running on a link? Perhaps I'm
being incredibly dense here (I'm sure I am) but I don't see how to do it
...
Any ideas? Am I re-inventing a wheel?
--
Nathan Norman
MidcoNet 410 South Phillips Avenue Sioux Falls, SD
mailto:finn@midco.net http://www.midco.net
finger finn@home.midco.net for PGP Key: (0xA33B86E9)
Reply to: