diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/stroke/stroke.c | 38 | ||||
-rw-r--r-- | src/stroke/stroke.h | 13 | ||||
-rw-r--r-- | src/stroke/stroke_keywords.h | 1 | ||||
-rw-r--r-- | src/stroke/stroke_keywords.txt | 1 |
4 files changed, 8 insertions, 45 deletions
diff --git a/src/stroke/stroke.c b/src/stroke/stroke.c index 0d688207c..1d4d11894 100644 --- a/src/stroke/stroke.c +++ b/src/stroke/stroke.c @@ -238,25 +238,13 @@ static int reread(stroke_keyword_t kw) return send_stroke_msg(&msg); } -static int set_logtype(char *context, char *type, int enable) -{ - stroke_msg_t msg; - - msg.type = STR_LOGTYPE; - msg.length = offsetof(stroke_msg_t, buffer); - msg.logtype.context = push_string(&msg, context); - msg.logtype.type = push_string(&msg, type); - msg.logtype.enable = enable; - return send_stroke_msg(&msg); -} - -static int set_loglevel(char *context, u_int level) +static int set_loglevel(char *type, u_int level) { stroke_msg_t msg; msg.type = STR_LOGLEVEL; msg.length = offsetof(stroke_msg_t, buffer); - msg.loglevel.context = push_string(&msg, context); + msg.loglevel.type = push_string(&msg, type); msg.loglevel.level = level; return send_stroke_msg(&msg); } @@ -289,17 +277,10 @@ static void exit_usage(char *error) printf(" Terminate a connection:\n"); printf(" stroke down NAME\n"); printf(" where: NAME is a connection name added with \"stroke add\"\n"); - printf(" Set logtype for a logging context:\n"); - printf(" stroke logtype CONTEXT TYPE ENABLE\n"); - printf(" where: CONTEXT is PARSR|GNRAT|IKESA|SAMGR|CHDSA|MESSG|TPOOL|WORKR|SCHED|\n"); - printf(" SENDR|RECVR|SOCKT|TESTR|DAEMN|CONFG|ENCPL|PAYLD\n"); - printf(" TYPE is CONTROL|ERROR|AUDIT|RAW|PRIVATE\n"); - printf(" ENABLE is 0|1\n"); - printf(" Set loglevel for a logging context:\n"); - printf(" stroke loglevel CONTEXT LEVEL\n"); - printf(" where: CONTEXT is PARSR|GNRAT|IKESA|SAMGR|CHDSA|MESSG|TPOOL|WORKR|SCHED|\n"); - printf(" SENDR|RECVR|SOCKT|TESTR|DAEMN|CONFG|ENCPL|PAYLD\n"); - printf(" LEVEL is 0|1|2|3\n"); + printf(" Set loglevel for a logging type:\n"); + printf(" stroke loglevel TYPE LEVEL\n"); + printf(" where: TYPE is any|dmn|mgr|ike|chd|job|cfg|knl|net|enc|lib\n"); + printf(" LEVEL is -1|0|1|2|3|4\n"); printf(" Show connection status:\n"); printf(" stroke status\n"); printf(" Show list of locally loaded certificates and crls:\n"); @@ -375,13 +356,6 @@ int main(int argc, char *argv[]) } res = unroute_connection(argv[2]); break; - case STROKE_LOGTYPE: - if (argc < 5) - { - exit_usage("\"logtype\" needs more parameters..."); - } - res = set_logtype(argv[2], argv[3], atoi(argv[4])); - break; case STROKE_LOGLEVEL: if (argc < 4) { diff --git a/src/stroke/stroke.h b/src/stroke/stroke.h index 3383f27ac..048ee0813 100644 --- a/src/stroke/stroke.h +++ b/src/stroke/stroke.h @@ -115,8 +115,6 @@ struct stroke_msg_t { /* show verbose connection status */ STR_STATUS_ALL, /* set a log type to log/not log */ - STR_LOGTYPE, - /* set the verbosity of a logging context */ STR_LOGLEVEL, /* list various objects */ STR_LIST, @@ -154,23 +152,16 @@ struct stroke_msg_t { stroke_end_t me, other; } add_conn; - /* data for STR_LOGTYPE */ - struct { - char *context; - char *type; - int enable; - } logtype; - /* data for STR_LOGLEVEL */ struct { - char *context; + char *type; int level; } loglevel; /* data for STR_LIST */ struct { list_flag_t flags; - bool utc; + bool utc; } list; /* data for STR_REREAD */ diff --git a/src/stroke/stroke_keywords.h b/src/stroke/stroke_keywords.h index 6a8dd5359..d8c9632cf 100644 --- a/src/stroke/stroke_keywords.h +++ b/src/stroke/stroke_keywords.h @@ -26,7 +26,6 @@ typedef enum { STROKE_UNROUTE, STROKE_UP, STROKE_DOWN, - STROKE_LOGTYPE, STROKE_LOGLEVEL, STROKE_STATUS, STROKE_STATUSALL, diff --git a/src/stroke/stroke_keywords.txt b/src/stroke/stroke_keywords.txt index d720a7d3a..b0f56ddd1 100644 --- a/src/stroke/stroke_keywords.txt +++ b/src/stroke/stroke_keywords.txt @@ -33,7 +33,6 @@ route, STROKE_ROUTE unroute, STROKE_UNROUTE up, STROKE_UP down, STROKE_DOWN -logtype, STROKE_LOGTYPE loglevel, STROKE_LOGLEVEL status, STROKE_STATUS statusall, STROKE_STATUSALL |