Ben Greear wrote: > Pavlin Radoslavov wrote: > >> The problem with this solution is that it will work only for Netlink >> on Linux. The (majoriyty of the) other mechanisms for obtaining the >> network interface information (getifaddrs(3), ioctl(2), syssctl(3), >> etc) don't allow the granularity for asking only the information for >> a specific interface. > Yes, this may only be useful for my scenario where I'm using a small > number of interfaces per xorp instance, with large numbers of total > interfaces. > Only linux can virtualize routing tables, as far as I know, so this > performance > gain is only really important on Linux.
Unfortunately as Pavlin points out getifaddrs() retrieves information for *all* interfaces configured in the system. It gets expensive for large N because it doesn't build a tree, it just uses a linked list. FreeBSD is about to see some virtualization support in this area, so a cross platform solution needs to be carefully considered. cheers BMS _______________________________________________ Xorp-hackers mailing list [email protected] http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
