syslog-ng source
file_reader.h File Reference
#include "compat/glib.h"
#include "compat/compat.h"
Include dependency graph for file_reader.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SyslogMsgElements
 

Macros

#define RFC5424_NIL_VALUE   "-"
 
#define RFC5424_DELIMITERS   " >"
 
#define RFC5424_BOM   ""
 
#define RFC5424_HEADER_TOKEN_NUM   8
 
#define RFC5424_PRI_INDEX   0
 
#define RFC5424_VER_INDEX   1
 
#define RFC5424_TIMESTAMP_INDEX   2
 
#define RFC5424_HOST_NAME_INDEX   3
 
#define RFC5424_APP_NAME_INDEX   4
 
#define RFC5424_PID_INDEX   5
 
#define RFC5424_MSGID_INDEX   6
 
#define RFC5424_SDATA_INDEX   7
 
#define RFC3164_TIMESTAMP_SIZE   15
 
#define PARS_BUF_PRI_SIZE   3+1
 
#define PARS_BUF_VER_SIZE   2+1
 
#define PARS_BUF_TIME_STAMP_SIZE   128+1
 
#define PARS_BUF_HOST_SIZE   255+1
 
#define PARS_BUF_APP_SIZE   48+1
 
#define PARS_BUF_MSG_ID_SIZE   32+1
 
#define PARS_BUF_PID_SIZE   128+1
 
#define PARS_BUF_SDATA_SIZE   1024+1
 
#define PARS_BUF_MSG_SIZE   4096+1
 

Enumerations

enum  LogFormatType { LOG_FORMAT_UNKNOWN , LOG_FORMAT_RFC5424 , LOG_FORMAT_RFC3164 }
 

Functions

GOptionEntry * get_file_reader_options (void)
 
int read_next_message_from_file (char *buf, int buflen, int syslog_proto, int thread_index)
 
int init_file_reader (int nr_threads)
 
void close_file_reader (int nr_threads)
 

Macro Definition Documentation

◆ PARS_BUF_APP_SIZE

#define PARS_BUF_APP_SIZE   48+1

◆ PARS_BUF_HOST_SIZE

#define PARS_BUF_HOST_SIZE   255+1

◆ PARS_BUF_MSG_ID_SIZE

#define PARS_BUF_MSG_ID_SIZE   32+1

◆ PARS_BUF_MSG_SIZE

#define PARS_BUF_MSG_SIZE   4096+1

◆ PARS_BUF_PID_SIZE

#define PARS_BUF_PID_SIZE   128+1

◆ PARS_BUF_PRI_SIZE

#define PARS_BUF_PRI_SIZE   3+1

◆ PARS_BUF_SDATA_SIZE

#define PARS_BUF_SDATA_SIZE   1024+1

◆ PARS_BUF_TIME_STAMP_SIZE

#define PARS_BUF_TIME_STAMP_SIZE   128+1

◆ PARS_BUF_VER_SIZE

#define PARS_BUF_VER_SIZE   2+1

◆ RFC3164_TIMESTAMP_SIZE

#define RFC3164_TIMESTAMP_SIZE   15

◆ RFC5424_APP_NAME_INDEX

#define RFC5424_APP_NAME_INDEX   4

◆ RFC5424_BOM

#define RFC5424_BOM   ""

◆ RFC5424_DELIMITERS

#define RFC5424_DELIMITERS   " >"

◆ RFC5424_HEADER_TOKEN_NUM

#define RFC5424_HEADER_TOKEN_NUM   8

◆ RFC5424_HOST_NAME_INDEX

#define RFC5424_HOST_NAME_INDEX   3

◆ RFC5424_MSGID_INDEX

#define RFC5424_MSGID_INDEX   6

◆ RFC5424_NIL_VALUE

#define RFC5424_NIL_VALUE   "-"

◆ RFC5424_PID_INDEX

#define RFC5424_PID_INDEX   5

◆ RFC5424_PRI_INDEX

#define RFC5424_PRI_INDEX   0

◆ RFC5424_SDATA_INDEX

#define RFC5424_SDATA_INDEX   7

◆ RFC5424_TIMESTAMP_INDEX

#define RFC5424_TIMESTAMP_INDEX   2

◆ RFC5424_VER_INDEX

#define RFC5424_VER_INDEX   1

Enumeration Type Documentation

◆ LogFormatType

Enumerator
LOG_FORMAT_UNKNOWN 
LOG_FORMAT_RFC5424 
LOG_FORMAT_RFC3164 

Function Documentation

◆ close_file_reader()

void close_file_reader ( int  nr_threads)

◆ get_file_reader_options()

GOptionEntry* get_file_reader_options ( void  )

◆ init_file_reader()

int init_file_reader ( int  nr_threads)

◆ read_next_message_from_file()

int read_next_message_from_file ( char *  buf,
int  buflen,
int  syslog_proto,
int  thread_index 
)