diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2023-04-05 23:55:13 -0500 | 
|---|---|---|
| committer | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2023-04-18 00:48:16 -0500 | 
| commit | 055355e10432fcbf37038f3116ef7ac388013b3b (patch) | |
| tree | 1b61db7f6ec0cb489d37aad4a7d4975253ed164b /lib/routemap.h | |
| parent | 6af89f8f033b61217322ca1e8fca324f813a1ef5 (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.h')
| -rw-r--r-- | lib/routemap.h | 37 | 
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/routemap.h b/lib/routemap.h index 2197a49e76..770d705837 100644 --- a/lib/routemap.h +++ b/lib/routemap.h @@ -312,6 +312,8 @@ DECLARE_QOBJ_TYPE(route_map);  	(strmatch(A, "frr-route-map:ipv6-next-hop"))  #define IS_SET_METRIC(A)                                                       \  	(strmatch(A, "frr-route-map:set-metric")) +#define IS_SET_MIN_METRIC(A) (strmatch(A, "frr-route-map:set-min-metric")) +#define IS_SET_MAX_METRIC(A) (strmatch(A, "frr-route-map:set-max-metric"))  #define IS_SET_TAG(A) (strmatch(A, "frr-route-map:set-tag"))  #define IS_SET_SR_TE_COLOR(A)                                                  \  	(strmatch(A, "frr-route-map:set-sr-te-color")) @@ -684,6 +686,22 @@ extern void route_map_no_set_metric_hook(  	int (*func)(struct route_map_index *index,  		    const char *command, const char *arg,  		    char *errmsg, size_t errmsg_len)); +/* set metric */ +extern 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)); +/* no set metric */ +extern 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)); +/* set metric */ +extern 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)); +/* no set metric */ +extern 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));  /* set tag */  extern void route_map_set_tag_hook(int (*func)(struct route_map_index *index,  					       const char *command, @@ -920,6 +938,25 @@ struct route_map_match_set_hooks {  	int (*no_set_metric)(struct route_map_index *index,  			     const char *command, const char *arg,  			     char *errmsg, size_t errmsg_len); +	/* set min-metric */ +	int (*set_min_metric)(struct route_map_index *index, +			      const char *command, const char *arg, +			      char *errmsg, size_t errmsg_len); + +	/* no set min-metric */ +	int (*no_set_min_metric)(struct route_map_index *index, +				 const char *command, const char *arg, +				 char *errmsg, size_t errmsg_len); + +	/* set max-metric */ +	int (*set_max_metric)(struct route_map_index *index, +			      const char *command, const char *arg, +			      char *errmsg, size_t errmsg_len); + +	/* no set max-metric */ +	int (*no_set_max_metric)(struct route_map_index *index, +				 const char *command, const char *arg, +				 char *errmsg, size_t errmsg_len);  	/* set tag */  	int (*set_tag)(struct route_map_index *index,  | 
