summaryrefslogtreecommitdiff
path: root/lib/routemap.c
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2023-04-05 23:55:13 -0500
committerJafar Al-Gharaibeh <jafar@atcorp.com>2023-04-18 00:48:16 -0500
commit055355e10432fcbf37038f3116ef7ac388013b3b (patch)
tree1b61db7f6ec0cb489d37aad4a7d4975253ed164b /lib/routemap.c
parent6af89f8f033b61217322ca1e8fca324f813a1ef5 (diff)
lib, ospfd, yang: add route map set for min/max metric
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Diffstat (limited to 'lib/routemap.c')
-rw-r--r--lib/routemap.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/routemap.c b/lib/routemap.c
index 20dcd2a53d..39455841e3 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -394,6 +394,40 @@ void route_map_no_set_metric_hook(int (*func)(struct route_map_index *index,
{
rmap_match_set_hook.no_set_metric = func;
}
+/* set min-metric */
+void route_map_set_min_metric_hook(int (*func)(struct route_map_index *index,
+ const char *command,
+ const char *arg, char *errmsg,
+ size_t errmsg_len))
+{
+ rmap_match_set_hook.set_min_metric = func;
+}
+
+/* no set min-metric */
+void route_map_no_set_min_metric_hook(int (*func)(struct route_map_index *index,
+ const char *command,
+ const char *arg, char *errmsg,
+ size_t errmsg_len))
+{
+ rmap_match_set_hook.no_set_min_metric = func;
+}
+/* set max-metric */
+void route_map_set_max_metric_hook(int (*func)(struct route_map_index *index,
+ const char *command,
+ const char *arg, char *errmsg,
+ size_t errmsg_len))
+{
+ rmap_match_set_hook.set_max_metric = func;
+}
+
+/* no set max-metric */
+void route_map_no_set_max_metric_hook(int (*func)(struct route_map_index *index,
+ const char *command,
+ const char *arg, char *errmsg,
+ size_t errmsg_len))
+{
+ rmap_match_set_hook.no_set_max_metric = func;
+}
/* set tag */
void route_map_set_tag_hook(int (*func)(struct route_map_index *index,