summaryrefslogtreecommitdiff
path: root/bgpd/bgp_flowspec_vty.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-03-26 19:11:58 -0400
committerDavid Lamparter <equinox@diac24.net>2020-06-23 17:32:52 +0200
commit9bcb3eef541180a17341d1d4510586efc35711db (patch)
tree686e6d7721a180a168cb3353e2c900b63069e6c3 /bgpd/bgp_flowspec_vty.c
parent6d7824f29c4aad88009ac1dfe0491de31c01fcb3 (diff)
bgp: rename bgp_node to bgp_dest
This is the bulk part extracted from "bgpd: Convert from `struct bgp_node` to `struct bgp_dest`". It should not result in any functional change. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_flowspec_vty.c')
-rw-r--r--bgpd/bgp_flowspec_vty.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/bgpd/bgp_flowspec_vty.c b/bgpd/bgp_flowspec_vty.c
index c852e18c46..64a6c2ea8f 100644
--- a/bgpd/bgp_flowspec_vty.c
+++ b/bgpd/bgp_flowspec_vty.c
@@ -391,7 +391,7 @@ int bgp_show_table_flowspec(struct vty *vty, struct bgp *bgp, afi_t afi,
unsigned long *output_cum, unsigned long *total_cum)
{
struct bgp_path_info *pi;
- struct bgp_node *rn;
+ struct bgp_dest *dest;
unsigned long total_count = 0;
json_object *json_paths = NULL;
int display = NLRI_STRING_FORMAT_LARGE;
@@ -399,8 +399,8 @@ int bgp_show_table_flowspec(struct vty *vty, struct bgp *bgp, afi_t afi,
if (type != bgp_show_type_detail)
return CMD_SUCCESS;
- for (rn = bgp_table_top(table); rn; rn = bgp_route_next(rn)) {
- pi = bgp_node_get_bgp_path_info(rn);
+ for (dest = bgp_table_top(table); dest; dest = bgp_route_next(dest)) {
+ pi = bgp_dest_get_bgp_path_info(dest);
if (pi == NULL)
continue;
if (use_json) {
@@ -409,8 +409,8 @@ int bgp_show_table_flowspec(struct vty *vty, struct bgp *bgp, afi_t afi,
}
for (; pi; pi = pi->next) {
total_count++;
- route_vty_out_flowspec(vty, bgp_node_get_prefix(rn), pi,
- display, json_paths);
+ route_vty_out_flowspec(vty, bgp_dest_get_prefix(dest),
+ pi, display, json_paths);
}
if (use_json) {
vty_out(vty, "%s\n",
@@ -553,19 +553,19 @@ extern int bgp_flowspec_display_match_per_ip(afi_t afi, struct bgp_table *rib,
bool use_json,
json_object *json_paths)
{
- struct bgp_node *rn;
+ struct bgp_dest *dest;
const struct prefix *prefix;
int display = 0;
- for (rn = bgp_table_top(rib); rn; rn = bgp_route_next(rn)) {
- prefix = bgp_node_get_prefix(rn);
+ for (dest = bgp_table_top(rib); dest; dest = bgp_route_next(dest)) {
+ prefix = bgp_dest_get_prefix(dest);
if (prefix->family != AF_FLOWSPEC)
continue;
if (bgp_flowspec_contains_prefix(prefix, match, prefix_check)) {
route_vty_out_flowspec(
- vty, prefix, bgp_node_get_bgp_path_info(rn),
+ vty, prefix, bgp_dest_get_bgp_path_info(dest),
use_json ? NLRI_STRING_FORMAT_JSON
: NLRI_STRING_FORMAT_LARGE,
json_paths);