Added ASN debug group to log low-level encoding/decoding (ASN.1, X.509).

This will allow us to remove quite some clutter from the LIB debug group
for higher debug levels.
This commit is contained in:
Tobias Brunner 2011-12-16 16:27:28 +01:00
parent c17f6f96e2
commit 54d096a712
6 changed files with 11 additions and 3 deletions

View File

@ -1315,7 +1315,7 @@ A comma separated list containing type/level-pairs may
be specified, e.g:
.B dmn 3, ike 1, net -1.
Acceptable values for types are
.B dmn, mgr, ike, chd, job, cfg, knl, net, enc, lib, tls, tnc, imc, imv, pts
.B dmn, mgr, ike, chd, job, cfg, knl, net, asn, enc, lib, tls, tnc, imc, imv, pts
and the level is one of
.B -1, 0, 1, 2, 3, 4
(for silent, audit, control, controlmore, raw, private). By default, the level

View File

@ -833,6 +833,9 @@ IPsec/Networking kernel interface
.B net
IKE network communication
.TP
.B asn
Low-level encoding/decoding (ASN.1, X.509 etc.)
.TP
.B enc
Packet encoding/decoding encryption/decryption operations
.TP

View File

@ -426,7 +426,7 @@ static void usage(const char *msg)
" [--version]\n"
" [--use-syslog]\n"
" [--debug-<type> <level>]\n"
" <type>: log context type (dmn|mgr|ike|chd|job|cfg|knl|net|enc|tnc|imc|imv|pts|tls|lib)\n"
" <type>: log context type (dmn|mgr|ike|chd|job|cfg|knl|net|asn|enc|tnc|imc|imv|pts|tls|lib)\n"
" <level>: log verbosity (-1 = silent, 0 = audit, 1 = control,\n"
" 2 = controlmore, 3 = raw, 4 = private)\n"
"\n"
@ -497,6 +497,7 @@ int main(int argc, char *argv[])
{ "debug-cfg", required_argument, &group, DBG_CFG },
{ "debug-knl", required_argument, &group, DBG_KNL },
{ "debug-net", required_argument, &group, DBG_NET },
{ "debug-asn", required_argument, &group, DBG_ASN },
{ "debug-enc", required_argument, &group, DBG_ENC },
{ "debug-tnc", required_argument, &group, DBG_TNC },
{ "debug-imc", required_argument, &group, DBG_IMC },

View File

@ -26,6 +26,7 @@ ENUM(debug_names, DBG_DMN, DBG_LIB,
"CFG",
"KNL",
"NET",
"ASN",
"ENC",
"TNC",
"IMC",
@ -44,6 +45,7 @@ ENUM(debug_lower_names, DBG_DMN, DBG_LIB,
"cfg",
"knl",
"net",
"asn",
"enc",
"tnc",
"imc",

View File

@ -48,6 +48,8 @@ enum debug_t {
DBG_KNL,
/** networking/sockets */
DBG_NET,
/** low-level encoding/decoding (ASN.1, X.509 etc.) */
DBG_ASN,
/** message encoding/decoding */
DBG_ENC,
/** trusted network connect */

View File

@ -393,7 +393,7 @@ static void exit_usage(char *error)
printf(" where: START and optional END define the clients source IP\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|tnc|imc|imv|pts|tls|lib\n");
printf(" where: TYPE is any|dmn|mgr|ike|chd|job|cfg|knl|net|asn|enc|tnc|imc|imv|pts|tls|lib\n");
printf(" LEVEL is -1|0|1|2|3|4\n");
printf(" Show connection status:\n");
printf(" stroke status\n");