path: root/include/libnftnl/expr.h
diff options
authorPatrick McHardy <>2016-04-26 14:16:58 +0100
committerPablo Neira Ayuso <>2016-05-09 22:57:10 +0200
commit600890067c40e1846398db373b9c38b6fe9a16a6 (patch)
treea2419ba0f0a817937bce9ca0f048ec43d24e5b42 /include/libnftnl/expr.h
parent813da08a8bd9d320d6a6a52b3cacc87b8d0ed1f9 (diff)
libnftnl: constify object arguments to various functions
flow table support needs constant object arguments to printing functions to avoid ugly casts. While at it, also constify object arguments to message construction, destructor and a few helper functions. Signed-off-by: Patrick McHardy <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include/libnftnl/expr.h')
1 files changed, 2 insertions, 2 deletions
diff --git a/include/libnftnl/expr.h b/include/libnftnl/expr.h
index da6a251..f192103 100644
--- a/include/libnftnl/expr.h
+++ b/include/libnftnl/expr.h
@@ -17,7 +17,7 @@ enum {
struct nftnl_expr *nftnl_expr_alloc(const char *name);
-void nftnl_expr_free(struct nftnl_expr *expr);
+void nftnl_expr_free(const struct nftnl_expr *expr);
bool nftnl_expr_is_set(const struct nftnl_expr *expr, uint16_t type);
void nftnl_expr_set(struct nftnl_expr *expr, uint16_t type, const void *data, uint32_t data_len);
@@ -36,7 +36,7 @@ uint32_t nftnl_expr_get_u32(const struct nftnl_expr *expr, uint16_t type);
uint64_t nftnl_expr_get_u64(const struct nftnl_expr *expr, uint16_t type);
const char *nftnl_expr_get_str(const struct nftnl_expr *expr, uint16_t type);
-int nftnl_expr_snprintf(char *buf, size_t buflen, struct nftnl_expr *expr, uint32_t type, uint32_t flags);
+int nftnl_expr_snprintf(char *buf, size_t buflen, const struct nftnl_expr *expr, uint32_t type, uint32_t flags);
enum {