From owner-freebsd-questions Sat Jun 15 06:43:25 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA25225 for questions-outgoing; Sat, 15 Jun 1996 06:43:25 -0700 (PDT) Received: from wedge.its.utas.edu.au (cp_nairn@wedge.its.utas.edu.au [131.217.10.10]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id GAA25217; Sat, 15 Jun 1996 06:43:22 -0700 (PDT) Received: (from cp_nairn@localhost) by wedge.its.utas.edu.au (8.7.1/8.6.6) id XAA15312; Sat, 15 Jun 1996 23:43:20 +1000 (EST) Date: Sat, 15 Jun 1996 23:43:19 +1000 (EST) From: Carey Nairn X-Sender: cp_nairn@wedge.its.utas.edu.au To: Gary Palmer cc: Branson Matheson , FreeBSD-Questions@FreeBSD.ORG Subject: Re: User PPP question In-Reply-To: <9894.834774881@palmer.demon.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Fri, 14 Jun 1996, Gary Palmer wrote: > 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 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. my thoughts as well.. I will have a look at that in a couple of weeks when I have finally finished my exams :) thanks, Carey ========================================================================= Carey Nairn ! email : Carey.Nairn@its.utas.edu.au Networks and Communications ! phone : (002) 20 7419 Information Technology Services ! fax : (002) 20 7898 University of Tasmania. ! =========================================================================