From 4b71a4e268409990b32f57adc8a39ce623755f23 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Thu, 25 Jul 2013 22:20:33 +0200 Subject: src: utils: add verdict2str and use it Add verdict2str() and str2verdict() helper functions and use in XML. While at it, I've fixed a small style issue in the data_reg JSON output and a bug in the data_reg XML parser: The parser walked the top level tree, instead of single node. Introduced in (51370f0 src: add support for XML parsing). Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- src/internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/internal.h') diff --git a/src/internal.h b/src/internal.h index fc78233..b846814 100644 --- a/src/internal.h +++ b/src/internal.h @@ -49,6 +49,8 @@ const char *nft_mxml_str_parse(mxml_node_t *tree, const char *node_name, uint32_ const char *nft_family2str(uint32_t family); int nft_str2family(const char *family); int nft_strtoi(const char *string, int base, void *number, enum nft_type type); +const char *nft_verdict2str(uint32_t verdict); +int nft_str2verdict(const char *verdict); struct expr_ops; -- cgit v1.2.3