Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Mar 1998 10:52:32 -0500
From:      "Brian Haskin" <haskin@ptway.com>
To:        <rneswold@mcs.net>, "allen campbell" <allenc@verinet.com>
Cc:        <hackers@FreeBSD.ORG>
Subject:   Re: Detecting state of PPP
Message-ID:  <001e01bd49e1$1aa91600$0b00000a@brianjr.haskin.org>

next in thread | raw e-mail | index | archive | help

-----Original Message-----
From: Richard M. Neswold <rneswold@mcs.net>
To: allen campbell <allenc@verinet.com>
Cc: hackers@FreeBSD.ORG <hackers@FreeBSD.ORG>
Date: Saturday, March 07, 1998 1:26 AM
Subject: Re: Detecting state of PPP


>On Fri, 6 Mar 1998, allen campbell wrote:
>
>> I think ppp deserves a status tool that performs simple tests on the
>> running daemon.
>
>Here's a ppp status tool (put this in a file called, for instance,
>'ppp_up'):
>
> #!/bin/sh
> ifconfig -l -u | grep -q tun0;
>
>To test it:
>
> $ ppp_up && echo PPP is running.
>
>  Rich
>


umm, this will tell you if the interface is up or not, i.e. if ppp is
running. The original question was how, using userland ppp with the auto
dial mode do you tell if ppp is currently connected. Your test would always
show that the interface is up even when the modem is not actually connected,
because the ppp is keeping the interface up and when it actually receives an
outgoing packet it will dial. Others have pointed out various methods of
checking this, varying from using pppctl to checking for a lock on the
serial port.

Brian Haskin


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?001e01bd49e1$1aa91600$0b00000a>