From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 10 00:52:47 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 8355C16A400 for ; Mon, 10 Apr 2006 00:52:47 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AFE943D46 for ; Mon, 10 Apr 2006 00:52:47 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k3A0pilx027211; Sun, 9 Apr 2006 18:51:44 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 09 Apr 2006 18:51:47 -0600 (MDT) Message-Id: <20060409.185147.25157954.imp@bsdimp.com> To: darren.pilgrim@bitfreak.org From: "M. Warner Losh" In-Reply-To: <44396D33.8070900@bitfreak.org> References: <4438A0A3.3050600@bitfreak.org> <17465.20321.174794.576853@bhuda.mired.org> <44396D33.8070900@bitfreak.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, mwm@mired.org Subject: Re: Using any network interface whatsoever (solution?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2006 00:52:47 -0000 In message: <44396D33.8070900@bitfreak.org> Darren Pilgrim writes: : Mike Meyer wrote: : > In <4438A0A3.3050600@bitfreak.org>, Darren Pilgrim typed: : >> You could test two different drivers on the same hardware and you wouldn't : >> have to duplicate or modify your ifconfig lines in /etc/rc.conf, just run: : > : > Yup, and this is an advantage. On the other hand, if you tie the : > device name to the slot number (the real goal), you can swap different : > hardware into that slot without having to modify any configuration : > information at all. : : It wouldn't be too difficult to extend the configuration to allow entries : like this: : : Interface0_addr="MAC 01:23:45:67:89:ab" : Interface1_addr="PCI 0:1:2" # pci0, device 1, function 2 : Interface2_addr="USB 0:1:2" # usb0, addr 1, port 2 : : Add some bits to grok dmesg or pciconf/usbdevs or maybe even trigger from : devd and there you go. : : I should mention that the second and third options could be broken by the : addition or removal of a card with a PCI bridge or USB root hub on it. The device subsystem already exports a bus-dependent plug and play position. No need to make it specific to USB/PCI/whatever. Warner