From owner-freebsd-net@FreeBSD.ORG Fri Oct 1 20:06:01 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24B8F16A4CE for ; Fri, 1 Oct 2004 20:06:01 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 082D443D31 for ; Fri, 1 Oct 2004 20:06:01 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i91KAE3P000946; Fri, 1 Oct 2004 13:10:14 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i91KAE9b000945; Fri, 1 Oct 2004 13:10:14 -0700 Date: Fri, 1 Oct 2004 13:10:14 -0700 From: Brooks Davis To: Wesley Shields Message-ID: <20041001201014.GA7913@odin.ac.hmc.edu> References: <20041001193234.GA14576@csh.rit.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <20041001193234.GA14576@csh.rit.edu> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-net@freebsd.org Subject: Re: ifconfig question X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Oct 2004 20:06:01 -0000 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 01, 2004 at 03:32:34PM -0400, Wesley Shields wrote: > Per a message about a month ago[1] I recently started some work on > adding a -v flag to ifconfig. I've been able to get the index number > and epoch as those are exposed to userland, but both the dname and dunit > are in an ifnet struct which AFAIK is not visible. I initially thought > you might be able to get them through an ioctl but that is not the case. >=20 > Unless I'm mistaken I'd have to either move the parts I would like to > see to the if_data struct (which is visible through a sysctl()), or make > them visible through an ioctl. >=20 > Am I correct in thinking that these are the only way to go about this > problem, and if so which way is the best way? >=20 > If neither of them are a wanted solution then any suggestions you have > would be helpful, otherwise I guess I'm just barking up the wrong tree > here. :) A pair of new per-interface sysctls is the right answer. Those members are't really intened to be used by public interfaces and if_data can not grow in -current until at least the 5.4 release and never can grow in 5.x. An ioctl could work, but a sysctls are a bit cheaper to add. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBXbmmXY6L6fI4GtQRAuyQAKDHTQ3SjeYCYiy4s10VL0ONW5WU2wCgmFXq COZIuhQ057QEjkSHOtzwoSo= =cm4o -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X--