From 2da431d3685c65d4355d387e213a3cd39d5b59f3 Mon Sep 17 00:00:00 2001 From: Neutron Soutmun Date: Thu, 10 May 2012 08:05:53 +0200 Subject: Add dynamic module support to ipset userspace tool The patch adds supporting dynamic modules for the set types to ipset userspace tool. The dynamic module support can be enabled by the --enable-settype-modules of "configure". The list of set types to be compiled as dynamic modules can be specified in the --with-settype-modules-list option. Example --enable-settype-modules \ --with-settype-modules-list="ipset_hash_ip ipset_hash_ipport" The keyword "all" can be used to compile all set types as dynamic modules. --- lib/ipset_list_set.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/ipset_list_set.c') diff --git a/lib/ipset_list_set.c b/lib/ipset_list_set.c index 67c29b6..dc0bf53 100644 --- a/lib/ipset_list_set.c +++ b/lib/ipset_list_set.c @@ -46,7 +46,7 @@ static const char list_set_usage[] = "test SETNAME NAME [before|after NAME]\n\n" "where NAME are existing set names.\n"; -struct ipset_type ipset_list_set0 = { +static struct ipset_type ipset_list_set0 = { .name = "list:set", .alias = { "setlist", NULL }, .revision = 0, @@ -89,3 +89,8 @@ struct ipset_type ipset_list_set0 = { .usage = list_set_usage, }; + +void _init(void) +{ + ipset_type_add(&ipset_list_set0); +} -- cgit v1.2.3