summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/json.h5
-rw-r--r--include/nftables/libnftables.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/include/json.h b/include/json.h
index 0a93bca8..b75512b8 100644
--- a/include/json.h
+++ b/include/json.h
@@ -78,7 +78,7 @@ json_t *connlimit_stmt_json(const struct stmt *stmt, struct output_ctx *octx);
int do_command_list_json(struct netlink_ctx *ctx, struct cmd *cmd);
-int nft_parse_json_buffer(struct nft_ctx *nft, char *buf, size_t buflen,
+int nft_parse_json_buffer(struct nft_ctx *nft, const char *buf,
struct list_head *msgs, struct list_head *cmds);
int nft_parse_json_filename(struct nft_ctx *nft, const char *filename,
struct list_head *msgs, struct list_head *cmds);
@@ -168,11 +168,12 @@ static inline int do_command_list_json(struct netlink_ctx *ctx, struct cmd *cmd)
}
static inline int
-nft_parse_json_buffer(struct nft_ctx *nft, char *buf, size_t buflen,
+nft_parse_json_buffer(struct nft_ctx *nft, const char *buf,
struct list_head *msgs, struct list_head *cmds)
{
return -EINVAL;
}
+
static inline int
nft_parse_json_filename(struct nft_ctx *nft, const char *filename,
struct list_head *msgs, struct list_head *cmds)
diff --git a/include/nftables/libnftables.h b/include/nftables/libnftables.h
index 4bfdaf9a..13ec3927 100644
--- a/include/nftables/libnftables.h
+++ b/include/nftables/libnftables.h
@@ -71,7 +71,7 @@ const char *nft_ctx_get_error_buffer(struct nft_ctx *ctx);
int nft_ctx_add_include_path(struct nft_ctx *ctx, const char *path);
void nft_ctx_clear_include_paths(struct nft_ctx *ctx);
-int nft_run_cmd_from_buffer(struct nft_ctx *nft, char *buf, size_t buflen);
+int nft_run_cmd_from_buffer(struct nft_ctx *nft, const char *buf);
int nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename);
#endif /* LIB_NFTABLES_H */