path: root/include/ct.h
diff options
authorPhil Sutter <>2018-05-08 13:08:36 +0200
committerPablo Neira Ayuso <>2018-05-11 12:16:57 +0200
commite77b31f53a61a8995cd6baf91a6e557260f401bd (patch)
tree1ee2e9c20c746c8cb66ee5f70ce95c9ebcf8cafc /include/ct.h
parent7feece21f72ebf4633048b2dd447e31da30819fb (diff)
libnftables: Introduce a few helper functions
This adds a bunch of functions for conversion of different values into string (and vice-versa). * log_level_parse(): A simple helper to turn log level string representation into log level value. * nat_etype2str(): Translate nat statement type into string representation. * ct_dir2str(): Convert IP_CT_DIR_* values into string representation. * ct_label2str(): Convert ct_label values into string representation. Signed-off-by: Phil Sutter <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include/ct.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ct.h b/include/ct.h
index dadd820f..4c5bd804 100644
--- a/include/ct.h
+++ b/include/ct.h
@@ -33,6 +33,8 @@ extern void ct_expr_update_type(struct proto_ctx *ctx, struct expr *expr);
extern struct stmt *notrack_stmt_alloc(const struct location *loc);
extern struct stmt *flow_offload_stmt_alloc(const struct location *loc,
const char *table_name);
+extern const char *ct_dir2str(int dir);
+extern const char *ct_label2str(unsigned long value);
extern const struct datatype ct_dir_type;
extern const struct datatype ct_state_type;