From owner-freebsd-net Wed Dec 6 14:10:12 2000 From owner-freebsd-net@FreeBSD.ORG Wed Dec 6 14:10:06 2000 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from homer.softweyr.com (mail.dobox.com [208.187.122.44]) by hub.freebsd.org (Postfix) with ESMTP id 05B9A37B400 for ; Wed, 6 Dec 2000 14:10:06 -0800 (PST) Received: from [127.0.0.1] (helo=softweyr.com ident=Fools trust ident!) by homer.softweyr.com with esmtp (Exim 3.16 #1) id 143mny-0000Lq-00; Wed, 06 Dec 2000 15:12:50 -0700 Sender: wes@FreeBSD.ORG Message-ID: <3A2EB9E2.B44DE118@softweyr.com> Date: Wed, 06 Dec 2000 15:12:50 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Brian Somers Cc: oscar@163.net, freebsd-net@FreeBSD.org Subject: Re: get tun0's ip from my program References: <200012060152.eB61q0H00910@hak.lan.Awfulhak.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Brian Somers wrote: > > > I want to get tun0's two ip addresses. > > and add ipfw rules to system at my program. > > How can I do it?is there a function? or > > have document describe it. someone please tell me! > > thank you! > > If you're using ppp, you can call a script with the primary interface > address from ppp.linkup like this: > > MYADDR: > !bg myscript MYADDR > > There's no way to get your hands on any secondary IP numbers though... > unless you do something like If he was looking for the address of the other end of the tunnel, it is similarly available as HISADDR. We use these values to re-write the scripts I mentioned earlier when using PPPoE. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message