From f4c87d0a7037188ff69dff29d5154a102230b792 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 8 May 2018 13:08:34 +0200 Subject: libnftables: Make some arrays globally accessible This removes static flag and adds declarations in headers for the following arrays: * ct_templates from src/ct.c * mark_tbl from src/datatype.c * meta_templates and devgroup_tbl from src/meta.c * table_flags_name from src/rule.c * set_stmt_op_names from src/statement.c * tcpopthdr_protocols from src/tcpopt.c Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- src/meta.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/meta.c') diff --git a/src/meta.c b/src/meta.c index 3012efa9..fb94ed40 100644 --- a/src/meta.c +++ b/src/meta.c @@ -334,7 +334,8 @@ const struct datatype pkttype_type = { .sym_tbl = &pkttype_type_tbl, }; -static struct symbol_table *devgroup_tbl; +struct symbol_table *devgroup_tbl = NULL; + void devgroup_table_init(void) { devgroup_tbl = rt_symbol_table_init("/etc/iproute2/group"); @@ -378,7 +379,7 @@ const struct datatype ifname_type = { .basetype = &string_type, }; -static const struct meta_template meta_templates[] = { +const struct meta_template meta_templates[] = { [NFT_META_LEN] = META_TEMPLATE("length", &integer_type, 4 * 8, BYTEORDER_HOST_ENDIAN), [NFT_META_PROTOCOL] = META_TEMPLATE("protocol", ðertype_type, -- cgit v1.2.3