netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, Eric Leblond <eric@regit.org>,
	Florian Westphal <fw@strlen.de>
Subject: Re: libnftables, next steps
Date: Mon, 16 Oct 2017 17:45:59 +0200	[thread overview]
Message-ID: <20171016154559.GQ11332@orbyte.nwl.cc> (raw)
In-Reply-To: <20171016101904.GA32102@salvia>

Hi Pablo,

On Mon, Oct 16, 2017 at 12:19:51PM +0200, Pablo Neira Ayuso wrote:
> On Thu, Oct 05, 2017 at 12:51:52AM +0200, Phil Sutter wrote:
[...]
> > * Create src/nftables_common.c and include/nftables_common.h to hold
> >   nft_run() and nft_netlink().
> 
> Why not just place this in src/libnftables.c?

Sounds reasonable. I was merely wondering why Eric chose to distribute
things this way.

[..]
> > Some additional thoughts:
> > 
> > * Should we support different output streams for debug and/or error
> >   messages?
> 
> What usecase you have in mind for this?

This was just me speculating about advanced API features. Assuming that
in future, applications would be able to replicate nft_run_cmd_from_*()
functions in their own code, it might be useful for them to configure
different streams for debug/error messages to treat them differently
from "regular" output. But I guess we best just ignore that until
someone actually provides a use-case for it.

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

This was just an idea as well, no actual use-case in mind. The nice
thing about error records is that they may be typed (erec->type) and
separate messages stay separate. Right now, applications get everything
in a single buffer and using erec would allow them to distinguish
between different messages without parsing for newlines or the like. But
yeah, maybe just keep in mind for later.

> > 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?
> 
> I think Eric doesn't have time at this stage, so if you can take his
> patches, revamp and resubmit, that would be great.

Will do, thanks for your feedback!

Cheers, Phil

      reply	other threads:[~2017-10-16 15:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171016154559.GQ11332@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=eric@regit.org \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).