From 4dd0772911a2c92a43d4e4aecf305fba498be106 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 13 Jul 2013 21:21:27 +0200 Subject: expr: use __attribute__((constructor)) to register expression Instead of manual array registration. Signed-off-by: Pablo Neira Ayuso --- src/expr_ops.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/expr_ops.h') diff --git a/src/expr_ops.h b/src/expr_ops.h index 18edfd1..d8a0b36 100644 --- a/src/expr_ops.h +++ b/src/expr_ops.h @@ -14,6 +14,8 @@ struct nft_rule_expr; #endif struct expr_ops { + struct list_head head; + char *name; size_t alloc_len; int max_attr; @@ -25,6 +27,7 @@ struct expr_ops { int (*xml_parse)(struct nft_rule_expr *e, mxml_node_t *tree); }; +void nft_expr_ops_register(struct expr_ops *ops); struct expr_ops *nft_expr_ops_lookup(const char *name); #endif -- cgit v1.2.3