From owner-freebsd-hackers Tue Nov 19 13:13:33 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D36E37B401 for ; Tue, 19 Nov 2002 13:13:31 -0800 (PST) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D0A443E4A for ; Tue, 19 Nov 2002 13:13:30 -0800 (PST) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.3/8.12.3) with ESMTP id gAJLDSs7024959; Tue, 19 Nov 2002 13:13:28 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.3/8.12.3/Submit) id gAJLDR0s024954; Tue, 19 Nov 2002 13:13:27 -0800 Date: Tue, 19 Nov 2002 13:13:27 -0800 From: Brooks Davis To: Rich Morin Cc: hackers@FreeBSD.ORG Subject: Re: auto-definition of a single network interface Message-ID: <20021119131327.B16432@Odin.AC.HMC.Edu> References: <3DD9EA96.F4DEC169@FreeBSD.org> <3DD9F5F5.C5637707@mindspring.com> <20021119103756.B17963@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="RASg3xLB4tUQ4RcS" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from rdm@cfcl.com on Tue, Nov 19, 2002 at 11:24:10AM -0800 X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --RASg3xLB4tUQ4RcS Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 19, 2002 at 11:24:10AM -0800, Rich Morin wrote: > At 10:37 AM -0800 11/19/02, Brooks Davis wrote: > >Once the if_xname patch is in, it will be exceedingly simple to add some > >code to ether_ifattach to do that if you really want. >=20 > Well, _I_ really want FreeBSD to move in the direction of "plug and play"; > this is merely one small contribution. That said, I have some questions > about your suggestion: >=20 > * Would it handle non-Ethernet network interfaces? If not, perhaps i= t's > not at the right level of generality. It depends what you mean by non-Ethernet interfaces. If you mean 802.11b wireless, those are ethernet interfaces. If you mean tokenring, that would require a seperate hack, but is possiable (though it would be a bit silly to call a tokenring interface eth0). I suppose you could implement an even uglier hack and rename everything to if#, but I think that would result in a flameware of epic proportions. Note that none of these ideas really helps my laptop since I've always got an ethernet interface via the 3com mini-pci card, but sometimes I want to use the wireless card. I don't think interface renaming could be turned on by default without a big fight, but it might be worth the effort eventualy (I don't really have a firm opinion). > * Would your change be smaller (or better in some other way) than the > half-dozen lines of code Ren=E9 has proposed? It would be very small since it would just need to track the list of allocated units (an int would do it) and do an snprintf into the if_xname value. It would also be in-kernel so you'd be able to talk about the interface consistantly instead of using one name in rc.conf and another everywhere else. > * What is the timing on the if_xname patch? Is it imminent or merely > "in the works"? Can you provide a URL (or an explanation) of what > this patch is intended to do? It's a .0 feature since it breaks the kernel API/ABI for network drivers, but I'm hopeful that we'll ship it in 5.0. There's been some recent discussion of it on -hackers and cvs-all with some older discusssion on -net. There's a large patch at: http://people.freebsd.org/~brooks/patches/if_xname.diff Most if it is really just string format changes. -- 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 --RASg3xLB4tUQ4RcS Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE92ql2XY6L6fI4GtQRAv1wAJ9FEKrwaC0kj9oPE58MOFRQ8toEcwCgpslE m82FmwOJlcE3mJOJlTW9RPo= =C62e -----END PGP SIGNATURE----- --RASg3xLB4tUQ4RcS-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message