tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Specifying names for tap interfaces
On Tue, Jun 26, 2012 at 11:10:19AM +0200, Manuel Bouyer wrote:
> On Tue, Jun 26, 2012 at 01:25:11PM +1000, Darren Reed wrote:
> > Your idea of label or aliases for network interfaces is something
> > that should at best be supported by your shell environment. It
> > is the usual place for aliases. It is not something that should
> > be supported by the kernel.
>
> But as the shell isn't always used to access network interface, it's not
> the right place.
Let me suggest that in userland, we maintain a map,
(ifnet.if_index, ifnet.if_index_gen) -> (interface description).
Let us look up descriptions through an API analogous to
if_nametoindex(3)/if_indextoname(3):
char *if_indextodesc(unsigned int ifindex, uint64_t gen, char *desc,
size_t descsize);
unsigned int if_desctoindex(const char *desc, uint64_t *genp);
So that interface->description mappings can persist across reboots,
I think that we should also maintain a map (rich device locators) ->
(interface name, interface description or NULL), too. So that the
information is available early during boot, I think that needs to be
either embedded in the kernel or stored in a boot properties file,
depending on the conventions and capabilities of the architecture.
Dave
--
David Young
dyoung%pobox.com@localhost Urbana, IL (217) 721-9981
Home |
Main Index |
Thread Index |
Old Index