From 795d88cb710512d9b85afbb17beaeec3d92dcd54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Falgueras=20Garc=C3=ADa?= Date: Tue, 22 Mar 2016 20:46:27 +0100 Subject: rule: Use libnftnl user data TLV infrastructure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now it is possible to store multiple variable length user data into rule. Modify the parser in order to fill the nftnl_udata with the comment, and the print function for extract these commentary and print it to user. Signed-off-by: Carlos Falgueras GarcĂ­a Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/rule.h') diff --git a/include/rule.h b/include/rule.h index cfe33a73..6dbde130 100644 --- a/include/rule.h +++ b/include/rule.h @@ -418,4 +418,10 @@ extern int do_command(struct netlink_ctx *ctx, struct cmd *cmd); extern int cache_update(enum cmd_ops cmd, struct list_head *msgs); extern void cache_release(void); +enum udata_type { + UDATA_TYPE_COMMENT, + __UDATA_TYPE_MAX, +}; +#define UDATA_TYPE_MAX (__UDATA_TYPE_MAX - 1) + #endif /* NFTABLES_RULE_H */ -- cgit v1.2.3