]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/agg_table.h
Merge pull request #5590 from qlyoung/fix-nhrp-underflow
[mirror_frr.git] / lib / agg_table.h
index 65d4137bc27a26a6e7e4fb89d79bbd11d49a9e22..40ffe8c7552873e4a0f17f0b9b943d2162e3ee88 100644 (file)
 #include "prefix.h"
 #include "table.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct agg_table {
        struct route_table *route_table;
 
@@ -37,6 +41,8 @@ struct agg_node {
         */
        ROUTE_NODE_FIELDS
 
+       /* Aggregation. */
+       void *aggregate;
 };
 
 static inline struct route_node *agg_node_to_rnode(struct agg_node *node)
@@ -56,7 +62,7 @@ static inline struct agg_node *agg_lock_node(struct agg_node *node)
 
 static inline void agg_unlock_node(struct agg_node *node)
 {
-       return route_unlock_node(agg_node_to_rnode(node));
+       route_unlock_node(agg_node_to_rnode(node));
 }
 
 static inline void agg_set_table_info(struct agg_table *atable, void *data)
@@ -146,6 +152,11 @@ static inline struct agg_node *agg_route_table_top(struct agg_node *node)
 
 static inline struct agg_table *agg_get_table(struct agg_node *node)
 {
-       return (struct agg_table *)node->table->info;
+       return (struct agg_table *)route_table_get_info(node->table);
+}
+
+#ifdef __cplusplus
 }
 #endif
+
+#endif