@ -50,7 +50,9 @@
# include "util-runmodes.h"
# include "util-runmodes.h"
int RunModeSetLiveCaptureAuto ( DetectEngineCtx * de_ctx ,
int RunModeSetLiveCaptureAuto ( DetectEngineCtx * de_ctx ,
ConfigIfaceParserFunc ConfigParser , char * recv_mod_name ,
ConfigIfaceParserFunc ConfigParser ,
ConfigIfaceThreadsCountFunc ModThreadsCount ,
char * recv_mod_name ,
char * decode_mod_name , char * thread_name ,
char * decode_mod_name , char * thread_name ,
const char * live_dev )
const char * live_dev )
{
{
@ -71,6 +73,13 @@ int RunModeSetLiveCaptureAuto(DetectEngineCtx *de_ctx,
exit ( EXIT_FAILURE ) ;
exit ( EXIT_FAILURE ) ;
}
}
if ( ModThreadsCount ( aconf ) > 1 ) {
SCLogWarning ( SC_ERR_UNIMPLEMENTED , " 'Auto' running mode does not honor 'threads' "
" variable (set on '%s'). Please use an other mode as "
" 'autofp' or 'worker' " ,
live_dev ) ;
}
/* create the threads */
/* create the threads */
ThreadVars * tv_receive =
ThreadVars * tv_receive =
TmThreadCreatePacketHandler ( recv_mod_name ,
TmThreadCreatePacketHandler ( recv_mod_name ,
@ -115,6 +124,13 @@ int RunModeSetLiveCaptureAuto(DetectEngineCtx *de_ctx,
exit ( EXIT_FAILURE ) ;
exit ( EXIT_FAILURE ) ;
}
}
if ( ModThreadsCount ( aconf ) > 1 ) {
SCLogWarning ( SC_ERR_UNIMPLEMENTED , " 'Auto' running mode does not honor 'threads' "
" variable (set on '%s'). Please use an other mode as "
" 'autofp' or 'worker' " ,
live_dev ) ;
}
snprintf ( tname , sizeof ( tname ) , " %s-%s " , thread_name , live_dev ) ;
snprintf ( tname , sizeof ( tname ) , " %s-%s " , thread_name , live_dev ) ;
tnamec = SCStrdup ( tname ) ;
tnamec = SCStrdup ( tname ) ;
if ( tnamec = = NULL ) {
if ( tnamec = = NULL ) {