Date: Fri, 6 Mar 1998 22:51:34 -0700 (MST) From: allen campbell <allenc@verinet.com> To: hackers@FreeBSD.ORG Subject: Re: Detecting state of PPP Message-ID: <199803070551.WAA20509@const.>
next in thread | raw e-mail | index | archive | help
> >> How does one go about writing a program to check if a PPP link is up > >> or down? > > > > I've seen lots of complicated responses to this, so there is probably > > something inherintly wrong with what I've always done, check for the > > existence of the /var/spool/lock/LCK..cuaa? > > Why not just look at the interface status: [Ensuing example deleted] In the case of user land ppp, take a look at the pppctl(8) man page. It provides an example of how to check the status of ppp, among other things. Even pppctl leaves much to be desired; essentially to provides a way to control a running ppp daemon as though you are using the telnet socket. You must then parse the output from the session to get answers. I think ppp deserves a status tool that performs simple tests on the running daemon. Perhaps: if pppstat --linkup section then do something requiring 'section'. fi Allen Campbell allenc@verinet.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803070551.WAA20509>