On Mon, Dec 04, 2000 at 08:12:50PM +0800, [EMAIL PROTECTED] 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!

See the tun(4) manpage, it describes the tun interface.  It refers to
'the usual network-interface ioctl(2)s, such as SIOCSIFADDR and SIOCSIFNETMAS'.
I think in this case you need something like SIOCGIFADDR.  As usual
when talking about network interfaces, my recommendation would be
'see the ifconfig(8) source, ifconfig usually knows how to do its job'.

Hope that helps.

G'luck,
Peter

-- 
If this sentence didn't exist, somebody would have invented it.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to