All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: Netfilter Development Mailing list <netfilter-devel@vger.kernel.org>
Subject: Re: [libnftables PATCH] parsing: add interface to parse from file
Date: Thu, 2 Jan 2014 20:21:02 +0100	[thread overview]
Message-ID: <20140102192102.GA3954@localhost> (raw)
In-Reply-To: <CAOkSjBg9tS38QWAhR+pZsV5639gYneEjApcqBM9t-rW6W9DQsA@mail.gmail.com>

On Thu, Jan 02, 2014 at 07:47:38PM +0100, Arturo Borrero Gonzalez wrote:
> On 2 January 2014 14:52, Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> >
> > Please, rework this to pass a file descriptor instead so it's
> > consistent with _fprintf API and we can use it with pipes as well.
> 
> Should I do a fread() based input?:
> 
> size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
> 
> If so, the API func may look like:
> 
> int nft_chain_fparse(struct nft_chain *c, type, size_t size, FILE *stream);

That interface is fine.

> And then I will need to malloc(size).

Please, explain why you need this.

      reply	other threads:[~2014-01-02 19:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-02 13:21 [libnftables PATCH] parsing: add interface to parse from file Arturo Borrero Gonzalez
2014-01-02 13:52 ` Pablo Neira Ayuso
2014-01-02 18:47   ` Arturo Borrero Gonzalez
2014-01-02 19:21     ` Pablo Neira Ayuso [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=20140102192102.GA3954@localhost \
    --to=pablo@netfilter.org \
    --cc=arturo.borrero.glez@gmail.com \
    --cc=netfilter-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.