]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: add `list chains' command
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 23 Sep 2015 17:00:33 +0000 (19:00 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 12 Oct 2015 18:34:21 +0000 (20:34 +0200)
commit716048ab2128b9af3e348fec3eefefea6f873be2
treef53862e60a607e43d08e514f5ed481f577179573
parentc62df142dcbc3f4123bf3c677abfbe53ce5d9167
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 <pablo@netfilter.org>
Acked-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
include/rule.h
src/evaluate.c
src/parser_bison.y
src/rule.c