Skip to contentSkip to conversation

examples: add nft-ruleset-get

PATCH Applied Arturo Borrero Gonzalez 2 participants 5 messages Dec 23, 2013 – Jan 6, 2014 netfilter

lore
Share & tools
lore
#0 lore raw

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
index 9965387..b909684 100644
@@ -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

maintainer Applied
#1 lore raw
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 with NFPROTO_UNSPEC) is required.

Updated this to point to c9c8e48 ("netfilter: nf_tables: dump sets in all existing families").

Applied to -next, thanks Arturo.

#2 lore raw
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 with NFPROTO_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
#3 lore raw
Quoted 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 with NFPROTO_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:

http://git.kernel.org/cgit/linux/kernel/git/pablo/nftables.git/commit/?id=c9c8e485978a308c8a359140da187d55120f8fee

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

#4 lore raw
Quoted 5 lines · Pablo Neira Ayuso

It's there, the one at the HEAD:

http://git.kernel.org/cgit/linux/kernel/git/pablo/nftables.git/commit/?id=c9c8e485978a308c8a359140da187d55120f8fee

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