path: root/include/netlink.h
diff options
authorArturo Borrero <>2014-04-16 18:43:17 +0200
committerPablo Neira Ayuso <>2014-04-25 17:45:33 +0200
commitf9563c0feb24d40036467ac8a3b7e9f41950df1e (patch)
treef08d0f160ef638cca8a6734ada140cccab208a6e /include/netlink.h
parent1be55ff3a9866cbee8fcde8d8f9425cb3d8af05d (diff)
src: add events reporting
This patch adds a basic events reporting option to nft. The syntax is: % nft monitor [new|destroy] [tables|chains|rules|sets|elements] [xml|json] Signed-off-by: Arturo Borrero Gonzalez <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include/netlink.h')
1 files changed, 10 insertions, 0 deletions
diff --git a/include/netlink.h b/include/netlink.h
index 1fb03562..eca4a483 100644
--- a/include/netlink.h
+++ b/include/netlink.h
@@ -136,6 +136,7 @@ extern void netlink_dump_expr(struct nft_rule_expr *nle);
extern void netlink_dump_set(struct nft_set *nls);
extern int netlink_batch_send(struct list_head *err_list);
+extern void netlink_abi_error(void) __noreturn;
extern int netlink_io_error(struct netlink_ctx *ctx,
const struct location *loc, const char *fmt, ...);
extern void netlink_open_error(void) __noreturn;
@@ -143,4 +144,13 @@ extern void netlink_open_error(void) __noreturn;
extern struct nft_ruleset *netlink_dump_ruleset(struct netlink_ctx *ctx,
const struct handle *h,
const struct location *loc);
+struct netlink_mon_handler {
+ uint32_t monitor_flags;
+ uint32_t format;
+ struct netlink_ctx *ctx;
+ const struct location *loc;
+ bool cache_needed;
+extern int netlink_monitor(struct netlink_mon_handler *monhandler);