From abbb6a0dd4c8e39944bb4655c00945e3d24f2e60 Mon Sep 17 00:00:00 2001 From: "Pablo M. Bermudo Garay" Date: Tue, 31 May 2016 12:37:07 +0200 Subject: src: add support for display maps content This commit adds a new command that displays the definition of a single map: # nft list map [family] If no family is specified, ip is assumed. Example: # nft list map ip6 filter test table ip6 filter { map test { type ipv6_addr : inet_service elements = { 2001:db8::ff00:42:8329 : http} } } Signed-off-by: Pablo M. Bermudo Garay Signed-off-by: Pablo Neira Ayuso --- src/parser_bison.y | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/parser_bison.y') diff --git a/src/parser_bison.y b/src/parser_bison.y index 59d7fd38..d7cba238 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -849,6 +849,10 @@ list_cmd : TABLE table_spec { $$ = cmd_alloc(CMD_LIST, CMD_OBJ_MAPS, &$2, &@$, NULL); } + | MAP set_spec + { + $$ = cmd_alloc(CMD_LIST, CMD_OBJ_MAP, &$2, &@$, NULL); + } ; flush_cmd : TABLE table_spec -- cgit v1.2.3