diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2015-12-13 17:07:28 +0100 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2015-12-13 17:07:28 +0100 |
commit | 47e56403780e417da67edc5f3e9753c60c9f2d21 (patch) | |
tree | 030f5e9afb85b1bba0e68f7f50e553c7e27904e2 | |
parent | 36b6d400d26f1dacff24c1777a30abea48378069 (diff) | |
download | strongswan-47e56403780e417da67edc5f3e9753c60c9f2d21.tar.bz2 strongswan-47e56403780e417da67edc5f3e9753c60c9f2d21.tar.xz |
swanctl --stats lists loaded plugins
-rw-r--r-- | src/swanctl/commands/stats.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/swanctl/commands/stats.c b/src/swanctl/commands/stats.c index a28ca83ba..e734c66ff 100644 --- a/src/swanctl/commands/stats.c +++ b/src/swanctl/commands/stats.c @@ -15,8 +15,17 @@ #include "command.h" +#include <collections/hashtable.h> + #include <errno.h> +CALLBACK(list, int, + hashtable_t *sa, vici_res_t *res, char *name, void *value, int len) +{ + printf(" %.*s", len, value); + return 0; +} + static int stats(vici_conn_t *conn) { vici_req_t *req; @@ -98,6 +107,9 @@ static int stats(vici_conn_t *conn) vici_find_str(res, "", "mallinfo.used"), vici_find_str(res, "", "mallinfo.free")); } + printf("loaded plugins:"); + vici_parse_cb(res, NULL, NULL, list, NULL); + printf("\n"); } vici_free_res(res); return 0; |