From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 9 20:23:16 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 A410416A401 for ; Sun, 9 Apr 2006 20:23:16 +0000 (UTC) (envelope-from darren.pilgrim@bitfreak.org) Received: from mail.bitfreak.org (mail.bitfreak.org [65.75.198.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D4F643D53 for ; Sun, 9 Apr 2006 20:23:16 +0000 (GMT) (envelope-from darren.pilgrim@bitfreak.org) Received: from [127.0.0.1] (mail.bitfreak.org [65.75.198.146]) by mail.bitfreak.org (Postfix) with ESMTP id 4C22319F2C; Sun, 9 Apr 2006 13:23:15 -0700 (PDT) Message-ID: <44396D33.8070900@bitfreak.org> Date: Sun, 09 Apr 2006 13:23:15 -0700 From: Darren Pilgrim User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Mike Meyer References: <20060407225742.GA21619@odin.ac.hmc.edu> <20060407230247.GH16344@submonkey.net> <4437C9F6.5000008@samsco.org> <17463.65076.117616.563302@bhuda.mired.org> <20060408224140.GA15366@outcold.yadt.co.uk> <17464.17494.251794.271711@bhuda.mired.org> <44385525.8000203@bitfreak.org> <17464.31976.938131.944829@bhuda.mired.org> <4438A0A3.3050600@bitfreak.org> <17465.20321.174794.576853@bhuda.mired.org> In-Reply-To: <17465.20321.174794.576853@bhuda.mired.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.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: Sun, 09 Apr 2006 20:23:16 -0000 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. > Of course, this doesn't help the OP's problem of wanting to be able to > address the sole interface in a system without knowing it's name in > advance. Maybe a feature to provide a default name for an interface if > one isn't found in the config file would do that. # ifconfig `ifconfig -l link` name GenericName