suricata
|
#include "suricata-common.h"
#include "suricata.h"
#include "tm-threads.h"
#include "source-erf-file.h"
#include "util-datalink.h"
Go to the source code of this file.
Data Structures | |
struct | DagFlags_ |
struct | DagRecord_ |
Macros | |
#define | DAG_TYPE_ETH 2 |
Typedefs | |
typedef struct DagFlags_ | DagFlags |
Functions | |
struct DagRecord_ | __attribute__ ((packed)) |
DNP3 application object header. More... | |
TmEcode | ReceiveErfFileLoop (ThreadVars *tv, void *data, void *slot) |
ERF file reading loop. More... | |
TmEcode | ReceiveErfFileThreadInit (ThreadVars *tv, const void *initdata, void **data) |
Initialize the ERF receiver thread. More... | |
void | ReceiveErfFileThreadExitStats (ThreadVars *tv, void *data) |
Print some stats to the log at program exit. More... | |
TmEcode | ReceiveErfFileThreadDeinit (ThreadVars *, void *) |
void | TmModuleReceiveErfFileRegister (void) |
Register the ERF file receiver (reader) module. More... | |
void | TmModuleDecodeErfFileRegister (void) |
Register the ERF file decoder module. More... | |
Variables | |
uint64_t | ts |
uint8_t | type |
DagFlags | flags |
uint16_t | rlen |
uint16_t | lctr |
uint16_t | wlen |
uint16_t | pad |
ErfFileThreadVars | |
Support for reading ERF files.
Only ethernet supported at this time.
Definition in file source-erf-file.c.
#define DAG_TYPE_ETH 2 |
Definition at line 35 of file source-erf-file.c.
struct DagRecord_ __attribute__ | ( | (packed) | ) |
DNP3 application object header.
Definition at line 1 of file source-erf-file.c.
TmEcode ReceiveErfFileLoop | ( | ThreadVars * | tv, |
void * | data, | ||
void * | slot | ||
) |
ERF file reading loop.
Definition at line 112 of file source-erf-file.c.
References EngineStop(), ErfFileThreadVars, PacketGetFromQueueOrAlloc(), PacketPoolWait(), PKT_SET_SRC, PKT_SRC_WIRE, SCLogError, SCReturnInt, suricata_ctl_flags, SURICATA_STOP, THV_RUNNING, TM_ECODE_FAILED, TM_ECODE_OK, TmThreadsSetFlag(), tv, and unlikely.
Referenced by TmModuleReceiveErfFileRegister().
TmEcode ReceiveErfFileThreadDeinit | ( | ThreadVars * | , |
void * | |||
) |
void ReceiveErfFileThreadExitStats | ( | ThreadVars * | tv, |
void * | data | ||
) |
Print some stats to the log at program exit.
tv | Pointer to ThreadVars. |
data | Pointer to data, ErfFileThreadVars. |
Definition at line 306 of file source-erf-file.c.
References ErfFileThreadVars, and SCLogInfo.
Referenced by TmModuleReceiveErfFileRegister().
TmEcode ReceiveErfFileThreadInit | ( | ThreadVars * | tv, |
const void * | initdata, | ||
void ** | data | ||
) |
Initialize the ERF receiver thread.
Definition at line 216 of file source-erf-file.c.
References DatalinkSetGlobalType(), ErfFileThreadVars, LINKTYPE_ETHERNET, SCCalloc, SCEnter, SCLogError, SCLogInfo, SCReturnInt, TM_ECODE_FAILED, TM_ECODE_OK, tv, and unlikely.
Referenced by TmModuleReceiveErfFileRegister().
void TmModuleDecodeErfFileRegister | ( | void | ) |
Register the ERF file decoder module.
Definition at line 98 of file source-erf-file.c.
References TmModule_::name, TmModule_::ThreadInit, TMM_DECODEERFFILE, and tmm_modules.
Referenced by RegisterAllModules().
void TmModuleReceiveErfFileRegister | ( | void | ) |
Register the ERF file receiver (reader) module.
Definition at line 80 of file source-erf-file.c.
References TmModule_::cap_flags, TmModule_::flags, TmModule_::Func, TmModule_::name, TmModule_::PktAcqBreakLoop, TmModule_::PktAcqLoop, ReceiveErfFileLoop(), ReceiveErfFileThreadExitStats(), ReceiveErfFileThreadInit(), TmModule_::ThreadDeinit, TmModule_::ThreadExitPrintStats, TmModule_::ThreadInit, TM_FLAG_RECEIVE_TM, tmm_modules, and TMM_RECEIVEERFFILE.
Referenced by RegisterAllModules().
ErfFileThreadVars |
Definition at line 64 of file source-erf-file.c.
Referenced by ReceiveErfFileLoop(), ReceiveErfFileThreadExitStats(), and ReceiveErfFileThreadInit().
DagFlags flags |
Definition at line 57 of file source-erf-file.c.
uint16_t lctr |
Definition at line 59 of file source-erf-file.c.
uint16_t pad |
Definition at line 61 of file source-erf-file.c.
uint16_t rlen |
Definition at line 58 of file source-erf-file.c.
uint64_t ts |
Definition at line 55 of file source-erf-file.c.
Referenced by AppLayerParserRegisterStateProgressCompletionStatus(), CreateIsoTimeString(), CreateTimeString(), CreateUtcIsoTimeString(), DefragTrackerTimedOut(), HttpRangeContainersTimeoutHash(), LogCustomFormatWriteTimestamp(), SCLogMessage(), SCTimespecAsEpochMillis(), StreamTcpDetectLogFlush(), ThresholdsExpire(), TimeSetIncrementTime(), and TimeSetToCurrentTime().
uint8_t type |
Definition at line 56 of file source-erf-file.c.
uint16_t wlen |
Definition at line 60 of file source-erf-file.c.