suricata
runmode-pcap-file.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int RunModeFilePcapSingle (void)
 Single thread version of the Pcap file processing. More...
 
int RunModeFilePcapAutoFp (void)
 RunModeFilePcapAutoFp set up the following thread packet handlers: More...
 
void RunModeFilePcapRegister (void)
 
const char * RunModeFilePcapGetDefaultMode (void)
 

Detailed Description

Function Documentation

int RunModeFilePcapAutoFp ( void  )

RunModeFilePcapAutoFp set up the following thread packet handlers:

  • Receive thread (from pcap file)
  • Decode thread
  • Stream thread
  • Detect: If we have only 1 cpu, it will setup one Detect thread If we have more than one, it will setup num_cpus - 1 starting from the second cpu available.
  • Outputs thread By default the threads will use the first cpu available except the Detection threads if we have more than one cpu.
Return values
0If all goes well. (If any problem is detected the engine will exit()).

Definition at line 144 of file runmode-pcap-file.c.

References ConfGet(), PcapFileGlobalInit(), RECEIVE_CPU_SET, RunmodeAutoFpCreatePickupQueuesString(), RunModeInitialize(), SC_ERR_FATAL, SC_ERR_RUNMODE, SCEnter, SCFree, SCLogDebug, SCLogError, thread_name_autofp, thread_name_workers, threading_detect_ratio, TimeModeSetOffline(), TM_ECODE_OK, TM_QUEUE_NAME_MAX, TM_THREAD_NAME_MAX, TmModuleGetByName(), TmSlotSetFuncAppend(), TmThreadCreatePacketHandler(), TmThreadGetNbThreads(), TmThreadSetCPU(), TmThreadSetGroupName(), TmThreadSpawn(), UtilCpuGetNumProcessorsOnline(), and WORKER_CPU_SET.

Referenced by RunModeFilePcapRegister().

Here is the call graph for this function:

Here is the caller graph for this function:

const char* RunModeFilePcapGetDefaultMode ( void  )

Definition at line 35 of file runmode-pcap-file.c.

Referenced by RunModeDispatch().

Here is the caller graph for this function:

void RunModeFilePcapRegister ( void  )

Definition at line 40 of file runmode-pcap-file.c.

References RUNMODE_PCAP_FILE, RunModeFilePcapAutoFp(), RunModeFilePcapSingle(), and RunModeRegisterNewRunMode().

Referenced by RunModeRegisterRunModes().

Here is the call graph for this function:

Here is the caller graph for this function:

int RunModeFilePcapSingle ( void  )

Single thread version of the Pcap file processing.

Definition at line 59 of file runmode-pcap-file.c.

References ConfGet(), ConfGetBool(), PcapFileGlobalInit(), RunModeInitialize(), SC_ERR_RUNMODE, SCLogError, SCLogNotice, thread_name_single, TimeModeSetOffline(), TM_ECODE_OK, ThreadVars_::tm_func, TM_THREAD_NAME_MAX, TmModuleGetByName(), TmSlotSetFuncAppend(), TmThreadCreatePacketHandler(), TmThreadSetCPU(), TmThreadSpawn(), and WORKER_CPU_SET.

Referenced by RunModeFilePcapRegister().

Here is the call graph for this function:

Here is the caller graph for this function: