On Mon, Jun 24, 2019 at 04:59:04AM -0700, Jason Thorpe wrote: > > > On Jun 24, 2019, at 4:29 AM, Manuel Bouyer <bou...@antioche.eu.org> wrote: > > > > I'd say that we should explicitely mention if we're looking up a name or > > a description, to avoid confusion. For example if wm0 has descrition > > "external if" we should be able to write in ipf: > > > > block in on wm0 from any to any > > or > > block in on intf_desc "external if" from any to any > > > > Same with netstat: > > netstat -I wm0 > > netstat -D "external if" > > > > and so on ... > > I think that severely limits the utility of the description field.
I'm not sure why. AFAIK this is already a different ioctl to retrieve the description, so the tools will have to be changed anyway. Alternatively we could make things like if_nametoindex(3) match on description as well as interface name, but this opens a whole can of worms: if_indextoname(3) will not return the same string, and what should we do with if_nameindex(3) ? -- Manuel Bouyer <bou...@antioche.eu.org> NetBSD: 26 ans d'experience feront toujours la difference --