diff options
author | Pablo M. Bermudo Garay <pablombg@gmail.com> | 2016-05-31 12:37:06 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-05-31 12:42:05 +0200 |
commit | 69da3095ea38b42e068bab063b046a5016409d6a (patch) | |
tree | 856ba437f543924c7bac8b15b5fde836d71f79dd /src/parser_bison.y | |
parent | aef75641d196ddc199df35092823f178b998a6a3 (diff) |
src: add 'list maps' support
This commit adds a new command that lists maps:
# nft list maps [family]
Only the declaration is displayed. If no family is specified, all maps
of all families are listed.
Example:
# nft list maps
table ip filter {
map test {
type ipv4_addr : inet_service
}
}
table ip6 filter {
map test {
type ipv6_addr : inet_service
}
}
Signed-off-by: Pablo M. Bermudo Garay <pablombg@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r-- | src/parser_bison.y | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y index dfdf2377..59d7fd38 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -178,6 +178,7 @@ static void location_update(struct location *loc, struct location *rhs, int n) %token SET "set" %token ELEMENT "element" %token MAP "map" +%token MAPS "maps" %token HANDLE "handle" %token RULESET "ruleset" @@ -844,6 +845,10 @@ list_cmd : TABLE table_spec { $$ = cmd_alloc(CMD_LIST, CMD_OBJ_FLOWTABLE, &$3, &@$, NULL); } + | MAPS ruleset_spec + { + $$ = cmd_alloc(CMD_LIST, CMD_OBJ_MAPS, &$2, &@$, NULL); + } ; flush_cmd : TABLE table_spec |