#include "queue.h"
#include "nexthop.h"
#include "bgp_table.h"
+#include "bgp_addpath_types.h"
struct bgp_nexthop_cache;
struct bgp_route_evpn;
/* Addpath identifiers */
uint32_t addpath_rx_id;
- uint32_t addpath_tx_id;
+ struct bgp_addpath_info_data tx_addpath;
};
/* Structure used in BGP path selection */
}
/* Prototypes. */
-extern void bgp_rib_remove(struct bgp_node *rn, struct bgp_path_info *ri,
+extern void bgp_rib_remove(struct bgp_node *rn, struct bgp_path_info *pi,
struct peer *peer, afi_t afi, safi_t safi);
extern void bgp_process_queue_init(void);
extern void bgp_route_init(void);
extern struct bgp_node *bgp_afi_node_get(struct bgp_table *table, afi_t afi,
safi_t safi, struct prefix *p,
struct prefix_rd *prd);
-extern struct bgp_path_info *bgp_info_lock(struct bgp_path_info *path);
-extern struct bgp_path_info *bgp_info_unlock(struct bgp_path_info *path);
-extern void bgp_info_add(struct bgp_node *rn, struct bgp_path_info *ri);
-extern void bgp_info_reap(struct bgp_node *rn, struct bgp_path_info *ri);
-extern void bgp_info_delete(struct bgp_node *rn, struct bgp_path_info *ri);
+extern struct bgp_path_info *bgp_path_info_lock(struct bgp_path_info *path);
+extern struct bgp_path_info *bgp_path_info_unlock(struct bgp_path_info *path);
+extern void bgp_path_info_add(struct bgp_node *rn, struct bgp_path_info *pi);
+extern void bgp_path_info_extra_free(struct bgp_path_info_extra **extra);
+extern void bgp_path_info_reap(struct bgp_node *rn, struct bgp_path_info *pi);
+extern void bgp_path_info_delete(struct bgp_node *rn, struct bgp_path_info *pi);
extern struct bgp_path_info_extra *
-bgp_info_extra_get(struct bgp_path_info *path);
-extern void bgp_info_set_flag(struct bgp_node *rn, struct bgp_path_info *path,
- uint32_t flag);
-extern void bgp_info_unset_flag(struct bgp_node *rn, struct bgp_path_info *path,
- uint32_t flag);
-extern void bgp_info_path_with_addpath_rx_str(struct bgp_path_info *ri,
- char *buf);
+bgp_path_info_extra_get(struct bgp_path_info *path);
+extern void bgp_path_info_set_flag(struct bgp_node *rn,
+ struct bgp_path_info *path, uint32_t flag);
+extern void bgp_path_info_unset_flag(struct bgp_node *rn,
+ struct bgp_path_info *path, uint32_t flag);
+extern void bgp_path_info_path_with_addpath_rx_str(struct bgp_path_info *pi,
+ char *buf);
extern int bgp_nlri_parse_ip(struct peer *, struct attr *, struct bgp_nlri *);
struct attr *attr, safi_t safi, bool use_json,
json_object *json_ar);
extern void route_vty_out_overlay(struct vty *vty, struct prefix *p,
- struct bgp_path_info *binfo, int display,
+ struct bgp_path_info *path, int display,
json_object *json);
extern int subgroup_process_announce_selected(struct update_subgroup *subgrp,
uint32_t addpath_tx_id);
extern int subgroup_announce_check(struct bgp_node *rn,
- struct bgp_path_info *ri,
+ struct bgp_path_info *pi,
struct update_subgroup *subgrp,
struct prefix *p, struct attr *attr);
extern struct bgp_node *bgp_afi_node_lookup(struct bgp_table *table, afi_t afi,
safi_t safi, struct prefix *p,
struct prefix_rd *prd);
-extern struct bgp_path_info *bgp_info_new(void);
-extern void bgp_info_restore(struct bgp_node *rn, struct bgp_path_info *path);
-
-extern int bgp_info_cmp_compatible(struct bgp *bgp, struct bgp_path_info *new,
- struct bgp_path_info *exist, char *pfx_buf,
- afi_t afi, safi_t safi);
+extern struct bgp_path_info *bgp_path_info_new(void);
+extern void bgp_path_info_restore(struct bgp_node *rn,
+ struct bgp_path_info *path);
+
+extern int bgp_path_info_cmp_compatible(struct bgp *bgp,
+ struct bgp_path_info *new,
+ struct bgp_path_info *exist,
+ char *pfx_buf, afi_t afi, safi_t safi);
extern void bgp_attr_add_gshut_community(struct attr *attr);
extern void bgp_best_selection(struct bgp *bgp, struct bgp_node *rn,
struct prefix_rd *prd, afi_t afi,
safi_t safi, json_object *json);
extern void route_vty_out_detail(struct vty *vty, struct bgp *bgp,
- struct prefix *p, struct bgp_path_info *binfo,
+ struct prefix *p, struct bgp_path_info *path,
afi_t afi, safi_t safi,
json_object *json_paths);
extern int bgp_show_table_rd(struct vty *vty, struct bgp *bgp, safi_t safi,