suricata
LogFileCtx_ Struct Reference

#include <util-logopenfile.h>

Collaboration diagram for LogFileCtx_:

Data Fields

union {
   FILE *   fp
 
   PcieFile *   pcie_fp
 
   LogThreadedFileCtx *   threads
 
   void *   plugin_data
 
}; 
 
union {
   SyslogSetup   syslog_setup
 
}; 
 
int(* Write )(const char *buffer, int buffer_len, struct LogFileCtx_ *fp)
 
void(* Close )(struct LogFileCtx_ *fp)
 
SCPluginFileTypeplugin
 
SCMutex fp_mutex
 
bool threaded
 
struct LogFileCtx_parent
 
int id
 
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
 
uint64_t output_errors
 

Detailed Description

Global structure for Output Context

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

Field Documentation

◆ @153

union { ... }

◆ @155

union { ... }

◆ Close

void(* LogFileCtx_::Close) (struct LogFileCtx_ *fp)

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

Referenced by LogFileFreeCtx().

◆ dropped

uint64_t LogFileCtx_::dropped

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

◆ filemode

uint32_t LogFileCtx_::filemode

File permissions

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

◆ filename

char* LogFileCtx_::filename

The name of the file

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

Referenced by LogFileFreeCtx(), and SCConfLogReopen().

◆ flags

uint8_t LogFileCtx_::flags

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

◆ fp

FILE* LogFileCtx_::fp

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

Referenced by LogFileFreeCtx(), and SCConfLogReopen().

◆ fp_mutex

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 85 of file util-logopenfile.h.

Referenced by LogFileFreeCtx(), and LogFileWrite().

◆ id

int LogFileCtx_::id

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

Referenced by LogFileFreeCtx().

◆ is_pcap_offline

bool LogFileCtx_::is_pcap_offline

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

Referenced by OutputJSONBuffer(), and OutputJsonBuilderBuffer().

◆ is_regular

uint8_t LogFileCtx_::is_regular

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

Referenced by SCConfLogReopen().

◆ is_sock

int LogFileCtx_::is_sock

Handle auto-connecting / reconnecting sockets

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

◆ json_flags

size_t LogFileCtx_::json_flags

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

Referenced by OutputJSONBuffer().

◆ nostamp

bool LogFileCtx_::nostamp

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

◆ output_errors

uint64_t LogFileCtx_::output_errors

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

◆ parent

struct LogFileCtx_* LogFileCtx_::parent

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

Referenced by LogFileFreeCtx().

◆ pcie_fp

PcieFile* LogFileCtx_::pcie_fp

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

◆ plugin

SCPluginFileType* LogFileCtx_::plugin

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

Referenced by LogFileFreeCtx(), and LogFileWrite().

◆ plugin_data

void* LogFileCtx_::plugin_data

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

Referenced by LogFileFreeCtx(), and LogFileWrite().

◆ prefix

char* LogFileCtx_::prefix

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

Referenced by LogFileFreeCtx(), OutputJSONBuffer(), and OutputJsonBuilderBuffer().

◆ prefix_len

size_t LogFileCtx_::prefix_len

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

Referenced by LogFileFreeCtx(), OutputJSONBuffer(), and OutputJsonBuilderBuffer().

◆ reconn_timer

uint64_t LogFileCtx_::reconn_timer

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

◆ rotate_interval

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 114 of file util-logopenfile.h.

◆ rotate_time

time_t LogFileCtx_::rotate_time

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

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

◆ rotation_flag

int LogFileCtx_::rotation_flag

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

Referenced by LogFileFreeCtx().

◆ send_flags

uint8_t LogFileCtx_::send_flags

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

◆ sensor_name

char* LogFileCtx_::sensor_name

Suricata sensor name

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

Referenced by LogFileFreeCtx(), OutputJSONBuffer(), OutputJsonBuilderBuffer(), and OutputJsonInitCtx().

◆ size_current

uint64_t LogFileCtx_::size_current

file current size

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

◆ size_limit

uint64_t LogFileCtx_::size_limit

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

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

◆ sock_type

int LogFileCtx_::sock_type

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

◆ syslog_setup

SyslogSetup LogFileCtx_::syslog_setup

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

Referenced by LogFileWrite().

◆ threaded

bool LogFileCtx_::threaded

When threaded, track of the parent and thread id

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

Referenced by LogFileEnsureExists(), and LogFileFreeCtx().

◆ threads

LogThreadedFileCtx* LogFileCtx_::threads

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

Referenced by LogFileEnsureExists(), and LogFileFreeCtx().

◆ type

enum LogFileType LogFileCtx_::type

the type of file

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

Referenced by LogFileFreeCtx(), and LogFileWrite().

◆ Write

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

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

Referenced by LogFileNewCtx(), and LogFileWrite().


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