From owner-freebsd-rc@FreeBSD.ORG Tue Nov 14 18:00:23 2006 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC4E916A568 for ; Tue, 14 Nov 2006 18:00:23 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from talk.nabble.com (www.nabble.com [72.21.53.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A7D543D76 for ; Tue, 14 Nov 2006 18:00:19 +0000 (GMT) (envelope-from bounces@nabble.com) Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1Gk2a2-0007z7-SI for freebsd-rc@freebsd.org; Tue, 14 Nov 2006 10:00:18 -0800 Message-ID: <7342892.post@talk.nabble.com> Date: Tue, 14 Nov 2006 10:00:18 -0800 (PST) From: subba To: freebsd-rc@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: subba@t8design.com Subject: How to read ifconfig in FreeBSD..Help plss X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:00:24 -0000 Hi, I have to write console menu set up, where user can change the IP , netmask,gateway settings etc. To Start with i need to read 'ifconfig' and get the 'ip' and 'netmask' and store it in a file and read the file to get the output. Can somebody help me in reading the IP and others from ifconfig... I am trying to use char *cmd[] = { "ifconfig","-a",(char *)0 } execv("/sbin/ifconfig,cmd); If there is a better solution to have the console set up, I would love to know it...I'd appreciate your help. Thanks, Subba -- View this message in context: http://www.nabble.com/How-to-read-ifconfig-in-FreeBSD..Help-plss-tf2631184.html#a7342892 Sent from the freebsd-rc mailing list archive at Nabble.com.