Hi, Le dimanche 07 janvier 2007 à 15:26 +0100, Harald Welte a écrit : > On Fri, Dec 29, 2006 at 12:40:47AM +0100, Eric Leblond wrote: > > It will add 4*IFNAMSIZ = 64 octets to each nfnetlink_queue message but > > this is not impressive as a part of the packet payload is usually sent. > > No, please don't do that. > Also, I _really_ want to get rid of interface names throughout > netfilter/iptables at some point in the future. all 'next generation' > subsystems (such as all nfnetlink based services) should just deal with > ifindexes. > > Please put some functions into libnfnetlink, even if it doesn't natively > belong there. If there's more netlink unification, we can always make > those just wrappers for the 'real new unified' ifindex/name resolving > functions. I've thought at this solution before getting interessed by pablo's suggestion. But I've got a conception problem. It is not correct to do a dump (and send a netlink message) for each ifindex resolution. Thus, libnfnetlink needs to listen to netlink interfaces message. A permanent "task" is thus needed to have the job done : It can be a dedicated thread or a carefully hidden select. In fact, if we omit the thread approach which is somehow intrusive, I don't see a way to do this via a simple call to added functions. Any idea welcome. > [yes, I'm back, more or less] Great news ! BR, -- Eric Leblond INL