summaryrefslogtreecommitdiffstats
path: root/include/json.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/json.h')
-rw-r--r--include/json.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/json.h b/include/json.h
index 66337548..d2dc92d9 100644
--- a/include/json.h
+++ b/include/json.h
@@ -9,9 +9,11 @@ struct expr;
struct netlink_ctx;
struct rule;
struct set;
+struct obj;
struct stmt;
struct symbol_table;
struct table;
+struct netlink_mon_handler;
#ifdef HAVE_LIBJANSSON
@@ -88,6 +90,19 @@ int nft_parse_json_buffer(struct nft_ctx *nft, const char *buf,
int nft_parse_json_filename(struct nft_ctx *nft, const char *filename,
struct list_head *msgs, struct list_head *cmds);
+void monitor_print_table_json(struct netlink_mon_handler *monh,
+ const char *cmd, struct table *t);
+void monitor_print_chain_json(struct netlink_mon_handler *monh,
+ const char *cmd, struct chain *c);
+void monitor_print_set_json(struct netlink_mon_handler *monh,
+ const char *cmd, struct set *s);
+void monitor_print_element_json(struct netlink_mon_handler *monh,
+ const char *cmd, struct set *s);
+void monitor_print_obj_json(struct netlink_mon_handler *monh,
+ const char *cmd, struct obj *o);
+void monitor_print_rule_json(struct netlink_mon_handler *monh,
+ const char *cmd, struct rule *r);
+
#else /* ! HAVE_LIBJANSSON */
typedef void json_t;
@@ -183,6 +198,42 @@ nft_parse_json_filename(struct nft_ctx *nft, const char *filename,
return -EINVAL;
}
+static inline void monitor_print_table_json(struct netlink_mon_handler *monh,
+ const char *cmd, struct table *t)
+{
+ /* empty */
+}
+
+static inline void monitor_print_chain_json(struct netlink_mon_handler *monh,
+ const char *cmd, struct chain *c)
+{
+ /* empty */
+}
+
+static inline void monitor_print_set_json(struct netlink_mon_handler *monh,
+ const char *cmd, struct set *s)
+{
+ /* empty */
+}
+
+static inline void monitor_print_element_json(struct netlink_mon_handler *monh,
+ const char *cmd, struct set *s)
+{
+ /* empty */
+}
+
+static inline void monitor_print_obj_json(struct netlink_mon_handler *monh,
+ const char *cmd, struct obj *o)
+{
+ /* empty */
+}
+
+static inline void monitor_print_rule_json(struct netlink_mon_handler *monh,
+ const char *cmd, struct rule *r)
+{
+ /* empty */
+}
+
#endif /* HAVE_LIBJANSSON */
#endif /* NFTABLES_JSON_H */