Internally lltable has been using addresses since r286624. IPv6 code is also using addresses instead of sockaddr in most places (see nd6_lookup() and nd6_alloc()).
Given that, switch lookup/allocation callbacks to use addresses.
Also, provide set of functions used solely for lltable lookups (e.g. not dealing with broadcast/multicast and is_gw).
Functions naming:
Currently llable has the following function prefixes/functions:
- in[6]_lltable - used for internal per-AF lltable callbacks
- arpresolve, nd6_resolve - exernal lookup API
- nd6_alloc, nd6_lookup - internal IPv6 wrappers
- lltable_alloc_entry - generic alloc callback wrapper
- lla_lookup - generic lookup callback wrapper
- llentry_alloc - used solely in flowtable to get ref'ed lle
- llentry_free - internal lle callback for reclaiming memory when refcount==0
- lla_rt_output - rtsock handler
This review changes the following:
- arpresolve, nd6_resolve -> deprecated
- in[6]_resolve_lla -> new external lookup API
- lltable_alloc_entry, lla_lookup -> do not use directly, use inlined per-af wrappers
- <arp|nd6>_alloc, <arp|nd6>_lookup - new per-af inlined wrappers (used for arg validation)
- llentry_alloc -> llentry_request (because flowtable really _requests_ an entry regadless of whether is was allocated or not)
I'm not very much about functions naming, so any suggessions/comments are welcome.
(e.g. lle[46]_resolve() or arpresolve_new() or ..).