suricata
output-json-frame.c File Reference
#include "suricata-common.h"
#include "detect.h"
#include "flow.h"
#include "conf.h"
#include "threads.h"
#include "tm-threads.h"
#include "threadvars.h"
#include "util-debug.h"
#include "util-logopenfile.h"
#include "util-misc.h"
#include "util-unittest.h"
#include "util-unittest-helper.h"
#include "detect-parse.h"
#include "detect-engine.h"
#include "detect-engine-mpm.h"
#include "detect-reference.h"
#include "detect-metadata.h"
#include "app-layer-parser.h"
#include "app-layer-frames.h"
#include "app-layer-dnp3.h"
#include "app-layer-htp.h"
#include "app-layer-htp-xff.h"
#include "app-layer-ftp.h"
#include "util-classification-config.h"
#include "stream-tcp.h"
#include "output.h"
#include "output-json.h"
#include "output-json-frame.h"
#include "util-byte.h"
#include "util-privs.h"
#include "util-print.h"
#include "util-proto-name.h"
#include "util-optimize.h"
#include "util-buffer.h"
#include "util-validate.h"
Include dependency graph for output-json-frame.c:

Go to the source code of this file.

Data Structures

struct  FrameJsonOutputCtx_
 
struct  JsonFrameLogThread_
 
struct  FrameJsonStreamDataCallbackData
 

Macros

#define MODULE_NAME   "JsonFrameLog"
 
#define JSON_STREAM_BUFFER_SIZE   4096
 

Typedefs

typedef struct FrameJsonOutputCtx_ FrameJsonOutputCtx
 
typedef struct JsonFrameLogThread_ JsonFrameLogThread
 

Functions

void FrameJsonLogOneFrame (const uint8_t ipproto, const Frame *frame, Flow *f, const TcpStream *stream, const Packet *p, JsonBuilder *jb, MemBuffer *buffer)
 log a single frame More...
 
void JsonFrameLogRegister (void)
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Logs frames in JSON format.

Definition in file output-json-frame.c.

Macro Definition Documentation

◆ JSON_STREAM_BUFFER_SIZE

#define JSON_STREAM_BUFFER_SIZE   4096

Definition at line 71 of file output-json-frame.c.

◆ MODULE_NAME

#define MODULE_NAME   "JsonFrameLog"

Definition at line 69 of file output-json-frame.c.

Typedef Documentation

◆ FrameJsonOutputCtx

◆ JsonFrameLogThread

Function Documentation

◆ FrameJsonLogOneFrame()

void FrameJsonLogOneFrame ( const uint8_t  ipproto,
const Frame frame,
Flow f,
const TcpStream stream,
const Packet p,
JsonBuilder *  jb,
MemBuffer buffer 
)

log a single frame

Note
ipproto argument is passed to assist static code analyzers

Definition at line 255 of file output-json-frame.c.

References Flow_::alproto, AppLayerParserGetFrameNameById(), DEBUG_VALIDATE_BUG_ON, FrameJsonStreamDataCallbackData::frame, FRAME_STREAM_TYPE, Frame::id, len, Frame::len, Frame::offset, PKT_IS_TOSERVER, Flow_::proto, Packet_::proto, StreamTcpGetUsable(), and Frame::type.

Here is the call graph for this function:

◆ JsonFrameLogRegister()

void JsonFrameLogRegister ( void  )

Definition at line 551 of file output-json-frame.c.

References LOGGER_JSON_FRAME, MODULE_NAME, and OutputRegisterPacketSubModule().

Here is the call graph for this function: