Migrated kernel_klips_plugin_t to INIT/METHOD macros

This commit is contained in:
Andreas Steffen
2010-11-25 23:06:20 +01:00
parent a76ad38365
commit c6753bd4a7
@@ -32,10 +32,8 @@ struct private_kernel_klips_plugin_t {
kernel_klips_plugin_t public; kernel_klips_plugin_t public;
}; };
/** METHOD(plugin_t, destroy, void,
* Implementation of plugin_t.destroy private_kernel_klips_plugin_t *this)
*/
static void destroy(private_kernel_klips_plugin_t *this)
{ {
hydra->kernel_interface->remove_ipsec_interface(hydra->kernel_interface, hydra->kernel_interface->remove_ipsec_interface(hydra->kernel_interface,
(kernel_ipsec_constructor_t)kernel_klips_ipsec_create); (kernel_ipsec_constructor_t)kernel_klips_ipsec_create);
@@ -49,8 +47,13 @@ plugin_t *kernel_klips_plugin_create()
{ {
private_kernel_klips_plugin_t *this = malloc_thing(private_kernel_klips_plugin_t); private_kernel_klips_plugin_t *this = malloc_thing(private_kernel_klips_plugin_t);
this->public.plugin.destroy = (void(*)(plugin_t*))destroy; INIT(this,
.public = {
.plugin = {
.destroy = _destroy,
}
}
);
hydra->kernel_interface->add_ipsec_interface(hydra->kernel_interface, hydra->kernel_interface->add_ipsec_interface(hydra->kernel_interface,
(kernel_ipsec_constructor_t)kernel_klips_ipsec_create); (kernel_ipsec_constructor_t)kernel_klips_ipsec_create);