suricata
source-pcap.c File Reference
#include "suricata-common.h"
#include "suricata.h"
#include "decode.h"
#include "packet-queue.h"
#include "threads.h"
#include "threadvars.h"
#include "tm-queuehandlers.h"
#include "tm-threads.h"
#include "source-pcap.h"
#include "conf.h"
#include "util-debug.h"
#include "util-error.h"
#include "util-privs.h"
#include "util-device.h"
#include "util-optimize.h"
#include "util-checksum.h"
#include "util-ioctl.h"
#include "tmqh-packetpool.h"
Include dependency graph for source-pcap.c:

Go to the source code of this file.

Data Structures

struct  PcapThreadVars_
 Structure to hold thread specific variables. More...
 

Macros

#define PCAP_STATE_DOWN   0
 
#define PCAP_STATE_UP   1
 
#define PCAP_RECONNECT_TIMEOUT   500000
 
#define PCAP_ERROR_BREAK   -2
 

Typedefs

typedef struct PcapThreadVars_ PcapThreadVars
 Structure to hold thread specific variables. More...
 

Functions

void TmModuleReceivePcapRegister (void)
 Registration Function for RecievePcap. More...
 
void TmModuleDecodePcapRegister (void)
 Registration Function for DecodePcap. More...
 
void PcapTranslateIPToDevice (char *pcap_dev, size_t len)
 

Detailed Description

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

Live pcap packet acquisition support

Definition in file source-pcap.c.

Macro Definition Documentation

◆ PCAP_ERROR_BREAK

#define PCAP_ERROR_BREAK   -2

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

◆ PCAP_RECONNECT_TIMEOUT

#define PCAP_RECONNECT_TIMEOUT   500000

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

◆ PCAP_STATE_DOWN

#define PCAP_STATE_DOWN   0

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

◆ PCAP_STATE_UP

#define PCAP_STATE_UP   1

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

Typedef Documentation

◆ PcapThreadVars

Structure to hold thread specific variables.

Function Documentation

◆ PcapTranslateIPToDevice()

void PcapTranslateIPToDevice ( char *  pcap_dev,
size_t  len 
)

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

References len, and strlcpy().

Here is the call graph for this function:

◆ TmModuleDecodePcapRegister()

void TmModuleDecodePcapRegister ( void  )

Registration Function for DecodePcap.

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

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

Referenced by RegisterAllModules().

Here is the caller graph for this function:

◆ TmModuleReceivePcapRegister()

void TmModuleReceivePcapRegister ( void  )

Registration Function for RecievePcap.

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

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

Referenced by RegisterAllModules().

Here is the caller graph for this function: