Re: [libnftnl PATCH 1/2] src: add nft_*_build_msg functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
>  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.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux