#include "prefix.h"
#include "table.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct agg_table {
struct route_table *route_table;
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)
}
static inline struct agg_node *agg_node_get(struct agg_table *table,
- struct prefix *p)
+ const struct prefix *p)
{
return agg_node_from_rnode(route_node_get(table->route_table, p));
}
static inline struct agg_node *
-agg_node_lookup(const struct agg_table *const table, struct prefix *p)
+agg_node_lookup(const struct agg_table *const table, const struct prefix *p)
{
return agg_node_from_rnode(route_node_lookup(table->route_table, p));
}
}
static inline struct agg_node *agg_node_match(struct agg_table *table,
- struct prefix *p)
+ const struct prefix *p)
{
return agg_node_from_rnode(route_node_match(table->route_table, p));
}
{
return (struct agg_table *)route_table_get_info(node->table);
}
+
+static inline const struct prefix *
+agg_node_get_prefix(const struct agg_node *node)
+{
+ return &node->p;
+}
+
+#ifdef _FRR_ATTRIBUTE_PRINTFRR
+#pragma FRR printfrr_ext "%pRN" (struct agg_node *)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
#endif