oif, ifindex, etc.

David Woodhouse (D.W.Woodhouse@nortel.co.uk)
Wed, 01 Oct 1997 11:19:39 +0100


I'm working on porting SO_BINDTODEVICE to the vger CVS tree. The new
implementations of routines like ip_route_output now take interface index
(oif) instead of the struct device * which they used to take.

I assume that there's a 1:1 correspondance between them, so:
For all int oif such that get_dev_by_index(oif) != NULL ,
(get_dev_by_index(oif))->ifindex == oif
&&
For all struct device * dev, get_dev_by_index(dev->ifindex) == dev

Am I right?

-- 
David Woodhouse,	CB3 9AN		http://dwmw2.robinson.cam.ac.uk/
	dwmw2@cam.ac.uk 		 Tel: 0976 658355        
      ( D.W.Woodhouse@nortel.co.uk	 Tel: 01279 402332 )

(Use the former; I'm going back to College next week.)