{
this->public.ike_sa_manager->flush(this->public.ike_sa_manager);
}
+ if (this->public.traps)
+ {
+ this->public.traps->flush(this->public.traps);
+ }
DESTROY_IF(this->public.receiver);
DESTROY_IF(this->public.sender);
/* unload plugins to release threads */
}
}
+METHOD(trap_manager_t, flush, void,
+ private_trap_manager_t *this)
+{
+ this->traps->invoke_function(this->traps, (void*)destroy_entry);
+}
+
METHOD(trap_manager_t, destroy, void,
private_trap_manager_t *this)
{
.uninstall = _uninstall,
.create_enumerator = _create_enumerator,
.acquire = _acquire,
+ .flush = _flush,
.destroy = _destroy,
},
.listener = {
traffic_selector_t *src, traffic_selector_t *dst);
/**
+ * Clear any installed trap.
+ */
+ void (*flush)(trap_manager_t *this);
+
+ /**
* Destroy a trap_manager_t.
*/
void (*destroy)(trap_manager_t *this);