On Mon, 2005-25-07 at 15:49 -0700, Ben Greear wrote: > jamal wrote: > > Name is not totaly sane either: > > I think one of the fscked s/ware i have seen is pppd that tries > > to recycle names immediately with the same name but different ifindex. > > It should probably use ppp<ifindex> for name. > > That would play merry hell with user-space applications that need to know > what the name of the ppp interface is that they just created > programatically. There are options to give to pppd to specify the 'X' > in the pppX name, by the way.
I dont use pppd anymore these days; however, that may be insufficient to guarantee uniqueness unless somehow it gets mapped to the ifindex. Also a lot of scripts assume the nature of reusing names. You will piss off a gazillion people if you changed the behavior. > > In theory, one should be able from user space to really configure the > > ifindex; we dont allow for it even for devices that are virtual. > > Might work at creation time, but you can't be certain that someone else > hasn't already used the index, at least not easily, Why not easily? It should be pretty trivial to tell user space "the ifindex you want is in use"; return -EEXIST > so I don't see it gaining you very much. The places (not linux) where it is used it does gain in consistency. Linux (and a few other OSes, I should add) assume that scanning the bus for example implies you alloc a netdevice and give it an ifindex. If we assumed that we only do that after we ifconfig up a device the first time (and disallow it afterwards), then we could easily have a user space app defining what the ifindex should be. cheers, jamal - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html