Go to the documentation of this file.
24 #ifndef SURICATA_OUTPUT_JSON_H
25 #define SURICATA_OUTPUT_JSON_H
43 #define JSON_ADDR_LEN 46
44 #define JSON_PROTO_LEN 16
63 #define JSON_OUTPUT_BUFFER_SIZE 65535
void FreeEveThreadCtx(OutputJsonThreadCtx *ctx)
void OutputJsonBuilderBuffer(ThreadVars *tv, const Packet *p, Flow *f, JsonBuilder *js, OutputJsonThreadCtx *ctx)
struct OutputJsonCommonSettings_ OutputJsonCommonSettings
json_t * SCJsonString(const char *val)
JsonBuilder * CreateEveHeaderWithTxId(const Packet *p, enum OutputJsonLogDirection dir, const char *event_type, JsonAddrInfo *addr, uint64_t tx_id, OutputJsonCtx *eve_ctx)
OutputJsonCommonSettings cfg
struct OutputJsonCtx_ OutputJsonCtx
OutputInitResult OutputJsonLogInitSub(ConfNode *conf, OutputCtx *parent_ctx)
void JSONFormatAndAddMACAddr(JsonBuilder *js, const char *key, const uint8_t *val, bool is_array)
enum LogFileType json_out
bool include_community_id
void EveFileInfo(JsonBuilder *js, const File *file, const uint64_t tx_id, const uint16_t flags)
const JsonAddrInfo json_addr_info_zero
TmEcode JsonLogThreadDeinit(ThreadVars *t, void *data)
struct OutputJsonThreadCtx_ OutputJsonThreadCtx
void CreateEveFlowId(JsonBuilder *js, const Flow *f)
Per thread variable structure.
void EvePacket(const Packet *p, JsonBuilder *js, uint32_t max_length)
Jsonify a packet.
JsonBuilder * CreateEveHeader(const Packet *p, enum OutputJsonLogDirection dir, const char *event_type, JsonAddrInfo *addr, OutputJsonCtx *eve_ctx)
void EveAddMetadata(const Packet *p, const Flow *f, JsonBuilder *js)
char proto[JSON_PROTO_LEN]
void EveAddCommonOptions(const OutputJsonCommonSettings *cfg, const Packet *p, const Flow *f, JsonBuilder *js, enum OutputJsonLogDirection dir)
void EveTcpFlags(uint8_t flags, JsonBuilder *js)
jsonify tcp flags field Only add 'true' fields in an attempt to keep things reasonably compact.
void OutputJsonRegister(void)
char src_ip[JSON_ADDR_LEN]
struct JsonAddrInfo_ JsonAddrInfo
char dst_ip[JSON_ADDR_LEN]
int OutputJSONBuffer(json_t *js, LogFileCtx *file_ctx, MemBuffer **buffer)
uint16_t community_id_seed
struct OutputJSONMemBufferWrapper_ OutputJSONMemBufferWrapper
void JsonAddrInfoInit(const Packet *p, enum OutputJsonLogDirection dir, JsonAddrInfo *addr)
OutputInitResult OutputJsonInitCtx(ConfNode *)
Create a new LogFileCtx for "fast" output style.
int OutputJSONMemBufferCallback(const char *str, size_t size, void *data)
Structure used to define an EVE output file type plugin.
TmEcode JsonLogThreadInit(ThreadVars *t, const void *initdata, void **data)
OutputJsonThreadCtx * CreateEveThreadCtx(ThreadVars *t, OutputJsonCtx *ctx)