* timestamp of daemon start
*/
time_t uptime;
+
+ /**
+ * strokes attribute provider
+ */
+ stroke_attribute_t *attribute;
};
/**
if (all)
{
peer_cfg_t *peer_cfg;
- char *plugin;
+ char *plugin, *name;
host_t *host;
u_int32_t dpd;
time_t uptime = time(NULL) - this->uptime;
-
+ bool first = TRUE;
+ u_int size, online, offline;
+
fprintf(out, "Performance:\n");
fprintf(out, " uptime: %V, since %#T\n", &uptime, &this->uptime, FALSE);
fprintf(out, " worker threads: %d idle of %d,",
enumerator->destroy(enumerator);
fprintf(out, "\n");
+ enumerator = this->attribute->create_pool_enumerator(this->attribute);
+ while (enumerator->enumerate(enumerator, &name, &size, &online, &offline))
+ {
+ if (first)
+ {
+ first = FALSE;
+ fprintf(out, "Virtual IP pools (size/online/offline):\n");
+ }
+ fprintf(out, " %s: %lu/%lu/%lu\n", name, size, online, offline);
+ }
+ enumerator->destroy(enumerator);
+
enumerator = charon->kernel_interface->create_address_enumerator(
charon->kernel_interface, FALSE, FALSE);
fprintf(out, "Listening IP addresses:\n");
/*
* see header file
*/
-stroke_list_t *stroke_list_create()
+stroke_list_t *stroke_list_create(stroke_attribute_t *attribute)
{
private_stroke_list_t *this = malloc_thing(private_stroke_list_t);
this->public.destroy = (void(*)(stroke_list_t*))destroy;
this->uptime = time(NULL);
+ this->attribute = attribute;
return &this->public;
}
this->ca = stroke_ca_create(this->cred);
this->config = stroke_config_create(this->ca, this->cred);
this->control = stroke_control_create();
- this->list = stroke_list_create();
+ this->list = stroke_list_create(this->attribute);
charon->credentials->add_set(charon->credentials, &this->ca->set);
charon->credentials->add_set(charon->credentials, &this->cred->set);