summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am1
-rw-r--r--include/common.h11
-rw-r--r--include/expr_ops.h2
-rw-r--r--include/internal.h1
-rw-r--r--include/json.h58
-rw-r--r--include/obj.h2
6 files changed, 0 insertions, 75 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index fd4cb40..01667f5 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -10,7 +10,6 @@ noinst_HEADERS = internal.h \
set.h \
common.h \
expr.h \
- json.h \
set_elem.h \
udata.h \
utils.h
diff --git a/include/common.h b/include/common.h
index 425bbf5..d05a81a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -18,15 +18,4 @@ enum nftnl_parse_input {
NFTNL_PARSE_FILE,
};
-#include <stdio.h>
-
-int nftnl_cmd_header_snprintf(char *buf, size_t bufsize, uint32_t cmd,
- uint32_t format, uint32_t flags);
-int nftnl_cmd_header_fprintf(FILE *fp, uint32_t cmd, uint32_t format,
- uint32_t flags);
-int nftnl_cmd_footer_snprintf(char *buf, size_t bufsize, uint32_t cmd,
- uint32_t format, uint32_t flags);
-int nftnl_cmd_footer_fprintf(FILE *fp, uint32_t cmd, uint32_t format,
- uint32_t flags);
-
#endif
diff --git a/include/expr_ops.h b/include/expr_ops.h
index e639390..00548b3 100644
--- a/include/expr_ops.h
+++ b/include/expr_ops.h
@@ -19,8 +19,6 @@ struct expr_ops {
int (*parse)(struct nftnl_expr *e, struct nlattr *attr);
void (*build)(struct nlmsghdr *nlh, const struct nftnl_expr *e);
int (*snprintf)(char *buf, size_t len, uint32_t type, uint32_t flags, const struct nftnl_expr *e);
- int (*json_parse)(struct nftnl_expr *e, json_t *data,
- struct nftnl_parse_err *err);
};
struct expr_ops *nftnl_expr_ops_lookup(const char *name);
diff --git a/include/internal.h b/include/internal.h
index 7e97c4a..b762a4a 100644
--- a/include/internal.h
+++ b/include/internal.h
@@ -6,7 +6,6 @@
#include "linux_list.h"
#include "utils.h"
#include "common.h"
-#include "json.h"
#include "linux_list.h"
#include "set.h"
#include "set_elem.h"
diff --git a/include/json.h b/include/json.h
deleted file mode 100644
index bd70cec..0000000
--- a/include/json.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef LIBNFTNL_JSON_INTERNAL_H
-#define LIBNFTNL_JSON_INTERNAL_H
-
-#ifdef JSON_PARSING
-#include <jansson.h>
-#include <stdbool.h>
-#include "common.h"
-
-struct nftnl_table;
-struct nftnl_chain;
-struct nftnl_rule;
-struct nftnl_set;
-struct nftnl_set_elem;
-struct nftnl_set_list;
-union nftnl_data_reg;
-
-int nftnl_jansson_parse_val(json_t *root, const char *node_name, int type,
- void *out, struct nftnl_parse_err *err);
-const char *nftnl_jansson_parse_str(json_t *root, const char *node_name,
- struct nftnl_parse_err *err);
-bool nftnl_jansson_node_exist(json_t *root, const char *node_name);
-json_t *nftnl_jansson_create_root(const void *json, json_error_t *error,
- struct nftnl_parse_err *err, enum nftnl_parse_input input);
-json_t *nftnl_jansson_get_node(json_t *root, const char *node_name,
- struct nftnl_parse_err *err);
-void nftnl_jansson_free_root(json_t *root);
-int nftnl_jansson_parse_family(json_t *root, void *out, struct nftnl_parse_err *err);
-int nftnl_jansson_str2num(json_t *root, const char *node_name, int base, void *out,
- enum nftnl_type type, struct nftnl_parse_err *err);
-int nftnl_jansson_parse_reg(json_t *root, const char *node_name, int type,
- void *out, struct nftnl_parse_err *err);
-struct nftnl_expr *nftnl_jansson_expr_parse(json_t *root,
- struct nftnl_parse_err *err,
- struct nftnl_set_list *set_list);
-int nftnl_jansson_data_reg_parse(json_t *root, const char *node_name,
- union nftnl_data_reg *data_reg,
- struct nftnl_parse_err *err);
-int nftnl_jansson_set_elem_parse(struct nftnl_set_elem *e, json_t *root,
- struct nftnl_parse_err *err);
-int nftnl_jansson_parse_table(struct nftnl_table *t, json_t *tree,
- struct nftnl_parse_err *err);
-int nftnl_jansson_parse_chain(struct nftnl_chain *c, json_t *tree,
- struct nftnl_parse_err *err);
-int nftnl_jansson_parse_rule(struct nftnl_rule *r, json_t *tree,
- struct nftnl_parse_err *err,
- struct nftnl_set_list *set_list);
-int nftnl_jansson_parse_set(struct nftnl_set *s, json_t *tree,
- struct nftnl_parse_err *err);
-int nftnl_jansson_parse_elem(struct nftnl_set *s, json_t *tree,
- struct nftnl_parse_err *err);
-
-int nftnl_data_reg_json_parse(union nftnl_data_reg *reg, json_t *data,
- struct nftnl_parse_err *err);
-#else
-#define json_t void
-#endif
-
-#endif /* LIBNFTNL_JSON_INTERNAL_H */
diff --git a/include/obj.h b/include/obj.h
index 435d8a0..35b5c40 100644
--- a/include/obj.h
+++ b/include/obj.h
@@ -93,8 +93,6 @@ struct obj_ops {
int (*parse)(struct nftnl_obj *e, struct nlattr *attr);
void (*build)(struct nlmsghdr *nlh, const struct nftnl_obj *e);
int (*snprintf)(char *buf, size_t len, uint32_t type, uint32_t flags, const struct nftnl_obj *e);
- int (*json_parse)(struct nftnl_obj *e, json_t *data,
- struct nftnl_parse_err *err);
};
extern struct obj_ops obj_ops_counter;