From owner-freebsd-questions Fri Jun 14 11:10:28 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA04316 for questions-outgoing; Fri, 14 Jun 1996 11:10:28 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id LAA04304 for ; Fri, 14 Jun 1996 11:10:25 -0700 (PDT) Received: from palmer.demon.co.uk (palmer.demon.co.uk [158.152.50.150]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id LAA09879 for ; Fri, 14 Jun 1996 11:10:16 -0700 Received: from palmer.demon.co.uk (localhost [127.0.0.1]) by palmer.demon.co.uk (sendmail/PALMER-1) with ESMTP id SAA09896; Fri, 14 Jun 1996 18:54:42 +0100 (BST) To: Branson Matheson cc: Carey Nairn , FreeBSD-Questions@FreeBSD.ORG From: "Gary Palmer" Subject: Re: User PPP question In-reply-to: Your message of "Fri, 14 Jun 1996 07:36:44 EDT." <199606141136.HAA07912@garion.hq.ferg.com> Date: Fri, 14 Jun 1996 18:54:41 +0100 Message-ID: <9894.834774881@palmer.demon.co.uk> Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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. Gary -- Gary Palmer FreeBSD Core Team Member FreeBSD: Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info