summaryrefslogtreecommitdiff
path: root/lib/routemap.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/routemap.h')
-rw-r--r--lib/routemap.h38
1 files changed, 30 insertions, 8 deletions
diff --git a/lib/routemap.h b/lib/routemap.h
index 90df1048ed..f9ad0f64a9 100644
--- a/lib/routemap.h
+++ b/lib/routemap.h
@@ -38,13 +38,35 @@ DECLARE_MTYPE(ROUTE_MAP_COMPILED)
enum route_map_type { RMAP_PERMIT, RMAP_DENY, RMAP_ANY };
typedef enum {
- RMAP_MATCH,
RMAP_DENYMATCH,
- RMAP_NOMATCH,
- RMAP_ERROR,
- RMAP_OKAY
+ RMAP_PERMITMATCH
} route_map_result_t;
+/*
+ * Route-map match or set result "Eg: match evpn vni xx"
+ * route-map match cmd always returns match/nomatch/noop
+ * match--> found a match
+ * nomatch--> didnt find a match
+ * noop--> not applicable
+ * route-map set retuns okay/error
+ * okay --> set was successful
+ * error --> set was not successful
+ */
+enum route_map_cmd_result_t {
+ /*
+ * route-map match cmd results
+ */
+ RMAP_MATCH,
+ RMAP_NOMATCH,
+ RMAP_NOOP,
+ /*
+ * route-map set cmd results
+ */
+ RMAP_OKAY,
+ RMAP_ERROR
+};
+
+
typedef enum {
RMAP_RIP,
RMAP_RIPNG,
@@ -91,10 +113,10 @@ struct route_map_rule_cmd {
const char *str;
/* Function for value set or match. */
- route_map_result_t (*func_apply)(void *rule,
- const struct prefix *prefix,
- route_map_object_t type,
- void *object);
+ enum route_map_cmd_result_t (*func_apply)(void *rule,
+ const struct prefix *prefix,
+ route_map_object_t type,
+ void *object);
/* Compile argument and return result as void *. */
void *(*func_compile)(const char *);