{ ARG_ENUM, offsetof(starter_config_t, setup.charonstart), LST_bool },
{ ARG_ENUM, offsetof(starter_config_t, setup.plutostart), LST_bool },
- /* pluto keywords */
+ /* pluto/charon keywords */
{ ARG_LST, offsetof(starter_config_t, setup.plutodebug), LST_plutodebug },
+ { ARG_STR, offsetof(starter_config_t, setup.charondebug), NULL },
{ ARG_STR, offsetof(starter_config_t, setup.prepluto), NULL },
{ ARG_STR, offsetof(starter_config_t, setup.postpluto), NULL },
{ ARG_ENUM, offsetof(starter_config_t, setup.uniqueids), LST_bool },
struct stat stb;
int argc = 1;
char *arg[] = {
- CHARON_CMD, NULL, NULL, NULL
+ CHARON_CMD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
if (!debug)
arg[argc++] = "--strictcrlpolicy";
}
+ { /* parse debug string */
+ char *pos, *level, *buf_pos, type[4], buffer[512];
+ pos = cfg->setup.charondebug;
+ buf_pos = buffer;
+ while (pos && sscanf(pos, "%4s %d,", type, &level) == 2)
+ {
+ snprintf(buf_pos, buffer + sizeof(buffer) - buf_pos, "--debug-%s", type);
+ arg[argc++] = buf_pos;
+ buf_pos += strlen(buf_pos) + 1;
+ if (buf_pos >= buffer + sizeof(buffer))
+ {
+ break;
+ }
+ snprintf(buf_pos, buffer + sizeof(buffer) - buf_pos, "%d", level);
+ arg[argc++] = buf_pos;
+ buf_pos += strlen(buf_pos) + 1;
+ if (buf_pos >= buffer + sizeof(buffer))
+ {
+ break;
+ }
+
+ /* get next */
+ pos = strchr(pos, ',');
+ if (pos)
+ {
+ pos++;
+ }
+ }
+ }
+
if (_charon_pid)
{
plog("starter_start_charon(): charon already started...");
for details on available debugging types, see
.IR ipsec_pluto (8).
.TP
+.B charondebug
+how much Charon debugging output should be logged.
+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
+and the level is one of
+.B -1, 0, 1, 2, 3, 4
+(for silent, audit, control, controlmore, raw, private)
+.TP
.B plutoopts
additional options to pass to pluto upon startup. See
.IR ipsec_pluto (8).