]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_route.h
zebra: Refactor kernel_rtm to be a bit smarter about how it handles options
[mirror_frr.git] / bgpd / bgp_route.h
index e9e282d37154920a01a7fedf1c7bb85ed6ff4450..0b3a203af760299d67bdb7c47dfb03b91978ac23 100644 (file)
@@ -24,6 +24,7 @@
 #include "queue.h"
 #include "nexthop.h"
 #include "bgp_table.h"
+#include "bgp_addpath_types.h"
 
 struct bgp_nexthop_cache;
 struct bgp_route_evpn;
@@ -220,7 +221,7 @@ struct bgp_path_info {
 
        /* 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 */
@@ -339,7 +340,7 @@ static inline int bgp_fibupd_safi(safi_t safi)
 }
 
 /* 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);
@@ -358,19 +359,20 @@ extern void bgp_clear_stale_route(struct peer *, afi_t, safi_t);
 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 *);
 
@@ -452,7 +454,7 @@ extern void route_vty_out_tmp(struct vty *vty, struct prefix *p,
                              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,
@@ -461,7 +463,7 @@ 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);
 
@@ -472,12 +474,14 @@ extern void bgp_process_queues_drain_immediate(void);
 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,
@@ -493,7 +497,7 @@ extern void route_vty_out_detail_header(struct vty *vty, struct bgp *bgp,
                                        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,