diff options
Diffstat (limited to 'bgpd/rfapi/rfapi.c')
| -rw-r--r-- | bgpd/rfapi/rfapi.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c index 355cf92053..a0e9ffbbd0 100644 --- a/bgpd/rfapi/rfapi.c +++ b/bgpd/rfapi/rfapi.c @@ -23,7 +23,7 @@ #include "lib/zebra.h" #include "lib/prefix.h" -#include "lib/table.h" +#include "lib/agg_table.h" #include "lib/vty.h" #include "lib/memory.h" #include "lib/routemap.h" @@ -203,11 +203,11 @@ int rfapi_ip_addr_cmp(struct rfapi_ip_addr *a1, struct rfapi_ip_addr *a2) static int rfapi_find_node(struct bgp *bgp, struct rfapi_ip_addr *vn_addr, struct rfapi_ip_addr *un_addr, - struct route_node **node) + struct agg_node **node) { struct rfapi *h; struct prefix p; - struct route_node *rn; + struct agg_node *rn; int rc; afi_t afi; @@ -228,12 +228,12 @@ static int rfapi_find_node(struct bgp *bgp, struct rfapi_ip_addr *vn_addr, if ((rc = rfapiRaddr2Qprefix(un_addr, &p))) return rc; - rn = route_node_lookup(h->un[afi], &p); + rn = agg_node_lookup(h->un[afi], &p); if (!rn) return ENOENT; - route_unlock_node(rn); + agg_unlock_node(rn); *node = rn; @@ -244,7 +244,7 @@ static int rfapi_find_node(struct bgp *bgp, struct rfapi_ip_addr *vn_addr, int rfapi_find_rfd(struct bgp *bgp, struct rfapi_ip_addr *vn_addr, struct rfapi_ip_addr *un_addr, struct rfapi_descriptor **rfd) { - struct route_node *rn; + struct agg_node *rn; int rc; rc = rfapi_find_node(bgp, vn_addr, un_addr, &rn); @@ -1347,8 +1347,8 @@ static int rfapi_open_inner(struct rfapi_descriptor *rfd, struct bgp *bgp, #define RFD_RTINIT_AFI(rh, ary, afi) \ do { \ if (!ary[afi]) { \ - ary[afi] = route_table_init(); \ - ary[afi]->info = rh; \ + ary[afi] = agg_table_init(); \ + agg_set_table_info(ary[afi], rh); \ } \ } while (0) @@ -1394,7 +1394,7 @@ int rfapi_init_and_open(struct bgp *bgp, struct rfapi_descriptor *rfd, char buf_un[BUFSIZ]; afi_t afi_vn, afi_un; struct prefix pfx_un; - struct route_node *rn; + struct agg_node *rn; rfapi_time(&rfd->open_time); @@ -1423,7 +1423,7 @@ int rfapi_init_and_open(struct bgp *bgp, struct rfapi_descriptor *rfd, assert(afi_vn && afi_un); assert(!rfapiRaddr2Qprefix(&rfd->un_addr, &pfx_un)); - rn = route_node_get(h->un[afi_un], &pfx_un); + rn = agg_node_get(h->un[afi_un], &pfx_un); assert(rn); rfd->next = rn->info; rn->info = rfd; @@ -1535,7 +1535,7 @@ rfapi_query_inner(void *handle, struct rfapi_ip_addr *target, afi_t afi; struct prefix p; struct prefix p_original; - struct route_node *rn; + struct agg_node *rn; struct rfapi_descriptor *rfd = (struct rfapi_descriptor *)handle; struct bgp *bgp = rfd->bgp; struct rfapi_next_hop_entry *pNHE = NULL; @@ -1704,7 +1704,7 @@ rfapi_query_inner(void *handle, struct rfapi_ip_addr *target, } if (rn) { - route_lock_node(rn); /* so we can unlock below */ + agg_lock_node(rn); /* so we can unlock below */ } else { /* * returns locked node. Don't unlock yet because the @@ -1721,7 +1721,7 @@ rfapi_query_inner(void *handle, struct rfapi_ip_addr *target, assert(rn); if (!rn->info) { - route_unlock_node(rn); + agg_unlock_node(rn); vnc_zlog_debug_verbose( "%s: VPN route not found, returning ENOENT", __func__); return ENOENT; @@ -1758,7 +1758,7 @@ rfapi_query_inner(void *handle, struct rfapi_ip_addr *target, &p_original); } - route_unlock_node(rn); + agg_unlock_node(rn); done: if (ppNextHopEntry) { @@ -2170,7 +2170,7 @@ int rfapi_close(void *handle) { struct rfapi_descriptor *rfd = (struct rfapi_descriptor *)handle; int rc; - struct route_node *node; + struct agg_node *node; struct bgp *bgp; struct rfapi *h; @@ -2276,7 +2276,7 @@ int rfapi_close(void *handle) } } } - route_unlock_node(node); + agg_unlock_node(node); } /* |
