From: Andreas Steffen Date: Sun, 13 Dec 2015 16:07:28 +0000 (+0100) Subject: swanctl --stats lists loaded plugins X-Git-Tag: 5.4.0dr2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=47e56403780e417da67edc5f3e9753c60c9f2d21;p=thirdparty%2Fstrongswan.git swanctl --stats lists loaded plugins --- diff --git a/src/swanctl/commands/stats.c b/src/swanctl/commands/stats.c index a28ca83bad..e734c66ff4 100644 --- a/src/swanctl/commands/stats.c +++ b/src/swanctl/commands/stats.c @@ -15,8 +15,17 @@ #include "command.h" +#include + #include +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;