summaryrefslogtreecommitdiff
path: root/lib/routemap.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/routemap.h')
-rw-r--r--lib/routemap.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/routemap.h b/lib/routemap.h
index 70e150c981..05c958967c 100644
--- a/lib/routemap.h
+++ b/lib/routemap.h
@@ -162,6 +162,9 @@ struct route_map_rule_list {
struct route_map_rule *tail;
};
+/* Forward struct declaration: the complete can be found later this file. */
+struct routemap_hook_context;
+
/* Route map index structure. */
struct route_map_index {
struct route_map *map;
@@ -194,6 +197,9 @@ struct route_map_index {
uint64_t applied;
uint64_t applied_clear;
+ /* List of match/sets contexts. */
+ TAILQ_HEAD(, routemap_hook_context) rhclist;
+
QOBJ_FIELDS
};
DECLARE_QOBJ_TYPE(route_map_index)
@@ -660,6 +666,7 @@ struct routemap_hook_context {
route_map_event_t rhc_event;
routemap_set_hook_fun rhc_shook;
routemap_match_hook_fun rhc_mhook;
+ TAILQ_ENTRY(routemap_hook_context) rhc_entry;
};
int lib_route_map_entry_match_destroy(enum nb_event event,
@@ -667,6 +674,10 @@ int lib_route_map_entry_match_destroy(enum nb_event event,
int lib_route_map_entry_set_destroy(enum nb_event event,
const struct lyd_node *dnode);
+struct routemap_hook_context *
+routemap_hook_context_insert(struct route_map_index *rmi);
+void routemap_hook_context_free(struct routemap_hook_context *rhc);
+
extern const struct frr_yang_module_info frr_route_map_info;
/* routemap_cli.c */