summaryrefslogtreecommitdiffstats
path: root/lib/routemap.h
diff options
context:
space:
mode:
authorLakshman Krishnamoorthy <lkrishnamoor@vmware.com>2019-06-04 00:36:02 +0200
committerLakshman Krishnamoorthy <lkrishnamoor@vmware.com>2019-06-04 00:43:02 +0200
commit2789041a46fd0109fa865a64bc1cf4751360f39e (patch)
tree9889aa5c920c47d172a4f6e50f1ff8686be1c8a3 /lib/routemap.h
parentMerge pull request #4451 from donaldsharp/routemap_return (diff)
downloadfrr-2789041a46fd0109fa865a64bc1cf4751360f39e.tar.xz
frr-2789041a46fd0109fa865a64bc1cf4751360f39e.zip
Revert of PR 4078 and PR 4315
Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
Diffstat (limited to 'lib/routemap.h')
-rw-r--r--lib/routemap.h37
1 files changed, 8 insertions, 29 deletions
diff --git a/lib/routemap.h b/lib/routemap.h
index d7acd7f3f..3781d227d 100644
--- a/lib/routemap.h
+++ b/lib/routemap.h
@@ -34,36 +34,15 @@ DECLARE_MTYPE(ROUTE_MAP_NAME)
DECLARE_MTYPE(ROUTE_MAP_RULE)
DECLARE_MTYPE(ROUTE_MAP_COMPILED)
-/*
- * 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--> invalid
- * route-map set retuns okay/error
- * okay --> set was successful
- * error --> set was not successful
- */
-enum route_map_match_result_t {
- /*
- * route-map match cmd results
- */
- RMAP_MATCH,
- RMAP_NOMATCH,
- RMAP_NOOP,
- /*
- * route-map set cmd results
- */
- RMAP_OKAY,
- RMAP_ERROR
-};
-
/* Route map's type. */
enum route_map_type { RMAP_PERMIT, RMAP_DENY, RMAP_ANY };
typedef enum {
+ RMAP_MATCH,
RMAP_DENYMATCH,
- RMAP_PERMITMATCH
+ RMAP_NOMATCH,
+ RMAP_ERROR,
+ RMAP_OKAY
} route_map_result_t;
typedef enum {
@@ -112,10 +91,10 @@ struct route_map_rule_cmd {
const char *str;
/* Function for value set or match. */
- enum route_map_match_result_t (*func_apply)(void *rule,
- const struct prefix *prefix,
- route_map_object_t type,
- void *object);
+ route_map_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 *);