Date: Fri, 14 Jun 1996 18:54:41 +0100 From: "Gary Palmer" <gpalmer@FreeBSD.ORG> To: Branson Matheson <branson@widomaker.com> Cc: Carey Nairn <cp_nairn@cc.utas.edu.au>, FreeBSD-Questions@FreeBSD.ORG Subject: Re: User PPP question Message-ID: <9894.834774881@palmer.demon.co.uk> In-Reply-To: Your message of "Fri, 14 Jun 1996 07:36:44 EDT." <199606141136.HAA07912@garion.hq.ferg.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Branson Matheson wrote in message ID <199606141136.HAA07912@garion.hq.ferg.com>: > >is there a way of determining whether an interface is connected > >(particularly tun0) without trying to send something (e.g. ping > >packets) across the interface ? What I want to do is find out if the > >interface is currently connected and iff it is then download mail from my > >ISP. > ifconfig -u | grep tun0 root@palmer:/> ifconfig -au [--SNIP--] tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1524 inet 158.152.50.150 --> 158.152.1.222 netmask 0xffff0000 [--SNIP--] The interface is always `up' and `running' while the `ppp' program is attached to the device as otherwise the ppp program won't get any packets sent to it and it won't know when to auto dial. There is *NO* automated way of doing this that I know of, short of writing a program which interrogates port 3000, which will need some smarts to do the parsing of the prompt(s) that you get presented with. Gary -- Gary Palmer FreeBSD Core Team Member FreeBSD: Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9894.834774881>