Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Mar 1998 16:34:45 +0500
From:      Konstantin Chuguev <joy@urc.ac.ru>
To:        Zach Heilig <zach@gaffaneys.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Detecting state of PPP
Message-ID:  <350130D5.AE9B61F4@urc.ac.ru>
References:  <199803060014.TAA13234@gte.net> <199803070058.RAA24995@usr09.primenet.com> <19980306225654.17589@gaffaneys.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Zach Heilig wrote:
> 
> On Sat, Mar 07, 1998 at 12:58:46AM +0000, Terry Lambert wrote:
> ... code removed ...
> ? Of course, not all of the includes are needed; I ripped this out of an
> ? experimental piece of DHCP code.
> 
> After cleaning it up so it will compile, I tried your code.  I always get:
> tun0: up
> 
> no matter what the actual state is.
> 
Are you running ppp in -auto mode? If so, the tun* interface is always up,
no matter, is modem carrier detected or not. IP packets normally go to
the tun*, and after that, if the serial line is down, ppp dials etc.
So, I don't see a way to detect the PPP connection state better than using
pppctl by some script.

If you're not using -auto mode, but still need to detect the state of PPP
(-ddial, incoming PPP), you can flag the state by creating a file in
/etc/ppp/ppp.linkup and /etc/ppp/ppp.linkdown scripts (they don't run
in -auto mode).

--
	Konstantin V. Chuguev.		System administrator of
					Ural Regional Center of FREEnet,
	Joy@urc.ac.ru			Chelyabinsk, Russia.

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?350130D5.AE9B61F4>