suricata
source-pcap-file.c File Reference
#include "suricata-common.h"
#include "source-pcap-file.h"
#include "source-pcap-file-helper.h"
#include "source-pcap-file-directory-helper.h"
#include "flow-manager.h"
#include "util-checksum.h"
#include "runmode-unix-socket.h"
#include "suricata.h"
#include "conf.h"
#include "util-misc.h"
Include dependency graph for source-pcap-file.c:

Go to the source code of this file.

Data Structures

union  PcapFileBehaviorVar_
 
struct  PcapFileThreadVars_
 

Macros

#define PCAP_FILE_BUFFER_SIZE_DEFAULT   131072U
 
#define PCAP_FILE_BUFFER_SIZE_MIN   4096U
 
#define PCAP_FILE_BUFFER_SIZE_MAX   67108864U
 

Typedefs

typedef union PcapFileBehaviorVar_ PcapFileBehaviorVar
 
typedef struct PcapFileThreadVars_ PcapFileThreadVars
 

Functions

void TmModuleReceivePcapFileRegister (void)
 
void TmModuleDecodePcapFileRegister (void)
 
void PcapFileGlobalInit (void)
 
void PcapIncreaseInvalidChecksum (void)
 

Variables

uint32_t max_pending_packets
 
PcapFileGlobalVars pcap_g
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

File based pcap packet acquisition support

Definition in file source-pcap-file.c.

Macro Definition Documentation

◆ PCAP_FILE_BUFFER_SIZE_DEFAULT

#define PCAP_FILE_BUFFER_SIZE_DEFAULT   131072U

Definition at line 141 of file source-pcap-file.c.

◆ PCAP_FILE_BUFFER_SIZE_MAX

#define PCAP_FILE_BUFFER_SIZE_MAX   67108864U

Definition at line 143 of file source-pcap-file.c.

◆ PCAP_FILE_BUFFER_SIZE_MIN

#define PCAP_FILE_BUFFER_SIZE_MIN   4096U

Definition at line 142 of file source-pcap-file.c.

Typedef Documentation

◆ PcapFileBehaviorVar

Union determining whether the behavior of the thread is file or directory

◆ PcapFileThreadVars

Data specific to the thread

Function Documentation

◆ PcapFileGlobalInit()

void PcapFileGlobalInit ( void  )

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

References ConfGet(), ParseSizeStringU32(), PCAP_FILE_BUFFER_SIZE_DEFAULT, PCAP_FILE_BUFFER_SIZE_MAX, PCAP_FILE_BUFFER_SIZE_MIN, pcap_g, PcapFileGlobalVars_::read_buffer_size, SC_ATOMIC_INIT, SCLogInfo, SCLogWarning, and str.

Referenced by RunModeFilePcapAutoFp(), and RunModeFilePcapSingle().

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

◆ PcapIncreaseInvalidChecksum()

void PcapIncreaseInvalidChecksum ( void  )

Definition at line 480 of file source-pcap-file.c.

References pcap_g, and SC_ATOMIC_ADD.

◆ TmModuleDecodePcapFileRegister()

void TmModuleDecodePcapFileRegister ( void  )

Definition at line 129 of file source-pcap-file.c.

References TmModule_::name, TmModule_::ThreadInit, TMM_DECODEPCAPFILE, and tmm_modules.

Referenced by RegisterAllModules().

Here is the caller graph for this function:

◆ TmModuleReceivePcapFileRegister()

void TmModuleReceivePcapFileRegister ( void  )

Pcap File Functionality

Definition at line 116 of file source-pcap-file.c.

References TmModule_::name, TmModule_::ThreadInit, tmm_modules, and TMM_RECEIVEPCAPFILE.

Referenced by RegisterAllModules().

Here is the caller graph for this function:

Variable Documentation

◆ pcap_g