suricata
|
#include "suricata-common.h"
#include "log-pcap.h"
#include "threads.h"
#include "threadvars.h"
#include "decode.h"
#include "stream.h"
#include "stream-tcp-reassemble.h"
#include "output.h"
#include "util-buffer.h"
#include "util-byte.h"
#include "util-conf.h"
#include "util-cpu.h"
#include "util-datalink.h"
#include "util-misc.h"
#include "util-path.h"
#include "util-time.h"
Go to the source code of this file.
Data Structures | |
struct | PcapFileName_ |
struct | PcapLogProfileData_ |
struct | PcapLogCompressionData_ |
struct | PcapLogData_ |
struct | PcapLogThreadData_ |
struct | PcapLogCallbackContext |
Macros | |
#define | DEFAULT_LOG_FILENAME "pcaplog" |
#define | MODULE_NAME "PcapLog" |
#define | MIN_LIMIT 4 * 1024 * 1024 |
#define | DEFAULT_LIMIT 100 * 1024 * 1024 |
#define | DEFAULT_FILE_LIMIT 0 |
#define | LOGMODE_NORMAL 0 |
#define | LOGMODE_MULTI 1 |
#define | RING_BUFFER_MODE_DISABLED 0 |
#define | RING_BUFFER_MODE_ENABLED 1 |
#define | TS_FORMAT_SEC 0 |
#define | TS_FORMAT_USEC 1 |
#define | USE_STREAM_DEPTH_DISABLED 0 |
#define | USE_STREAM_DEPTH_ENABLED 1 |
#define | HONOR_PASS_RULES_DISABLED 0 |
#define | HONOR_PASS_RULES_ENABLED 1 |
#define | PCAP_SNAPLEN 262144 |
#define | PCAP_BUFFER_TIMEOUT 1000000 |
#define | PCAP_PKTHDR_SIZE 16 |
#define | MAX_TOKS 9 |
#define | MAX_FILENAMELEN 513 |
#define | PCAPLOG_PROFILE_START uint64_t pcaplog_profile_ticks = UtilCpuGetTicks() |
#define | PCAPLOG_PROFILE_END(prof) |
Typedefs | |
typedef enum LogModeConditionalType_ | LogModeConditionalType |
typedef struct PcapFileName_ | PcapFileName |
typedef struct PcapLogProfileData_ | PcapLogProfileData |
typedef struct PcapLogCompressionData_ | PcapLogCompressionData |
typedef struct PcapLogData_ | PcapLogData |
typedef struct PcapLogThreadData_ | PcapLogThreadData |
Functions | |
SC_ATOMIC_DECLARE (uint32_t, thread_cnt) | |
void | PcapLogRegister (void) |
char * | PcapLogGetFilename (void) |
void | PcapLogProfileSetup (void) |
Variables | |
thread_local char * | pcap_file_thread = NULL |
Pcap packet logging module.
Definition in file log-pcap.c.
#define DEFAULT_FILE_LIMIT 0 |
Definition at line 63 of file log-pcap.c.
#define DEFAULT_LIMIT 100 * 1024 * 1024 |
Definition at line 62 of file log-pcap.c.
#define DEFAULT_LOG_FILENAME "pcaplog" |
Definition at line 59 of file log-pcap.c.
#define HONOR_PASS_RULES_DISABLED 0 |
Definition at line 83 of file log-pcap.c.
#define HONOR_PASS_RULES_ENABLED 1 |
Definition at line 84 of file log-pcap.c.
#define LOGMODE_MULTI 1 |
Definition at line 66 of file log-pcap.c.
#define LOGMODE_NORMAL 0 |
Definition at line 65 of file log-pcap.c.
#define MAX_FILENAMELEN 513 |
Definition at line 114 of file log-pcap.c.
#define MAX_TOKS 9 |
Definition at line 113 of file log-pcap.c.
#define MIN_LIMIT 4 * 1024 * 1024 |
Definition at line 61 of file log-pcap.c.
#define MODULE_NAME "PcapLog" |
Definition at line 60 of file log-pcap.c.
#define PCAP_BUFFER_TIMEOUT 1000000 |
Definition at line 87 of file log-pcap.c.
#define PCAP_PKTHDR_SIZE 16 |
Definition at line 88 of file log-pcap.c.
#define PCAP_SNAPLEN 262144 |
Definition at line 86 of file log-pcap.c.
#define PCAPLOG_PROFILE_END | ( | prof | ) |
Definition at line 223 of file log-pcap.c.
#define PCAPLOG_PROFILE_START uint64_t pcaplog_profile_ticks = UtilCpuGetTicks() |
Definition at line 220 of file log-pcap.c.
#define RING_BUFFER_MODE_DISABLED 0 |
Definition at line 74 of file log-pcap.c.
#define RING_BUFFER_MODE_ENABLED 1 |
Definition at line 75 of file log-pcap.c.
#define TS_FORMAT_SEC 0 |
Definition at line 77 of file log-pcap.c.
#define TS_FORMAT_USEC 1 |
Definition at line 78 of file log-pcap.c.
#define USE_STREAM_DEPTH_DISABLED 0 |
Definition at line 80 of file log-pcap.c.
#define USE_STREAM_DEPTH_ENABLED 1 |
Definition at line 81 of file log-pcap.c.
typedef enum LogModeConditionalType_ LogModeConditionalType |
typedef struct PcapFileName_ PcapFileName |
typedef struct PcapLogCompressionData_ PcapLogCompressionData |
typedef struct PcapLogData_ PcapLogData |
PcapLog thread vars
Used for storing file options.
typedef struct PcapLogProfileData_ PcapLogProfileData |
typedef struct PcapLogThreadData_ PcapLogThreadData |
Enumerator | |
---|---|
LOGMODE_COND_ALL | |
LOGMODE_COND_ALERTS | |
LOGMODE_COND_TAG |
Definition at line 67 of file log-pcap.c.
Enumerator | |
---|---|
PCAP_LOG_COMPRESSION_FORMAT_NONE | |
PCAP_LOG_COMPRESSION_FORMAT_LZ4 |
Definition at line 115 of file log-pcap.c.
char* PcapLogGetFilename | ( | void | ) |
Definition at line 1766 of file log-pcap.c.
References pcap_file_thread.
void PcapLogProfileSetup | ( | void | ) |
Definition at line 1890 of file log-pcap.c.
References ConfGetNode(), and ConfNodeChildValueIsTrue().
void PcapLogRegister | ( | void | ) |
Definition at line 210 of file log-pcap.c.
References LOGGER_PCAP, MODULE_NAME, and OutputRegisterPacketModule().
SC_ATOMIC_DECLARE | ( | uint32_t | , |
thread_cnt | |||
) |
thread_local char* pcap_file_thread = NULL |
Definition at line 105 of file log-pcap.c.
Referenced by PcapLogGetFilename().