From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Alvaro Neira Ayuso <alvaroneay@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [libnftnl PATCH 1/4 v2] src: add command tag in json/xml export support
Date: Fri, 30 Jan 2015 19:36:38 +0100 [thread overview]
Message-ID: <20150130183638.GA22598@salvia> (raw)
In-Reply-To: <1422628525-28109-1-git-send-email-alvaroneay@gmail.com>
On Fri, Jan 30, 2015 at 03:35:22PM +0100, Alvaro Neira Ayuso wrote:
> diff --git a/src/chain.c b/src/chain.c
> index 26ad14d..7eb8923 100644
> --- a/src/chain.c
> +++ b/src/chain.c
> @@ -847,12 +847,12 @@ static int nft_chain_snprintf_default(char *buf, size_t size,
> return offset;
> }
>
> -int nft_chain_snprintf(char *buf, size_t size, struct nft_chain *c,
> - uint32_t type, uint32_t flags)
> +int nft_chain_cmd_snprintf(char *buf, size_t size, struct nft_chain *c,
> + uint32_t cmd, uint32_t type, uint32_t flags)
> {
> int ret, len = size, offset = 0;
>
> - ret = nft_event_header_snprintf(buf+offset, len, type, flags);
> + ret = nft_cmd_header_snprintf(buf + offset, len, cmd, type, flags);
> SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
>
> switch (type) {
> @@ -869,15 +869,26 @@ int nft_chain_snprintf(char *buf, size_t size, struct nft_chain *c,
>
> SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
>
> - ret = nft_event_footer_snprintf(buf+offset, len, type, flags);
> + ret = nft_cmd_footer_snprintf(buf + offset, len, cmd, type, flags);
> SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
>
> return offset;
> }
> EXPORT_SYMBOL(nft_chain_snprintf);
This EXPORT_SYMBOL should be nft_chain_cmd_snprintf.
You also have to update the .map file otherwise this new functions
will not be visible to client of this library.
Add to src/libnftnl.map:
LIBNFTNL_1.2.0 {
nft_chin_cmd_snprintf;
...
} LIBNFTNL_1.2;
prev parent reply other threads:[~2015-01-30 18:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-30 14:35 [libnftnl PATCH 1/4 v2] src: add command tag in json/xml export support Alvaro Neira Ayuso
2015-01-30 14:35 ` [libnftnl PATCH 2/4 v2] src: add support to import json/xml with the new syntax Alvaro Neira Ayuso
2015-01-30 18:38 ` Pablo Neira Ayuso
2015-01-30 19:56 ` Pablo Neira Ayuso
2015-01-30 14:35 ` [libnftnl PATCH 3/4 v4] example: Parse and create netlink message using the new parsing functions Alvaro Neira Ayuso
2015-01-30 19:43 ` Pablo Neira Ayuso
2015-01-30 14:35 ` [libnftnl PATCH 4/4 v2] test: update json/xml tests to the new syntax Alvaro Neira Ayuso
2015-01-30 18:38 ` Pablo Neira Ayuso
2015-01-30 18:36 ` 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=20150130183638.GA22598@salvia \
--to=pablo@netfilter.org \
--cc=alvaroneay@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).