]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_table.h
Merge pull request #3370 from pguibert6WIND/default_vrf_initialization
[mirror_frr.git] / bgpd / bgp_table.h
index 60c2cbd4a483c3e646595ebc4434b2f16badd6ff..c267b4fe8ae42ceb69f65d87399280967e45b54a 100644 (file)
@@ -25,6 +25,7 @@
 #include "table.h"
 #include "queue.h"
 #include "linklist.h"
+#include "bgpd.h"
 
 struct bgp_table {
        /* table belongs to this instance */
@@ -67,6 +68,8 @@ struct bgp_node {
 #define BGP_NODE_USER_CLEAR             (1 << 1)
 #define BGP_NODE_LABEL_CHANGED          (1 << 2)
 #define BGP_NODE_REGISTERED_FOR_LABEL   (1 << 3)
+
+       struct bgp_addpath_node_data tx_addpath;
 };
 
 /*
@@ -112,7 +115,7 @@ static inline struct route_node *bgp_node_to_rnode(struct bgp_node *node)
  */
 static inline struct bgp_table *bgp_node_table(struct bgp_node *node)
 {
-       return bgp_node_to_rnode(node)->table->info;
+       return route_table_get_info(bgp_node_to_rnode(node)->table);
 }
 
 /*
@@ -313,4 +316,63 @@ static inline uint64_t bgp_table_version(struct bgp_table *table)
 void bgp_table_range_lookup(const struct bgp_table *table, struct prefix *p,
                            uint8_t maxlen, struct list *matches);
 
+
+static inline struct bgp_aggregate *
+bgp_aggregate_get_node_info(struct bgp_node *node)
+{
+       return node->info;
+}
+
+static inline void bgp_aggregate_set_node_info(struct bgp_node *node,
+                                              struct bgp_aggregate *aggregate)
+{
+       node->info = aggregate;
+}
+
+static inline struct bgp_distance *bgp_distance_get_node(struct bgp_node *node)
+{
+       return node->info;
+}
+
+static inline void bgp_distance_set_node_info(struct bgp_node *node,
+                                             struct bgp_distance *distance)
+{
+       node->info = distance;
+}
+
+static inline struct bgp_static *bgp_static_get_node_info(struct bgp_node *node)
+{
+       return node->info;
+}
+
+static inline void bgp_static_set_node_info(struct bgp_node *node,
+                                           struct bgp_static *bgp_static)
+{
+       node->info = bgp_static;
+}
+
+static inline struct bgp_connected_ref *
+bgp_connected_get_node_info(struct bgp_node *node)
+{
+       return node->info;
+}
+
+static inline void bgp_connected_set_node_info(struct bgp_node *node,
+                                              struct bgp_connected_ref *bc)
+{
+       node->info = bc;
+}
+
+static inline struct bgp_nexthop_cache *
+bgp_nexthop_get_node_info(struct bgp_node *node)
+{
+       return node->info;
+}
+
+static inline void bgp_nexthop_set_node_info(struct bgp_node *node,
+                                            struct bgp_nexthop_cache *bnc)
+{
+       node->info = bnc;
+}
+
 #endif /* _QUAGGA_BGP_TABLE_H */