Subject: Re: Automatically bumping device numbers
To: Marcin Jessa <>
From: Garrett D'Amore <>
List: current-users
Date: 03/24/2006 13:59:28
Marcin Jessa wrote:
> Hi guys.
> Testing the CARP patch of Liam I noticed that creating 
> of new devices like bridge or carp requires giving them a 
> specific number, i.e bridge0 or carp0. 
> I was wondering if you think it would be a good idea to have 
> the device numbers being bumped up automatically like on 
> FreeBSD if numbers are not explicitly given.
> So ifconfig carp create would create carp0 and running 
> the command again would create carp1, etc.
> Is there any reason for this not being implemented?
> One more thing that must be a heritage from the past is
> ifconfig which needs -a flag to show all the network devices
> instead of just ifconfig. Is there any reason for that too?

You need to create device nodes in order to have dynamic device
numbers.  This also means you need to create some persistent database
containing the mapping.   Right now, we don't have anything like that. 
The (mythical?) devfs project could address this, however.

As far as ifconfig, ifconfig behaves that way (needing -a to show all
interfaces) on other operating systems as well.  For example, without
arguments, ifconfig on Solaris shows a help message, just as on NetBSD.

I would vote *against* changing that behavior of ifconfig.    The help
message for ifconfig may actually be useful to some folks.

Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
Phone: 951 325-2134  Fax: 951 325-2191