netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [nft PATCH 0/8] nft event monitor
@ 2014-04-14 10:17 Arturo Borrero Gonzalez
  2014-04-14 10:17 ` [nft PATCH 1/8] rule: allow to print sets in plain format Arturo Borrero Gonzalez
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Arturo Borrero Gonzalez @ 2014-04-14 10:17 UTC (permalink / raw)
  To: netfilter-devel; +Cc: pablo

The following series implements a basic nftables monitor via Netlink messages.

Most of the work in first patches is related to refactorization/generalization
of code.

The final patch is the big one.

About the syntax, i'm proposing:
 % nft monitor [added|deleted] [tables|chains|sets|elements|rules] [xml|json]

The straight-forward way of test this new feature is to simply run:
 % nft monitor

Other examples:
 * report new tables in XML format
   % nft monitor added tables xml
 * report deleted elements in standar nft syntax
   % nft monitor deleted elements
 * report all added/deleted rules in JSON format
   % nft monitor rules json

Handling set/set_elems is one of the harders parts of event reporting.
I've succesfully tested many cases (maps, named sets, anon-sets..), but I guess
more tuning can be done in the future, with some additional use and testing
by the community.

Please comment.

regards.
---

Arturo Borrero Gonzalez (8):
      rule: allow to print sets in plain format
      netlink: add netlink_delinearize_set() func
      rule: generalize chain_print()
      netlink: add netlink_delinearize_chain() func
      netlink: add netlink_delinearize_table() func
      netlink: refactorize set_elem conversion from netlink
      netlink: add socket error reporting helper function
      src: add events reporting


 doc/nftables.xml   |    1 
 include/mnl.h      |    3 
 include/netlink.h  |   11 +
 include/nftables.h |    1 
 include/rule.h     |   10 +
 src/evaluate.c     |    1 
 src/mnl.c          |   45 ++-
 src/netlink.c      |  746 ++++++++++++++++++++++++++++++++++++++++++++++------
 src/parser.y       |   90 ++++++
 src/rule.c         |  163 +++++++++++
 src/scanner.l      |    5 
 11 files changed, 957 insertions(+), 119 deletions(-)

-- 
Arturo Borrero Gonzalez

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-04-28 14:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-14 10:17 [nft PATCH 0/8] nft event monitor Arturo Borrero Gonzalez
2014-04-14 10:17 ` [nft PATCH 1/8] rule: allow to print sets in plain format Arturo Borrero Gonzalez
2014-04-14 10:17 ` [nft PATCH 2/8] netlink: add netlink_delinearize_set() func Arturo Borrero Gonzalez
2014-04-14 10:17 ` [nft PATCH 3/8] rule: generalize chain_print() Arturo Borrero Gonzalez
2014-04-14 10:17 ` [nft PATCH 4/8] netlink: add netlink_delinearize_chain() func Arturo Borrero Gonzalez
2014-04-14 10:17 ` [nft PATCH 5/8] netlink: add netlink_delinearize_table() func Arturo Borrero Gonzalez
2014-04-14 10:17 ` [nft PATCH 6/8] netlink: refactorize set_elem conversion from netlink Arturo Borrero Gonzalez
2014-04-14 10:17 ` [nft PATCH 7/8] netlink: add socket error reporting helper function Arturo Borrero Gonzalez
2014-04-14 10:17 ` [nft PATCH 8/8] src: add events reporting Arturo Borrero Gonzalez
2014-04-14 12:28   ` Pablo Neira Ayuso
2014-04-14 12:32 ` [nft PATCH 0/8] nft event monitor Pablo Neira Ayuso
2014-04-14 12:35   ` Patrick McHardy
2014-04-28 14:28 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).