From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH libnftnl] libnftnl: export nftnl_set_elem_fprintf
Date: Thu, 20 Aug 2020 17:16:45 +0200 [thread overview]
Message-ID: <20200820151645.29418-1-fw@strlen.de> (raw)
Was not exported so far due to a typo. While at it, add const qualifier
to element structure.
Will be used to optionally dump set contents / elements from nft
frontend.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
include/libnftnl/set.h | 2 +-
src/libnftnl.map | 2 +-
src/set_elem.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/libnftnl/set.h b/include/libnftnl/set.h
index 5138bb99b426..961ce5d7d71d 100644
--- a/include/libnftnl/set.h
+++ b/include/libnftnl/set.h
@@ -142,7 +142,7 @@ int nftnl_set_elem_parse(struct nftnl_set_elem *e, enum nftnl_parse_type type,
int nftnl_set_elem_parse_file(struct nftnl_set_elem *e, enum nftnl_parse_type type,
FILE *fp, struct nftnl_parse_err *err);
int nftnl_set_elem_snprintf(char *buf, size_t size, const struct nftnl_set_elem *s, uint32_t type, uint32_t flags);
-int nftnl_set_elem_fprintf(FILE *fp, struct nftnl_set_elem *se, uint32_t type, uint32_t flags);
+int nftnl_set_elem_fprintf(FILE *fp, const struct nftnl_set_elem *se, uint32_t type, uint32_t flags);
int nftnl_set_elem_foreach(struct nftnl_set *s, int (*cb)(struct nftnl_set_elem *e, void *data), void *data);
diff --git a/src/libnftnl.map b/src/libnftnl.map
index f62640f83e6b..6042479bf903 100644
--- a/src/libnftnl.map
+++ b/src/libnftnl.map
@@ -169,7 +169,7 @@ global:
nftnl_set_elem_parse;
nftnl_set_elem_parse_file;
nftnl_set_elem_snprintf;
- nftnl_set_elem_fprinf;
+ nftnl_set_elem_fprintf;
nftnl_set_elems_nlmsg_build_payload;
nftnl_set_elems_nlmsg_parse;
diff --git a/src/set_elem.c b/src/set_elem.c
index 44213228d827..e82684bc1c53 100644
--- a/src/set_elem.c
+++ b/src/set_elem.c
@@ -706,7 +706,7 @@ static int nftnl_set_elem_do_snprintf(char *buf, size_t size, const void *e,
}
EXPORT_SYMBOL(nftnl_set_elem_fprintf);
-int nftnl_set_elem_fprintf(FILE *fp, struct nftnl_set_elem *se, uint32_t type,
+int nftnl_set_elem_fprintf(FILE *fp, const struct nftnl_set_elem *se, uint32_t type,
uint32_t flags)
{
return nftnl_fprintf(fp, se, NFTNL_CMD_UNSPEC, type, flags,
--
2.26.2
reply other threads:[~2020-08-20 15:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200820151645.29418-1-fw@strlen.de \
--to=fw@strlen.de \
--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).