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

◆ RunModeFilePcapAutoFp()

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 118 of file runmode-pcap-file.c.

References ConfGet(), FatalError, PcapFileGlobalInit(), RECEIVE_CPU_SET, RunmodeAutoFpCreatePickupQueuesString(), SCEnter, SCFree, SCLogDebug, 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:

◆ RunModeFilePcapGetDefaultMode()

const char* RunModeFilePcapGetDefaultMode ( void  )

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

◆ RunModeFilePcapRegister()

void RunModeFilePcapRegister ( void  )

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

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

Here is the call graph for this function:

◆ RunModeFilePcapSingle()

int RunModeFilePcapSingle ( void  )

Single thread version of the Pcap file processing.

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

References ConfGet(), FatalError, PcapFileGlobalInit(), thread_name_single, TimeModeSetOffline(), TM_ECODE_OK, TM_THREAD_NAME_MAX, TmModuleGetByName(), TmSlotSetFuncAppend(), TmThreadCreatePacketHandler(), TmThreadSetCPU(), TmThreadSpawn(), tv, and WORKER_CPU_SET.

Referenced by RunModeFilePcapRegister().

Here is the call graph for this function:
Here is the caller graph for this function: