From owner-freebsd-net@FreeBSD.ORG Wed Mar 7 17:30:05 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ACDA6106566C for ; Wed, 7 Mar 2012 17:30:05 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3C57B8FC12 for ; Wed, 7 Mar 2012 17:30:04 +0000 (UTC) Received: by wibhn6 with SMTP id hn6so4661734wib.13 for ; Wed, 07 Mar 2012 09:30:04 -0800 (PST) Received: by 10.180.92.165 with SMTP id cn5mr7120496wib.1.1331141404211; Wed, 07 Mar 2012 09:30:04 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.227.209.78 with HTTP; Wed, 7 Mar 2012 09:29:44 -0800 (PST) In-Reply-To: References: <63821C69-16E5-4483-8307-69DCF2865E99@my.gd> From: Juli Mallett Date: Wed, 7 Mar 2012 09:29:44 -0800 X-Google-Sender-Auth: R3VyegnvyndMSQpGexq4wE5bgDg Message-ID: To: hiren panchasara Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkQ7ITjgQBMeu02LrWImmlaZ0IoKDRL+skzgA/3KsT1oWCgVyjMC1CJZW2pCxNWivTx1ouG Cc: "freebsd-net@freebsd.org" , Damien Fleuriot Subject: Re: Network Interface configuration X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 17:30:05 -0000 On Wed, Mar 7, 2012 at 01:24, hiren panchasara wrote: > On Wed, Mar 7, 2012 at 12:49 AM, Juli Mallett wrot= e: >> =C2=A0In general, interfaces do >> not come from the configuration files like rc.conf, however the way >> that those interfaces are set up on boot is configured by files like >> rc.conf. > > > Thanks Juli. > So, does it mean that looking at getifaddrs() is the best way (as ifconfi= g > is doing) to get the correct state of network interfaces at any point in > time? Yes. > And for the interface of your interest, you can check if rc.conf is > specifying any persistent configuration or not. Pretty much. There are other ways one could configure the interfaces persistently (for example, a series of ifconfig commands in rc.local) but in general rc.conf is the way to go, unless you decide to build your own configuration system.