suricata
runmode-af-packet.c File Reference
#include "suricata-common.h"
#include "tm-threads.h"
#include "conf.h"
#include "runmodes.h"
#include "runmode-af-packet.h"
#include "output.h"
#include "log-httplog.h"
#include "detect-engine-mpm.h"
#include "alert-fastlog.h"
#include "alert-prelude.h"
#include "alert-debuglog.h"
#include "flow-bypass.h"
#include "util-debug.h"
#include "util-time.h"
#include "util-cpu.h"
#include "util-affinity.h"
#include "util-device.h"
#include "util-runmodes.h"
#include "util-ioctl.h"
#include "util-ebpf.h"
#include "util-byte.h"
#include "source-af-packet.h"
Include dependency graph for runmode-af-packet.c:

Go to the source code of this file.

int max_pending_packets
 
const char * RunModeAFPGetDefaultMode (void)
 
void RunModeIdsAFPRegister (void)
 
int AFPRunModeIsIPS ()
 
int RunModeIdsAFPAutoFp (void)
 
int RunModeIdsAFPSingle (void)
 Single thread version of the AF_PACKET processing. More...
 
int RunModeIdsAFPWorkers (void)
 Workers version of the AF_PACKET processing. More...
 

Detailed Description

Author
Eric Leblond eric@.nosp@m.regi.nosp@m.t.org

AF_PACKET socket runmode

Definition in file runmode-af-packet.c.

Function Documentation

◆ AFPRunModeIsIPS()

◆ RunModeAFPGetDefaultMode()

const char* RunModeAFPGetDefaultMode ( void  )

Definition at line 62 of file runmode-af-packet.c.

Referenced by RunModeDispatch().

Here is the caller graph for this function:

◆ RunModeIdsAFPAutoFp()

int RunModeIdsAFPAutoFp ( void  )

Definition at line 799 of file runmode-af-packet.c.

References AFPPeersListInit(), ConfGet(), FatalError, RunModeInitialize(), RunModeSetLiveCaptureAutoFp(), SC_ERR_FATAL, SCEnter, SCLogDebug, TimeModeSetLive(), and TM_ECODE_OK.

Referenced by RunModeIdsAFPRegister().

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

◆ RunModeIdsAFPRegister()

void RunModeIdsAFPRegister ( void  )

Definition at line 67 of file runmode-af-packet.c.

References RUNMODE_AFP_DEV, RunModeIdsAFPAutoFp(), RunModeIdsAFPSingle(), RunModeIdsAFPWorkers(), and RunModeRegisterNewRunMode().

Here is the call graph for this function:

◆ RunModeIdsAFPSingle()

int RunModeIdsAFPSingle ( void  )

Single thread version of the AF_PACKET processing.

Definition at line 843 of file runmode-af-packet.c.

References AFPPeersListInit(), ConfGet(), FatalError, RunModeInitialize(), RunModeSetLiveCaptureSingle(), SC_ERR_FATAL, SCEnter, TimeModeSetLive(), and TM_ECODE_OK.

Referenced by RunModeIdsAFPRegister().

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

◆ RunModeIdsAFPWorkers()

int RunModeIdsAFPWorkers ( void  )

Workers version of the AF_PACKET processing.

Start N threads with each thread doing all the work.

Definition at line 885 of file runmode-af-packet.c.

References AFPPeersListInit(), ConfGet(), FatalError, RunModeInitialize(), RunModeSetLiveCaptureWorkers(), SC_ERR_FATAL, SCEnter, TimeModeSetLive(), and TM_ECODE_OK.

Referenced by RunModeIdsAFPRegister().

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

Variable Documentation

◆ max_pending_packets

int max_pending_packets

Maximum packets to simultaneously process.

Definition at line 212 of file suricata.c.

Referenced by PacketPoolInit(), and PacketPoolPostRunmodes().