From owner-freebsd-net Wed Dec 6 17:28:37 2000 From owner-freebsd-net@FreeBSD.ORG Wed Dec 6 17:28:35 2000 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from bjapp4.163.net (unknown [202.108.255.214]) by hub.freebsd.org (Postfix) with ESMTP id 2DF2537B400 for ; Wed, 6 Dec 2000 17:28:35 -0800 (PST) Received: by bjapp4.163.net (Postfix, from userid 1005) id 9454F1D4D96D9; Thu, 7 Dec 2000 09:27:41 +0800 (CST) MIME-Version: 1.0 Message-Id: <3A2EE78D.29432@bjapp4.163.net> Date: Thu, 7 Dec 2000 09:27:41 +0800 (CST) From: oscar@163.net To: freebsd-net@freebsd.org Subject: get tun0's ip from my program C X-Priority: 3 X-Originating-IP: [61.130.54.94] Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Thank for all replys from friends. But I want to know use C program to get the ip address, not script. it must use network-interface ioctl and SIOCSIFADDR as param.But I do not know how to do this. Can anyone write a small example function to do this? thanks a lot. oscar > 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! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ “200家连锁网站,让眼睛尝尝鲜” http://www.chinese.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 163电子邮局,给您更完美Email服务! http://www.163.net ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message