[PATCH libnftnl] libnftnl: export nftnl_set_elem_fprintf

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

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux