tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Removing ifnet_addrs



Hi,

ifnet_addrs is a global data used to look up
an ifaddr of an interface via ifp->if_index,
i.e., we can get an ifaddr via
ifnet_addrs[ifp->if_index].

As looking at if.c, I notice that
ifnet_addrs[ifp->if_index] is always the same as
ifp->if_dl. So we can use ifp->if_dl instead of
ifnet_addrs[ifp->if_index] and remove ifnet_addrs
entirely. The removal simplifies if.c.

Please tell me if I'm missing something.

Here is a patch:
http://www.netbsd.org/~ozaki-r/remove_ifnet_addrs.diff

Note that the change passes ATF tests (tested
only tests/net).

Thanks,
  ozaki-r


Home | Main Index | Thread Index | Old Index