suricata
util-exception-policy.c
Go to the documentation of this file.
1 /* Copyright (C) 2022-2025 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", p->pcap_cnt, 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) {
165  p->flow->flags |= FLOW_ACTION_DROP;
166  FlowSetNoPayloadInspectionFlag(p->flow);
168  }
169  /* fall through */
171  SCLogDebug("EXCEPTION_POLICY_DROP_PACKET");
172  DecodeSetNoPayloadInspectionFlag(p);
173  DecodeSetNoPacketInspectionFlag(p);
174  PacketDrop(p, ACTION_DROP, drop_reason);
175  break;
178  /* fall through */
180  SCLogDebug("EXCEPTION_POLICY_PASS_FLOW");
181  if (p->flow) {
182  p->flow->flags |= FLOW_ACTION_PASS;
183  }
184  /* fall through */
186  SCLogDebug("EXCEPTION_POLICY_PASS_PACKET");
187  DecodeSetNoPayloadInspectionFlag(p);
188  DecodeSetNoPacketInspectionFlag(p);
189  break;
190  }
191  SCLogDebug("end");
192 }
193 
194 static enum ExceptionPolicy PickPacketAction(const char *option, enum ExceptionPolicy p)
195 {
196  switch (p) {
198  SCLogWarning(
199  "flow actions not supported for %s, defaulting to \"drop-packet\"", option);
202  SCLogWarning(
203  "flow actions not supported for %s, defaulting to \"pass-packet\"", option);
206  SCLogWarning("flow actions not supported for %s, defaulting to \"ignore\"", option);
208  /* add all cases, to make sure new cases not handle will raise
209  * errors */
211  break;
213  break;
216  break;
218  break;
220  break;
221  }
222  return p;
223 }
224 
225 static enum ExceptionPolicy ExceptionPolicyConfigValueParse(
226  const char *option, const char *value_str)
227 {
229  if (strcmp(value_str, "drop-flow") == 0) {
231  } else if (strcmp(value_str, "pass-flow") == 0) {
233  } else if (strcmp(value_str, "bypass") == 0) {
235  } else if (strcmp(value_str, "drop-packet") == 0) {
237  } else if (strcmp(value_str, "pass-packet") == 0) {
239  } else if (strcmp(value_str, "reject") == 0) {
240  policy = EXCEPTION_POLICY_REJECT;
241  } else if (strcmp(value_str, "rejectboth") == 0) {
243  } else if (strcmp(value_str, "ignore") == 0) { // TODO name?
244  policy = EXCEPTION_POLICY_NOT_SET;
245  } else if (strcmp(value_str, "auto") == 0) {
246  policy = EXCEPTION_POLICY_AUTO;
247  } else {
249  "\"%s\" is not a valid exception policy value. Valid options are drop-flow, "
250  "pass-flow, bypass, reject, drop-packet, pass-packet, ignore or auto.",
251  value_str);
252  }
253 
254  return policy;
255 }
256 
257 /* Select an exception policy in case the configuration value was set to 'auto' */
258 static enum ExceptionPolicy ExceptionPolicyPickAuto(bool midstream_enabled, bool support_flow)
259 {
261  if (!midstream_enabled && EngineModeIsIPS()) {
262  if (support_flow) {
264  } else {
266  }
267  }
268  return policy;
269 }
270 
271 static enum ExceptionPolicy ExceptionPolicyMasterParse(const char *value)
272 {
273  enum ExceptionPolicy policy = ExceptionPolicyConfigValueParse("exception-policy", value);
274  if (!EngineModeIsIPS() &&
275  (policy == EXCEPTION_POLICY_DROP_PACKET || policy == EXCEPTION_POLICY_DROP_FLOW)) {
276  policy = EXCEPTION_POLICY_NOT_SET;
277  }
278  g_eps_have_exception_policy = true;
279 
280  SCLogInfo("master exception-policy set to: %s", ExceptionPolicyEnumToString(policy, false));
281 
282  return policy;
283 }
284 
285 static enum ExceptionPolicy ExceptionPolicyGetDefault(
286  const char *option, bool support_flow, bool midstream)
287 {
289  if (g_eps_have_exception_policy) {
290  p = GetMasterExceptionPolicy();
291 
292  if (p == EXCEPTION_POLICY_AUTO) {
293  p = ExceptionPolicyPickAuto(midstream, support_flow);
294  }
295 
296  if (!support_flow) {
297  p = PickPacketAction(option, p);
298  }
299  SCLogConfig("%s: %s (defined via 'exception-policy' master switch)", option,
300  ExceptionPolicyEnumToString(p, false));
301  return p;
302  } else if (EngineModeIsIPS() && !midstream) {
304  }
305  SCLogConfig("%s: %s (defined via 'built-in default' for %s-mode)", option,
306  ExceptionPolicyEnumToString(p, false), EngineModeIsIPS() ? "IPS" : "IDS");
307 
308  return p;
309 }
310 
311 enum ExceptionPolicy ExceptionPolicyParse(const char *option, bool support_flow)
312 {
314  const char *value_str = NULL;
315 
316  if ((SCConfGet(option, &value_str) == 1) && value_str != NULL) {
317  if (strcmp(option, "exception-policy") == 0) {
318  policy = ExceptionPolicyMasterParse(value_str);
319  } else {
320  policy = ExceptionPolicyConfigValueParse(option, value_str);
321  if (policy == EXCEPTION_POLICY_AUTO) {
322  policy = ExceptionPolicyPickAuto(false, support_flow);
323  }
324  if (!support_flow) {
325  policy = PickPacketAction(option, policy);
326  }
327  SCLogConfig("%s: %s", option, ExceptionPolicyEnumToString(policy, false));
328  }
329  } else {
330  policy = ExceptionPolicyGetDefault(option, support_flow, false);
331  }
332 
333  return policy;
334 }
335 
336 enum ExceptionPolicy ExceptionPolicyMidstreamParse(bool midstream_enabled)
337 {
339  const char *value_str = NULL;
340  /* policy was set directly */
341  if ((SCConfGet("stream.midstream-policy", &value_str)) == 1 && value_str != NULL) {
342  policy = ExceptionPolicyConfigValueParse("midstream-policy", value_str);
343  if (policy == EXCEPTION_POLICY_AUTO) {
344  policy = ExceptionPolicyPickAuto(midstream_enabled, true);
345  } else if (midstream_enabled) {
346  if (policy != EXCEPTION_POLICY_NOT_SET && policy != EXCEPTION_POLICY_PASS_FLOW) {
348  "Error parsing stream.midstream-policy from config file. \"%s\" is "
349  "not a valid exception policy when midstream is enabled. Valid options "
350  "are pass-flow and ignore.",
351  value_str);
352  }
353  }
354  if (!EngineModeIsIPS()) {
355  if (policy == EXCEPTION_POLICY_DROP_FLOW) {
357  "Error parsing stream.midstream-policy from config file. \"%s\" is "
358  "not a valid exception policy in IDS mode. See our documentation for a "
359  "list of all possible values.",
360  value_str);
361  }
362  }
363  } else {
364  policy = ExceptionPolicyGetDefault("stream.midstream-policy", true, midstream_enabled);
365  }
366 
367  if (policy == EXCEPTION_POLICY_PASS_PACKET || policy == EXCEPTION_POLICY_DROP_PACKET) {
368  FatalErrorOnInit("Error parsing stream.midstream-policy from config file. \"%s\" is "
369  "not valid for this exception policy. See our documentation for a list of "
370  "all possible values.",
371  value_str);
372  }
373 
374  return policy;
375 }
376 
378  ExceptionPolicyStatsSetts *setting, enum ExceptionPolicy conf_policy,
379  const char *default_str, bool (*isExceptionPolicyValid)(enum ExceptionPolicy))
380 {
381  if (conf_policy != EXCEPTION_POLICY_NOT_SET) {
382  /* set-up policy counters */
383  for (enum ExceptionPolicy i = EXCEPTION_POLICY_NOT_SET + 1; i < EXCEPTION_POLICY_MAX; i++) {
384  if (isExceptionPolicyValid(i)) {
385  snprintf(setting->eps_name[i], sizeof(setting->eps_name[i]), "%s%s", default_str,
386  ExceptionPolicyEnumToString(i, true));
387  counter->eps_id[i] = StatsRegisterCounter(setting->eps_name[i], tv);
388  }
389  }
390  }
391 }
392 
393 #ifndef DEBUG
394 
395 int ExceptionSimulationCommandLineParser(const char *name, const char *arg)
396 {
397  return 0;
398 }
399 
400 #else
401 
402 /* exception policy simulation (eps) handling */
403 
404 uint64_t g_eps_applayer_error_offset_ts = UINT64_MAX;
405 uint64_t g_eps_applayer_error_offset_tc = UINT64_MAX;
406 uint64_t g_eps_pcap_packet_loss = UINT64_MAX;
407 uint64_t g_eps_stream_ssn_memcap = UINT64_MAX;
408 uint64_t g_eps_stream_reassembly_memcap = UINT64_MAX;
409 uint64_t g_eps_flow_memcap = UINT64_MAX;
410 uint64_t g_eps_defrag_memcap = UINT64_MAX;
411 bool g_eps_is_alert_queue_fail_mode = false;
412 
413 /* 1: parsed, 0: not for us, -1: error */
414 int ExceptionSimulationCommandLineParser(const char *name, const char *arg)
415 {
416  if (strcmp(name, "simulate-applayer-error-at-offset-ts") == 0) {
417  BUG_ON(arg == NULL);
418  uint64_t offset = 0;
419  if (ParseSizeStringU64(arg, &offset) < 0) {
420  return -1;
421  }
422  g_eps_applayer_error_offset_ts = offset;
423  } else if (strcmp(name, "simulate-applayer-error-at-offset-tc") == 0) {
424  BUG_ON(arg == NULL);
425  uint64_t offset = 0;
426  if (ParseSizeStringU64(arg, &offset) < 0) {
427  return TM_ECODE_FAILED;
428  }
429  g_eps_applayer_error_offset_tc = offset;
430  } else if (strcmp(name, "simulate-packet-loss") == 0) {
431  BUG_ON(arg == NULL);
432  uint64_t pkt_num = 0;
433  if (ParseSizeStringU64(arg, &pkt_num) < 0) {
434  return TM_ECODE_FAILED;
435  }
436  g_eps_pcap_packet_loss = pkt_num;
437  } else if (strcmp(name, "simulate-packet-tcp-reassembly-memcap") == 0) {
438  BUG_ON(arg == NULL);
439  uint64_t pkt_num = 0;
440  if (ParseSizeStringU64(arg, &pkt_num) < 0) {
441  return TM_ECODE_FAILED;
442  }
443  g_eps_stream_reassembly_memcap = pkt_num;
444  } else if (strcmp(name, "simulate-packet-tcp-ssn-memcap") == 0) {
445  BUG_ON(arg == NULL);
446  uint64_t pkt_num = 0;
447  if (ParseSizeStringU64(arg, &pkt_num) < 0) {
448  return TM_ECODE_FAILED;
449  }
450  g_eps_stream_ssn_memcap = pkt_num;
451  } else if (strcmp(name, "simulate-packet-flow-memcap") == 0) {
452  BUG_ON(arg == NULL);
453  uint64_t pkt_num = 0;
454  if (ParseSizeStringU64(arg, &pkt_num) < 0) {
455  return TM_ECODE_FAILED;
456  }
457  g_eps_flow_memcap = pkt_num;
458  } else if (strcmp(name, "simulate-packet-defrag-memcap") == 0) {
459  BUG_ON(arg == NULL);
460  uint64_t pkt_num = 0;
461  if (ParseSizeStringU64(arg, &pkt_num) < 0) {
462  return TM_ECODE_FAILED;
463  }
464  g_eps_defrag_memcap = pkt_num;
465  } else if (strcmp(name, "simulate-alert-queue-realloc-failure") == 0) {
466  g_eps_is_alert_queue_fail_mode = true;
467  } else {
468  // not for us
469  return 0;
470  }
471  return 1;
472 }
473 #endif
PKT_DROP_REASON_DEFRAG_MEMCAP
@ PKT_DROP_REASON_DEFRAG_MEMCAP
Definition: decode.h:384
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:395
EXCEPTION_POLICY_PASS_FLOW
@ EXCEPTION_POLICY_PASS_FLOW
Definition: util-exception-policy-types.h:29
offset
uint64_t offset
Definition: util-streaming-buffer.h:0
PacketBypassCallback
void PacketBypassCallback(Packet *p)
Definition: decode.c:534
stream-tcp.h
EXCEPTION_POLICY_REJECT_BOTH
@ EXCEPTION_POLICY_REJECT_BOTH
Definition: util-exception-policy-types.h:34
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:392
ACTION_REJECT
#define ACTION_REJECT
Definition: action-globals.h:31
PKT_DROP_REASON_FLOW_MEMCAP
@ PKT_DROP_REASON_FLOW_MEMCAP
Definition: decode.h:385
EXCEPTION_POLICY_DROP_PACKET
@ EXCEPTION_POLICY_DROP_PACKET
Definition: util-exception-policy-types.h:31
SCLogDebug
#define SCLogDebug(...)
Definition: util-debug.h:279
Packet_::pcap_cnt
uint64_t pcap_cnt
Definition: decode.h:626
ParseSizeStringU64
int ParseSizeStringU64(const char *size, uint64_t *res)
Definition: util-misc.c:191
action-globals.h
ExceptionPolicyStatsSetts_
Definition: util-exception-policy-types.h:57
SCConfGet
int SCConfGet(const char *name, const char **vptr)
Retrieve the value of a configuration node.
Definition: conf.c:350
EXCEPTION_TARGET_FLAG_APPLAYER_ERROR
#define EXCEPTION_TARGET_FLAG_APPLAYER_ERROR
Definition: util-exception-policy-types.h:50
PKT_DROP_REASON_STREAM_REASSEMBLY
@ PKT_DROP_REASON_STREAM_REASSEMBLY
Definition: decode.h:394
stream-tcp-reassemble.h
FLOW_ACTION_DROP
#define FLOW_ACTION_DROP
Definition: flow.h:70
EXCEPTION_POLICY_BYPASS_FLOW
@ EXCEPTION_POLICY_BYPASS_FLOW
Definition: util-exception-policy-types.h:30
TM_ECODE_FAILED
@ TM_ECODE_FAILED
Definition: tm-threads-common.h:82
PacketDropReason
PacketDropReason
Definition: decode.h:380
EXCEPTION_POLICY_NOT_SET
@ EXCEPTION_POLICY_NOT_SET
Definition: util-exception-policy-types.h:26
ExceptionPolicyParse
enum ExceptionPolicy ExceptionPolicyParse(const char *option, bool support_flow)
Definition: util-exception-policy.c:311
ExceptionPolicyTargetFlagToString
const char * ExceptionPolicyTargetFlagToString(uint8_t target_flag)
Definition: util-exception-policy.c:97
FLOW_ACTION_PASS
#define FLOW_ACTION_PASS
Definition: flow.h:117
EXCEPTION_POLICY_MAX
#define EXCEPTION_POLICY_MAX
Definition: util-exception-policy-types.h:37
EXCEPTION_TARGET_FLAG_DEFRAG_MEMCAP
#define EXCEPTION_TARGET_FLAG_DEFRAG_MEMCAP
Definition: util-exception-policy-types.h:45
ExceptionPolicyTargetPolicy
enum ExceptionPolicy ExceptionPolicyTargetPolicy(uint8_t target_flag)
Definition: util-exception-policy.c:117
ExceptionPolicyCounters_
Definition: util-exception-policy-types.h:52
EXCEPTION_POLICY_PASS_PACKET
@ EXCEPTION_POLICY_PASS_PACKET
Definition: util-exception-policy-types.h:28
PKT_DROP_REASON_APPLAYER_ERROR
@ PKT_DROP_REASON_APPLAYER_ERROR
Definition: decode.h:387
EXCEPTION_POLICY_AUTO
@ EXCEPTION_POLICY_AUTO
Definition: util-exception-policy-types.h:27
util-exception-policy.h
ExceptionPolicyCounters_::eps_id
uint16_t eps_id[EXCEPTION_POLICY_MAX]
Definition: util-exception-policy-types.h:54
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:377
ThreadVars_
Per thread variable structure.
Definition: threadvars.h:58
EXCEPTION_POLICY_DROP_FLOW
@ EXCEPTION_POLICY_DROP_FLOW
Definition: util-exception-policy-types.h:32
SCLogWarning
#define SCLogWarning(...)
Macro used to log WARNING messages.
Definition: util-debug.h:259
app-layer-parser.h
BUG_ON
#define BUG_ON(x)
Definition: suricata-common.h:317
ExceptionPolicyMidstreamParse
enum ExceptionPolicy ExceptionPolicyMidstreamParse(bool midstream_enabled)
Definition: util-exception-policy.c:336
Packet_
Definition: decode.h:501
conf.h
name
const char * name
Definition: tm-threads.c:2163
EXCEPTION_TARGET_FLAG_REASSEMBLY_MEMCAP
#define EXCEPTION_TARGET_FLAG_REASSEMBLY_MEMCAP
Definition: util-exception-policy-types.h:47
SCLogInfo
#define SCLogInfo(...)
Macro used to log INFORMATIONAL messages.
Definition: util-debug.h:229
EXCEPTION_TARGET_FLAG_MIDSTREAM
#define EXCEPTION_TARGET_FLAG_MIDSTREAM
Definition: util-exception-policy-types.h:49
StreamTcpReassemblyMemcapGetExceptionPolicy
enum ExceptionPolicy StreamTcpReassemblyMemcapGetExceptionPolicy(void)
Definition: stream-tcp.c:912
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:546
FlowGetMemcapExceptionPolicy
enum ExceptionPolicy FlowGetMemcapExceptionPolicy(void)
Definition: flow.c:135
Flow_::applied_exception_policy
uint8_t applied_exception_policy
Definition: flow.h:465
EXCEPTION_POLICY_REJECT
@ EXCEPTION_POLICY_REJECT
Definition: util-exception-policy-types.h:33
StreamTcpDisableAppLayer
void StreamTcpDisableAppLayer(Flow *f)
Definition: stream-tcp-reassemble.c:447
suricata-common.h
EXCEPTION_TARGET_FLAG_SESSION_MEMCAP
#define EXCEPTION_TARGET_FLAG_SESSION_MEMCAP
Definition: util-exception-policy-types.h:46
FatalErrorOnInit
#define FatalErrorOnInit(...)
Fatal error IF we're starting up, and configured to consider errors to be fatal errors.
Definition: util-debug.h:523
packet.h
ACTION_DROP
#define ACTION_DROP
Definition: action-globals.h:30
tv
ThreadVars * tv
Definition: fuzz_decodepcapfile.c:32
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:917
Flow_::flags
uint32_t flags
Definition: flow.h:413
StreamTcpSsnMemcapGetExceptionPolicy
enum ExceptionPolicy StreamTcpSsnMemcapGetExceptionPolicy(void)
Definition: stream-tcp.c:907
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:242
suricata.h
defrag-hash.h
EXCEPTION_TARGET_FLAG_FLOW_MEMCAP
#define EXCEPTION_TARGET_FLAG_FLOW_MEMCAP
Definition: util-exception-policy-types.h:48
SetMasterExceptionPolicy
void SetMasterExceptionPolicy(void)
Definition: util-exception-policy.c:65
util-misc.h
flow.h
PKT_DROP_REASON_STREAM_MIDSTREAM
@ PKT_DROP_REASON_STREAM_MIDSTREAM
Definition: decode.h:393
ExceptionPolicy
ExceptionPolicy
Definition: util-exception-policy-types.h:25
StatsRegisterCounter
uint16_t StatsRegisterCounter(const char *name, struct ThreadVars_ *tv)
Registers a normal, unqualified counter.
Definition: counters.c:968
DefragGetMemcapExceptionPolicy
enum ExceptionPolicy DefragGetMemcapExceptionPolicy(void)
Definition: defrag-hash.c:80
ExceptionPolicyStatsSetts_::eps_name
char eps_name[EXCEPTION_POLICY_MAX][EXCEPTION_POLICY_COUNTER_MAX_LEN]
Definition: util-exception-policy-types.h:58