Go to the documentation of this file.
28 #ifndef SURICATA_LOG_CF_COMMON_H
29 #define SURICATA_LOG_CF_COMMON_H
31 #define LOG_MAXN_NODES 64
32 #define LOG_NODE_STRLEN 256
33 #define LOG_NODE_MAXOUTPUTLEN 8192
35 #define TIMESTAMP_DEFAULT_FORMAT "%D-%H:%M:%S"
38 #define LOG_CF_NONE "-"
39 #define LOG_CF_LITERAL '%'
40 #define LOG_CF_TIMESTAMP 't'
41 #define LOG_CF_TIMESTAMP_U 'z'
42 #define LOG_CF_CLIENT_IP 'a'
43 #define LOG_CF_SERVER_IP 'A'
44 #define LOG_CF_CLIENT_PORT 'p'
45 #define LOG_CF_SERVER_PORT 'P'
48 #define LOG_CF_STAR_SEPARATOR "[**]"
49 #define LOG_CF_SPACE_SEPARATOR " "
50 #define LOG_CF_UNKNOWN_VALUE "-"
52 #define LOG_CF_WRITE_STAR_SEPARATOR(buffer) MemBufferWriteString(buffer, LOG_CF_STAR_SEPARATOR);
54 #define LOG_CF_WRITE_SPACE_SEPARATOR(buffer) \
55 MemBufferWriteString(buffer, LOG_CF_SPACE_SEPARATOR);
57 #define LOG_CF_WRITE_UNKNOWN_VALUE(buffer) \
58 MemBufferWriteString(buffer, LOG_CF_UNKNOWN_VALUE);
void LogCustomFormatAddNode(LogCustomFormat *cf, LogCustomFormatNode *node)
Adds a node to custom format.
void LogCustomFormatFree(LogCustomFormat *cf)
Frees memory held by a custom format.
void LogCustomFormatRegister(void)
void LogCustomFormatWriteTimestamp(MemBuffer *buffer, const char *fmt, const SCTime_t ts)
Writes a timestamp with given format into a MemBuffer.
int LogCustomFormatParse(LogCustomFormat *cf, const char *format)
Parses and saves format nodes for custom format.
struct LogCustomFormatNode_ LogCustomFormatNode
void LogCustomFormatNodeFree(LogCustomFormatNode *node)
Frees memory held by a custom format node.
LogCustomFormatNode * LogCustomFormatNodeAlloc(void)
Creates a custom format node.
LogCustomFormat * LogCustomFormatAlloc(void)
Creates a custom format.
struct LogCustomFormat_ LogCustomFormat