Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Dec 2000 15:12:50 -0700
From:      Wes Peters <wes@softweyr.com>
To:        Brian Somers <brian@Awfulhak.org>
Cc:        oscar@163.net, freebsd-net@FreeBSD.org
Subject:   Re: get tun0's ip from my program
Message-ID:  <3A2EB9E2.B44DE118@softweyr.com>
References:  <200012060152.eB61q0H00910@hak.lan.Awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A2EB9E2.B44DE118>