diff options
author | Matias Elo <matias.elo@nokia.com> | 2020-11-11 16:10:23 +0200 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2020-11-13 16:39:08 +0200 |
commit | ac88db114d8c83626fce36d1d57aedc11dc12547 (patch) | |
tree | 6e6a0fe8409eaf8e13ddf0dcbdc927edc216c38d /example | |
parent | 9adf28c6387587a1106032868f4efb0d93cb83b6 (diff) |
example: cls: add support for ODP_PMR_DIP_ADDR
Add support for destination IPv4 address PMR term.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'example')
-rw-r--r-- | example/classifier/odp_classifier.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c index ef7b829e1..cdc04aea1 100644 --- a/example/classifier/odp_classifier.c +++ b/example/classifier/odp_classifier.c @@ -797,6 +797,9 @@ static int convert_str_to_pmr_enum(char *token, odp_cls_pmr_term_t *term) } else if (strcasecmp(token, "ODP_PMR_TCP_SPORT") == 0) { *term = ODP_PMR_TCP_SPORT; return 0; + } else if (strcasecmp(token, "ODP_PMR_DIP_ADDR") == 0) { + *term = ODP_PMR_DIP_ADDR; + return 0; } else if (strcasecmp(token, "ODP_PMR_SIP_ADDR") == 0) { *term = ODP_PMR_SIP_ADDR; return 0; @@ -891,6 +894,8 @@ static int parse_pmr_policy(appl_args_t *appl_args, char *optarg) stats[policy_count].rule.val_sz = 2; break; + case ODP_PMR_DIP_ADDR: + /* Fall through */ case ODP_PMR_SIP_ADDR: /* :<IP addr>:<mask> */ token = strtok(NULL, ":"); |