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. --- include/libipset/types.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/libipset/types.h') diff --git a/include/libipset/types.h b/include/libipset/types.h index 950988f..1fd3f92 100644 --- a/include/libipset/types.h +++ b/include/libipset/types.h @@ -107,4 +107,16 @@ extern bool ipset_match_typename(const char *str, const struct ipset_type *t); extern void ipset_load_types(void); +extern void ipset_types_init(void); + +#ifdef TYPE_INCLUSIVE +# ifdef _INIT +# undef _init +# define _init _INIT +# endif +#else +# undef _init +# define _init __attribute__((constructor)) _INIT +#endif + #endif /* LIBIPSET_TYPES_H */ -- cgit v1.2.3