examples: add nft-ruleset-get
PATCH v2 1/1 examples: add nft-ruleset-get
This example prints the ruleset, using the ruleset API of nftables.
The kernel patch [b63108a] (netfilter: nf_tables: allow to dump sets with NFPROTO_UNSPEC) is required.
---
v1: initial release of this patch.
v2: refreshed against the current status of the lib: common.h, fprintf, etc..
examples/Makefile.am | 4 examples/nft-ruleset-get.c | 389 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 393 insertions(+) create mode 100644 examples/nft-ruleset-get.c
examples/Makefile.am +4 -0
@@ -25,6 +25,7 @@ check_PROGRAMS = nft-table-add \ nft-set-elem-add \ nft-set-elem-get \ nft-set-elem-del \ + nft-ruleset-get \ nft-compat-get nft_table_add_SOURCES = nft-table-add.c
@@ -102,5 +103,8 @@ nft_set_elem_del_LDADD = ../src/libnftables.la ${LIBMNL_LIBS} nft_set_elem_get_SOURCES = nft-set-elem-get.c nft_set_elem_get_LDADD = ../src/libnftables.la ${LIBMNL_LIBS} +nft_ruleset_get_SOURCES = nft-ruleset-get.c +nft_ruleset_get_LDADD = ../src/libnftables.la ${LIBMNL_LIBS} + nft_compat_get_SOURCES = nft-compat-get.c nft_compat_get_LDADD = ../src/libnftables.la ${LIBMNL_LIBS}
examples/nft-ruleset-get.c new file +389 -0
389 lines not on this page · raw message
Quoted 4 lines · Arturo Borrero Gonzalez
This example prints the ruleset, using the ruleset API of nftables.
The kernel patch [b63108a] (netfilter:
nf_tables: allow to dump sets withNFPROTO_UNSPEC) is required.
Updated this to point to c9c8e48 ("netfilter: nf_tables: dump sets in all existing families").
Applied to -next, thanks Arturo.
Quoted 10 lines · Pablo Neira Ayuso
Quoted 4 lines · Arturo Borrero Gonzalez
This example prints the ruleset, using the ruleset API of nftables.
The kernel patch [b63108a] (netfilter:
nf_tables: allow to dump sets withNFPROTO_UNSPEC) is required.Updated this to point to c9c8e48 ("netfilter:
nf_tables: dump sets in all existing families").Applied to -next, thanks Arturo.
I don't see the kernel patch applied [0].
Have you applied it, or have plans to do so? If applied, please, could you point me to the right tree?
[0] http://git.kernel.org/cgit/linux/kernel/git/pablo/nftables.git/log/
Signature · 5 lines
Arturo Borrero González -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Pablo Neira Ayuso
maintainerQuoted 10 lines · Arturo Borrero Gonzalez
Quoted 9 lines · Pablo Neira Ayuso
Quoted 4 lines · Arturo Borrero Gonzalez
This example prints the ruleset, using the ruleset API of nftables.
The kernel patch [b63108a] (netfilter:
nf_tables: allow to dump sets withNFPROTO_UNSPEC) is required.Updated this to point to c9c8e48 ("netfilter:
nf_tables: dump sets in all existing families").
Quoted 6 lines
Quoted 1 line
Applied to -next, thanks Arturo.
I don't see the kernel patch applied [0].
Have you applied it, or have plans to do so? If applied, please, could you point me to the right tree?
It's there, the one at the HEAD:
Quoted 3 lines
[0] http://git.kernel.org/cgit/linux/kernel/git/pablo/nftables.git/log/
Signature · 1 line
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Pablo Neira Ayuso
It's there, the one at the HEAD:
i'm buying glasses B-)
thanks
Signature · 5 lines
Arturo Borrero González -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html