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?
Yes, unless we have some bug in the current code, this should always
be the case.
Later,
David "Sparc" Miller
davem@caip.rutgers.edu