Go to the documentation of this file.
63 #define DEFAULT_LOG_FILENAME "eve.json"
64 #define MODULE_NAME "OutputJSON"
66 #define MAX_JSON_SIZE 2048
68 static void OutputJsonDeInitCtx(
OutputCtx *);
69 static void CreateEveCommunityFlowId(
SCJsonBuilder *js,
const Flow *
f,
const uint16_t seed);
70 static int CreateJSONEther(
73 static const char *TRAFFIC_ID_PREFIX =
"traffic/id/";
74 static const char *TRAFFIC_LABEL_PREFIX =
"traffic/label/";
75 static size_t traffic_id_prefix_len = 0;
76 static size_t traffic_label_prefix_len = 0;
84 traffic_id_prefix_len = strlen(TRAFFIC_ID_PREFIX);
85 traffic_label_prefix_len = strlen(TRAFFIC_LABEL_PREFIX);
98 json_t * retval = json_string(val);
100 if (retval == NULL) {
103 for (u = 0; u < strlen(val); u++) {
104 if (isprint(val[u])) {
113 retval = json_string(retbuf);
119 static int64_t sensor_id = -1;
123 SCJbSetStringFromBytes(jb,
"filename", ff->
name, ff->
name_len);
126 SCJbOpenArray(jb,
"sid");
127 for (uint32_t i = 0; ff->
sid != NULL && i < ff->
sid_cnt; i++) {
128 SCJbAppendUint(jb, ff->
sid[i]);
135 SCJbSetString(jb,
"magic", (
char *)ff->magic);
142 SCJbSetHex(jb,
"md5", (uint8_t *)ff->
md5, (uint32_t)
sizeof(ff->
md5));
145 SCJbSetHex(jb,
"sha1", (uint8_t *)ff->
sha1, (uint32_t)
sizeof(ff->
sha1));
160 SCJbSetHex(jb,
"sha256", (uint8_t *)ff->
sha256, (uint32_t)
sizeof(ff->
sha256));
175 SCJbSetUint(jb,
"start", ff->
start);
176 SCJbSetUint(jb,
"end", ff->
end);
178 SCJbSetUint(jb,
"tx_id", tx_id);
183 if (
p == NULL ||
p->
pktvar == NULL) {
189 if (pv->
key || pv->
id > 0) {
191 SCJbOpenArray(js_vars,
"pktvars");
194 SCJbStartObject(js_vars);
196 if (pv->
key != NULL) {
199 uint8_t keybuf[pv->
key_len + 1];
201 SCJbSetPrintAsciiString(js_vars, (
char *)keybuf, pv->
value, pv->
value_len);
204 SCJbSetPrintAsciiString(js_vars, varname, pv->
value, pv->
value_len);
223 static bool SCStringHasPrefix(
const char *s,
const char *prefix)
225 return strncmp(s, prefix, strlen(prefix)) == 0;
247 if (js_flowvars == NULL) {
248 js_flowvars = SCJbNewArray();
249 if (js_flowvars == NULL)
253 SCJbStartObject(js_flowvars);
254 SCJbSetPrintAsciiString(
256 SCJbClose(js_flowvars);
259 if (js_flowvars == NULL) {
260 js_flowvars = SCJbNewArray();
261 if (js_flowvars == NULL)
266 uint8_t keybuf[fv->
keylen + 1];
270 SCJbStartObject(js_flowvars);
271 SCJbSetPrintAsciiString(js_flowvars, (
const char *)keybuf, fv->
data.
fv_str.
value,
273 SCJbClose(js_flowvars);
277 if (js_entropyvals == NULL) {
278 js_entropyvals = SCJbNewObject();
279 if (js_entropyvals == NULL)
289 if (js_flowints == NULL) {
290 js_flowints = SCJbNewObject();
291 if (js_flowints == NULL)
302 if (SCStringHasPrefix(varname, TRAFFIC_ID_PREFIX)) {
303 if (js_traffic_id == NULL) {
304 js_traffic_id = SCJbNewArray();
305 if (
unlikely(js_traffic_id == NULL)) {
309 SCJbAppendString(js_traffic_id, &varname[traffic_id_prefix_len]);
310 }
else if (SCStringHasPrefix(varname, TRAFFIC_LABEL_PREFIX)) {
311 if (js_traffic_label == NULL) {
312 js_traffic_label = SCJbNewArray();
313 if (
unlikely(js_traffic_label == NULL)) {
317 SCJbAppendString(js_traffic_label, &varname[traffic_label_prefix_len]);
319 if (js_flowbits == NULL) {
320 js_flowbits = SCJbNewArray();
324 SCJbAppendString(js_flowbits, varname);
331 SCJbClose(js_flowbits);
332 SCJbSetObject(js_root,
"flowbits", js_flowbits);
333 SCJbFree(js_flowbits);
336 SCJbClose(js_flowints);
337 SCJbSetObject(js_root,
"flowints", js_flowints);
338 SCJbFree(js_flowints);
340 if (js_entropyvals) {
341 SCJbClose(js_entropyvals);
342 SCJbSetObject(js_root,
"entropy", js_entropyvals);
343 SCJbFree(js_entropyvals);
346 SCJbClose(js_flowvars);
347 SCJbSetObject(js_root,
"flowvars", js_flowvars);
348 SCJbFree(js_flowvars);
351 if (js_traffic_id != NULL || js_traffic_label != NULL) {
352 *js_traffic = SCJbNewObject();
353 if (
likely(*js_traffic != NULL)) {
354 if (js_traffic_id != NULL) {
355 SCJbClose(js_traffic_id);
356 SCJbSetObject(*js_traffic,
"id", js_traffic_id);
357 SCJbFree(js_traffic_id);
359 if (js_traffic_label != NULL) {
360 SCJbClose(js_traffic_label);
361 SCJbSetObject(*js_traffic,
"label", js_traffic_label);
362 SCJbFree(js_traffic_label);
364 SCJbClose(*js_traffic);
376 EveAddFlowVars(
f, js_vars, &js_traffic);
377 if (js_traffic != NULL) {
378 SCJbSetObject(js,
"traffic", js_traffic);
379 SCJbFree(js_traffic);
383 EveAddPacketVars(
p, js_vars);
386 SCJbSetObject(js,
"metadata", js_vars);
396 SCJbSetString(js,
"suricata_version",
PROG_VER);
402 CreateJSONEther(js,
p,
f, dir);
421 uint32_t max_len = max_length == 0 ?
GET_PKT_LEN(
p) : max_length;
424 if (!SCJbOpenObject(js,
"packet_info")) {
427 if (!SCJbSetUint(js,
"linktype",
p->
datalink)) {
436 (void)SCJbSetString(js,
"linktype_name", dl_name == NULL ?
"n/a" : dl_name);
469 const void *src_ip = NULL;
470 const void *dst_ip = NULL;
474 if (PacketIsIPv4(
p)) {
477 }
else if (PacketIsIPv6(
p)) {
490 if (PacketIsIPv4(
p)) {
493 }
else if (PacketIsIPv6(
p)) {
500 if (PacketIsIPv4(
p)) {
503 }
else if (PacketIsIPv6(
p)) {
513 if (PacketIsIPv4(
p)) {
516 }
else if (PacketIsIPv6(
p)) {
523 if (PacketIsIPv4(
p)) {
526 }
else if (PacketIsIPv6(
p)) {
539 if (PacketIsIPv4(
p)) {
542 }
else if (PacketIsIPv6(
p)) {
563 snprintf(addr->
proto,
sizeof(addr->
proto),
"%" PRIu32, PacketGetIPProto(
p));
567 #define COMMUNITY_ID_BUF_SIZE 64
569 static bool CalculateCommunityFlowIdv4(
const Flow *
f,
570 const uint16_t seed,
unsigned char *base64buf)
582 uint32_t
src =
f->
src.addr_data32[0];
583 uint32_t
dst =
f->
dst.addr_data32[0];
585 if (
f->
proto == IPPROTO_ICMP)
589 if (
f->
proto == IPPROTO_ICMP)
593 ipv4.seed = htons(seed);
594 if (ntohl(
src) < ntohl(
dst) || (
src ==
dst && ntohs(sp) < ntohs(dp))) {
609 if (SCSha1HashBuffer((
const uint8_t *)&ipv4,
sizeof(ipv4), hash,
sizeof(hash)) == 1) {
612 if (SCBase64Encode(hash,
sizeof(hash), base64buf + 2, &out_len) == SC_BASE64_OK) {
619 static bool CalculateCommunityFlowIdv6(
const Flow *
f,
620 const uint16_t seed,
unsigned char *base64buf)
633 if (
f->
proto == IPPROTO_ICMPV6)
637 if (
f->
proto == IPPROTO_ICMPV6)
641 ipv6.seed = htons(seed);
643 if ((cmp_r < 0) || (cmp_r == 0 && ntohs(sp) < ntohs(dp))) {
644 memcpy(&ipv6.src, &
f->
src.addr_data32, 16);
645 memcpy(&ipv6.dst, &
f->
dst.addr_data32, 16);
649 memcpy(&ipv6.src, &
f->
dst.addr_data32, 16);
650 memcpy(&ipv6.dst, &
f->
src.addr_data32, 16);
658 if (SCSha1HashBuffer((
const uint8_t *)&ipv6,
sizeof(ipv6), hash,
sizeof(hash)) == 1) {
661 if (SCBase64Encode(hash,
sizeof(hash), base64buf + 2, &out_len) == SC_BASE64_OK) {
668 static void CreateEveCommunityFlowId(
SCJsonBuilder *js,
const Flow *
f,
const uint16_t seed)
672 if (CalculateCommunityFlowIdv4(
f, seed, buf)) {
673 SCJbSetString(js,
"community_id", (
const char *)buf);
676 if (CalculateCommunityFlowIdv6(
f, seed, buf)) {
677 SCJbSetString(js,
"community_id", (
const char *)buf);
687 uint64_t flow_id = FlowGetId(
f);
688 SCJbSetUint(js,
"flow_id", flow_id);
697 (void) snprintf(eth_addr, 19,
"%02x:%02x:%02x:%02x:%02x:%02x",
698 val[0], val[1], val[2], val[3], val[4], val[5]);
700 SCJbAppendString(js, eth_addr);
702 SCJbSetString(js, key, eth_addr);
711 static int MacSetIterateToJSON(uint8_t *val,
MacSetSide side,
void *data)
722 static int CreateJSONEther(
727 if (PacketIsEthernet(
p)) {
728 const EthernetHdr *ethh = PacketGetEthernet(
p);
729 SCJbOpenObject(js,
"ether");
730 SCJbSetUint(js,
"ether_type",
SCNtohs(ethh->eth_type));
763 }
else if (
f != NULL) {
772 if (
dst != NULL &&
src != NULL) {
773 SCJbOpenObject(js,
"ether");
780 }
else if (
f != NULL) {
785 SCJbOpenObject(js,
"ether");
787 info.
dst = SCJbNewArray();
788 info.
src = SCJbNewArray();
801 SCJbSetObject(js,
"dest_macs", info.
src);
802 SCJbSetObject(js,
"src_macs", info.
dst);
805 SCJbSetObject(js,
"dest_macs", info.
dst);
806 SCJbSetObject(js,
"src_macs", info.
src);
829 SCJbSetString(js,
"timestamp", timebuf);
834 if (sensor_id >= 0) {
835 SCJbSetUint(js,
"sensor_id", sensor_id);
841 SCJbSetString(js,
"in_iface", dev->
dev);
847 SCJbSetUint(js,
"pcap_cnt", pcap_cnt);
851 SCJbSetString(js,
"event_type", event_type);
856 SCJbOpenArray(js,
"vlan");
873 if (addr->
src_ip[0] !=
'\0') {
874 SCJbSetString(js,
"src_ip", addr->
src_ip);
877 SCJbSetUint(js,
"src_port", addr->
sp);
879 if (addr->
dst_ip[0] !=
'\0') {
880 SCJbSetString(js,
"dest_ip", addr->
dst_ip);
883 SCJbSetUint(js,
"dest_port", addr->
dp);
885 if (addr->
proto[0] !=
'\0') {
886 SCJbSetString(js,
"proto", addr->
proto);
890 if (PacketIsIPv4(
p)) {
891 SCJbSetUint(js,
"ip_v", 4);
892 }
else if (PacketIsIPv6(
p)) {
893 SCJbSetUint(js,
"ip_v", 6);
899 if (PacketIsICMPv4(
p)) {
900 SCJbSetUint(js,
"icmp_type",
p->
icmp_s.type);
901 SCJbSetUint(js,
"icmp_code",
p->
icmp_s.code);
905 if (PacketIsICMPv6(
p)) {
906 SCJbSetUint(js,
"icmp_type", PacketGetICMPv6(
p)->
type);
907 SCJbSetUint(js,
"icmp_code", PacketGetICMPv6(
p)->code);
911 if (PacketIsIGMP(
p)) {
914 SCJbOpenObject(js,
"igmp");
915 SCJbSetUint(js,
"type", PacketGetIGMP(
p)->
type);
919 SCJbOpenObject(js,
"rgmp");
920 SCJbSetUint(js,
"type", PacketGetIGMP(
p)->
type);
926 if (PacketIsSCTP(
p)) {
927 SCJbOpenObject(js,
"sctp");
931 SCJbOpenArray(js,
"chunk_types");
932 for (uint8_t i = 0; i <
cnt; i++) {
935 SCJbAppendString(js,
name);
938 snprintf(unknown,
sizeof(unknown),
"unknown(%u)",
940 SCJbAppendString(js, unknown);
955 if (eve_ctx != NULL) {
970 SCJbSetUint(js,
"tx_id", tx_id);
992 json_object_set_new(js,
"host",
1035 MemBufferReset(*buffer);
1041 size_t jslen = SCJbLen(js);
1044 if (jslen >= remaining) {
1045 size_t expand_by = jslen + 1 - remaining;
1047 if (!
ctx->too_large_warning) {
1051 size_t partial_len =
MIN(
sizeof(partial), jslen);
1052 memcpy(partial, SCJbPtr(js), partial_len - 1);
1053 partial[partial_len - 1] =
'\0';
1054 SCLogWarning(
"Formatted JSON EVE record too large, will be dropped: %s", partial);
1055 ctx->too_large_warning =
true;
1065 static inline enum LogFileType FileTypeFromConf(
const char *typestr)
1069 if (typestr == NULL) {
1071 }
else if (strcmp(typestr,
"file") == 0 || strcmp(typestr,
"regular") == 0) {
1073 }
else if (strcmp(typestr,
"unix_dgram") == 0) {
1075 }
else if (strcmp(typestr,
"unix_stream") == 0) {
1077 }
else if (strcmp(typestr,
"redis") == 0) {
1078 #ifdef HAVE_LIBHIREDIS
1081 FatalError(
"redis JSON output option is not compiled");
1084 SCLogDebug(
"type %s, file type value %d", typestr, log_filetype);
1085 return log_filetype;
1088 static int LogFileTypePrepare(
1098 #ifdef HAVE_LIBHIREDIS
1103 char hostname[1024];
1104 gethostname(hostname, 1023);
1111 if (SCConfLogOpenRedis(redis_node, json_ctx->
file_ctx) < 0) {
1151 SCLogDebug(
"could not create new OutputJsonCtx");
1158 if (sensor_name != NULL) {
1159 SCLogWarning(
"Found deprecated eve-log setting \"sensor-name\". "
1160 "Please set sensor-name globally.");
1163 (void)
SCConfGet(
"sensor-name", &sensor_name);
1168 SCLogDebug(
"AlertJsonInitCtx: Could not create new LogFileCtx");
1182 if (
unlikely(output_ctx == NULL)) {
1186 output_ctx->
data = json_ctx;
1187 output_ctx->
DeInit = OutputJsonDeInitCtx;
1192 if (output_s == NULL) {
1196 enum LogFileType log_filetype = FileTypeFromConf(output_s);
1199 if (filetype != NULL) {
1203 FatalError(
"Invalid JSON output option: %s", output_s);
1208 SCLogConfig(
"Will compress IPv6 addresses in EVE output per RFC 5952");
1217 SCLogInfo(
"Using prefix '%s' for JSON messages", prefix);
1221 FatalError(
"Failed to allocate memory for eve-log.prefix setting.");
1234 if (LogFileTypePrepare(json_ctx, log_filetype, conf) < 0) {
1239 if (sensor_id_s != NULL) {
1241 FatalError(
"Failed to initialize JSON output, "
1242 "invalid sensor-id: %s",
1259 SCLogConfig(
"Enabling Ethernet MAC address logging.");
1267 SCLogConfig(
"Enabling Suricata version logging.");
1276 SCLogConfig(
"Enabling eve community_id logging.");
1282 if (cid_seed != NULL) {
1284 10, 0, cid_seed) < 0)
1286 FatalError(
"Failed to initialize JSON output, "
1287 "invalid community-id-seed: %s",
1309 SCLogDebug(
"returning output_ctx %p", output_ctx);
1311 result.
ctx = output_ctx;
1330 static void OutputJsonDeInitCtx(
OutputCtx *output_ctx)
1334 if (logfile_ctx->dropped) {
1335 SCLogWarning(
"%" PRIu64
" events were dropped due to slow or "
1336 "disconnected socket",
1337 logfile_ctx->dropped);
1339 if (json_ctx->
xff_cfg != NULL) {
#define PKT_IS_TOCLIENT(p)
struct SCJsonBuilder SCJsonBuilder
FlowVarTypeFloat fv_float
int SCConfValIsTrue(const char *val)
Check if a value is true.
void CreateIsoTimeString(const SCTime_t ts, char *str, size_t size)
OutputJsonCommonSettings cfg
void HttpXFFGetCfg(SCConfNode *conf, HttpXFFCfg *result)
Function to return XFF configuration from a configuration node.
void * SCFlowGetStorageById(const Flow *f, SCFlowStorageId id)
LogFileCtx * LogFileNewCtx(void)
LogFileNewCtx() Get a new LogFileCtx.
uint64_t PcapPacketCntGet(const Packet *p)
int MemBufferExpand(MemBuffer **buffer, uint32_t expand_by)
expand membuffer by size of 'expand_by'
uint8_t chunk_types[SCTP_MAX_TRACKED_CHUNKS]
SCJsonBuilder * CreateEveHeader(const Packet *p, enum SCOutputJsonLogDirection dir, const char *event_type, JsonAddrInfo *addr, OutputJsonCtx *eve_ctx)
#define JSON_OUTPUT_BUFFER_SIZE
const char * PrintInetIPv6(const void *src, char *dst, socklen_t size, bool compress_ipv6)
void JsonAddrInfoInit(const Packet *p, enum SCOutputJsonLogDirection dir, JsonAddrInfo *addr, OutputJsonCommonSettings *cfg)
int StringParseUint16(uint16_t *res, int base, size_t len, const char *str)
int SCConfGet(const char *name, const char **vptr)
Retrieve the value of a configuration node.
LiveDevice * LiveDeviceGetById(const int id)
bool SCProtoNameValid(uint16_t proto)
Function to check if the received protocol number is valid and do we have corresponding name entry fo...
void EveTcpFlags(const uint8_t flags, SCJsonBuilder *js)
jsonify tcp flags field Only add 'true' fields in an attempt to keep things reasonably compact.
const JsonAddrInfo json_addr_info_zero
#define COMMUNITY_ID_BUF_SIZE
bool include_community_id
int SCConfValIsFalse(const char *val)
Check if a value is false.
const char * known_proto[256]
void OutputJsonBuilderBuffer(ThreadVars *tv, const Packet *p, Flow *f, SCJsonBuilder *js, OutputJsonThreadCtx *ctx)
void CreateEveFlowId(SCJsonBuilder *js, const Flow *f)
const char * SCConfNodeLookupChildValue(const SCConfNode *node, const char *name)
Lookup the value of a child configuration node by name.
struct JSONMACAddrInfo JSONMACAddrInfo
uint8_t sha1[SC_SHA1_LEN]
#define GET_IPV6_DST_ADDR(p)
json_t * SCJsonString(const char *val)
bool include_suricata_version
void PrintStringsToBuffer(uint8_t *dst_buf, uint32_t *dst_buf_offset_ptr, uint32_t dst_buf_size, const uint8_t *src_buf, const uint32_t src_buf_len)
void OutputJsonRegister(void)
size_t strlcpy(char *dst, const char *src, size_t siz)
struct Packet_::@32::@39 icmp_s
struct Flow_::@128::@134 icmp_d
SCRunMode SCRunmodeGet(void)
Get the current run mode.
int LogFileWrite(LogFileCtx *file_ctx, MemBuffer *buffer)
#define JB_SET_STRING(jb, key, val)
struct GenericVar_ * next
#define GET_IPV4_DST_ADDR_PTR(p)
#define PKT_IS_TOSERVER(p)
#define DEFAULT_LOG_FILENAME
void EveAddCommonOptions(const OutputJsonCommonSettings *cfg, const Packet *p, const Flow *f, SCJsonBuilder *js, enum SCOutputJsonLogDirection dir)
SCEveFileTypeThreadInitFunc ThreadInit
Initialize thread specific data.
void OutputRegisterModule(const char *, const char *, OutputInitFunc)
OutputInitResult OutputJsonInitCtx(SCConfNode *conf)
Create a new LogFileCtx for "fast" output style.
Per thread variable structure.
#define SCTP_GET_RAW_VTAG(sctph)
const char * PrintInet(int af, const void *src, char *dst, socklen_t size)
uint64_t FileTrackedSize(const File *file)
get the size of the file
SCEveFileTypeInitFunc Init
Function to initialize this filetype.
const char * PktSrcToString(enum PktSrcEnum pkt_src)
#define JB_SET_TRUE(jb, key)
#define SCLogWarning(...)
Macro used to log WARNING messages.
void SyslogInitialize(void)
void NullLogInitialize(void)
void EveFileInfo(SCJsonBuilder *jb, const File *ff, const uint64_t tx_id, const uint16_t flags)
void JSONFormatAndAddMACAddr(SCJsonBuilder *js, const char *key, const uint8_t *val, bool is_array)
@ LOGFILE_TYPE_UNIX_DGRAM
bool SCLogOpenThreadedFile(const char *log_path, const char *append, LogFileCtx *parent_ctx)
typedef __attribute__
DNP3 application header.
@ LOGFILE_TYPE_UNIX_STREAM
void EvePacket(const Packet *p, SCJsonBuilder *js, uint32_t max_length)
Jsonify a packet.
#define SCLogInfo(...)
Macro used to log INFORMATIONAL messages.
void EveAddMetadata(const Packet *p, const Flow *f, SCJsonBuilder *js)
char proto[JSON_PROTO_LEN]
SCConfNode * SCConfNodeLookupChild(const SCConfNode *node, const char *name)
Lookup a child configuration node by name.
struct Flow_::@126::@132 icmp_s
uint8_t tracked_chunk_cnt
int StringParseUint64(uint64_t *res, int base, size_t len, const char *str)
#define GET_IPV4_SRC_ADDR_PTR(p)
#define PrintBufferData(buf, buf_offset_ptr, buf_size,...)
void(* DeInit)(struct OutputCtx_ *)
const char * VarNameStoreLookupById(const uint32_t id, const enum VarTypes type)
find name for id+type at packet time. As the active store won't be modified, we don't need locks.
union FlowVar_::@121 data
int MacSetSize(const MacSet *ms)
#define FLOWVAR_TYPE_FLOAT
int LogFileFreeCtx(LogFileCtx *lf_ctx)
LogFileFreeCtx() Destroy a LogFileCtx (Close the file and free memory)
SCJsonBuilder * CreateEveHeaderWithTxId(const Packet *p, enum SCOutputJsonLogDirection dir, const char *event_type, JsonAddrInfo *addr, uint64_t tx_id, OutputJsonCtx *eve_ctx)
uint8_t sha256[SC_SHA256_LEN]
#define JB_SET_FALSE(jb, key)
struct SCLogConfig_ SCLogConfig
Holds the config state used by the logging api.
char src_ip[JSON_ADDR_LEN]
int SCConfLogOpenGeneric(SCConfNode *conf, LogFileCtx *log_ctx, const char *default_filename, int rotate)
open a generic output "log file", which may be a regular file or a socket
#define GET_IPV6_SRC_ADDR(p)
uint8_t * MacSetGetFirst(const MacSet *ms, MacSetSide side)
#define MEMBUFFER_SIZE(mem_buffer)
Get the MemBuffers current size.
int MacSetForEach(const MacSet *ms, MacSetIteratorFunc IterFunc, void *data)
char dst_ip[JSON_ADDR_LEN]
const char * PcapFileGetFilename(void)
int OutputJSONMemBufferCallback(const char *str, size_t size, void *data)
int OutputJSONBuffer(json_t *js, LogFileCtx *file_ctx, MemBuffer **buffer)
uint32_t MemBufferWriteRaw(MemBuffer *dst, const uint8_t *raw, const uint32_t raw_len)
Write a raw buffer to the MemBuffer dst.
SCEveFileType * SCEveFindFileType(const char *name)
uint16_t vlan_id[VLAN_MAX_LAYERS]
uint16_t community_id_seed
#define MEMBUFFER_OFFSET(mem_buffer)
Get the MemBuffers current offset.
const char * DatalinkValueToName(int datalink_value)
#define DEBUG_VALIDATE_BUG_ON(exp)
union PacketL4::L4Vars vars
void SCEveRunCallbacks(ThreadVars *tv, const Packet *p, Flow *f, SCJsonBuilder *jb)
Structure used to define an EVE output file type.
SCFlowStorageId MacSetGetFlowStorageID(void)