netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [libnftnl PATCH 1/2] src: add nft_*_build_msg functions
Date: Mon, 12 May 2014 18:13:36 +0200	[thread overview]
Message-ID: <20140512161336.GA13099@localhost> (raw)
In-Reply-To: <20140506201936.18158.83354.stgit@nfdev.cica.es>

On Tue, May 06, 2014 at 10:19:36PM +0200, Arturo Borrero Gonzalez wrote:
> These functions are likely to be used by all userspace programs to interact
> with the nftables kernel subsystem.
> 
> Lets put in the library.
> 
> Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
> ---
>  include/libnftnl/chain.h |    2 ++
>  include/libnftnl/rule.h  |    2 ++
>  include/libnftnl/set.h   |    4 ++++
>  include/libnftnl/table.h |    2 ++
>  src/chain.c              |   11 +++++++++++
>  src/libnftnl.map         |    8 ++++++++
>  src/rule.c               |   11 +++++++++++
>  src/set.c                |   11 +++++++++++
>  src/set_elem.c           |   11 +++++++++++
>  src/table.c              |   11 +++++++++++
>  10 files changed, 73 insertions(+)
> 
> diff --git a/include/libnftnl/chain.h b/include/libnftnl/chain.h
> index c11cb5e..eecc7e9 100644
> --- a/include/libnftnl/chain.h
> +++ b/include/libnftnl/chain.h
> @@ -56,6 +56,8 @@ uint64_t nft_chain_attr_get_u64(struct nft_chain *c, uint16_t attr);
>  struct nlmsghdr;
>  
>  void nft_chain_nlmsg_build_payload(struct nlmsghdr *nlh, const struct nft_chain *t);
> +void nft_chain_build_msg(struct nft_chain *c, void *buf, uint16_t msg,
> +			 unsigned int flags, uint32_t seq);

We should return the struct nlmsghdr * there, so we can still use the
_fprintf function from libmnl in case we need to debug the message
that has been made.

      parent reply	other threads:[~2014-05-12 16:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06 20:19 [libnftnl PATCH 1/2] src: add nft_*_build_msg functions Arturo Borrero Gonzalez
2014-05-06 20:19 ` [libnftnl PATCH 2/2] examples: use new nft_*_build_msg() functions Arturo Borrero Gonzalez
2014-05-12 16:15   ` Pablo Neira Ayuso
2014-05-13  8:18     ` Arturo Borrero Gonzalez
2014-05-12 16:13 ` 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=20140512161336.GA13099@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 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).