bgpd: Rejiggle exported nht function names and consolidate some code
* bgp_nht.h: Tweak the API a bit to simplify and make names a bit clearer on
function. Remove AFI argument, it's implied in both bgp_infos and peers.
(bgp_find_nexthop) this doesn't so much find a bnc, as check the bnc
for the given bgp_info is valid. Rename to (bgp_nexthop_check).
(bgp_find_or_add_nexthop) This ensures a bnc exists, so call it
(bgp_ensure_nexthop).
(bgp_unlink_nexthop_by_peer) Remove via peer.
* bgp_nht.c: Adjust to above.
(bgp_get_nexthop_rn) helper to get the rn.
(bgp_find_nexthop) further helper to get the bnc for path or peer.
(bgp_unlink_nexthop_check) helper to check whether a bnc should go.
(bgp_ensure_nexthop) Use the helpers.
* bgp_{route,fsm}.c: s/bgp_find_or_add_nexthop/bgp_ensure_nexthop/
4 files changed