Add a load-tester control socket to manually trigger initiation
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "load_tester_creds.h"
|
||||
#include "load_tester_ipsec.h"
|
||||
#include "load_tester_listener.h"
|
||||
#include "load_tester_control.h"
|
||||
#include "load_tester_diffie_hellman.h"
|
||||
|
||||
#include <unistd.h>
|
||||
@@ -50,6 +51,11 @@ struct private_load_tester_plugin_t {
|
||||
*/
|
||||
load_tester_creds_t *creds;
|
||||
|
||||
/**
|
||||
* Unix control socket to initiate load-tests
|
||||
*/
|
||||
load_tester_control_t *control;
|
||||
|
||||
/**
|
||||
* event handler, listens on bus
|
||||
*/
|
||||
@@ -181,6 +187,7 @@ static bool register_load_tester(private_load_tester_plugin_t *this,
|
||||
|
||||
this->config = load_tester_config_create();
|
||||
this->creds = load_tester_creds_create();
|
||||
this->control = load_tester_control_create();
|
||||
|
||||
charon->backends->add_backend(charon->backends, &this->config->backend);
|
||||
lib->credmgr->add_set(lib->credmgr, &this->creds->credential_set);
|
||||
@@ -215,6 +222,7 @@ static bool register_load_tester(private_load_tester_plugin_t *this,
|
||||
this->config->destroy(this->config);
|
||||
this->creds->destroy(this->creds);
|
||||
this->listener->destroy(this->listener);
|
||||
this->control->destroy(this->control);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user