suricata
util-exception-policy.c
Go to the documentation of this file.
1 /* Copyright (C) 2022-2026 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 
22 #include "util-exception-policy.h"
23 #include "suricata-common.h"
24 #include "suricata.h"
25 #include "packet.h"
26 #include "util-misc.h"
27 #include "stream-tcp-reassemble.h"
28 #include "action-globals.h"
29 #include "conf.h"
30 #include "flow.h"
31 #include "stream-tcp.h"
32 #include "defrag-hash.h"
33 #include "app-layer-parser.h"
34 
36 /** true if exception policy was defined in config */
37 static bool g_eps_have_exception_policy = false;
38 
39 const char *ExceptionPolicyEnumToString(enum ExceptionPolicy policy, bool is_json)
40 {
41  switch (policy) {
43  return "ignore";
45  return "auto";
47  return "reject";
49  return "bypass";
51  return "reject_both";
53  return is_json ? "drop_flow" : "drop-flow";
55  return is_json ? "drop_packet" : "drop-packet";
57  return is_json ? "pass_packet" : "pass-packet";
59  return is_json ? "pass_flow" : "pass-flow";
60  }
61  // TODO we shouldn't reach this, but if we do, better not to leave this as simply null...
62  return "not set";
63 }
64 
66 {
67  g_eps_master_switch = ExceptionPolicyParse("exception-policy", true);
68 }
69 
70 static enum ExceptionPolicy GetMasterExceptionPolicy(void)
71 {
72  return g_eps_master_switch;
73 }
74 
75 static uint8_t ExceptionPolicyFlag(enum PacketDropReason drop_reason)
76 {
77  switch (drop_reason) {
90  default:
91  return 0;
92  }
93 
94  return 0;
95 }
96 
97 const char *ExceptionPolicyTargetFlagToString(uint8_t target_flag)
98 {
99  switch (target_flag) {
101  return "defrag_memcap";
103  return "stream_memcap";
105  return "stream_reassembly_memcap";
107  return "flow_memcap";
109  return "stream_midstream";
111  return "app_layer_error";
112  default:
113  return "none";
114  }
115 }
116 
117 enum ExceptionPolicy ExceptionPolicyTargetPolicy(uint8_t target_flag)
118 {
119  switch (target_flag) {
132  default:
134  }
136 }
137 
138 void ExceptionPolicyApply(Packet *p, enum ExceptionPolicy policy, enum PacketDropReason drop_reason)
139 {
140  SCLogDebug("start: pcap_cnt %" PRIu64 ", policy %u", PcapPacketCntGet(p), policy);
141  if (p->flow) {
142  p->flow->applied_exception_policy |= ExceptionPolicyFlag(drop_reason);
143  }
144  switch (policy) {
146  break;
148  break;
151  if (policy == EXCEPTION_POLICY_REJECT) {
152  SCLogDebug("EXCEPTION_POLICY_REJECT");
153  PacketDrop(p, ACTION_REJECT, drop_reason);
154  } else {
155  SCLogDebug("EXCEPTION_POLICY_REJECT_BOTH");
156  PacketDrop(p, ACTION_REJECT_BOTH, drop_reason);
157  }
158  if (!EngineModeIsIPS()) {
159  break;
160  }
161  /* fall through */
163  SCLogDebug("EXCEPTION_POLICY_DROP_FLOW");
164  if (p->flow) {
167  FlowSetNoPayloadInspectionFlag(p->flow);
169  }
170  /* fall through */
172  SCLogDebug("EXCEPTION_POLICY_DROP_PACKET");
173  DecodeSetNoPayloadInspectionFlag(p);
174  DecodeSetNoPacketInspectionFlag(p);
175  PacketDrop(p, ACTION_DROP, drop_reason);
176  break;
179  /* fall through */
181  SCLogDebug("EXCEPTION_POLICY_PASS_FLOW");
182  if (p->flow) {
184  }
185  /* fall through */
187  SCLogDebug("EXCEPTION_POLICY_PASS_PACKET");
188  DecodeSetNoPayloadInspectionFlag(p);
189  DecodeSetNoPacketInspectionFlag(p);
190  break;
191  }
192  SCLogDebug("end");
193 }
194 
195 static enum ExceptionPolicy PickPacketAction(const char *option, enum ExceptionPolicy p)
196 {
197  switch (p) {
199  SCLogWarning(
200  "flow actions not supported for %s, defaulting to \"drop-packet\"", option);
203  SCLogWarning(
204  "flow actions not supported for %s, defaulting to \"pass-packet\"", option);
207  SCLogWarning("flow actions not supported for %s, defaulting to \"ignore\"", option);
209  /* add all cases, to make sure new cases not handle will raise
210  * errors */
212  break;
214  break;
217  break;
219  break;
221  break;
222  }
223  return p;
224 }
225 
226 static enum ExceptionPolicy ExceptionPolicyConfigValueParse(
227  const char *option, const char *value_str)
228 {
230  if (strcmp(value_str, "drop-flow") == 0) {
232  } else if (strcmp(value_str, "pass-flow") == 0) {
234  } else if (strcmp(value_str, "bypass") == 0) {
236  } else if (strcmp(value_str, "drop-packet") == 0) {
238  } else if (strcmp(value_str, "pass-packet") == 0) {
240  } else if (strcmp(value_str, "reject") == 0) {
241  policy = EXCEPTION_POLICY_REJECT;
242  } else if (strcmp(value_str, "rejectboth") == 0) {
244  } else if (strcmp(value_str, "ignore") == 0) { // TODO name?
245  policy = EXCEPTION_POLICY_NOT_SET;
246  } else if (strcmp(value_str, "auto") == 0) {
247  policy = EXCEPTION_POLICY_AUTO;
248  } else {
250  "\"%s\" is not a valid exception policy value. Valid options are drop-flow, "
251  "pass-flow, bypass, reject, drop-packet, pass-packet, ignore or auto.",
252  value_str);
253  }
254 
255  return policy;
256 }
257 
258 /* Select an exception policy in case the configuration value was set to 'auto' */
259 static enum ExceptionPolicy ExceptionPolicyPickAuto(bool midstream_enabled, bool support_flow)
260 {
262  if (!midstream_enabled && EngineModeIsIPS()) {
263  if (support_flow) {
265  } else {
267  }
268  }
269  return policy;
270 }
271 
272 static enum ExceptionPolicy ExceptionPolicyMasterParse(const char *value)
273 {
274  enum ExceptionPolicy policy = ExceptionPolicyConfigValueParse("exception-policy", value);
275  if (!EngineModeIsIPS() &&
276  (policy == EXCEPTION_POLICY_DROP_PACKET || policy == EXCEPTION_POLICY_DROP_FLOW)) {
277  policy = EXCEPTION_POLICY_NOT_SET;
278  }
279  g_eps_have_exception_policy = true;
280 
281  SCLogInfo("master exception-policy set to: %s", ExceptionPolicyEnumToString(policy, false));
282 
283  return policy;
284 }
285 
286 static enum ExceptionPolicy ExceptionPolicyGetDefault(
287  const char *option, bool support_flow, bool midstream)
288 {
290  if (g_eps_have_exception_policy) {
291  p = GetMasterExceptionPolicy();
292 
293  if (p == EXCEPTION_POLICY_AUTO) {
294  p = ExceptionPolicyPickAuto(midstream, support_flow);
295  }
296 
297  if (!support_flow) {
298  p = PickPacketAction(option, p);
299  }
300  SCLogConfig("%s: %s (defined via 'exception-policy' master switch)", option,
302  return p;
303  } else if (EngineModeIsIPS() && !midstream) {
305  }
306  SCLogConfig("%s: %s (defined via 'built-in default' for %s-mode)", option,
307  ExceptionPolicyEnumToString(p, false), EngineModeIsIPS() ? "IPS" : "IDS");
308 
309  return p;
310 }
311 
312 enum ExceptionPolicy ExceptionPolicyParse(const char *option, bool support_flow)
313 {
315  const char *value_str = NULL;
316 
317  if ((SCConfGet(option, &value_str) == 1) && value_str != NULL) {
318  if (strcmp(option, "exception-policy") == 0) {
319  policy = ExceptionPolicyMasterParse(value_str);
320  } else {
321  policy = ExceptionPolicyConfigValueParse(option, value_str);
322  if (policy == EXCEPTION_POLICY_AUTO) {
323  policy = ExceptionPolicyPickAuto(false, support_flow);
324  }
325  if (!support_flow) {
326  policy = PickPacketAction(option, policy);
327  }
328  SCLogConfig("%s: %s", option, ExceptionPolicyEnumToString(policy, false));
329  }
330  } else {
331  policy = ExceptionPolicyGetDefault(option, support_flow, false);
332  }
333 
334  return policy;
335 }
336 
337 enum ExceptionPolicy ExceptionPolicyMidstreamParse(bool midstream_enabled)
338 {
340  const char *value_str = NULL;
341  /* policy was set directly */
342  if ((SCConfGet("stream.midstream-policy", &value_str)) == 1 && value_str != NULL) {
343  policy = ExceptionPolicyConfigValueParse("midstream-policy", value_str);
344  if (policy == EXCEPTION_POLICY_AUTO) {
345  policy = ExceptionPolicyPickAuto(midstream_enabled, true);
346  } else if (midstream_enabled) {
347  if (policy != EXCEPTION_POLICY_NOT_SET && policy != EXCEPTION_POLICY_PASS_FLOW) {
349  "Error parsing stream.midstream-policy from config file. \"%s\" is "
350  "not a valid exception policy when midstream is enabled. Valid options "
351  "are pass-flow and ignore.",
352  value_str);
353  }
354  }
355  if (!EngineModeIsIPS()) {
356  if (policy == EXCEPTION_POLICY_DROP_FLOW) {
358  "Error parsing stream.midstream-policy from config file. \"%s\" is "
359  "not a valid exception policy in IDS mode. See our documentation for a "
360  "list of all possible values.",
361  value_str);
362  }
363  }
364  } else {
365  policy = ExceptionPolicyGetDefault("stream.midstream-policy", true, midstream_enabled);
366  }
367 
368  if (policy == EXCEPTION_POLICY_PASS_PACKET || policy == EXCEPTION_POLICY_DROP_PACKET) {
369  FatalErrorOnInit("Error parsing stream.midstream-policy from config file. \"%s\" is "
370  "not valid for this exception policy. See our documentation for a list of "
371  "all possible values.",
372  value_str);
373  }
374 
375  return policy;
376 }
377 
379  ExceptionPolicyStatsSetts *setting, enum ExceptionPolicy conf_policy,
380  const char *default_str, bool (*isExceptionPolicyValid)(enum ExceptionPolicy))
381 {
382  if (conf_policy != EXCEPTION_POLICY_NOT_SET) {
383  /* set-up policy counters */
384  for (enum ExceptionPolicy i = EXCEPTION_POLICY_NOT_SET + 1; i < EXCEPTION_POLICY_MAX; i++) {
385  if (isExceptionPolicyValid(i)) {
386  snprintf(setting->eps_name[i], sizeof(setting->eps_name[i]), "%s%s", default_str,
387  ExceptionPolicyEnumToString(i, true));
388  counter->eps_id[i] = StatsRegisterCounter(setting->eps_name[i], &tv->stats);
389  }
390  }
391  }
392 }
393 
394 #ifndef QA_SIMULATION
395 
396 int ExceptionSimulationCommandLineParser(const char *name, const char *arg)
397 {
398  return 0;
399 }
400 
401 #else
402 
403 /* exception policy simulation (eps) handling */
404 
405 uint64_t g_eps_applayer_error_offset_ts = UINT64_MAX;
406 uint64_t g_eps_applayer_error_offset_tc = UINT64_MAX;
407 uint64_t g_eps_pcap_packet_loss = UINT64_MAX;
408 uint64_t g_eps_stream_ssn_memcap = UINT64_MAX;
409 uint64_t g_eps_stream_reassembly_memcap = UINT64_MAX;
410 uint64_t g_eps_flow_memcap = UINT64_MAX;
411 uint64_t g_eps_defrag_memcap = UINT64_MAX;
412 bool g_eps_is_alert_queue_fail_mode = false;
413 
414 /* 1: parsed, 0: not for us, -1: error */
415 int ExceptionSimulationCommandLineParser(const char *name, const char *arg)
416 {
417  if (strcmp(name, "simulate-applayer-error-at-offset-ts") == 0) {
418  BUG_ON(arg == NULL);
419  uint64_t offset = 0;
420  if (ParseSizeStringU64(arg, &offset) < 0) {
421  return -1;
422  }
423  g_eps_applayer_error_offset_ts = offset;
424  } else if (strcmp(name, "simulate-applayer-error-at-offset-tc") == 0) {
425  BUG_ON(arg == NULL);
426  uint64_t offset = 0;
427  if (ParseSizeStringU64(arg, &offset) < 0) {
428  return TM_ECODE_FAILED;
429  }
430  g_eps_applayer_error_offset_tc = offset;
431  } else if (strcmp(name, "simulate-packet-loss") == 0) {
432  BUG_ON(arg == NULL);
433  uint64_t pkt_num = 0;
434  if (ParseSizeStringU64(arg, &pkt_num) < 0) {
435  return TM_ECODE_FAILED;
436  }
437  g_eps_pcap_packet_loss = pkt_num;
438  } else if (strcmp(name, "simulate-packet-tcp-reassembly-memcap") == 0) {
439  BUG_ON(arg == NULL);
440  uint64_t pkt_num = 0;
441  if (ParseSizeStringU64(arg, &pkt_num) < 0) {
442  return TM_ECODE_FAILED;
443  }
444  g_eps_stream_reassembly_memcap = pkt_num;
445  } else if (strcmp(name, "simulate-packet-tcp-ssn-memcap") == 0) {
446  BUG_ON(arg == NULL);
447  uint64_t pkt_num = 0;
448  if (ParseSizeStringU64(arg, &pkt_num) < 0) {
449  return TM_ECODE_FAILED;
450  }
451  g_eps_stream_ssn_memcap = pkt_num;
452  } else if (strcmp(name, "simulate-packet-flow-memcap") == 0) {
453  BUG_ON(arg == NULL);
454  uint64_t pkt_num = 0;
455  if (ParseSizeStringU64(arg, &pkt_num) < 0) {
456  return TM_ECODE_FAILED;
457  }
458  g_eps_flow_memcap = pkt_num;
459  } else if (strcmp(name, "simulate-packet-defrag-memcap") == 0) {
460  BUG_ON(arg == NULL);
461  uint64_t pkt_num = 0;
462  if (ParseSizeStringU64(arg, &pkt_num) < 0) {
463  return TM_ECODE_FAILED;
464  }
465  g_eps_defrag_memcap = pkt_num;
466  } else if (strcmp(name, "simulate-alert-queue-realloc-failure") == 0) {
467  g_eps_is_alert_queue_fail_mode = true;
468  } else {
469  // not for us
470  return 0;
471  }
472  return 1;
473 }
474 #endif
PKT_DROP_REASON_DEFRAG_MEMCAP
@ PKT_DROP_REASON_DEFRAG_MEMCAP
Definition: decode.h:386
ExceptionPolicyApply
void ExceptionPolicyApply(Packet *p, enum ExceptionPolicy policy, enum PacketDropReason drop_reason)
Definition: util-exception-policy.c:138
ExceptionSimulationCommandLineParser
int ExceptionSimulationCommandLineParser(const char *name, const char *arg)
Definition: util-exception-policy.c:396
EXCEPTION_POLICY_PASS_FLOW
@ EXCEPTION_POLICY_PASS_FLOW
Definition: util-exception-policy-types.h:30
Flow_::flags
uint64_t flags
Definition: flow.h:403
offset
uint64_t offset
Definition: util-streaming-buffer.h:0
PacketBypassCallback
void PacketBypassCallback(Packet *p)
Definition: decode.c:536
stream-tcp.h
EXCEPTION_POLICY_REJECT_BOTH
@ EXCEPTION_POLICY_REJECT_BOTH
Definition: util-exception-policy-types.h:35
g_eps_master_switch
enum ExceptionPolicy g_eps_master_switch
Definition: util-exception-policy.c:35
PKT_DROP_REASON_STREAM_MEMCAP
@ PKT_DROP_REASON_STREAM_MEMCAP
Definition: decode.h:395
ACTION_REJECT
#define ACTION_REJECT
Definition: action-globals.h:31
PKT_DROP_REASON_FLOW_MEMCAP
@ PKT_DROP_REASON_FLOW_MEMCAP
Definition: decode.h:387
PcapPacketCntGet
uint64_t PcapPacketCntGet(const Packet *p)
Definition: decode.c:1180
EXCEPTION_POLICY_DROP_PACKET
@ EXCEPTION_POLICY_DROP_PACKET
Definition: util-exception-policy-types.h:32
SCLogDebug
#define SCLogDebug(...)
Definition: util-debug.h:282
ParseSizeStringU64
int ParseSizeStringU64(const char *size, uint64_t *res)
Definition: util-misc.c:191
StatsRegisterCounter
StatsCounterId StatsRegisterCounter(const char *name, StatsThreadContext *stats)
Registers a normal, unqualified counter.
Definition: counters.c:1039
name
const char * name
Definition: detect-engine-proto.c:48
action-globals.h
ExceptionPolicyStatsSetts_
Definition: util-exception-policy-types.h:59
SCConfGet
int SCConfGet(const char *name, const char **vptr)
Retrieve the value of a configuration node.
Definition: conf.c:351
EXCEPTION_TARGET_FLAG_APPLAYER_ERROR
#define EXCEPTION_TARGET_FLAG_APPLAYER_ERROR
Definition: util-exception-policy-types.h:52
PKT_DROP_REASON_STREAM_REASSEMBLY
@ PKT_DROP_REASON_STREAM_REASSEMBLY
Definition: decode.h:397
stream-tcp-reassemble.h
FLOW_ACTION_DROP
#define FLOW_ACTION_DROP
Definition: flow.h:69
EXCEPTION_POLICY_BYPASS_FLOW
@ EXCEPTION_POLICY_BYPASS_FLOW
Definition: util-exception-policy-types.h:31
p
Packet * p
Definition: fuzz_iprep.c:21
TM_ECODE_FAILED
@ TM_ECODE_FAILED
Definition: tm-threads-common.h:82
PacketDropReason
PacketDropReason
Definition: decode.h:382
EXCEPTION_POLICY_NOT_SET
@ EXCEPTION_POLICY_NOT_SET
Definition: util-exception-policy-types.h:27
ExceptionPolicyParse
enum ExceptionPolicy ExceptionPolicyParse(const char *option, bool support_flow)
Definition: util-exception-policy.c:312
ExceptionPolicyTargetFlagToString
const char * ExceptionPolicyTargetFlagToString(uint8_t target_flag)
Definition: util-exception-policy.c:97
FLOW_ACTION_PASS
#define FLOW_ACTION_PASS
Definition: flow.h:116
EXCEPTION_POLICY_MAX
#define EXCEPTION_POLICY_MAX
Definition: util-exception-policy-types.h:39
EXCEPTION_TARGET_FLAG_DEFRAG_MEMCAP
#define EXCEPTION_TARGET_FLAG_DEFRAG_MEMCAP
Definition: util-exception-policy-types.h:47
ExceptionPolicyTargetPolicy
enum ExceptionPolicy ExceptionPolicyTargetPolicy(uint8_t target_flag)
Definition: util-exception-policy.c:117
ExceptionPolicyCounters_
Definition: util-exception-policy-types.h:54
EXCEPTION_POLICY_PASS_PACKET
@ EXCEPTION_POLICY_PASS_PACKET
Definition: util-exception-policy-types.h:29
PKT_DROP_REASON_APPLAYER_ERROR
@ PKT_DROP_REASON_APPLAYER_ERROR
Definition: decode.h:390
EXCEPTION_POLICY_AUTO
@ EXCEPTION_POLICY_AUTO
Definition: util-exception-policy-types.h:28
util-exception-policy.h
ExceptionPolicySetStatsCounters
void ExceptionPolicySetStatsCounters(ThreadVars *tv, ExceptionPolicyCounters *counter, ExceptionPolicyStatsSetts *setting, enum ExceptionPolicy conf_policy, const char *default_str, bool(*isExceptionPolicyValid)(enum ExceptionPolicy))
Definition: util-exception-policy.c:378
ThreadVars_
Per thread variable structure.
Definition: threadvars.h:58
EXCEPTION_POLICY_DROP_FLOW
@ EXCEPTION_POLICY_DROP_FLOW
Definition: util-exception-policy-types.h:33
SCLogWarning
#define SCLogWarning(...)
Macro used to log WARNING messages.
Definition: util-debug.h:262
app-layer-parser.h
BUG_ON
#define BUG_ON(x)
Definition: suricata-common.h:325
ExceptionPolicyMidstreamParse
enum ExceptionPolicy ExceptionPolicyMidstreamParse(bool midstream_enabled)
Definition: util-exception-policy.c:337
Packet_
Definition: decode.h:515
conf.h
EXCEPTION_TARGET_FLAG_REASSEMBLY_MEMCAP
#define EXCEPTION_TARGET_FLAG_REASSEMBLY_MEMCAP
Definition: util-exception-policy-types.h:49
SCLogInfo
#define SCLogInfo(...)
Macro used to log INFORMATIONAL messages.
Definition: util-debug.h:232
EXCEPTION_TARGET_FLAG_MIDSTREAM
#define EXCEPTION_TARGET_FLAG_MIDSTREAM
Definition: util-exception-policy-types.h:51
StreamTcpReassemblyMemcapGetExceptionPolicy
enum ExceptionPolicy StreamTcpReassemblyMemcapGetExceptionPolicy(void)
Definition: stream-tcp.c:911
ACTION_REJECT_BOTH
#define ACTION_REJECT_BOTH
Definition: action-globals.h:33
AppLayerErrorGetExceptionPolicy
enum ExceptionPolicy AppLayerErrorGetExceptionPolicy(void)
Definition: app-layer-parser.c:162
Packet_::flow
struct Flow_ * flow
Definition: decode.h:563
FlowGetMemcapExceptionPolicy
enum ExceptionPolicy FlowGetMemcapExceptionPolicy(void)
Definition: flow.c:135
Flow_::applied_exception_policy
uint8_t applied_exception_policy
Definition: flow.h:473
EXCEPTION_POLICY_REJECT
@ EXCEPTION_POLICY_REJECT
Definition: util-exception-policy-types.h:34
StreamTcpDisableAppLayer
void StreamTcpDisableAppLayer(Flow *f)
Definition: stream-tcp-reassemble.c:445
suricata-common.h
EXCEPTION_TARGET_FLAG_SESSION_MEMCAP
#define EXCEPTION_TARGET_FLAG_SESSION_MEMCAP
Definition: util-exception-policy-types.h:48
FatalErrorOnInit
#define FatalErrorOnInit(...)
Fatal error IF we're starting up, and configured to consider errors to be fatal errors.
Definition: util-debug.h:526
packet.h
ACTION_DROP
#define ACTION_DROP
Definition: action-globals.h:30
tv
ThreadVars * tv
Definition: fuzz_decodepcapfile.c:33
SCLogConfig
struct SCLogConfig_ SCLogConfig
Holds the config state used by the logging api.
ExceptionPolicyEnumToString
const char * ExceptionPolicyEnumToString(enum ExceptionPolicy policy, bool is_json)
Definition: util-exception-policy.c:39
StreamMidstreamGetExceptionPolicy
enum ExceptionPolicy StreamMidstreamGetExceptionPolicy(void)
Definition: stream-tcp.c:916
StreamTcpSsnMemcapGetExceptionPolicy
enum ExceptionPolicy StreamTcpSsnMemcapGetExceptionPolicy(void)
Definition: stream-tcp.c:906
PacketDrop
void PacketDrop(Packet *p, const uint8_t action, enum PacketDropReason r)
issue drop action
Definition: packet.c:34
EngineModeIsIPS
int EngineModeIsIPS(void)
Definition: suricata.c:246
suricata.h
defrag-hash.h
EXCEPTION_TARGET_FLAG_FLOW_MEMCAP
#define EXCEPTION_TARGET_FLAG_FLOW_MEMCAP
Definition: util-exception-policy-types.h:50
SetMasterExceptionPolicy
void SetMasterExceptionPolicy(void)
Definition: util-exception-policy.c:65
FLOW_ACTION_BY_EXCEPTION_POLICY
#define FLOW_ACTION_BY_EXCEPTION_POLICY
Definition: flow.h:127
util-misc.h
flow.h
PKT_DROP_REASON_STREAM_MIDSTREAM
@ PKT_DROP_REASON_STREAM_MIDSTREAM
Definition: decode.h:396
ExceptionPolicy
ExceptionPolicy
Definition: util-exception-policy-types.h:26
ThreadVars_::stats
StatsThreadContext stats
Definition: threadvars.h:121
DefragGetMemcapExceptionPolicy
enum ExceptionPolicy DefragGetMemcapExceptionPolicy(void)
Definition: defrag-hash.c:80
ExceptionPolicyCounters_::eps_id
StatsCounterId eps_id[EXCEPTION_POLICY_MAX]
Definition: util-exception-policy-types.h:56
ExceptionPolicyStatsSetts_::eps_name
char eps_name[EXCEPTION_POLICY_MAX][EXCEPTION_POLICY_COUNTER_MAX_LEN]
Definition: util-exception-policy-types.h:60