if(strcasecmp(run_sampler, "off") == 0) { if(strcasecmp(hooking, "off") != 0) { msg(MSG_FATAL, "sampler input is disabled, but hooking is used");
if(strcasecmp(hooking, "off") != 0) {  if((strcasecmp(run_sampler, "off") == 0) || (strcasecmp(run_concentrator, "off") == 0) ) { msg(MSG_FATAL, "Main: Hooking is used (%s), but either concentrator(%s) or sampler(%s) is off", hooking, run_concentrator, run_sampler ); msg(MSG_FATAL, "Both must be enabled");
static int vermont_configure(struct v_objects *v){        dictionary *conf=v->v_config;        /* if the sampler is not needed, interface will say "off" */        char *run_sampler=iniparser_getvalue(conf, "sampler", "interface");        char *run_concentrator=iniparser_getvalue(conf, "concentrator", "listen_ip");        char *hooking=iniparser_getvalue(conf, "main", "packets");        /*         check if we run the sampler         if sampler is off, then we can use the sampler->concentrator hook         */        if(strcasecmp(run_sampler, "off") == 0) {                if(strcasecmp(hooking, "off") != 0) {                        msg(MSG_FATAL, "sampler input is disabled, but hooking is used");                        return -1;                }                msg(MSG_DIALOG, "not running sampler subsystem");        } else {                if(configure_sampler(v)) {                        msg(MSG_FATAL, "Main: Could not configure the sampler");                        return -1;                }        }        if(strcasecmp(run_concentrator, "off") == 0) {                msg(MSG_DIALOG, "not running concentrator subsystem");        } else {                if(configure_concentrator(v)) {                        msg(MSG_FATAL, "Main: Could not configure the concentrator");                        return -1;                }        }        /* after we have a concentrator, we may fill the ctx for the HookingFilter */        if(v->hooking) {                msg(MSG_DEBUG, "Main: adding context pointer %p (aggregator) to HookingFilter", v->conc_aggregator);                v->hooking->setContext(v->conc_aggregator);        }        return 0;}