netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* libnftables, next steps
@ 2017-10-04 22:51 Phil Sutter
  2017-10-16 10:19 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Sutter @ 2017-10-04 22:51 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Eric Leblond, Pablo Neira Ayuso, Florian Westphal

Hi!

I rebased Eric's libnftables patch series onto current master to get an
overview of what's still missing (and what I could work on :). Here's
what I collected:

* Implement application accessible batch support.
  -> This basically splits nft_run() into stages.
  -> I would change nft_run_cmd_from_*() to use this internally.
  -> Do we want this in the early library version or is this going to be
     part of the 'advanced API' to add later?

* Add erec_free_list().
  -> This becomes handy if the application wants to drop erec list
     without printing it (erec_print_list() clears the list while
     traversing it).
  -> No use for this if we only export nft_run_cmd_from_*() functions.

* Create src/nftables_common.c and include/nftables_common.h to hold
  nft_run() and nft_netlink().
  -> Is this meant as the (not exported) high-level library backend?
  -> If batch support is implemented, these could be removed after
     changing nft_run_cmd_from_*() and cli_complete() to use it.

* Move library routines from src/main.c into src/libnftables.c and
  create include/nftables/nftables.h to hold the signatures.

* Introduce the library (i.e., generate libnftables.so).

Some additional thoughts:

* Should we support different output streams for debug and/or error
  messages?

* Should we reuse src/erec.c for regular output as well? (This probably
  needs a 'print immediately' switch for monitor mode, though.)

Feedback highly appreciated, of course! Should I start with moving the
library stuff into libnftables.{c,h} so we get an impression of what the
API will look like?

Cheers, Phil

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

end of thread, other threads:[~2017-10-16 15:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-04 22:51 libnftables, next steps Phil Sutter
2017-10-16 10:19 ` Pablo Neira Ayuso
2017-10-16 15:45   ` Phil Sutter

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).