summaryrefslogtreecommitdiff
path: root/bgpd/rfapi/vnc_export_bgp.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/rfapi/vnc_export_bgp.c')
-rw-r--r--bgpd/rfapi/vnc_export_bgp.c60
1 files changed, 31 insertions, 29 deletions
diff --git a/bgpd/rfapi/vnc_export_bgp.c b/bgpd/rfapi/vnc_export_bgp.c
index 69426670a1..6289175645 100644
--- a/bgpd/rfapi/vnc_export_bgp.c
+++ b/bgpd/rfapi/vnc_export_bgp.c
@@ -25,7 +25,7 @@
#include "lib/zebra.h"
#include "lib/prefix.h"
-#include "lib/table.h"
+#include "lib/agg_table.h"
#include "lib/vty.h"
#include "lib/log.h"
#include "lib/stream.h"
@@ -54,7 +54,7 @@
static void vnc_direct_add_rn_group_rd(struct bgp *bgp,
struct rfapi_nve_group_cfg *rfg,
- struct route_node *rn, struct attr *attr,
+ struct agg_node *rn, struct attr *attr,
afi_t afi,
struct rfapi_descriptor *irfd);
@@ -172,7 +172,7 @@ static int getce(struct bgp *bgp, struct attr *attr, struct prefix *pfx_ce)
}
-void vnc_direct_bgp_add_route_ce(struct bgp *bgp, struct route_node *rn,
+void vnc_direct_bgp_add_route_ce(struct bgp *bgp, struct agg_node *rn,
struct bgp_info *bi)
{
struct attr *attr = bi->attr;
@@ -327,7 +327,7 @@ void vnc_direct_bgp_add_route_ce(struct bgp *bgp, struct route_node *rn,
/*
* "Withdrawing a Route" export process
*/
-void vnc_direct_bgp_del_route_ce(struct bgp *bgp, struct route_node *rn,
+void vnc_direct_bgp_del_route_ce(struct bgp *bgp, struct agg_node *rn,
struct bgp_info *bi)
{
afi_t afi = family2afi(rn->p.family);
@@ -404,7 +404,7 @@ void vnc_direct_bgp_del_route_ce(struct bgp *bgp, struct route_node *rn,
static void vnc_direct_bgp_vpn_enable_ce(struct bgp *bgp, afi_t afi)
{
- struct route_node *rn;
+ struct agg_node *rn;
struct bgp_info *ri;
vnc_zlog_debug_verbose("%s: entry, afi=%d", __func__, afi);
@@ -430,8 +430,8 @@ static void vnc_direct_bgp_vpn_enable_ce(struct bgp *bgp, afi_t afi)
/*
* Go through entire ce import table and export to BGP unicast.
*/
- for (rn = route_top(bgp->rfapi->it_ce->imported_vpn[afi]); rn;
- rn = route_next(rn)) {
+ for (rn = agg_route_top(bgp->rfapi->it_ce->imported_vpn[afi]); rn;
+ rn = agg_route_next(rn)) {
if (!rn->info)
continue;
@@ -513,7 +513,7 @@ static void vnc_direct_bgp_vpn_disable_ce(struct bgp *bgp, afi_t afi)
* Export methods that proxy nexthop BEGIN
***********************************************************************/
-static struct ecommunity *vnc_route_origin_ecom(struct route_node *rn)
+static struct ecommunity *vnc_route_origin_ecom(struct agg_node *rn)
{
struct ecommunity *new;
struct bgp_info *bi;
@@ -586,8 +586,8 @@ static struct ecommunity *vnc_route_origin_ecom_single(struct in_addr *origin)
static int
encap_attr_export(struct attr *new, struct attr *orig,
struct prefix *new_nexthop,
- struct route_node *rn) /* for VN addrs for ecom list */
- /* if rn is 0, use route's nexthop */
+ struct agg_node *rn) /* for VN addrs for ecom list */
+ /* if rn is 0, use route's nexthop */
{
struct prefix orig_nexthop;
struct prefix *use_nexthop;
@@ -692,7 +692,7 @@ encap_attr_export(struct attr *new, struct attr *orig,
*/
void vnc_direct_bgp_add_prefix(struct bgp *bgp,
struct rfapi_import_table *import_table,
- struct route_node *rn)
+ struct agg_node *rn)
{
struct attr attr = {0};
struct listnode *node, *nnode;
@@ -803,7 +803,7 @@ void vnc_direct_bgp_add_prefix(struct bgp *bgp,
*/
void vnc_direct_bgp_del_prefix(struct bgp *bgp,
struct rfapi_import_table *import_table,
- struct route_node *rn)
+ struct agg_node *rn)
{
struct listnode *node, *nnode;
struct rfapi_rfg_name *rfgn;
@@ -965,8 +965,8 @@ void vnc_direct_bgp_add_nve(struct bgp *bgp, struct rfapi_descriptor *rfd)
*/
if (rfgn->rfg == rfg) {
- struct route_table *rt = NULL;
- struct route_node *rn;
+ struct agg_table *rt = NULL;
+ struct agg_node *rn;
struct attr attr = {0};
struct rfapi_import_table *import_table;
@@ -987,7 +987,8 @@ void vnc_direct_bgp_add_nve(struct bgp *bgp, struct rfapi_descriptor *rfd)
/*
* Walk the NVE-Group's VNC Import table
*/
- for (rn = route_top(rt); rn; rn = route_next(rn)) {
+ for (rn = agg_route_top(rt); rn;
+ rn = agg_route_next(rn)) {
if (rn->info) {
@@ -1111,8 +1112,8 @@ void vnc_direct_bgp_del_nve(struct bgp *bgp, struct rfapi_descriptor *rfd)
*/
if (rfg && rfgn->rfg == rfg) {
- struct route_table *rt = NULL;
- struct route_node *rn;
+ struct agg_table *rt = NULL;
+ struct agg_node *rn;
struct rfapi_import_table *import_table;
import_table = rfg->rfapi_import_table;
@@ -1128,7 +1129,8 @@ void vnc_direct_bgp_del_nve(struct bgp *bgp, struct rfapi_descriptor *rfd)
/*
* Walk the NVE-Group's VNC Import table
*/
- for (rn = route_top(rt); rn; rn = route_next(rn)) {
+ for (rn = agg_route_top(rt); rn;
+ rn = agg_route_next(rn)) {
if (rn->info) {
@@ -1159,7 +1161,7 @@ void vnc_direct_bgp_del_nve(struct bgp *bgp, struct rfapi_descriptor *rfd)
static void vnc_direct_add_rn_group_rd(struct bgp *bgp,
struct rfapi_nve_group_cfg *rfg,
- struct route_node *rn, struct attr *attr,
+ struct agg_node *rn, struct attr *attr,
afi_t afi, struct rfapi_descriptor *irfd)
{
struct prefix nhp;
@@ -1279,8 +1281,8 @@ static void vnc_direct_bgp_add_group_afi(struct bgp *bgp,
struct rfapi_nve_group_cfg *rfg,
afi_t afi)
{
- struct route_table *rt = NULL;
- struct route_node *rn;
+ struct agg_table *rt = NULL;
+ struct agg_node *rn;
struct attr attr = {0};
struct rfapi_import_table *import_table;
@@ -1311,7 +1313,7 @@ static void vnc_direct_bgp_add_group_afi(struct bgp *bgp,
/*
* Walk the NVE-Group's VNC Import table
*/
- for (rn = route_top(rt); rn; rn = route_next(rn)) {
+ for (rn = agg_route_top(rt); rn; rn = agg_route_next(rn)) {
if (rn->info) {
@@ -1366,7 +1368,7 @@ void vnc_direct_bgp_add_group(struct bgp *bgp, struct rfapi_nve_group_cfg *rfg)
static void vnc_direct_del_rn_group_rd(struct bgp *bgp,
struct rfapi_nve_group_cfg *rfg,
- struct route_node *rn, afi_t afi,
+ struct agg_node *rn, afi_t afi,
struct rfapi_descriptor *irfd)
{
if (irfd == NULL)
@@ -1388,8 +1390,8 @@ static void vnc_direct_bgp_del_group_afi(struct bgp *bgp,
struct rfapi_nve_group_cfg *rfg,
afi_t afi)
{
- struct route_table *rt = NULL;
- struct route_node *rn;
+ struct agg_table *rt = NULL;
+ struct agg_node *rn;
struct rfapi_import_table *import_table;
vnc_zlog_debug_verbose("%s: entry", __func__);
@@ -1412,7 +1414,7 @@ static void vnc_direct_bgp_del_group_afi(struct bgp *bgp,
/*
* Walk the NVE-Group's VNC Import table
*/
- for (rn = route_top(rt); rn; rn = route_next(rn))
+ for (rn = agg_route_top(rt); rn; rn = agg_route_next(rn))
if (rn->info) {
if (rfg->type == RFAPI_GROUP_CFG_VRF)
vnc_direct_del_rn_group_rd(bgp, rfg, rn, afi,
@@ -1473,14 +1475,14 @@ void vnc_direct_bgp_reexport_group_afi(struct bgp *bgp,
}
-static void vnc_direct_bgp_unexport_table(afi_t afi, struct route_table *rt,
+static void vnc_direct_bgp_unexport_table(afi_t afi, struct agg_table *rt,
struct list *nve_list)
{
if (nve_list) {
- struct route_node *rn;
+ struct agg_node *rn;
- for (rn = route_top(rt); rn; rn = route_next(rn)) {
+ for (rn = agg_route_top(rt); rn; rn = agg_route_next(rn)) {
if (rn->info) {