suricata
LogFileCtx_ Struct Reference

#include <util-logopenfile.h>

Collaboration diagram for LogFileCtx_:

Data Fields

union {
   FILE *   fp
 
   PcieFile *   pcie_fp
 
}; 
 
union {
   SyslogSetup   syslog_setup
 
}; 
 
int(* Write )(const char *buffer, int buffer_len, struct LogFileCtx_ *fp)
 
void(* Close )(struct LogFileCtx_ *fp)
 
SCMutex fp_mutex
 
enum LogFileType type
 
char * filename
 
uint32_t filemode
 
char * sensor_name
 
int is_sock
 
int sock_type
 
uint64_t reconn_timer
 
time_t rotate_time
 
uint64_t rotate_interval
 
char * prefix
 
size_t prefix_len
 
uint64_t size_limit
 
uint64_t size_current
 
uint8_t flags
 
uint8_t send_flags
 
uint8_t is_regular
 
size_t json_flags
 
int rotation_flag
 
bool nostamp
 
bool is_pcap_offline
 
uint64_t dropped
 

Detailed Description

Global structure for Output Context

Definition at line 52 of file util-logopenfile.h.

Field Documentation

union { ... }
union { ... }
void(* LogFileCtx_::Close) (struct LogFileCtx_ *fp)

Definition at line 69 of file util-logopenfile.h.

Referenced by LogFileFreeCtx(), and LogFileNewCtx().

uint64_t LogFileCtx_::dropped

Definition at line 133 of file util-logopenfile.h.

uint32_t LogFileCtx_::filemode

File permissions

Definition at line 82 of file util-logopenfile.h.

Referenced by SCConfLogOpenGeneric(), and SCConfLogReopen().

char* LogFileCtx_::filename

The name of the file

Definition at line 79 of file util-logopenfile.h.

Referenced by LogFileFreeCtx(), SCConfLogOpenGeneric(), SCConfLogReopen(), and Unified2AlertInitCtx().

uint8_t LogFileCtx_::flags

Definition at line 110 of file util-logopenfile.h.

Referenced by SCConfLogOpenGeneric(), and Unified2AlertThreadDeinit().

FILE* LogFileCtx_::fp
SCMutex LogFileCtx_::fp_mutex

It will be locked if the log/alert record cannot be written to the file in one call

Definition at line 73 of file util-logopenfile.h.

Referenced by LogFileFreeCtx(), LogFileNewCtx(), and LogFileWrite().

bool LogFileCtx_::is_pcap_offline

Definition at line 129 of file util-logopenfile.h.

Referenced by OutputJsonRegister().

uint8_t LogFileCtx_::is_regular

Definition at line 117 of file util-logopenfile.h.

Referenced by SCConfLogOpenGeneric(), and SCConfLogReopen().

int LogFileCtx_::is_sock

Handle auto-connecting / reconnecting sockets

Definition at line 88 of file util-logopenfile.h.

Referenced by SCConfLogOpenGeneric().

size_t LogFileCtx_::json_flags

Definition at line 120 of file util-logopenfile.h.

Referenced by OutputJsonRegister(), and SCConfLogOpenGeneric().

bool LogFileCtx_::nostamp

Definition at line 126 of file util-logopenfile.h.

Referenced by Unified2AlertInitCtx().

PcieFile* LogFileCtx_::pcie_fp

Definition at line 55 of file util-logopenfile.h.

Referenced by SCConfLogOpenGeneric().

char* LogFileCtx_::prefix
size_t LogFileCtx_::prefix_len

Definition at line 102 of file util-logopenfile.h.

Referenced by LogFileFreeCtx(), and OutputJsonRegister().

uint64_t LogFileCtx_::reconn_timer

Definition at line 90 of file util-logopenfile.h.

uint64_t LogFileCtx_::rotate_interval

The interval to rotate the log file Used by some alert loggers like the unified ones that append the date onto the end of files.

Definition at line 97 of file util-logopenfile.h.

Referenced by SCConfLogOpenGeneric().

time_t LogFileCtx_::rotate_time

The next time to rotate log file, if rotate interval is specified.

Definition at line 94 of file util-logopenfile.h.

Referenced by SCConfLogOpenGeneric().

int LogFileCtx_::rotation_flag

Definition at line 123 of file util-logopenfile.h.

Referenced by LogFileFreeCtx(), SCConfLogOpenGeneric(), and Unified2AlertInitCtx().

uint8_t LogFileCtx_::send_flags

Definition at line 113 of file util-logopenfile.h.

Referenced by SCConfLogOpenGeneric().

char* LogFileCtx_::sensor_name

Suricata sensor name

Definition at line 85 of file util-logopenfile.h.

Referenced by LogFileFreeCtx(), and OutputJsonRegister().

uint64_t LogFileCtx_::size_current

file current size

Definition at line 107 of file util-logopenfile.h.

Referenced by Unified2AlertRegister().

uint64_t LogFileCtx_::size_limit

Generic size_limit and size_current They must be common to the threads accesing the same file file size limit

Definition at line 106 of file util-logopenfile.h.

Referenced by Unified2AlertInitCtx().

int LogFileCtx_::sock_type

Definition at line 89 of file util-logopenfile.h.

Referenced by SCConfLogOpenGeneric().

SyslogSetup LogFileCtx_::syslog_setup

Definition at line 62 of file util-logopenfile.h.

Referenced by LogFileWrite().

enum LogFileType LogFileCtx_::type

the type of file

Definition at line 76 of file util-logopenfile.h.

Referenced by LogFileWrite(), and SCConfLogOpenGeneric().

int(* LogFileCtx_::Write) (const char *buffer, int buffer_len, struct LogFileCtx_ *fp)

The documentation for this struct was generated from the following file: