From 716048ab2128b9af3e348fec3eefefea6f873be2 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 23 Sep 2015 19:00:33 +0200 Subject: src: add `list chains' command # nft list chains table ip filter { chain test1 { } chain test2 { } chain input { type filter hook input priority 0; policy accept; } } table ip6 filter { chain test1 { } chain input { type filter hook input priority 0; policy accept; } } You can also filter out per family: # nft list chains ip table ip x { chain y { } chain xz { } chain input { type filter hook input priority 0; policy accept; } } # nft list chains ip6 table ip6 filter { chain x { } chain input { type filter hook input priority 0; policy accept; } } This command only shows the chain declarations, so the content (the definition) is omitted. Signed-off-by: Pablo Neira Ayuso Acked-by: Arturo Borrero Gonzalez --- include/rule.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/rule.h') diff --git a/include/rule.h b/include/rule.h index f137a4c8..30b4597d 100644 --- a/include/rule.h +++ b/include/rule.h @@ -270,6 +270,7 @@ enum cmd_ops { * @CMD_OBJ_SETS: multiple sets * @CMD_OBJ_RULE: rule * @CMD_OBJ_CHAIN: chain + * @CMD_OBJ_CHAINS: multiple chains * @CMD_OBJ_TABLE: table * @CMD_OBJ_RULESET: ruleset * @CMD_OBJ_EXPR: expression @@ -283,6 +284,7 @@ enum cmd_obj { CMD_OBJ_SETS, CMD_OBJ_RULE, CMD_OBJ_CHAIN, + CMD_OBJ_CHAINS, CMD_OBJ_TABLE, CMD_OBJ_RULESET, CMD_OBJ_EXPR, -- cgit v1.2.3