Anders Persson writes: > As most of you already know, if_nameindex(3SOCKET) and > if_indextoname(3SOCKET) will only return physical device names. It > also appears that some applications expect that the interface names > obtained using the API will be usable for issuing lifreq ioctls. > However, if you are using the API in a non-global zone that only has > logical interfaces, things break down as the zone cannot issue ioctls > on interfaces that are not in the zone (so > if_nametoindex(if_indextoname(1)) == 0 :-). > > What do you guys think about the idea of changing if_nameindex() and > if_indextoname() such that they return logical names when the > physical ones are not accessible?
That seems reasonable as a work-around. At one point, we talked about allowing vanity names up at the IP level so that shared stack non-global zones could have less ugly interface names, and I think that'd help with this problem, but the idea never went anywhere. If we're concerned about safety, we could make it so that the new logic is invoked only if getzoneid() != GLOBAL_ZONEID. -- James Carlson, Solaris Networking <[email protected]> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677 _______________________________________________ networking-discuss mailing list [email protected]
