suricata
output-json-drop.c
Go to the documentation of this file.
1 /* Copyright (C) 2007-2021 Open Information Security Foundation
2  *
3  * You can copy, redistribute or modify this Program under the terms of
4  * the GNU General Public License version 2 as published by the Free
5  * Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * version 2 along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17 
18 /**
19  * \file
20  *
21  * \author Tom DeCanio <td@npulsetech.com>
22  *
23  * JSON Drop log module to log the dropped packet information
24  *
25  */
26 
27 #include "suricata-common.h"
28 #include "packet.h"
29 #include "detect.h"
30 #include "flow.h"
31 #include "conf.h"
32 
33 #include "threads.h"
34 #include "tm-threads.h"
35 #include "threadvars.h"
36 #include "util-debug.h"
37 
38 #include "decode-ipv4.h"
39 #include "detect-parse.h"
40 #include "detect-engine.h"
41 #include "detect-engine-mpm.h"
42 #include "detect-reference.h"
43 
44 #include "output.h"
45 #include "output-json.h"
46 #include "output-json-alert.h"
47 #include "output-json-drop.h"
48 
49 #include "util-unittest.h"
50 #include "util-unittest-helper.h"
52 #include "util-privs.h"
53 #include "util-print.h"
54 #include "util-proto-name.h"
55 #include "util-logopenfile.h"
56 #include "util-time.h"
57 #include "util-buffer.h"
58 
59 #include "action-globals.h"
60 
61 #define MODULE_NAME "JsonDropLog"
62 
63 #define LOG_DROP_ALERTS 1
64 
65 typedef struct JsonDropOutputCtx_ {
66  uint8_t flags;
69 
70 typedef struct JsonDropLogThread_ {
74 
75 /* default to true as this has been the default behavior for a long time */
76 static int g_droplog_flows_start = 1;
77 
78 /**
79  * \brief Log the dropped packets in netfilter format when engine is running
80  * in inline mode
81  *
82  * \param tv Pointer the current thread variables
83  * \param p Pointer the packet which is being logged
84  *
85  * \return return TM_EODE_OK on success
86  */
87 static int DropLogJSON (JsonDropLogThread *aft, const Packet *p)
88 {
89  JsonDropOutputCtx *drop_ctx = aft->drop_ctx;
90 
93 
94  JsonBuilder *js = CreateEveHeader(p, LOG_DIR_PACKET, "drop", &addr, drop_ctx->eve_ctx);
95  if (unlikely(js == NULL))
96  return TM_ECODE_OK;
97 
98  if (p->flow != NULL) {
99  if (p->flowflags & FLOW_PKT_TOSERVER) {
100  jb_set_string(js, "direction", "to_server");
101  } else {
102  jb_set_string(js, "direction", "to_client");
103  }
104  }
105 
106  jb_open_object(js, "drop");
107 
108  uint16_t proto = 0;
109  if (PKT_IS_IPV4(p)) {
110  jb_set_uint(js, "len", IPV4_GET_IPLEN(p));
111  jb_set_uint(js, "tos", IPV4_GET_IPTOS(p));
112  jb_set_uint(js, "ttl", IPV4_GET_IPTTL(p));
113  jb_set_uint(js, "ipid", IPV4_GET_IPID(p));
114  proto = IPV4_GET_IPPROTO(p);
115  } else if (PKT_IS_IPV6(p)) {
116  jb_set_uint(js, "len", IPV6_GET_PLEN(p));
117  jb_set_uint(js, "tc", IPV6_GET_CLASS(p));
118  jb_set_uint(js, "hoplimit", IPV6_GET_HLIM(p));
119  jb_set_uint(js, "flowlbl", IPV6_GET_FLOW(p));
120  proto = IPV6_GET_L4PROTO(p);
121  }
122  switch (proto) {
123  case IPPROTO_TCP:
124  if (PKT_IS_TCP(p)) {
125  jb_set_uint(js, "tcpseq", TCP_GET_SEQ(p));
126  jb_set_uint(js, "tcpack", TCP_GET_ACK(p));
127  jb_set_uint(js, "tcpwin", TCP_GET_WINDOW(p));
128  jb_set_bool(js, "syn", TCP_ISSET_FLAG_SYN(p) ? true : false);
129  jb_set_bool(js, "ack", TCP_ISSET_FLAG_ACK(p) ? true : false);
130  jb_set_bool(js, "psh", TCP_ISSET_FLAG_PUSH(p) ? true : false);
131  jb_set_bool(js, "rst", TCP_ISSET_FLAG_RST(p) ? true : false);
132  jb_set_bool(js, "urg", TCP_ISSET_FLAG_URG(p) ? true : false);
133  jb_set_bool(js, "fin", TCP_ISSET_FLAG_FIN(p) ? true : false);
134  jb_set_uint(js, "tcpres", TCP_GET_RAW_X2(p->tcph));
135  jb_set_uint(js, "tcpurgp", TCP_GET_URG_POINTER(p));
136  }
137  break;
138  case IPPROTO_UDP:
139  if (PKT_IS_UDP(p)) {
140  jb_set_uint(js, "udplen", UDP_GET_LEN(p));
141  }
142  break;
143  case IPPROTO_ICMP:
144  if (PKT_IS_ICMPV4(p)) {
145  jb_set_uint(js, "icmp_id", ICMPV4_GET_ID(p));
146  jb_set_uint(js, "icmp_seq", ICMPV4_GET_SEQ(p));
147  } else if(PKT_IS_ICMPV6(p)) {
148  jb_set_uint(js, "icmp_id", ICMPV6_GET_ID(p));
149  jb_set_uint(js, "icmp_seq", ICMPV6_GET_SEQ(p));
150  }
151  break;
152  }
153  if (p->drop_reason != 0) {
154  const char *str = PacketDropReasonToString(p->drop_reason);
155  jb_set_string(js, "reason", str);
156  }
157 
158  /* Close drop. */
159  jb_close(js);
160 
161  if (aft->drop_ctx->flags & LOG_DROP_ALERTS) {
162  int logged = 0;
163  int i;
164  for (i = 0; i < p->alerts.cnt; i++) {
165  const PacketAlert *pa = &p->alerts.alerts[i];
166  if (unlikely(pa->s == NULL)) {
167  continue;
168  }
170  ((pa->action & ACTION_DROP) && EngineModeIsIPS()))
171  {
172  AlertJsonHeader(NULL, p, pa, js, 0, &addr, NULL);
173  logged = 1;
174  break;
175  }
176  }
177  if (logged == 0) {
178  if (p->alerts.drop.action != 0) {
179  const PacketAlert *pa = &p->alerts.drop;
180  AlertJsonHeader(NULL, p, pa, js, 0, &addr, NULL);
181  }
182  }
183  }
184 
185  OutputJsonBuilderBuffer(js, aft->ctx);
186  jb_free(js);
187 
188  return TM_ECODE_OK;
189 }
190 
191 static TmEcode JsonDropLogThreadInit(ThreadVars *t, const void *initdata, void **data)
192 {
193  JsonDropLogThread *aft = SCCalloc(1, sizeof(JsonDropLogThread));
194  if (unlikely(aft == NULL))
195  return TM_ECODE_FAILED;
196 
197  if(initdata == NULL)
198  {
199  SCLogDebug("Error getting context for EveLogDrop. \"initdata\" argument NULL");
200  goto error_exit;
201  }
202 
203  /** Use the Ouptut Context (file pointer and mutex) */
204  aft->drop_ctx = ((OutputCtx *)initdata)->data;
205  aft->ctx = CreateEveThreadCtx(t, aft->drop_ctx->eve_ctx);
206  if (!aft->ctx) {
207  goto error_exit;
208  }
209 
210  *data = (void *)aft;
211  return TM_ECODE_OK;
212 
213 error_exit:
214  SCFree(aft);
215  return TM_ECODE_FAILED;
216 }
217 
218 static TmEcode JsonDropLogThreadDeinit(ThreadVars *t, void *data)
219 {
220  JsonDropLogThread *aft = (JsonDropLogThread *)data;
221  if (aft == NULL) {
222  return TM_ECODE_OK;
223  }
224 
225  FreeEveThreadCtx(aft->ctx);
226 
227  /* clear memory */
228  memset(aft, 0, sizeof(*aft));
229 
230  SCFree(aft);
231  return TM_ECODE_OK;
232 }
233 
234 static void JsonDropOutputCtxFree(JsonDropOutputCtx *drop_ctx)
235 {
236  if (drop_ctx != NULL) {
237  SCFree(drop_ctx);
238  }
239 }
240 
241 static void JsonDropLogDeInitCtxSub(OutputCtx *output_ctx)
242 {
244 
245  JsonDropOutputCtx *drop_ctx = output_ctx->data;
246  SCFree(drop_ctx);
247  SCLogDebug("cleaning up sub output_ctx %p", output_ctx);
248  SCFree(output_ctx);
249 }
250 
251 static OutputInitResult JsonDropLogInitCtxSub(ConfNode *conf, OutputCtx *parent_ctx)
252 {
253  OutputInitResult result = { NULL, false };
254  if (OutputDropLoggerEnable() != 0) {
255  SCLogError("only one 'drop' logger "
256  "can be enabled");
257  return result;
258  }
259 
260  OutputJsonCtx *ajt = parent_ctx->data;
261 
262  JsonDropOutputCtx *drop_ctx = SCCalloc(1, sizeof(*drop_ctx));
263  if (drop_ctx == NULL)
264  return result;
265 
266  OutputCtx *output_ctx = SCCalloc(1, sizeof(OutputCtx));
267  if (unlikely(output_ctx == NULL)) {
268  JsonDropOutputCtxFree(drop_ctx);
269  return result;
270  }
271 
272  if (conf) {
273  const char *extended = ConfNodeLookupChildValue(conf, "alerts");
274  if (extended != NULL) {
275  if (ConfValIsTrue(extended)) {
276  drop_ctx->flags = LOG_DROP_ALERTS;
277  }
278  }
279  extended = ConfNodeLookupChildValue(conf, "flows");
280  if (extended != NULL) {
281  if (strcasecmp(extended, "start") == 0) {
282  g_droplog_flows_start = 1;
283  } else if (strcasecmp(extended, "all") == 0) {
284  g_droplog_flows_start = 0;
285  } else {
286  SCLogWarning("valid options for "
287  "'flow' are 'start' and 'all'");
288  }
289  }
290  }
291 
292  drop_ctx->eve_ctx = ajt;
293 
294  output_ctx->data = drop_ctx;
295  output_ctx->DeInit = JsonDropLogDeInitCtxSub;
296 
297  result.ctx = output_ctx;
298  result.ok = true;
299  return result;
300 }
301 
302 /**
303  * \brief Log the dropped packets when engine is running in inline mode
304  *
305  * \param tv Pointer the current thread variables
306  * \param data Pointer to the droplog struct
307  * \param p Pointer the packet which is being logged
308  *
309  * \retval 0 on succes
310  */
311 static int JsonDropLogger(ThreadVars *tv, void *thread_data, const Packet *p)
312 {
313  JsonDropLogThread *td = thread_data;
314  int r = DropLogJSON(td, p);
315  if (r < 0)
316  return -1;
317 
318  if (!g_droplog_flows_start)
319  return 0;
320 
321  if (p->flow) {
322  if (p->flow->flags & FLOW_ACTION_DROP) {
325  else if (PKT_IS_TOCLIENT(p) && !(p->flow->flags & FLOW_TOCLIENT_DROP_LOGGED))
327  }
328  }
329  return 0;
330 }
331 
332 
333 /**
334  * \brief Check if we need to drop-log this packet
335  *
336  * \param tv Pointer the current thread variables
337  * \param p Pointer the packet which is tested
338  *
339  * \retval bool TRUE or FALSE
340  */
341 static int JsonDropLogCondition(ThreadVars *tv, void *data, const Packet *p)
342 {
343  if (!EngineModeIsIPS()) {
344  SCLogDebug("engine is not running in inline mode, so returning");
345  return FALSE;
346  }
347  if (PKT_IS_PSEUDOPKT(p)) {
348  SCLogDebug("drop log doesn't log pseudo packets");
349  return FALSE;
350  }
351 
352  if (g_droplog_flows_start && p->flow != NULL) {
353  int ret = FALSE;
354 
355  /* for a flow that will be dropped fully, log just once per direction */
356  if (p->flow->flags & FLOW_ACTION_DROP) {
358  ret = TRUE;
359  else if (PKT_IS_TOCLIENT(p) && !(p->flow->flags & FLOW_TOCLIENT_DROP_LOGGED))
360  ret = TRUE;
361  }
362 
363  /* if drop is caused by signature, log anyway */
364  if (p->alerts.drop.action != 0)
365  ret = TRUE;
366 
367  return ret;
368  } else if (PacketCheckAction(p, ACTION_DROP)) {
369  return TRUE;
370  }
371 
372  return FALSE;
373 }
374 
376 {
378  "eve-log.drop", JsonDropLogInitCtxSub, JsonDropLogger,
379  JsonDropLogCondition, JsonDropLogThreadInit, JsonDropLogThreadDeinit,
380  NULL);
381 }
PKT_IS_TOCLIENT
#define PKT_IS_TOCLIENT(p)
Definition: decode.h:252
PacketCheckAction
bool PacketCheckAction(const Packet *p, const uint8_t a)
Definition: packet.c:48
PKT_IS_UDP
#define PKT_IS_UDP(p)
Definition: decode.h:248
tm-threads.h
TCP_GET_RAW_X2
#define TCP_GET_RAW_X2(tcph)
Definition: decode-tcp.h:72
detect-engine.h
OutputDropLoggerEnable
int OutputDropLoggerEnable(void)
Definition: output.c:811
PacketAlert_::s
const struct Signature_ * s
Definition: decode.h:267
JsonDropLogThread_::drop_ctx
JsonDropOutputCtx * drop_ctx
Definition: output-json-drop.c:71
PKT_IS_PSEUDOPKT
#define PKT_IS_PSEUDOPKT(p)
return 1 if the packet is a pseudo packet
Definition: decode.h:1059
PKT_IS_IPV6
#define PKT_IS_IPV6(p)
Definition: decode.h:246
unlikely
#define unlikely(expr)
Definition: util-optimize.h:35
ACTION_REJECT
#define ACTION_REJECT
Definition: action-globals.h:31
JsonDropLogThread_
Definition: output-json-drop.c:70
PacketDropReasonToString
const char * PacketDropReasonToString(enum PacketDropReason r)
Definition: decode.c:785
SCLogDebug
#define SCLogDebug(...)
Definition: util-debug.h:269
FreeEveThreadCtx
void FreeEveThreadCtx(OutputJsonThreadCtx *ctx)
Definition: output-json-common.c:58
PacketAlerts_::cnt
uint16_t cnt
Definition: decode.h:289
action-globals.h
threads.h
OutputJsonCtx_
Definition: output-json.h:81
ICMPV6_GET_SEQ
#define ICMPV6_GET_SEQ(p)
Definition: decode-icmpv6.h:112
logged
int logged
Definition: app-layer-htp.h:1
JsonDropOutputCtx
struct JsonDropOutputCtx_ JsonDropOutputCtx
OutputJsonBuilderBuffer
int OutputJsonBuilderBuffer(JsonBuilder *js, OutputJsonThreadCtx *ctx)
Definition: output-json.c:934
PacketAlerts_::alerts
PacketAlert * alerts
Definition: decode.h:292
CreateEveThreadCtx
OutputJsonThreadCtx * CreateEveThreadCtx(ThreadVars *t, OutputJsonCtx *ctx)
Definition: output-json-common.c:29
json_addr_info_zero
const JsonAddrInfo json_addr_info_zero
Definition: output-json.c:89
FLOW_PKT_TOSERVER
#define FLOW_PKT_TOSERVER
Definition: flow.h:227
IPV6_GET_L4PROTO
#define IPV6_GET_L4PROTO(p)
Definition: decode-ipv6.h:93
ICMPV6_GET_ID
#define ICMPV6_GET_ID(p)
Definition: decode-icmpv6.h:110
PacketAlerts_::drop
PacketAlert drop
Definition: decode.h:295
util-privs.h
FLOW_ACTION_DROP
#define FLOW_ACTION_DROP
Definition: flow.h:67
FLOW_TOSERVER_DROP_LOGGED
#define FLOW_TOSERVER_DROP_LOGGED
Definition: flow.h:75
proto
uint8_t proto
Definition: decode-template.h:0
Packet_::flowflags
uint8_t flowflags
Definition: decode.h:459
TM_ECODE_FAILED
@ TM_ECODE_FAILED
Definition: tm-threads-common.h:85
Packet_::alerts
PacketAlerts alerts
Definition: decode.h:588
util-unittest.h
ConfValIsTrue
int ConfValIsTrue(const char *val)
Check if a value is true.
Definition: conf.c:531
util-unittest-helper.h
OutputCtx_::data
void * data
Definition: tm-modules.h:81
TM_ECODE_OK
@ TM_ECODE_OK
Definition: tm-threads-common.h:84
OutputCtx_
Definition: tm-modules.h:78
IPV6_GET_PLEN
#define IPV6_GET_PLEN(p)
Definition: decode-ipv6.h:88
TCP_GET_WINDOW
#define TCP_GET_WINDOW(p)
Definition: decode-tcp.h:116
PacketAlert_::action
uint8_t action
Definition: decode.h:265
OutputJsonThreadCtx_
Definition: output-json.h:89
detect-reference.h
TCP_ISSET_FLAG_SYN
#define TCP_ISSET_FLAG_SYN(p)
Definition: decode-tcp.h:122
ICMPV4_GET_SEQ
#define ICMPV4_GET_SEQ(p)
Definition: decode-icmpv4.h:245
ACTION_REJECT_DST
#define ACTION_REJECT_DST
Definition: action-globals.h:32
PKT_IS_TCP
#define PKT_IS_TCP(p)
Definition: decode.h:247
IPV4_GET_IPPROTO
#define IPV4_GET_IPPROTO(p)
Definition: decode-ipv4.h:148
util-debug.h
LOG_DROP_ALERTS
#define LOG_DROP_ALERTS
Definition: output-json-drop.c:63
PKT_IS_TOSERVER
#define PKT_IS_TOSERVER(p)
Definition: decode.h:251
OutputInitResult_::ctx
OutputCtx * ctx
Definition: output.h:47
output-json.h
JsonDropLogThread_::ctx
OutputJsonThreadCtx * ctx
Definition: output-json-drop.c:72
CreateEveHeader
JsonBuilder * CreateEveHeader(const Packet *p, enum OutputJsonLogDirection dir, const char *event_type, JsonAddrInfo *addr, OutputJsonCtx *eve_ctx)
Definition: output-json.c:796
util-print.h
detect-engine-mpm.h
detect.h
ThreadVars_
Per thread variable structure.
Definition: threadvars.h:57
IPV4_GET_IPLEN
#define IPV4_GET_IPLEN(p)
Definition: decode-ipv4.h:127
TCP_ISSET_FLAG_URG
#define TCP_ISSET_FLAG_URG(p)
Definition: decode-tcp.h:126
util-time.h
OutputInitResult_::ok
bool ok
Definition: output.h:48
SCLogWarning
#define SCLogWarning(...)
Macro used to log WARNING messages.
Definition: util-debug.h:249
IPV4_GET_IPID
#define IPV4_GET_IPID(p)
Definition: decode-ipv4.h:129
TRUE
#define TRUE
Definition: suricata-common.h:33
PKT_IS_ICMPV6
#define PKT_IS_ICMPV6(p)
Definition: decode.h:250
TCP_GET_SEQ
#define TCP_GET_SEQ(p)
Definition: decode-tcp.h:114
FALSE
#define FALSE
Definition: suricata-common.h:34
JsonAddrInfo_
Definition: output-json.h:49
Packet_
Definition: decode.h:428
conf.h
TmEcode
TmEcode
Definition: tm-threads-common.h:83
AlertJsonHeader
void AlertJsonHeader(void *ctx, const Packet *p, const PacketAlert *pa, JsonBuilder *js, uint16_t flags, JsonAddrInfo *addr, char *xff_buffer)
Definition: output-json-alert.c:365
util-proto-name.h
JsonDropOutputCtx_::flags
uint8_t flags
Definition: output-json-drop.c:66
ACTION_REJECT_BOTH
#define ACTION_REJECT_BOTH
Definition: action-globals.h:33
decode-ipv4.h
ICMPV4_GET_ID
#define ICMPV4_GET_ID(p)
Definition: decode-icmpv4.h:243
IPV6_GET_FLOW
#define IPV6_GET_FLOW(p)
Definition: decode-ipv6.h:84
OutputInitResult_
Definition: output.h:46
Packet_::flow
struct Flow_ * flow
Definition: decode.h:465
UDP_GET_LEN
#define UDP_GET_LEN(p)
Definition: decode-udp.h:35
LOG_DIR_PACKET
@ LOG_DIR_PACKET
Definition: output-json.h:39
IPV6_GET_CLASS
#define IPV6_GET_CLASS(p)
Definition: decode-ipv6.h:82
suricata-common.h
OutputCtx_::DeInit
void(* DeInit)(struct OutputCtx_ *)
Definition: tm-modules.h:84
OutputRegisterPacketSubModule
void OutputRegisterPacketSubModule(LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, PacketLogger PacketLogFunc, PacketLogCondition PacketConditionFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats)
Register a packet output sub-module.
Definition: output.c:215
Packet_::tcph
TCPHdr * tcph
Definition: decode.h:553
MODULE_NAME
#define MODULE_NAME
Definition: output-json-drop.c:61
packet.h
ACTION_DROP
#define ACTION_DROP
Definition: action-globals.h:30
LOGGER_JSON_DROP
@ LOGGER_JSON_DROP
Definition: suricata-common.h:470
TCP_ISSET_FLAG_ACK
#define TCP_ISSET_FLAG_ACK(p)
Definition: decode-tcp.h:125
util-classification-config.h
tv
ThreadVars * tv
Definition: fuzz_decodepcapfile.c:32
output-json-alert.h
PKT_IS_ICMPV4
#define PKT_IS_ICMPV4(p)
Definition: decode.h:249
threadvars.h
TCP_ISSET_FLAG_RST
#define TCP_ISSET_FLAG_RST(p)
Definition: decode-tcp.h:123
str
#define str(s)
Definition: suricata-common.h:280
IPV4_GET_IPTOS
#define IPV4_GET_IPTOS(p)
Definition: decode-ipv4.h:125
SCLogError
#define SCLogError(...)
Macro used to log ERROR messages.
Definition: util-debug.h:261
JsonDropLogThread
struct JsonDropLogThread_ JsonDropLogThread
SCFree
#define SCFree(p)
Definition: util-mem.h:61
ConfNode_
Definition: conf.h:32
util-logopenfile.h
JsonDropOutputCtx_
Definition: output-json-drop.c:65
TCP_ISSET_FLAG_FIN
#define TCP_ISSET_FLAG_FIN(p)
Definition: decode-tcp.h:121
Flow_::flags
uint32_t flags
Definition: flow.h:435
JsonDropLogRegister
void JsonDropLogRegister(void)
Definition: output-json-drop.c:375
detect-parse.h
util-buffer.h
FLOW_TOCLIENT_DROP_LOGGED
#define FLOW_TOCLIENT_DROP_LOGGED
Definition: flow.h:77
IPV6_GET_HLIM
#define IPV6_GET_HLIM(p)
Definition: decode-ipv6.h:90
EngineModeIsIPS
int EngineModeIsIPS(void)
Definition: suricata.c:211
Packet_::drop_reason
uint8_t drop_reason
Definition: decode.h:615
TCP_GET_URG_POINTER
#define TCP_GET_URG_POINTER(p)
Definition: decode-tcp.h:117
PacketAlert_
Definition: decode.h:263
JsonAddrInfoInit
void JsonAddrInfoInit(const Packet *p, enum OutputJsonLogDirection dir, JsonAddrInfo *addr)
Definition: output-json.c:473
TCP_GET_ACK
#define TCP_GET_ACK(p)
Definition: decode-tcp.h:115
flow.h
SCCalloc
#define SCCalloc(nm, sz)
Definition: util-mem.h:53
PKT_IS_IPV4
#define PKT_IS_IPV4(p)
Definition: decode.h:245
JsonDropOutputCtx_::eve_ctx
OutputJsonCtx * eve_ctx
Definition: output-json-drop.c:67
output.h
IPV4_GET_IPTTL
#define IPV4_GET_IPTTL(p)
Definition: decode-ipv4.h:146
OutputDropLoggerDisable
void OutputDropLoggerDisable(void)
Definition: output.c:819
TCP_ISSET_FLAG_PUSH
#define TCP_ISSET_FLAG_PUSH(p)
Definition: decode-tcp.h:124
output-json-drop.h
ConfNodeLookupChildValue
const char * ConfNodeLookupChildValue(const ConfNode *node, const char *name)
Lookup the value of a child configuration node by name.
Definition: conf.c:808