Date: Mon, 4 Dec 2000 14:18:41 +0200 From: Peter Pentchev <roam@orbitel.bg> To: oscar@163.net Cc: freebsd-hackers@freebsd.org Subject: Re: get tun0's ip from my program Message-ID: <20001204141841.C614@ringworld.oblivion.bg> In-Reply-To: <3A2B8A42.09234@bjapp6.163.net>; from oscar@163.net on Mon, Dec 04, 2000 at 08:12:50PM %2B0800 References: <3A2B8A42.09234@bjapp6.163.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 04, 2000 at 08:12:50PM +0800, oscar@163.net 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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001204141841.C614>
