Pavlin Radoslavov wrote: >>> In your implementation you need to be very careful that you capture >>> all places inside IfTree that are related to the new pif_index to >>> vif mapping. >>> >>> >> I was thinking on the way home: Maybe just map if-index to if-name. If >> the mapping >> lookup fails, do a long slow linear lookup and if the object is found, >> add it to the if-index -> map. >> If it succeeds, then lookup the vif by way of the existing hash, >> double-check the if-index is >> correct (if not, do a slow lookup). >> > > I think this adds lots of complexity. > Just a simple if-index to vif-name-pointer should be sufficient. > Off the top of my head, you need to consider the following places > inside IfTree that will affect the mapping: >
Maybe I'm too paranoid..but any code can get an if, and then muck with it's vifs. The mapping is external to the if and vif objects, so it would be hard to make sure no one can ever screw up a listing. Also, an ifname can change while the ifindex remains the same, or a new interface with the same name but a different ifindex can be created. Anyway, I'll make a stab at it and then let you review what I come up with. Also, any comments on the socket-per-interface patch? I'd like to work towards getting that accepted, as my cvs diff is getting quite large... Ben -- Ben Greear <[EMAIL PROTECTED]> Candela Technologies Inc http://www.candelatech.com _______________________________________________ Xorp-hackers mailing list [email protected] http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
