suricata
detect.h
Go to the documentation of this file.
1 /* Copyright (C) 2007-2022 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 Victor Julien <victor@inliniac.net>
22  */
23 
24 #ifndef __DETECT_H__
25 #define __DETECT_H__
26 
27 #include "suricata-common.h"
28 
29 #include "flow.h"
30 
31 #include "detect-engine-proto.h"
32 #include "detect-reference.h"
33 #include "detect-metadata.h"
34 #include "detect-engine-register.h"
35 #include "packet-queue.h"
36 
37 #include "util-prefilter.h"
38 #include "util-mpm.h"
39 #include "util-spm.h"
40 #include "util-hash.h"
41 #include "util-hashlist.h"
42 #include "util-debug.h"
43 #include "util-error.h"
44 #include "util-radix-tree.h"
45 #include "util-file.h"
46 #include "reputation.h"
47 
48 #include "detect-mark.h"
49 
50 #include "stream.h"
51 
52 #include "util-var-name.h"
53 
54 #include "app-layer-events.h"
55 
56 #define DETECT_MAX_RULE_SIZE 8192
57 
58 #define DETECT_TRANSFORMS_MAX 16
59 
60 /** default rule priority if not set through priority keyword or via
61  * classtype. */
62 #define DETECT_DEFAULT_PRIO 3
63 
64 /* forward declarations for the structures from detect-engine-sigorder.h */
65 struct SCSigOrderFunc_;
67 
68 /*
69  The detection engine groups similar signatures/rules together. Internally a
70  tree of different types of data is created on initialization. This is it's
71  global layout:
72 
73  For TCP/UDP
74 
75  - Flow direction
76  -- Protocol
77  -=- Dst port
78 
79  For the other protocols
80 
81  - Flow direction
82  -- Protocol
83 */
84 
85 /* holds the values for different possible lists in struct Signature.
86  * These codes are access points to particular lists in the array
87  * Signature->sm_lists[DETECT_SM_LIST_MAX]. */
91 
92  /* base64_data keyword uses some hardcoded logic so consider
93  * built-in
94  * TODO convert to inspect engine */
96 
97  /* list for post match actions: flowbit set, flowint increment, etc */
99 
100  DETECT_SM_LIST_TMATCH, /**< post-detection tagging */
101 
102  /* lists for alert thresholding and suppression */
105 
107 
108  /* start of dynamically registered lists */
110 };
111 
112 /* used for Signature->list, which indicates which list
113  * we're adding keywords to in cases of sticky buffers like
114  * file_data */
115 #define DETECT_SM_LIST_NOTSET INT_MAX
116 
117 /*
118  * DETECT ADDRESS
119  */
120 
121 /* a is ... than b */
122 enum {
123  ADDRESS_ER = -1, /**< error e.g. compare ipv4 and ipv6 */
124  ADDRESS_LT, /**< smaller [aaa] [bbb] */
125  ADDRESS_LE, /**< smaller with overlap [aa[bab]bb] */
126  ADDRESS_EQ, /**< exactly equal [abababab] */
127  ADDRESS_ES, /**< within [bb[aaa]bb] and [[abab]bbb] and [bbb[abab]] */
128  ADDRESS_EB, /**< completely overlaps [aa[bbb]aa] and [[baba]aaa] and [aaa[baba]] */
129  ADDRESS_GE, /**< bigger with overlap [bb[aba]aa] */
130  ADDRESS_GT, /**< bigger [bbb] [aaa] */
131 };
132 
133 #define ADDRESS_FLAG_NOT 0x01 /**< address is negated */
134 
135 /** \brief address structure for use in the detection engine.
136  *
137  * Contains the address information and matching information.
138  */
139 typedef struct DetectAddress_ {
140  /** address data for this group */
143 
144  /** flags affecting this address */
145  uint8_t flags;
146 
147  /** ptr to the previous address in the list */
149  /** ptr to the next address in the list */
152 
153 /** Address grouping head. IPv4 and IPv6 are split out */
154 typedef struct DetectAddressHead_ {
158 
159 
160 typedef struct DetectMatchAddressIPv4_ {
161  uint32_t ip; /**< address in host order, start of range */
162  uint32_t ip2; /**< address in host order, end of range */
164 
165 typedef struct DetectMatchAddressIPv6_ {
166  uint32_t ip[4];
167  uint32_t ip2[4];
169 
170 /*
171  * DETECT PORT
172  */
173 
174 /* a is ... than b */
175 enum {
176  PORT_ER = -1, /* error e.g. compare ipv4 and ipv6 */
177  PORT_LT, /* smaller [aaa] [bbb] */
178  PORT_LE, /* smaller with overlap [aa[bab]bb] */
179  PORT_EQ, /* exactly equal [abababab] */
180  PORT_ES, /* within [bb[aaa]bb] and [[abab]bbb] and [bbb[abab]] */
181  PORT_EB, /* completely overlaps [aa[bbb]aa] and [[baba]aaa] and [aaa[baba]] */
182  PORT_GE, /* bigger with overlap [bb[aba]aa] */
183  PORT_GT, /* bigger [bbb] [aaa] */
184 };
185 
186 #define PORT_FLAG_ANY 0x01 /**< 'any' special port */
187 #define PORT_FLAG_NOT 0x02 /**< negated port */
188 #define PORT_SIGGROUPHEAD_COPY 0x04 /**< sgh is a ptr copy */
189 
190 /** \brief Port structure for detection engine */
191 typedef struct DetectPort_ {
192  uint16_t port;
193  uint16_t port2;
194 
195  uint8_t flags; /**< flags for this port */
196 
197  /* signatures that belong in this group
198  *
199  * If the PORT_SIGGROUPHEAD_COPY flag is set, we don't own this pointer
200  * (memory is freed elsewhere).
201  */
202  struct SigGroupHead_ *sh;
203 
204  struct DetectPort_ *prev;
205  struct DetectPort_ *next;
207 
208 /* Signature flags */
209 /** \note: additions should be added to the rule analyzer as well */
210 
211 #define SIG_FLAG_SRC_ANY BIT_U32(0) /**< source is any */
212 #define SIG_FLAG_DST_ANY BIT_U32(1) /**< destination is any */
213 #define SIG_FLAG_SP_ANY BIT_U32(2) /**< source port is any */
214 #define SIG_FLAG_DP_ANY BIT_U32(3) /**< destination port is any */
215 
216 #define SIG_FLAG_NOALERT BIT_U32(4) /**< no alert flag is set */
217 #define SIG_FLAG_DSIZE BIT_U32(5) /**< signature has a dsize setting */
218 #define SIG_FLAG_APPLAYER BIT_U32(6) /**< signature applies to app layer instead of packets */
219 #define SIG_FLAG_IPONLY BIT_U32(7) /**< ip only signature */
220 #define SIG_FLAG_LIKE_IPONLY \
221  BIT_U32(8) /**< signature that is almost ip only, but contains negation prevening some iponly \
222  optimizations */
223 
224 // vacancy
225 
226 #define SIG_FLAG_REQUIRE_PACKET BIT_U32(9) /**< signature is requiring packet match */
227 #define SIG_FLAG_REQUIRE_STREAM BIT_U32(10) /**< signature is requiring stream match */
228 
229 #define SIG_FLAG_MPM_NEG BIT_U32(11)
230 
231 #define SIG_FLAG_FLUSH BIT_U32(12) /**< detection logic needs stream flush notification */
232 
233 // vacancies
234 
235 #define SIG_FLAG_REQUIRE_FLOWVAR BIT_U32(17) /**< signature can only match if a flowbit, flowvar or flowint is available. */
236 
237 #define SIG_FLAG_FILESTORE BIT_U32(18) /**< signature has filestore keyword */
238 
239 #define SIG_FLAG_TOSERVER BIT_U32(19)
240 #define SIG_FLAG_TOCLIENT BIT_U32(20)
241 
242 #define SIG_FLAG_TLSSTORE BIT_U32(21)
243 
244 #define SIG_FLAG_BYPASS BIT_U32(22)
245 
246 #define SIG_FLAG_PREFILTER BIT_U32(23) /**< sig is part of a prefilter engine */
247 
248 /** Proto detect only signature.
249  * Inspected once per direction when protocol detection is done. */
250 #define SIG_FLAG_PDONLY BIT_U32(24)
251 /** Info for Source and Target identification */
252 #define SIG_FLAG_SRC_IS_TARGET BIT_U32(25)
253 /** Info for Source and Target identification */
254 #define SIG_FLAG_DEST_IS_TARGET BIT_U32(26)
255 
256 #define SIG_FLAG_HAS_TARGET (SIG_FLAG_DEST_IS_TARGET|SIG_FLAG_SRC_IS_TARGET)
257 
258 /* signature init flags */
259 #define SIG_FLAG_INIT_DEONLY BIT_U32(0) /**< decode event only signature */
260 #define SIG_FLAG_INIT_PACKET BIT_U32(1) /**< signature has matches against a packet (as opposed to app layer) */
261 #define SIG_FLAG_INIT_FLOW BIT_U32(2) /**< signature has a flow setting */
262 #define SIG_FLAG_INIT_BIDIREC BIT_U32(3) /**< signature has bidirectional operator */
263 #define SIG_FLAG_INIT_FIRST_IPPROTO_SEEN BIT_U32(4) /** < signature has seen the first ip_proto keyword */
264 #define SIG_FLAG_INIT_HAS_TRANSFORM BIT_U32(5)
265 #define SIG_FLAG_INIT_STATE_MATCH BIT_U32(6) /**< signature has matches that require stateful inspection */
266 #define SIG_FLAG_INIT_NEED_FLUSH BIT_U32(7)
267 #define SIG_FLAG_INIT_PRIO_EXPLICT BIT_U32(8) /**< priority is explicitly set by the priority keyword */
268 #define SIG_FLAG_INIT_FILEDATA BIT_U32(9) /**< signature has filedata keyword */
269 
270 /* signature mask flags */
271 /** \note: additions should be added to the rule analyzer as well */
272 #define SIG_MASK_REQUIRE_PAYLOAD BIT_U8(0)
273 #define SIG_MASK_REQUIRE_FLOW BIT_U8(1)
274 #define SIG_MASK_REQUIRE_FLAGS_INITDEINIT BIT_U8(2) /* SYN, FIN, RST */
275 #define SIG_MASK_REQUIRE_FLAGS_UNUSUAL BIT_U8(3) /* URG, ECN, CWR */
276 #define SIG_MASK_REQUIRE_NO_PAYLOAD BIT_U8(4)
277 #define SIG_MASK_REQUIRE_DCERPC BIT_U8(5) /* require either SMB+DCE or raw DCE */
278 // vacancy
279 #define SIG_MASK_REQUIRE_ENGINE_EVENT BIT_U8(7)
280 
281 /* for now a uint8_t is enough */
282 #define SignatureMask uint8_t
283 
284 #define DETECT_ENGINE_THREAD_CTX_FRAME_ID_SET 0x0001
285 #define DETECT_ENGINE_THREAD_CTX_STREAM_CONTENT_MATCH 0x0004
286 
287 #define FILE_SIG_NEED_FILE 0x01
288 #define FILE_SIG_NEED_FILENAME 0x02
289 #define FILE_SIG_NEED_MAGIC 0x04 /**< need the start of the file */
290 #define FILE_SIG_NEED_FILECONTENT 0x08
291 #define FILE_SIG_NEED_MD5 0x10
292 #define FILE_SIG_NEED_SHA1 0x20
293 #define FILE_SIG_NEED_SHA256 0x40
294 #define FILE_SIG_NEED_SIZE 0x80
295 
296 /* Detection Engine flags */
297 #define DE_QUIET 0x01 /**< DE is quiet (esp for unittests) */
298 
299 typedef struct IPOnlyCIDRItem_ {
300  /* address data for this item */
301  uint8_t family;
302  /* netmask in CIDR values (ex. /16 /18 /24..) */
303  uint8_t netmask;
304  /* If this host or net is negated for the signum */
305  uint8_t negated;
306 
307  uint32_t ip[4];
308  SigIntId signum; /**< our internal id */
309 
310  /* linked list, the header should be the biggest network */
312 
314 
315 /** \brief Used to start a pointer to SigMatch context
316  * Should never be dereferenced without casting to something else.
317  */
318 typedef struct SigMatchCtx_ {
319  int foo;
321 
322 /** \brief a single match condition for a signature */
323 typedef struct SigMatch_ {
324  uint16_t type; /**< match type */
325  uint16_t idx; /**< position in the signature */
326  SigMatchCtx *ctx; /**< plugin specific data */
327  struct SigMatch_ *next;
328  struct SigMatch_ *prev;
330 
331 /** \brief Data needed for Match() */
332 typedef struct SigMatchData_ {
333  uint16_t type; /**< match type */
334  uint8_t is_last; /**< Last element of the list */
335  SigMatchCtx *ctx; /**< plugin specific data */
337 
338 struct DetectEngineThreadCtx_;// DetectEngineThreadCtx;
339 
340 /* inspection buffer is a simple structure that is passed between prefilter,
341  * transformation functions and inspection functions.
342  * Initially setup with 'orig' ptr and len, transformations can then take
343  * then and fill the 'buf'. Multiple transformations can update the buffer,
344  * both growing and shrinking it.
345  * Prefilter and inspection will only deal with 'inspect'. */
346 
347 typedef struct InspectionBuffer {
348  const uint8_t *inspect; /**< active pointer, points either to ::buf or ::orig */
349  uint64_t inspect_offset;
350  uint32_t inspect_len; /**< size of active data. See to ::len or ::orig_len */
351  uint8_t flags; /**< DETECT_CI_FLAGS_* for use with DetectEngineContentInspection */
352 #ifdef DEBUG_VALIDATION
353  bool multi;
354 #endif
355  uint32_t len; /**< how much is in use */
356  uint8_t *buf;
357  uint32_t size; /**< size of the memory allocation */
358 
359  uint32_t orig_len;
360  const uint8_t *orig;
362 
363 /* inspection buffers are kept per tx (in det_ctx), but some protocols
364  * need a bit more. A single TX might have multiple buffers, e.g. files in
365  * SMTP or DNS queries. Since all prefilters+transforms run before the
366  * individual rules need the same buffers, we need a place to store the
367  * transformed data. This array of arrays is that place. */
368 
371  uint32_t size; /**< size in number of elements */
372  uint32_t max:31; /**< max id in use in this run */
373  uint32_t init:1; /**< first time used this run. Used for clean logic */
375 
376 typedef struct TransformData_ {
378  void *options;
380 
381 typedef struct DetectEngineTransforms {
383  int cnt;
385 
386 /** callback for getting the buffer we need to prefilter/inspect */
387 typedef InspectionBuffer *(*InspectionBufferGetDataPtr)(
388  struct DetectEngineThreadCtx_ *det_ctx,
389  const DetectEngineTransforms *transforms,
390  Flow *f, const uint8_t flow_flags,
391  void *txv, const int list_id);
393 
394 typedef uint8_t (*InspectEngineFuncPtr2)(struct DetectEngineCtx_ *de_ctx,
395  struct DetectEngineThreadCtx_ *det_ctx,
396  const struct DetectEngineAppInspectionEngine_ *engine, const struct Signature_ *s, Flow *f,
397  uint8_t flags, void *alstate, void *txv, uint64_t tx_id);
398 
401  uint8_t dir;
402  uint8_t id; /**< per sig id used in state keeping */
403  bool mpm;
404  bool stream;
405  uint16_t sm_list;
406  uint16_t sm_list_base; /**< base buffer being transformed */
407  int16_t progress;
408 
409  struct {
412  /** pointer to the transforms in the 'DetectBuffer entry for this list */
414  } v2;
415 
417 
420 
421 typedef struct DetectBufferType_ {
422  char name[32];
423  char description[128];
424  int id;
426  bool mpm;
427  bool packet; /**< compat to packet matches */
428  bool frame; /**< is about Frame inspection */
430  void (*SetupCallback)(const struct DetectEngineCtx_ *, struct Signature_ *);
431  bool (*ValidateCallback)(const struct Signature_ *, const char **sigerror);
434 
436 
437 /**
438  * \param alert_flags[out] for setting PACKET_ALERT_FLAG_*
439  */
441  struct DetectEngineThreadCtx_ *,
442  const struct DetectEnginePktInspectionEngine *engine,
443  const struct Signature_ *s,
444  Packet *p, uint8_t *alert_flags);
445 
446 /** callback for getting the buffer we need to prefilter/inspect */
447 typedef InspectionBuffer *(*InspectionBufferGetPktDataPtr)(
448  struct DetectEngineThreadCtx_ *det_ctx,
449  const DetectEngineTransforms *transforms,
450  Packet *p, const int list_id);
451 
454  bool mpm;
455  uint16_t sm_list;
456  uint16_t sm_list_base;
457  struct {
460  /** pointer to the transforms in the 'DetectBuffer entry for this list */
462  } v1;
465 
466 struct Frame;
467 struct Frames;
469 
470 /**
471  * \param alert_flags[out] for setting PACKET_ALERT_FLAG_*
472  */
474  const struct DetectEngineFrameInspectionEngine *engine, const struct Signature_ *s,
475  Packet *p, const struct Frames *frames, const struct Frame *frame, const uint32_t idx);
476 
479  uint8_t dir;
480  uint8_t type;
481  bool mpm;
482  uint16_t sm_list;
483  uint16_t sm_list_base;
484  struct {
486  /** pointer to the transforms in the 'DetectBuffer entry for this list */
488  } v1;
492 
493 #ifdef UNITTESTS
494 #define sm_lists init_data->smlists
495 #define sm_lists_tail init_data->smlists_tail
496 #endif
497 
498 typedef struct SignatureInitData_ {
499  /** Number of sigmatches. Used for assigning SigMatch::idx */
500  uint16_t sm_cnt;
501 
502  /** option was prefixed with '!'. Only set for sigmatches that
503  * have the SIGMATCH_HANDLE_NEGATION flag set. */
504  bool negated;
505 
506  /* track if we saw any negation in the addresses. If so, we
507  * skip it for ip-only */
510 
511  /* used to hold flags that are used during init */
512  uint32_t init_flags;
513  /* coccinelle: SignatureInitData:init_flags:SIG_FLAG_INIT_ */
514 
515  /* used at init to determine max dsize */
517 
518  /* list id for `mpm_sm`. Should always match `SigMatchListSMBelongsTo(s, mpm_sm)`. */
520  /* the fast pattern added from this signature */
522  /* used to speed up init of prefilter */
524 
525  /* SigMatch list used for adding content and friends. E.g. file_data; */
526  int list;
527  bool list_set;
528 
530 
531  /** score to influence rule grouping. A higher value leads to a higher
532  * likelihood of a rulegroup with this sig ending up as a contained
533  * group. */
535 
536  /** address settings for this signature */
538 
540 
542  /* holds all sm lists */
543  struct SigMatch_ **smlists;
544  /* holds all sm lists' tails */
547 
548 /** \brief Signature container */
549 typedef struct Signature_ {
550  uint32_t flags;
551  /* coccinelle: Signature:flags:SIG_FLAG_ */
552 
554 
555  uint16_t dsize_low;
556  uint16_t dsize_high;
557  uint8_t dsize_mode;
558 
560  SigIntId num; /**< signature number, internal id */
561 
562  /** inline -- action */
563  uint8_t action;
564  uint8_t file_flags;
565 
566  /** addresses, ports and proto this sig matches on */
568 
569  /** classification id **/
570  uint16_t class_id;
571 
572  /** ipv4 match arrays */
579  /** ipv6 match arrays */
582 
583  uint32_t id; /**< sid, set by the 'sid' rule keyword */
584  uint32_t gid; /**< generator id */
585  uint32_t rev;
586  int prio;
587 
588  /** port settings for this signature */
590 
591 #ifdef PROFILING
592  uint16_t profiling_id;
593 #endif
594 
595  /** netblocks and hosts specified at the sid, in CIDR format */
597 
601 
602  /* Matching structures for the built-ins. The others are in
603  * their inspect engines. */
605 
606  /* memory is still owned by the sm_lists/sm_arrays entry */
608 
609  char *msg;
610 
611  /** classification message */
612  char *class_msg;
613  /** Reference */
615  /** Metadata */
617 
618  char *sig_str;
619 
621 
622  /** ptr to the next sig in the list */
623  struct Signature_ *next;
625 
630  /* must be last */
632 };
633 
634 /** \brief one time registration of keywords at start up */
636  const char *name;
637  char pname[32]; /**< name used in profiling */
638  int direction; /**< SIG_FLAG_TOSERVER or SIG_FLAG_TOCLIENT */
639  int16_t sm_list;
640  int16_t sm_list_base;
641  int priority;
642  int id; /**< index into this array and result arrays */
645 
647  struct SigGroupHead_ *sgh, MpmCtx *mpm_ctx,
648  const struct DetectBufferMpmRegistery_ *mpm_reg, int list_id);
650 
651  union {
652  /* app-layer matching: use if type == DETECT_BUFFER_MPM_TYPE_APP */
653  struct {
658 
659  /* pkt matching: use if type == DETECT_BUFFER_MPM_TYPE_PKT */
660  struct {
662  struct SigGroupHead_ *sgh, MpmCtx *mpm_ctx,
663  const struct DetectBufferMpmRegistery_ *mpm_reg, int list_id);
666 
667  /* frame matching: use if type == DETECT_BUFFER_MPM_TYPE_FRAME */
668  struct {
670  uint8_t type;
672  };
673 
676 
677 /* helper structure to track pattern stats and assign pattern id's. */
678 typedef struct DetectPatternTracker {
679  const struct DetectContentData_ *cd;
680  int sm_list;
681  uint32_t cnt;
682  uint32_t mpm;
684 
685 typedef struct DetectReplaceList_ {
687  uint8_t *found;
690 
691 /** only execute flowvar storage if rule matched */
692 #define DETECT_VAR_TYPE_FLOW_POSTMATCH 1
693 #define DETECT_VAR_TYPE_PKT_POSTMATCH 2
694 
695 /** list for flowvar store candidates, to be stored from
696  * post-match function */
697 typedef struct DetectVarList_ {
698  uint32_t idx; /**< flowvar name idx */
699  uint16_t len; /**< data len */
700  uint16_t key_len;
701  int type; /**< type of store candidate POSTMATCH or ALWAYS */
702  uint8_t *key;
703  uint8_t *buffer; /**< alloc'd buffer, may be freed by
704  post-match, post-non-match */
707 
708 typedef struct SCFPSupportSMList_ {
709  int list_id;
710  int priority;
713 
715  uint8_t *sig_match_array; /* bit array of sig nums */
716  uint32_t sig_match_size; /* size in bytes of the array */
718 
719 /** \brief IP only rules matching ctx. */
720 typedef struct DetectEngineIPOnlyCtx_ {
721  /* Lookup trees */
724 
725  /* Used to build the radix trees */
727  uint32_t max_idx;
729 
730 typedef struct DetectEngineLookupFlow_ {
733  struct SigGroupHead_ *sgh[256];
735 
736 #include "detect-threshold.h"
737 
738 /** \brief threshold ctx */
739 typedef struct ThresholdCtx_ {
740  SCMutex threshold_table_lock; /**< Mutex for hash table */
741 
742  /** to support rate_filter "by_rule" option */
744  uint32_t th_size;
746 
747 typedef struct SigString_ {
748  char *filename;
749  char *sig_str;
750  char *sig_error;
751  int line;
754 
755 /** \brief Signature loader statistics */
756 typedef struct SigFileLoaderStat_ {
757  TAILQ_HEAD(, SigString_) failed_sigs;
763 
765  void *(*InitFunc)(void *);
766  void (*FreeFunc)(void *);
767  void *data;
769  int id;
770  const char *name; /* keyword name, for error printing */
772 
774 {
775  DETECT_PREFILTER_MPM = 0, /**< use only mpm / fast_pattern */
776  DETECT_PREFILTER_AUTO = 1, /**< use mpm + keyword prefilters */
777 };
778 
780 {
782  DETECT_ENGINE_TYPE_DD_STUB = 1, /* delayed detect stub: can be reloaded */
783  DETECT_ENGINE_TYPE_MT_STUB = 2, /* multi-tenant stub: cannot be reloaded */
785 };
786 
787 /* Flow states:
788  * toserver
789  * toclient
790  */
791 #define FLOW_STATES 2
792 
793 /** \brief main detection engine ctx */
794 typedef struct DetectEngineCtx_ {
795  uint8_t flags;
797 
799 
801  uint32_t sig_cnt;
802 
803  /* version of the srep data */
804  uint32_t srep_version;
805 
806  /* reputation for netblocks */
808 
810  uint32_t sig_array_size; /* size in bytes */
811  uint32_t sig_array_len; /* size in array members */
812 
813  uint32_t signum;
814 
815  /** Maximum value of all our sgh's non_mpm_store_cnt setting,
816  * used to alloc det_ctx::non_mpm_id_array */
818 
819  /* used by the signature ordering module */
821 
822  /* hash table used for holding the classification config info */
824  /* hash table used for holding the reference config info */
826 
827  /* main sigs */
829 
830  uint32_t gh_unique, gh_reuse;
831 
832  /* init phase vars */
834 
837 
838  /* hash table used to cull out duplicate sigs */
840 
843 
844  uint8_t mpm_matcher; /**< mpm matcher this ctx uses */
845  uint16_t spm_matcher; /**< spm matcher this ctx uses */
846 
847  /* spm thread context prototype, built as spm matchers are constructed and
848  * later used to construct thread context for each thread. */
850 
851  /* Config options */
852 
855 
856  /* specify the configuration for mpm context factory */
858 
859  /* max flowbit id that is used */
860  uint32_t max_fb_id;
861 
862  uint32_t max_fp_id;
863 
865 
866  /* maximum recursion depth for content inspection */
868 
869  /* conf parameter that limits the length of the http request body inspected */
871  /* conf parameter that limits the length of the http response body inspected */
873 
874  /* array containing all sgh's in use so we can loop
875  * through it in Stage4. */
877  uint32_t sgh_array_cnt;
878  uint32_t sgh_array_size;
879 
884 
885  /* the max local id used amongst all sigs */
887 
888  /** version of the detect engine. The version is incremented on reloads */
889  uint32_t version;
890 
891  /** sgh for signatures that match against invalid packets. In those cases
892  * we can't lookup by proto, address, port as we don't have these */
894 
895  /* Maximum size of the buffer for decoded base64 data. */
897 
898  /** Store rule file and line so that parsers can use them in errors. */
899  char *rule_file;
903  const char *sigerror;
904 
905  /** hash list of keywords that need thread local ctxs */
908 
909  struct {
910  uint32_t content_limit;
915 
916 #ifdef PROFILING
923 #endif
924  uint32_t prefilter_maxid;
925 
926  char config_prefix[64];
927 
928  enum DetectEngineType type;
929 
930  /** how many de_ctx' are referencing this */
931  uint32_t ref_cnt;
932  /** list in master: either active or freelist */
934 
935  /** id of loader thread 'owning' this de_ctx */
937 
938  /** are we using just mpm or also other prefilters */
940 
942 
945 
946  /** table for storing the string representation with the parsers result */
948 
949  /** table to store metadata keys and values */
951 
952  /* hash tables with rule-time buffer registration. Start time registration
953  * is in detect-engine.c::g_buffer_type_hash */
956  uint32_t buffer_type_id;
957 
958  /* list with app inspect engines. Both the start-time registered ones and
959  * the rule-time registered ones. */
969 
970  uint32_t prefilter_id;
972 
973  /** time of last ruleset reload */
974  struct timeval last_reload;
975 
976  /** signatures stats */
978 
979  /** per keyword flag indicating if a prefilter has been
980  * set for it. If true, the setup function will have to
981  * run. */
984 
985  /* list of Fast Pattern registrations. Initially filled using a copy of
986  * `g_fp_support_smlist_list`, then extended at rule loading time if needed */
989 
990 /* Engine groups profiles (low, medium, high, custom) */
991 enum {
998 };
999 
1000 /* Siggroup mpm context profile */
1001 enum {
1005 #define ENGINE_SGH_MPM_FACTORY_CONTEXT_START_ID_RANGE (ENGINE_SGH_MPM_FACTORY_CONTEXT_AUTO + 1)
1006 };
1007 
1008 typedef struct HttpReassembledBody_ {
1009  const uint8_t *buffer;
1011  uint32_t buffer_size; /**< size of the buffer itself */
1012  uint32_t buffer_len; /**< data len in the buffer */
1014  uint64_t offset; /**< data offset */
1016 
1017 #define DETECT_FILESTORE_MAX 15
1024 
1025 /** array of TX inspect rule candidates */
1026 typedef struct RuleMatchCandidateTx {
1027  SigIntId id; /**< internal signature id */
1028  uint32_t *flags; /**< inspect flags ptr */
1029  union {
1030  struct {
1032  uint8_t stream_result;
1033  };
1034  uint32_t stream_reset;
1035  };
1036 
1037  const Signature *s; /**< ptr to sig */
1039 
1040 /**
1041  * Detection engine thread data.
1042  */
1043 typedef struct DetectEngineThreadCtx_ {
1044  /** \note multi-tenant hash lookup code from Detect() *depends*
1045  * on this being the first member */
1046  uint32_t tenant_id;
1047 
1048  /* the thread to which this detection engine thread belongs */
1050 
1051  /** Array of non-prefiltered sigs that need to be evaluated. Updated
1052  * per packet based on the rule group and traffic properties. */
1054  uint32_t non_pf_id_cnt; // size is cnt * sizeof(uint32_t)
1055 
1059 
1062 
1063  uint32_t (*TenantGetId)(const void *, const Packet *p);
1064 
1065  /* detection engine variables */
1066 
1068 
1069  /** offset into the payload of the last match by:
1070  * content, pcre, etc */
1071  uint32_t buffer_offset;
1072  /* used by pcre match function alone */
1074 
1075  /* counter for the filestore array below -- up here for cache reasons. */
1076  uint16_t filestore_cnt;
1077 
1078  /** id for alert counter */
1079  uint16_t counter_alerts;
1080  /** id for discarded alerts counter */
1082  /** id for suppressed alerts counter */
1084 #ifdef PROFILING
1089 #endif
1090 
1091  int inspect_list; /**< list we're currently inspecting, DETECT_SM_LIST_* */
1092 
1093  struct {
1095  uint32_t buffers_size; /**< in number of elements */
1096  uint32_t to_clear_idx;
1097  uint32_t *to_clear_queue;
1099 
1100  struct {
1101  /** inspection buffers for more complex case. As we can inspect multiple
1102  * buffers in parallel, we need this extra wrapper struct */
1104  uint32_t buffers_size; /**< in number of elements */
1105  uint32_t to_clear_idx;
1106  uint32_t *to_clear_queue;
1108 
1109  /* used to discontinue any more matching */
1111  uint16_t flags; /**< DETECT_ENGINE_THREAD_CTX_* flags */
1112 
1113  /* true if tx_id is set */
1115  /** ID of the transaction currently being inspected. */
1116  uint64_t tx_id;
1117  int64_t frame_id;
1119 
1123 
1124  SC_ATOMIC_DECLARE(int, so_far_used_by_detect);
1125 
1126  /* holds the current recursion depth on content inspection */
1128 
1129  /** array of signature pointers we're going to inspect in the detection
1130  * loop. */
1132  /** size of the array in items (mem size if * sizeof(Signature *)
1133  * Only used during initialization. */
1135  /** size in use */
1137 
1140 
1143 
1144  /** pointer to the current mpm ctx that is stored
1145  * in a rule group head -- can be either a content
1146  * or uricontent ctx. */
1147  MpmThreadCtx mtc; /**< thread ctx for the mpm */
1148  MpmThreadCtx mtcu; /**< thread ctx for uricontent mpm */
1149  MpmThreadCtx mtcs; /**< thread ctx for stream mpm */
1151 
1152  /** SPM thread context used for scanning. This has been cloned from the
1153  * prototype held by DetectEngineCtx. */
1155 
1156  /** ip only rules ctx */
1158 
1159  /* byte_* values */
1160  uint64_t *byte_values;
1161 
1162  /* string to replace */
1164  /* vars to store in post match function */
1166 
1167  /* Array in which the filestore keyword stores file id and tx id. If the
1168  * full signature matches, these are processed by a post-match filestore
1169  * function to finalize the store. */
1170  struct {
1171  uint32_t file_id;
1172  uint64_t tx_id;
1174 
1176  /** store for keyword contexts that need a per thread storage. Per de_ctx. */
1179  /** store for keyword contexts that need a per thread storage. Global. */
1182 
1183  uint8_t *base64_decoded;
1186 
1188  uint16_t events;
1189 
1190 #ifdef DEBUG
1191  uint64_t pkt_stream_add_cnt;
1192  uint64_t payload_mpm_cnt;
1193  uint64_t payload_mpm_size;
1194  uint64_t stream_mpm_cnt;
1195  uint64_t stream_mpm_size;
1196  uint64_t payload_persig_cnt;
1197  uint64_t payload_persig_size;
1198  uint64_t stream_persig_cnt;
1199  uint64_t stream_persig_size;
1200 #endif
1201 #ifdef PROFILING
1206  int keyword_perf_list; /**< list we're currently inspecting, DETECT_SM_LIST_* */
1208 
1211 #endif
1213 
1214 /** \brief element in sigmatch type table.
1215  */
1216 typedef struct SigTableElmt_ {
1217  /** Packet match function pointer */
1218  int (*Match)(DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *);
1219 
1220  /** AppLayer TX match function pointer */
1222  uint8_t flags, void *alstate, void *txv,
1223  const Signature *, const SigMatchCtx *);
1224 
1225  /** File match function pointer */
1227  Flow *, /**< *LOCKED* flow */
1228  uint8_t flags, File *, const Signature *, const SigMatchCtx *);
1229 
1230  /** InspectionBuffer transformation callback */
1231  void (*Transform)(InspectionBuffer *, void *context);
1232  bool (*TransformValidate)(const uint8_t *content, uint16_t content_len, void *context);
1233 
1234  /** keyword setup function pointer */
1235  int (*Setup)(DetectEngineCtx *, Signature *, const char *);
1236 
1237  bool (*SupportsPrefilter)(const Signature *s);
1239 
1240  void (*Free)(DetectEngineCtx *, void *);
1241 #ifdef UNITTESTS
1242  void (*RegisterTests)(void);
1243 #endif
1244  uint16_t flags;
1245  /* coccinelle: SigTableElmt:flags:SIGMATCH_ */
1246 
1247  /** better keyword to replace the current one */
1248  uint16_t alternative;
1249 
1250  const char *name; /**< keyword name alias */
1251  const char *alias; /**< name alias */
1252  const char *desc;
1253  const char *url;
1254 
1256 
1257 /* event code */
1258 enum {
1259 #ifdef UNITTESTS
1261 #endif
1276 
1278 };
1279 
1280 #define SIG_GROUP_HEAD_HAVERAWSTREAM BIT_U32(0)
1281 #ifdef HAVE_MAGIC
1282 #define SIG_GROUP_HEAD_HAVEFILEMAGIC BIT_U32(20)
1283 #endif
1284 #define SIG_GROUP_HEAD_HAVEFILEMD5 BIT_U32(21)
1285 #define SIG_GROUP_HEAD_HAVEFILESIZE BIT_U32(22)
1286 #define SIG_GROUP_HEAD_HAVEFILESHA1 BIT_U32(23)
1287 #define SIG_GROUP_HEAD_HAVEFILESHA256 BIT_U32(24)
1298 };
1299 
1300 typedef struct MpmStore_ {
1301  uint8_t *sid_array;
1302  uint32_t sid_array_size;
1303 
1306  int sm_list;
1308 
1310 
1312 
1313 typedef void (*PrefilterFrameFn)(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
1314  const struct Frames *frames, const struct Frame *frame, const uint32_t idx);
1315 
1316 typedef struct PrefilterEngineList_ {
1317  uint16_t id;
1318 
1319  /** App Proto this engine applies to: only used with Tx Engines */
1321  /** Minimal Tx progress we need before running the engine. Only used
1322  * with Tx Engine */
1324 
1325  uint8_t frame_type;
1326 
1327  /** Context for matching. Might be MpmCtx for MPM engines, other ctx'
1328  * for other engines. */
1329  void *pectx;
1330 
1331  void (*Prefilter)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx);
1332  void (*PrefilterTx)(DetectEngineThreadCtx *det_ctx, const void *pectx,
1333  Packet *p, Flow *f, void *tx,
1334  const uint64_t idx, const uint8_t flags);
1336 
1338 
1339  /** Free function for pectx data. If NULL the memory is not freed. */
1340  void (*Free)(void *pectx);
1341 
1342  const char *name;
1343  /* global id for this prefilter */
1344  uint32_t gid;
1346 
1347 typedef struct PrefilterEngine_ {
1348  uint16_t local_id;
1349 
1350  /** App Proto this engine applies to: only used with Tx Engines */
1352 
1353  union {
1354  /** Minimal Tx progress we need before running the engine. Only used
1355  * with Tx Engine */
1357  uint8_t frame_type;
1358  } ctx;
1359 
1360  /** Context for matching. Might be MpmCtx for MPM engines, other ctx'
1361  * for other engines. */
1362  void *pectx;
1363 
1364  union {
1365  void (*Prefilter)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx);
1366  void (*PrefilterTx)(DetectEngineThreadCtx *det_ctx, const void *pectx,
1367  Packet *p, Flow *f, void *tx,
1368  const uint64_t idx, const uint8_t flags);
1370  } cb;
1371 
1372  /* global id for this prefilter */
1373  uint32_t gid;
1374  bool is_last;
1377 
1378 typedef struct SigGroupHeadInitData_ {
1380 
1381  uint8_t *sig_array; /**< bit array of sig nums (internal id's) */
1382  uint32_t sig_size; /**< size in bytes */
1383 
1384  uint8_t protos[256]; /**< proto(s) this sgh is for */
1385  uint32_t direction; /**< set to SIG_FLAG_TOSERVER, SIG_FLAG_TOCLIENT or both */
1386  int whitelist; /**< try to make this group a unique one */
1387 
1391 
1396 
1397  /** number of sigs in this group */
1399 
1400  /** Array with sig ptrs... size is sig_cnt * sizeof(Signature *) */
1402 
1403  /* port ptr */
1406 
1407 /** \brief Container for matching data for a signature group */
1408 typedef struct SigGroupHead_ {
1409  uint32_t flags;
1410  /* coccinelle: SigGroupHead:flags:SIG_GROUP_HEAD_ */
1411 
1412  /* non prefilter list excluding SYN rules */
1415  SignatureNonPrefilterStore *non_pf_other_store_array; // size is non_mpm_store_cnt * sizeof(SignatureNonPrefilterStore)
1416  /* non mpm list including SYN rules */
1417  SignatureNonPrefilterStore *non_pf_syn_store_array; // size is non_mpm_syn_store_cnt * sizeof(SignatureNonPrefilterStore)
1418 
1419  /** the number of signatures in this sgh that have the filestore keyword
1420  * set. */
1421  uint16_t filestore_cnt;
1422 
1423  uint32_t id; /**< unique id used to index sgh_array for stats */
1424 
1429 
1430  /* ptr to our init data we only use at... init :) */
1432 
1434 
1435 /** sigmatch has no options, so the parser shouldn't expect any */
1436 #define SIGMATCH_NOOPT BIT_U16(0)
1437 /** sigmatch is compatible with a ip only rule */
1438 #define SIGMATCH_IPONLY_COMPAT BIT_U16(1)
1439 /** sigmatch is compatible with a decode event only rule */
1440 #define SIGMATCH_DEONLY_COMPAT BIT_U16(2)
1441 /**< Flag to indicate that the signature is not built-in */
1442 #define SIGMATCH_NOT_BUILT BIT_U16(3)
1443 /** sigmatch may have options, so the parser should be ready to
1444  * deal with both cases */
1445 #define SIGMATCH_OPTIONAL_OPT BIT_U16(4)
1446 /** input may be wrapped in double quotes. They will be stripped before
1447  * input data is passed to keyword parser */
1448 #define SIGMATCH_QUOTES_OPTIONAL BIT_U16(5)
1449 /** input MUST be wrapped in double quotes. They will be stripped before
1450  * input data is passed to keyword parser. Missing double quotes lead to
1451  * error and signature invalidation. */
1452 #define SIGMATCH_QUOTES_MANDATORY BIT_U16(6)
1453 /** negation parsing is handled by the rule parser. Signature::init_data::negated
1454  * will be set to true or false prior to calling the keyword parser. Exclamation
1455  * mark is stripped from the input to the keyword parser. */
1456 #define SIGMATCH_HANDLE_NEGATION BIT_U16(7)
1457 /** keyword is a content modifier */
1458 #define SIGMATCH_INFO_CONTENT_MODIFIER BIT_U16(8)
1459 /** keyword is a sticky buffer */
1460 #define SIGMATCH_INFO_STICKY_BUFFER BIT_U16(9)
1461 /** keyword is deprecated: used to suggest an alternative */
1462 #define SIGMATCH_INFO_DEPRECATED BIT_U16(10)
1463 /** strict parsing is enabled */
1464 #define SIGMATCH_STRICT_PARSING BIT_U16(11)
1467 {
1468  TENANT_SELECTOR_UNKNOWN = 0, /**< not set */
1469  TENANT_SELECTOR_DIRECT, /**< method provides direct tenant id */
1470  TENANT_SELECTOR_VLAN, /**< map vlan to tenant id */
1471  TENANT_SELECTOR_LIVEDEV, /**< map livedev to tenant id */
1472 };
1473 
1475  uint32_t tenant_id;
1476 
1477  /* traffic id that maps to the tenant id */
1478  uint32_t traffic_id;
1479 
1482 
1483 typedef struct DetectEngineMasterCtx_ {
1485 
1486  /** enable multi tenant mode */
1488 
1489  /** version, incremented after each 'apply to threads' */
1490  uint32_t version;
1491 
1492  /** list of active detection engines. This list is used to generate the
1493  * threads det_ctx's */
1495 
1496  /** free list, containing detection engines that will be removed but may
1497  * still be referenced by det_ctx's. Freed as soon as all references are
1498  * gone. */
1500 
1502 
1503  /** list of tenant mappings. Updated under lock. Used to generate lookup
1504  * structures. */
1506 
1507  /** list of keywords that need thread local ctxs,
1508  * only updated by keyword registration at start up. Not
1509  * covered by the lock. */
1513 
1514 /* Table with all SigMatch registrations */
1516 
1517 /** Remember to add the options in SignatureIsIPOnly() at detect.c otherwise it wont be part of a signature group */
1518 
1519 /* detection api */
1520 TmEcode Detect(ThreadVars *tv, Packet *p, void *data);
1521 
1522 SigMatch *SigMatchAlloc(void);
1523 Signature *SigFindSignatureBySidGid(DetectEngineCtx *, uint32_t, uint32_t);
1525  Packet *, SignatureMask,
1526  uint16_t);
1528 
1529 void SigRegisterTests(void);
1531 
1533 
1535 char *DetectLoadCompleteSigPath(const DetectEngineCtx *, const char *sig_file);
1536 int SigLoadSignatures (DetectEngineCtx *, char *, int);
1538  DetectEngineThreadCtx *det_ctx, Packet *p);
1539 
1542 
1544 
1545 int DetectUnregisterThreadCtxFuncs(DetectEngineCtx *, void *data, const char *name);
1546 int DetectRegisterThreadCtxFuncs(DetectEngineCtx *, const char *name, void *(*InitFunc)(void *), void *data, void (*FreeFunc)(void *), int);
1548 
1549 void RuleMatchCandidateTxArrayInit(DetectEngineThreadCtx *det_ctx, uint32_t size);
1551 
1552 void AlertQueueInit(DetectEngineThreadCtx *det_ctx);
1553 void AlertQueueFree(DetectEngineThreadCtx *det_ctx);
1554 void AlertQueueAppend(DetectEngineThreadCtx *det_ctx, const Signature *s, Packet *p, uint64_t tx_id,
1555  uint8_t alert_flags);
1556 
1558 
1561 
1562 /* events */
1563 void DetectEngineSetEvent(DetectEngineThreadCtx *det_ctx, uint8_t e);
1565 int DetectEngineGetEventInfo(const char *event_name, int *event_id,
1566  AppLayerEventType *event_type);
1567 
1569 
1570 #include "detect-engine-build.h"
1571 #include "detect-engine-register.h"
1572 
1573 #endif /* __DETECT_H__ */
1574 
DetectEngineThreadCtx_::byte_values
uint64_t * byte_values
Definition: detect.h:1160
DetectEngineCtx_::sgh_hash_table
HashListTable * sgh_hash_table
Definition: detect.h:833
DetectEngineCtx_::pkt_mpms_list_cnt
uint32_t pkt_mpms_list_cnt
Definition: detect.h:965
DetectEngineAppInspectionEngine_::stream
bool stream
Definition: detect.h:404
DetectEngineCtx_::frame_mpms_list_cnt
uint32_t frame_mpms_list_cnt
Definition: detect.h:968
SCFPSupportSMList
struct SCFPSupportSMList_ SCFPSupportSMList
SigFileLoaderStat_::bad_files
int bad_files
Definition: detect.h:758
SigGroupHead_::non_pf_syn_store_cnt
uint32_t non_pf_syn_store_cnt
Definition: detect.h:1414
DetectEngineThreadCtx_::non_pf_store_ptr
SignatureNonPrefilterStore * non_pf_store_ptr
Definition: detect.h:1141
DetectEngineTenantMapping_
Definition: detect.h:1474
Signature_::cidr_src
IPOnlyCIDRItem * cidr_src
Definition: detect.h:596
DetectAddress_::ip
Address ip
Definition: detect.h:141
SigMatchSignaturesGetSgh
const SigGroupHead * SigMatchSignaturesGetSgh(const DetectEngineCtx *de_ctx, const Packet *p)
Get the SigGroupHead for a packet.
Definition: detect.c:194
DetectPatternTracker
Definition: detect.h:678
PrefilterEngineList_::frame_type
uint8_t frame_type
Definition: detect.h:1325
SCFPSupportSMList_
Definition: detect.h:708
DetectEngineThreadCtx_::keyword_perf_data_per_list
struct SCProfileKeywordData_ ** keyword_perf_data_per_list
Definition: detect.h:1205
DetectEngineCtx_::tenant_id
int tenant_id
Definition: detect.h:798
SigGroupHead_::tx_engines
PrefilterEngine * tx_engines
Definition: detect.h:1427
AlertQueueInit
void AlertQueueInit(DetectEngineThreadCtx *det_ctx)
Definition: detect-engine-alert.c:203
SigMatchAlloc
SigMatch * SigMatchAlloc(void)
Definition: detect-parse.c:235
DetectEngineAppInspectionEngine_
Definition: detect.h:399
SigTableElmt_::url
const char * url
Definition: detect.h:1253
FILE_DECODER_EVENT_NO_MEM
@ FILE_DECODER_EVENT_NO_MEM
Definition: detect.h:1262
DetectBufferType_::supports_transforms
bool supports_transforms
Definition: detect.h:429
MPMB_UDP_TS
@ MPMB_UDP_TS
Definition: detect.h:1294
SigMatch_::prev
struct SigMatch_ * prev
Definition: detect.h:328
PORT_EB
@ PORT_EB
Definition: detect.h:181
DetectBufferMpmRegistery_::direction
int direction
Definition: detect.h:638
DetectEngineAppInspectionEngine_::mpm
bool mpm
Definition: detect.h:403
SCProfileKeywordData_
Definition: util-profiling-keywords.c:49
DetectBufferType_::mpm
bool mpm
Definition: detect.h:426
RuleMatchCandidateTx::stream_stored
bool stream_stored
Definition: detect.h:1031
ENGINE_PROFILE_LOW
@ ENGINE_PROFILE_LOW
Definition: detect.h:993
DetectEngineThreadCtx_::alert_queue_size
uint16_t alert_queue_size
Definition: detect.h:1120
DetectEngineThreadCtx_::buffer_offset
uint32_t buffer_offset
Definition: detect.h:1071
DETECT_SM_LIST_PMATCH
@ DETECT_SM_LIST_PMATCH
Definition: detect.h:90
DetectEngineThreadCtx_::to_clear_idx
uint32_t to_clear_idx
Definition: detect.h:1096
SigMatchFree
void SigMatchFree(DetectEngineCtx *, SigMatch *sm)
free a SigMatch
Definition: detect-parse.c:250
DetectEngineCtx_::class_conf_ht
HashTable * class_conf_ht
Definition: detect.h:823
PrefilterEngine_::Prefilter
void(* Prefilter)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx)
Definition: detect.h:1365
detect-engine-proto.h
DetectEngineThreadCtx_::keyword_perf_data
struct SCProfileKeywordData_ * keyword_perf_data
Definition: detect.h:1204
DetectEngineThreadCtx_::match_array_cnt
SigIntId match_array_cnt
Definition: detect.h:1136
DetectVarList_::idx
uint32_t idx
Definition: detect.h:698
MpmStore_::sid_array_size
uint32_t sid_array_size
Definition: detect.h:1302
SigTableElmt_::desc
const char * desc
Definition: detect.h:1252
SignatureInitData_::list_set
bool list_set
Definition: detect.h:527
Signature_::addr_src_match6
DetectMatchAddressIPv6 * addr_src_match6
Definition: detect.h:581
DetectEngineThreadCtx_::SC_ATOMIC_DECLARE
SC_ATOMIC_DECLARE(int, so_far_used_by_detect)
DET_CTX_EVENT_TEST
@ DET_CTX_EVENT_TEST
Definition: detect.h:1260
Signature_::sig_str
char * sig_str
Definition: detect.h:618
MpmStore_::sid_array
uint8_t * sid_array
Definition: detect.h:1301
DetectEngineThreadKeywordCtxItem
struct DetectEngineThreadKeywordCtxItem_ DetectEngineThreadKeywordCtxItem
DetectEngineCtx_::sgh_mpm_context_proto_tcp_packet
int32_t sgh_mpm_context_proto_tcp_packet
Definition: detect.h:880
DetectVarList_::buffer
uint8_t * buffer
Definition: detect.h:703
SigTableElmt_::Free
void(* Free)(DetectEngineCtx *, void *)
Definition: detect.h:1240
IPOnlyCIDRItem
struct IPOnlyCIDRItem_ IPOnlyCIDRItem
util-hashlist.h
DetectEngineCtx_::decoder_event_sgh
struct SigGroupHead_ * decoder_event_sgh
Definition: detect.h:893
DetectEngineCtx_::flow_gh
DetectEngineLookupFlow flow_gh[FLOW_STATES]
Definition: detect.h:828
FILE_DECODER_EVENT_Z_UNKNOWN_ERROR
@ FILE_DECODER_EVENT_Z_UNKNOWN_ERROR
Definition: detect.h:1268
SCFPSupportSMList_::next
struct SCFPSupportSMList_ * next
Definition: detect.h:711
DetectEngineThreadCtx_::counter_match_list
uint16_t counter_match_list
Definition: detect.h:1088
SigString
struct SigString_ SigString
DetectEnginePktInspectionEngine
Definition: detect.h:452
DetectEngineMasterCtx_::tenant_mapping_list
DetectEngineTenantMapping * tenant_mapping_list
Definition: detect.h:1505
Signature_::filestore_ctx
const struct DetectFilestoreData_ * filestore_ctx
Definition: detect.h:607
DetectEngineAppInspectionEngine_::next
struct DetectEngineAppInspectionEngine_ * next
Definition: detect.h:418
DetectEngineGetEventInfo
int DetectEngineGetEventInfo(const char *event_name, int *event_id, AppLayerEventType *event_type)
Definition: detect-engine.c:4642
SignatureIsIPOnly
int SignatureIsIPOnly(DetectEngineCtx *de_ctx, const Signature *s)
Test is a initialized signature is IP only.
Definition: detect-engine-build.c:191
SCFPSupportSMList_::list_id
int list_id
Definition: detect.h:709
SigTableElmt_::name
const char * name
Definition: detect.h:1250
DetectEngineMasterCtx_::list
DetectEngineCtx * list
Definition: detect.h:1494
MpmThreadCtx_
Definition: util-mpm.h:46
DetectPatternTracker::mpm
uint32_t mpm
Definition: detect.h:682
Signature_::num
SigIntId num
Definition: detect.h:560
DetectEngineCtx
struct DetectEngineCtx_ DetectEngineCtx
main detection engine ctx
IPOnlyCIDRItem_::netmask
uint8_t netmask
Definition: detect.h:303
DetectEngineCtx_::type
enum DetectEngineType type
Definition: detect.h:928
SigGroupHead_
Container for matching data for a signature group.
Definition: detect.h:1408
detect-mark.h
DetectEngineCtx_::pattern_hash_table
HashListTable * pattern_hash_table
Definition: detect.h:836
DetectEngineThreadCtx_::sgh_perf_data
struct SCProfileSghData_ * sgh_perf_data
Definition: detect.h:1207
ThresholdCtx_::threshold_table_lock
SCMutex threshold_table_lock
Definition: detect.h:740
DetectEngineCtx_::rule_file
char * rule_file
Definition: detect.h:899
ADDRESS_LT
@ ADDRESS_LT
Definition: detect.h:124
DetectEngineTransforms
Definition: detect.h:381
PrefilterEngineList_::id
uint16_t id
Definition: detect.h:1317
FILE_DECODER_EVENT_INVALID_SWF_VERSION
@ FILE_DECODER_EVENT_INVALID_SWF_VERSION
Definition: detect.h:1264
SigGroupHeadInitData_::sig_array
uint8_t * sig_array
Definition: detect.h:1381
SCProfileSghDetectCtx_
Definition: util-profiling-rulegroups.c:59
DetectAddress_
address structure for use in the detection engine.
Definition: detect.h:139
DetectEngineCtx_::max_uniq_toclient_groups
uint16_t max_uniq_toclient_groups
Definition: detect.h:853
DetectEngineThreadCtx_::buffers
InspectionBufferMultipleForList * buffers
Definition: detect.h:1103
SignatureInitData_::prefilter_sm
SigMatch * prefilter_sm
Definition: detect.h:523
PrefilterRuleStore_
structure for storing potential rule matches
Definition: util-prefilter.h:32
SignatureInitData_::src_contains_negation
bool src_contains_negation
Definition: detect.h:508
DetectEngineCtx_::ref_cnt
uint32_t ref_cnt
Definition: detect.h:931
SignatureInitData_::whitelist
int whitelist
Definition: detect.h:534
DetectEngineCtx_::sigerror_silent
bool sigerror_silent
Definition: detect.h:901
Signature_::alproto
AppProto alproto
Definition: detect.h:553
SignatureNonPrefilterStore_::id
SigIntId id
Definition: detect.h:1020
SigString_
Definition: detect.h:747
DetectAddressHead_
Definition: detect.h:154
ADDRESS_EB
@ ADDRESS_EB
Definition: detect.h:128
MPMB_OTHERIP
@ MPMB_OTHERIP
Definition: detect.h:1296
DetectEngineCtx_::max_fp_id
uint32_t max_fp_id
Definition: detect.h:862
DetectEngineCtx_::non_pf_store_cnt_max
uint32_t non_pf_store_cnt_max
Definition: detect.h:817
next
struct HtpBodyChunk_ * next
Definition: app-layer-htp.h:0
DetectEngineFrameInspectionEngine::sm_list_base
uint16_t sm_list_base
Definition: detect.h:483
DetectPort_::port
uint16_t port
Definition: detect.h:192
DetectEngineIPOnlyCtx_::ip_src
IPOnlyCIDRItem * ip_src
Definition: detect.h:726
SigGroupHeadInitData_::port
struct DetectPort_ * port
Definition: detect.h:1404
AppProto
uint16_t AppProto
Definition: app-layer-protos.h:80
ENGINE_PROFILE_MEDIUM
@ ENGINE_PROFILE_MEDIUM
Definition: detect.h:994
DETECT_SM_LIST_DYNAMIC_START
@ DETECT_SM_LIST_DYNAMIC_START
Definition: detect.h:109
DetectEngineThreadCtx_::prefilter_perf_size
int prefilter_perf_size
Definition: detect.h:1210
IPOnlyCIDRItem_
Definition: detect.h:299
DetectBufferMpmRegistery_::transforms
DetectEngineTransforms transforms
Definition: detect.h:649
SigMatchSignaturesBuildMatchArray
void SigMatchSignaturesBuildMatchArray(DetectEngineThreadCtx *, Packet *, SignatureMask, uint16_t)
DetectEngineThreadCtx_::tx_id
uint64_t tx_id
Definition: detect.h:1116
DetectEngineThreadCtx_::decoder_events
AppLayerDecoderEvents * decoder_events
Definition: detect.h:1187
SigMatchData_::ctx
SigMatchCtx * ctx
Definition: detect.h:335
InspectionBuffer
Definition: detect.h:347
SigLoadSignatures
int SigLoadSignatures(DetectEngineCtx *, char *, int)
Load signatures.
Definition: detect-engine-loader.c:282
DetectVarList_::key_len
uint16_t key_len
Definition: detect.h:700
MpmStore_::sm_list
int sm_list
Definition: detect.h:1306
DetectEngineAppInspectionEngine_::GetData
InspectionBufferGetDataPtr GetData
Definition: detect.h:410
DetectEngineThreadKeywordCtxItem_
Definition: detect.h:764
DETECT_BUFFER_MPM_TYPE_FRAME
@ DETECT_BUFFER_MPM_TYPE_FRAME
Definition: detect.h:629
DetectEngineCtx_::prefilter_maxid
uint32_t prefilter_maxid
Definition: detect.h:924
Frame
Definition: app-layer-frames.h:45
DETECT_TBLSIZE
@ DETECT_TBLSIZE
Definition: detect-engine-register.h:321
Flow_
Flow data structure.
Definition: flow.h:356
SigTableElmt_::FileMatch
int(* FileMatch)(DetectEngineThreadCtx *, Flow *, uint8_t flags, File *, const Signature *, const SigMatchCtx *)
Definition: detect.h:1226
DetectVarList_
Definition: detect.h:697
DETECT_SM_LIST_THRESHOLD
@ DETECT_SM_LIST_THRESHOLD
Definition: detect.h:104
ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE
@ ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE
Definition: detect.h:1003
DetectReplaceList_::found
uint8_t * found
Definition: detect.h:687
AppLayerEventType
enum AppLayerEventType_ AppLayerEventType
ADDRESS_GT
@ ADDRESS_GT
Definition: detect.h:130
DetectEngineThreadKeywordCtxItem_::data
void * data
Definition: detect.h:767
DetectEngineThreadCtx_::pmq
PrefilterRuleStore pmq
Definition: detect.h:1150
util-hash.h
InspectionBufferGetDataPtr
InspectionBuffer *(* InspectionBufferGetDataPtr)(struct DetectEngineThreadCtx_ *det_ctx, const DetectEngineTransforms *transforms, Flow *f, const uint8_t flow_flags, void *txv, const int list_id)
Definition: detect.h:387
SigGroupHeadInitData_::mpm_store
MpmStore mpm_store[MPMB_MAX]
Definition: detect.h:1379
DetectEngineCtx_::frame_mpms_list
DetectBufferMpmRegistery * frame_mpms_list
Definition: detect.h:967
SigTableElmt_::flags
uint16_t flags
Definition: detect.h:1244
SCRadixTree_
Structure for the radix tree.
Definition: util-radix-tree.h:86
SigFindSignatureBySidGid
Signature * SigFindSignatureBySidGid(DetectEngineCtx *, uint32_t, uint32_t)
Find a specific signature by sid and gid.
Definition: detect-engine-build.c:66
DetectEngineIPOnlyCtx_::tree_ipv6dst
SCRadixTree * tree_ipv6dst
Definition: detect.h:723
DetectBufferMpmRegistery_::app_v2
struct DetectBufferMpmRegistery_::@87::@89 app_v2
DetectEngineCtx_::inspection_recursion_limit
int inspection_recursion_limit
Definition: detect.h:867
PrefilterEngineList_::name
const char * name
Definition: detect.h:1342
DetectVarList_::len
uint16_t len
Definition: detect.h:699
DetectEngineFrameInspectionEngine::transforms
const DetectEngineTransforms * transforms
Definition: detect.h:487
DetectEngineCtx_
main detection engine ctx
Definition: detect.h:794
DetectBufferMpmRegistery_::type
enum DetectBufferMpmType type
Definition: detect.h:643
DetectEnginePktInspectionEngine::smd
SigMatchData * smd
Definition: detect.h:453
DetectPatternTracker
struct DetectPatternTracker DetectPatternTracker
SCProfilePrefilterDetectCtx_
Definition: util-profiling-prefilter.c:50
SigMatchSignatures
void SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, Packet *p)
wrapper for old tests
Definition: detect.c:1782
DetectEngineThreadCtx_::global_keyword_ctxs_array
void ** global_keyword_ctxs_array
Definition: detect.h:1181
HttpReassembledBody_::buffer
const uint8_t * buffer
Definition: detect.h:1009
TransformData_::options
void * options
Definition: detect.h:378
packet-queue.h
DetectEngineFrameInspectionEngine::mpm
bool mpm
Definition: detect.h:481
detect-engine-register.h
ThresholdCtx_::th_size
uint32_t th_size
Definition: detect.h:744
PrefilterEngine_::tx_min_progress
uint8_t tx_min_progress
Definition: detect.h:1356
InspectionBuffer::orig
const uint8_t * orig
Definition: detect.h:360
RuleMatchCandidateTxArrayFree
void RuleMatchCandidateTxArrayFree(DetectEngineThreadCtx *det_ctx)
Definition: detect.c:973
DetectEngineThreadCtx_::p
Packet * p
Definition: detect.h:1118
SigTableElmt_::AppLayerTxMatch
int(* AppLayerTxMatch)(DetectEngineThreadCtx *, Flow *, uint8_t flags, void *alstate, void *txv, const Signature *, const SigMatchCtx *)
Definition: detect.h:1221
DetectEngineThreadCtx_::keyword_perf_list
int keyword_perf_list
Definition: detect.h:1206
InspectionBufferGetPktDataPtr
InspectionBuffer *(* InspectionBufferGetPktDataPtr)(struct DetectEngineThreadCtx_ *det_ctx, const DetectEngineTransforms *transforms, Packet *p, const int list_id)
Definition: detect.h:447
DetectEngineCtx_::keyword_id
int keyword_id
Definition: detect.h:907
RuleMatchCandidateTx::id
SigIntId id
Definition: detect.h:1027
Detect
TmEcode Detect(ThreadVars *tv, Packet *p, void *data)
Detection engine thread wrapper.
Definition: detect.c:1714
DetectEngineIPOnlyCtx_::tree_ipv4src
SCRadixTree * tree_ipv4src
Definition: detect.h:722
ADDRESS_EQ
@ ADDRESS_EQ
Definition: detect.h:126
util-var-name.h
HashTable_
Definition: util-hash.h:35
DetectEngineThreadCtx_::flags
uint16_t flags
Definition: detect.h:1111
DetectPatternTracker::cnt
uint32_t cnt
Definition: detect.h:681
DetectEngineTenantMapping_::next
struct DetectEngineTenantMapping_ * next
Definition: detect.h:1480
DetectEngineThreadCtx_::buffers_size
uint32_t buffers_size
Definition: detect.h:1095
DetectEngineCtx_::srep_version
uint32_t srep_version
Definition: detect.h:804
DetectBufferType_::name
char name[32]
Definition: detect.h:422
DetectEngineCtx_::profile_sgh_ctx
struct SCProfileSghDetectCtx_ * profile_sgh_ctx
Definition: detect.h:921
Frames
Definition: app-layer-frames.h:61
DetectPort_::next
struct DetectPort_ * next
Definition: detect.h:205
DetectReplaceList_
Definition: detect.h:685
MPMB_TCP_STREAM_TS
@ MPMB_TCP_STREAM_TS
Definition: detect.h:1292
DetectEngineAppInspectionEngine_::sm_list_base
uint16_t sm_list_base
Definition: detect.h:406
Address_
Definition: decode.h:122
DetectPatternTracker::cd
const struct DetectContentData_ * cd
Definition: detect.h:679
DetectBufferMpmRegistery_
one time registration of keywords at start up
Definition: detect.h:635
DetectThresholdEntry_
Definition: detect-threshold.h:68
InspectionBuffer::size
uint32_t size
Definition: detect.h:357
DetectEngineThreadCtx_::spm_thread_ctx
SpmThreadCtx * spm_thread_ctx
Definition: detect.h:1154
DetectAddressHead
struct DetectAddressHead_ DetectAddressHead
InspectionBuffer::flags
uint8_t flags
Definition: detect.h:351
DetectEngineCtx_::dport_hash_table
HashListTable * dport_hash_table
Definition: detect.h:941
PrefilterEngineList_::Prefilter
void(* Prefilter)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx)
Definition: detect.h:1331
DetectEngineCtx_::gh_reuse
uint32_t gh_reuse
Definition: detect.h:830
Signature_::sm_arrays
SigMatchData * sm_arrays[DETECT_SM_LIST_MAX]
Definition: detect.h:604
SigGroupHead_::payload_engines
PrefilterEngine * payload_engines
Definition: detect.h:1426
DetectEngineCtx_::mpm_ctx_factory_container
MpmCtxFactoryContainer * mpm_ctx_factory_container
Definition: detect.h:864
DetectEngineCtx_::prefilter_setting
enum DetectEnginePrefilterSetting prefilter_setting
Definition: detect.h:939
SignatureInitData_::init_flags
uint32_t init_flags
Definition: detect.h:512
DetectBufferType_
Definition: detect.h:421
DetectEngineCtx_::filedata_config
struct DetectEngineCtx_::@92 filedata_config[ALPROTO_MAX]
DetectPort_::sh
struct SigGroupHead_ * sh
Definition: detect.h:202
DetectContentData_
Definition: detect-content.h:86
DetectEngineSetEvent
void DetectEngineSetEvent(DetectEngineThreadCtx *det_ctx, uint8_t e)
Definition: detect-engine.c:4631
SigFileLoaderStat_::TAILQ_HEAD
TAILQ_HEAD(, SigString_) failed_sigs
DetectEngineCtx_::sigerror_ok
bool sigerror_ok
Definition: detect.h:902
Signature_::profiling_id
uint16_t profiling_id
Definition: detect.h:592
DetectBufferMpmRegistery_::GetData
InspectionBufferGetDataPtr GetData
Definition: detect.h:654
PrefilterEngine_::local_id
uint16_t local_id
Definition: detect.h:1348
DetectBufferMpmRegistery_::GetData
InspectionBufferGetPktDataPtr GetData
Definition: detect.h:664
PrefilterEngineList_::Free
void(* Free)(void *pectx)
Definition: detect.h:1340
RuleMatchCandidateTxArrayInit
void RuleMatchCandidateTxArrayInit(DetectEngineThreadCtx *det_ctx, uint32_t size)
Definition: detect.c:960
ALPROTO_MAX
@ ALPROTO_MAX
Definition: app-layer-protos.h:75
MPMB_MAX
@ MPMB_MAX
Definition: detect.h:1297
SigTableElmt_
element in sigmatch type table.
Definition: detect.h:1216
SigMatchData_
Data needed for Match()
Definition: detect.h:332
InspectionBufferMultipleForList::init
uint32_t init
Definition: detect.h:373
SigTableElmt_::Setup
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
Definition: detect.h:1235
DetectEngineCtx_::sgh_mpm_context_proto_udp_packet
int32_t sgh_mpm_context_proto_udp_packet
Definition: detect.h:881
DetectPort
struct DetectPort_ DetectPort
Port structure for detection engine.
RuleMatchCandidateTx::s
const Signature * s
Definition: detect.h:1037
DetectEngineCtx_::reference_conf_ht
HashTable * reference_conf_ht
Definition: detect.h:825
DetectEngineCtx_::content_inspect_window
uint32_t content_inspect_window
Definition: detect.h:912
DetectEngineThreadCtx_::counter_fnonmpm_list
uint16_t counter_fnonmpm_list
Definition: detect.h:1087
SigMatchData_::type
uint16_t type
Definition: detect.h:333
DetectEngineCtx_::version
uint32_t version
Definition: detect.h:889
DetectMatchAddressIPv4_::ip
uint32_t ip
Definition: detect.h:161
DetectEngineAppInspectionEngine_::v2
struct DetectEngineAppInspectionEngine_::@84 v2
DETECT_TRANSFORMS_MAX
#define DETECT_TRANSFORMS_MAX
Definition: detect.h:58
InspectionBuffer::orig_len
uint32_t orig_len
Definition: detect.h:359
DetectEngineThreadCtx_::varlist
DetectVarList * varlist
Definition: detect.h:1165
Signature_::dsize_low
uint16_t dsize_low
Definition: detect.h:555
DetectPort_::port2
uint16_t port2
Definition: detect.h:193
SignatureNonPrefilterStore_
Definition: detect.h:1019
DetectEngineThreadCtx_::counter_nonmpm_list
uint16_t counter_nonmpm_list
Definition: detect.h:1086
MPMB_TCP_STREAM_TC
@ MPMB_TCP_STREAM_TC
Definition: detect.h:1293
DetectEngineThreadCtx_::events
uint16_t events
Definition: detect.h:1188
AppLayerDecoderEvents_
Data structure to store app layer decoder events.
Definition: app-layer-events.h:34
SigGroupHead
struct SigGroupHead_ SigGroupHead
Container for matching data for a signature group.
DetectMatchAddressIPv6
struct DetectMatchAddressIPv6_ DetectMatchAddressIPv6
PORT_LE
@ PORT_LE
Definition: detect.h:178
DetectUnregisterThreadCtxFuncs
int DetectUnregisterThreadCtxFuncs(DetectEngineCtx *, void *data, const char *name)
Remove Thread keyword context registration.
Definition: detect-engine.c:3474
DetectEngineThreadCtx_::mtcu
MpmThreadCtx mtcu
Definition: detect.h:1148
TransformData_
Definition: detect.h:376
DetectBufferMpmRegistery_::id
int id
Definition: detect.h:642
FLOW_STATES
#define FLOW_STATES
Definition: detect.h:791
Signature_::frame_inspect
DetectEngineFrameInspectionEngine * frame_inspect
Definition: detect.h:600
DetectBufferMpmRegistery_::frame_v1
struct DetectBufferMpmRegistery_::@87::@91 frame_v1
DetectEnginePktInspectionEngine::transforms
const DetectEngineTransforms * transforms
Definition: detect.h:461
MpmBuiltinBuffers
MpmBuiltinBuffers
Definition: detect.h:1289
DetectPort_::flags
uint8_t flags
Definition: detect.h:195
FILE_DECODER_EVENT_Z_BUF_ERROR
@ FILE_DECODER_EVENT_Z_BUF_ERROR
Definition: detect.h:1267
FILE_DECODER_EVENT_LZMA_FORMAT_ERROR
@ FILE_DECODER_EVENT_LZMA_FORMAT_ERROR
Definition: detect.h:1272
DetectEngineCtx_::app_mpms_list
DetectBufferMpmRegistery * app_mpms_list
Definition: detect.h:961
SigRegisterTests
void SigRegisterTests(void)
Definition: detect.c:5151
DetectThreadCtxGetKeywordThreadCtx
void * DetectThreadCtxGetKeywordThreadCtx(DetectEngineThreadCtx *, int)
Retrieve thread local keyword ctx by id.
Definition: detect-engine.c:3492
FILE_DECODER_EVENT_INVALID_SWF_LENGTH
@ FILE_DECODER_EVENT_INVALID_SWF_LENGTH
Definition: detect.h:1263
DetectEngineFrameInspectionEngine::Callback
InspectionBufferFrameInspectFunc Callback
Definition: detect.h:485
DetectEngineThreadCtx_::mtcs
MpmThreadCtx mtcs
Definition: detect.h:1149
InspectionBufferMultipleForList::size
uint32_t size
Definition: detect.h:371
DetectEngineCtx_::udp_whitelist
DetectPort * udp_whitelist
Definition: detect.h:944
DetectEngineThreadCtx_::mt_det_ctxs_hash
HashTable * mt_det_ctxs_hash
Definition: detect.h:1058
DetectAddress_::prev
struct DetectAddress_ * prev
Definition: detect.h:148
DETECT_PREFILTER_AUTO
@ DETECT_PREFILTER_AUTO
Definition: detect.h:776
DetectEngineThreadCtx_::keyword_ctxs_size
int keyword_ctxs_size
Definition: detect.h:1178
PrefilterEngine_::is_last_for_progress
bool is_last_for_progress
Definition: detect.h:1375
detect-reference.h
TmModuleDetectRegister
void TmModuleDetectRegister(void)
Signature_::gid
uint32_t gid
Definition: detect.h:584
DetectEngineCtx_::prefilter_id
uint32_t prefilter_id
Definition: detect.h:970
DetectEngineCtx_::sgh_array_size
uint32_t sgh_array_size
Definition: detect.h:878
SigGroupHeadInitData_::pkt_mpms
MpmCtx ** pkt_mpms
Definition: detect.h:1389
SigString_::sig_error
char * sig_error
Definition: detect.h:750
DetectMatchAddressIPv6_::ip2
uint32_t ip2[4]
Definition: detect.h:167
DetectEngineAppInspectionEngine_::id
uint8_t id
Definition: detect.h:402
PrefilterEngineList_::next
struct PrefilterEngineList_ * next
Definition: detect.h:1337
DetectEngineThreadCtx_::counter_alerts_suppressed
uint16_t counter_alerts_suppressed
Definition: detect.h:1083
SigTableElmt_::SetupPrefilter
int(* SetupPrefilter)(DetectEngineCtx *de_ctx, struct SigGroupHead_ *sgh)
Definition: detect.h:1238
DetectBufferMpmRegistery_::sgh_mpm_context
int sgh_mpm_context
Definition: detect.h:644
Signature_::next
struct Signature_ * next
Definition: detect.h:623
DetectEngineCtx_::sgh_mpm_context_proto_other_packet
int32_t sgh_mpm_context_proto_other_packet
Definition: detect.h:882
DetectVarList
struct DetectVarList_ DetectVarList
DetectEngineAppInspectionEngine_::sm_list
uint16_t sm_list
Definition: detect.h:405
TENANT_SELECTOR_UNKNOWN
@ TENANT_SELECTOR_UNKNOWN
Definition: detect.h:1468
HttpReassembledBody_::buffer_len
uint32_t buffer_len
Definition: detect.h:1012
SignatureInitData_::smlists_tail
struct SigMatch_ ** smlists_tail
Definition: detect.h:545
ENGINE_SGH_MPM_FACTORY_CONTEXT_AUTO
@ ENGINE_SGH_MPM_FACTORY_CONTEXT_AUTO
Definition: detect.h:1004
DetectEngineTenantMapping_::tenant_id
uint32_t tenant_id
Definition: detect.h:1475
InspectionBufferMultipleForList
Definition: detect.h:369
DetectBufferMpmType
DetectBufferMpmType
Definition: detect.h:626
DETECT_SM_LIST_POSTMATCH
@ DETECT_SM_LIST_POSTMATCH
Definition: detect.h:98
DetectEngineTenantMapping
struct DetectEngineTenantMapping_ DetectEngineTenantMapping
DetectEngineCtx_::prefilter_hash_table
HashListTable * prefilter_hash_table
Definition: detect.h:971
DetectReplaceList
struct DetectReplaceList_ DetectReplaceList
PORT_ER
@ PORT_ER
Definition: detect.h:176
DetectEngineCtx_::sm_types_silent_error
bool sm_types_silent_error[DETECT_TBLSIZE]
Definition: detect.h:983
SigString_::TAILQ_ENTRY
TAILQ_ENTRY(SigString_) next
DetectEngineTenantSelectors
DetectEngineTenantSelectors
Definition: detect.h:1467
InspectionBufferPktInspectFunc
int(* InspectionBufferPktInspectFunc)(struct DetectEngineThreadCtx_ *, const struct DetectEnginePktInspectionEngine *engine, const struct Signature_ *s, Packet *p, uint8_t *alert_flags)
Definition: detect.h:440
DetectBufferType
struct DetectBufferType_ DetectBufferType
DetectEngineThreadCtx_::tx_candidates
RuleMatchCandidateTx * tx_candidates
Definition: detect.h:1138
InspectionBuffer
struct InspectionBuffer InspectionBuffer
DetectEngineMasterCtx
struct DetectEngineMasterCtx_ DetectEngineMasterCtx
SignatureInitData_::prefilter_list
int prefilter_list
Definition: detect.h:539
Signature_::addr_src_match4
DetectMatchAddressIPv4 * addr_src_match4
Definition: detect.h:578
SigTableElmt_::TransformValidate
bool(* TransformValidate)(const uint8_t *content, uint16_t content_len, void *context)
Definition: detect.h:1232
Signature_::class_id
uint16_t class_id
Definition: detect.h:570
DetectEngineThreadCtx_::counter_alerts_overflow
uint16_t counter_alerts_overflow
Definition: detect.h:1081
util-debug.h
DETECT_FILESTORE_MAX
#define DETECT_FILESTORE_MAX
Definition: detect.h:1017
PrefilterEngineList_::alproto
AppProto alproto
Definition: detect.h:1320
SignatureInitData
struct SignatureInitData_ SignatureInitData
SigGroupHeadInitData_::sig_cnt
SigIntId sig_cnt
Definition: detect.h:1398
SRepCIDRTree_
Definition: reputation.h:34
util-error.h
de_ctx
DetectEngineCtx * de_ctx
Definition: fuzz_siginit.c:17
PrefilterEngine_::PrefilterTx
void(* PrefilterTx)(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p, Flow *f, void *tx, const uint64_t idx, const uint8_t flags)
Definition: detect.h:1366
DetectEnginePktInspectionEngine::sm_list
uint16_t sm_list
Definition: detect.h:455
DetectEngineThreadCtx_::match_array_len
uint32_t match_array_len
Definition: detect.h:1134
IPOnlyCIDRItem_::negated
uint8_t negated
Definition: detect.h:305
DetectEngineThreadCtx_
Definition: detect.h:1043
PrefilterEngine_
Definition: detect.h:1347
DetectEngineThreadCtx_::filestore
struct DetectEngineThreadCtx_::@99 filestore[DETECT_FILESTORE_MAX]
ENGINE_PROFILE_UNKNOWN
@ ENGINE_PROFILE_UNKNOWN
Definition: detect.h:992
MpmStore_
Definition: detect.h:1300
SigGroupHeadInitData_::tx_engines
PrefilterEngineList * tx_engines
Definition: detect.h:1394
SCProfileKeywordDetectCtx_
Definition: util-profiling-keywords.c:57
SignatureInitData_::mpm_sm
SigMatch * mpm_sm
Definition: detect.h:521
DetectEngineCtx_::srepCIDR_ctx
SRepCIDRTree * srepCIDR_ctx
Definition: detect.h:807
DetectBufferMpmRegistery_::PrefilterRegisterWithListId
int(* PrefilterRegisterWithListId)(struct DetectEngineCtx_ *de_ctx, struct SigGroupHead_ *sgh, MpmCtx *mpm_ctx, const struct DetectBufferMpmRegistery_ *mpm_reg, int list_id)
Definition: detect.h:646
SignatureInitData_::src
const DetectAddressHead * src
Definition: detect.h:537
DetectEngineThreadCtx_::tx_candidates_size
uint32_t tx_candidates_size
Definition: detect.h:1139
DETECT_SM_LIST_BASE64_DATA
@ DETECT_SM_LIST_BASE64_DATA
Definition: detect.h:95
DetectEngineThreadKeywordCtxItem_::id
int id
Definition: detect.h:769
DetectEngineThreadCtx_::buffers
InspectionBuffer * buffers
Definition: detect.h:1094
SigAddressPrepareBidirectionals
void SigAddressPrepareBidirectionals(DetectEngineCtx *)
DetectEngineMasterCtx_::keyword_list
DetectEngineThreadKeywordCtxItem * keyword_list
Definition: detect.h:1510
SignatureInitData_::mpm_sm_list
int mpm_sm_list
Definition: detect.h:519
PrefilterEngineList_::PrefilterFrame
PrefilterFrameFn PrefilterFrame
Definition: detect.h:1335
DetectEngineIPOnlyThreadCtx_::sig_match_array
uint8_t * sig_match_array
Definition: detect.h:715
HttpReassembledBody
struct HttpReassembledBody_ HttpReassembledBody
DetectEngineMasterCtx_::tenant_selector
enum DetectEngineTenantSelectors tenant_selector
Definition: detect.h:1501
DetectEngineCtx_::keyword_hash
HashListTable * keyword_hash
Definition: detect.h:906
PrefilterEngineList_::pectx
void * pectx
Definition: detect.h:1329
DetectEngineCtx_::last_reload
struct timeval last_reload
Definition: detect.h:974
SignatureInitData_::list
int list
Definition: detect.h:526
Signature_::pkt_inspect
DetectEnginePktInspectionEngine * pkt_inspect
Definition: detect.h:599
SCProfileSghData_
Definition: util-profiling-rulegroups.c:45
DetectReplaceList_::next
struct DetectReplaceList_ * next
Definition: detect.h:688
DetectEngineLookupFlow_::sgh
struct SigGroupHead_ * sgh[256]
Definition: detect.h:733
Signature_::references
DetectReference * references
Definition: detect.h:614
PrefilterFrameFn
void(* PrefilterFrameFn)(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p, const struct Frames *frames, const struct Frame *frame, const uint32_t idx)
Definition: detect.h:1313
ThreadVars_
Per thread variable structure.
Definition: threadvars.h:58
SignatureNonPrefilterStore_::alproto
AppProto alproto
Definition: detect.h:1022
PrefilterEngineList_::gid
uint32_t gid
Definition: detect.h:1344
DetectEngineFrameInspectionEngine::sm_list
uint16_t sm_list
Definition: detect.h:482
DetectMetadataHead
Definition: detect-metadata.h:39
SCSigSignatureWrapper_
Signature wrapper used by signature ordering module while ordering signatures.
Definition: detect-engine-sigorder.h:45
SigTableElmt
struct SigTableElmt_ SigTableElmt
element in sigmatch type table.
SigMatch
struct SigMatch_ SigMatch
a single match condition for a signature
SigMatch_::next
struct SigMatch_ * next
Definition: detect.h:327
DetectEngineCtx_::mpm_matcher
uint8_t mpm_matcher
Definition: detect.h:844
InspectionBuffer::inspect_offset
uint64_t inspect_offset
Definition: detect.h:349
DetectEngineCtx_::frame_inspect_engines
DetectEngineFrameInspectionEngine * frame_inspect_engines
Definition: detect.h:966
PrefilterEngineList
struct PrefilterEngineList_ PrefilterEngineList
DetectEngineMasterCtx_::free_list
DetectEngineCtx * free_list
Definition: detect.h:1499
DetectBufferMpmRegistery_::alproto
AppProto alproto
Definition: detect.h:655
DetectEngineThreadKeywordCtxItem_::next
struct DetectEngineThreadKeywordCtxItem_ * next
Definition: detect.h:768
DetectAddress_::ip2
Address ip2
Definition: detect.h:142
DetectEngineThreadCtx_::non_pf_id_cnt
uint32_t non_pf_id_cnt
Definition: detect.h:1054
DETECT_SM_LIST_MATCH
@ DETECT_SM_LIST_MATCH
Definition: detect.h:89
DetectPort_
Port structure for detection engine.
Definition: detect.h:191
SigGroupHead_::init
SigGroupHeadInitData * init
Definition: detect.h:1431
DetectEngineCtx_::ths_ctx
ThresholdCtx ths_ctx
Definition: detect.h:842
DetectEngineCtx_::sig_cnt
uint32_t sig_cnt
Definition: detect.h:801
InspectionBuffer::buf
uint8_t * buf
Definition: detect.h:356
SigTableElmt_::alternative
uint16_t alternative
Definition: detect.h:1248
Signature_::app_inspect
DetectEngineAppInspectionEngine * app_inspect
Definition: detect.h:598
SigMatch_::ctx
SigMatchCtx * ctx
Definition: detect.h:326
DetectReference_
Signature reference list.
Definition: detect-reference.h:34
DetectBufferType_::ValidateCallback
bool(* ValidateCallback)(const struct Signature_ *, const char **sigerror)
Definition: detect.h:431
AlertQueueAppend
void AlertQueueAppend(DetectEngineThreadCtx *det_ctx, const Signature *s, Packet *p, uint64_t tx_id, uint8_t alert_flags)
Append signature to local packet alert queue for later preprocessing.
Definition: detect-engine-alert.c:260
PORT_GE
@ PORT_GE
Definition: detect.h:182
SigFileLoaderStat_::bad_sigs_total
int bad_sigs_total
Definition: detect.h:761
SigGroupHeadInitData_::direction
uint32_t direction
Definition: detect.h:1385
DetectLoadCompleteSigPath
char * DetectLoadCompleteSigPath(const DetectEngineCtx *, const char *sig_file)
Create the path if default-rule-path was specified.
Definition: detect-engine-loader.c:60
MpmStore_::direction
int direction
Definition: detect.h:1304
DetectEngineThreadCtx_::base64_decoded_len
int base64_decoded_len
Definition: detect.h:1184
DetectVarList_::next
struct DetectVarList_ * next
Definition: detect.h:705
RuleMatchCandidateTx::stream_result
uint8_t stream_result
Definition: detect.h:1032
Signature_::action
uint8_t action
Definition: detect.h:563
DetectBufferMpmRegistery_::name
const char * name
Definition: detect.h:636
ADDRESS_ES
@ ADDRESS_ES
Definition: detect.h:127
DetectEngineLookupFlow_::udp
DetectPort * udp
Definition: detect.h:732
DetectEngineThreadCtx_::raw_stream_progress
uint64_t raw_stream_progress
Definition: detect.h:1067
DetectEngineCtx_::profile_ctx
struct SCProfileDetectCtx_ * profile_ctx
Definition: detect.h:917
PrefilterEngine_::alproto
AppProto alproto
Definition: detect.h:1351
Signature_::flags
uint32_t flags
Definition: detect.h:550
FILE_DECODER_EVENT_LZMA_UNKNOWN_ERROR
@ FILE_DECODER_EVENT_LZMA_UNKNOWN_ERROR
Definition: detect.h:1275
ThresholdCtx_::th_entry
DetectThresholdEntry ** th_entry
Definition: detect.h:743
stream.h
DetectEngineFrameInspectionEngine::v1
struct DetectEngineFrameInspectionEngine::@86 v1
IPOnlyCIDRItem_::next
struct IPOnlyCIDRItem_ * next
Definition: detect.h:311
DetectEngineCtx_::max_fb_id
uint32_t max_fb_id
Definition: detect.h:860
HttpReassembledBody_
Definition: detect.h:1008
Packet_
Definition: decode.h:442
DetectEngineFrameInspectionEngine::alproto
AppProto alproto
Definition: detect.h:478
DetectEngineCtx_::sgh_mpm_context_stream
int32_t sgh_mpm_context_stream
Definition: detect.h:883
detect-engine-build.h
SignatureNonPrefilterStore
struct SignatureNonPrefilterStore_ SignatureNonPrefilterStore
DetectEngineThreadCtx_::rule_perf_data_size
int rule_perf_data_size
Definition: detect.h:1203
DetectEngineThreadCtx_::frame_id
int64_t frame_id
Definition: detect.h:1117
HttpReassembledBody_::buffer_size
uint32_t buffer_size
Definition: detect.h:1011
DetectEngineAppInspectionEngine_::Callback
InspectEngineFuncPtr2 Callback
Definition: detect.h:411
TransformData
struct TransformData_ TransformData
DetectEngineCtx_::sgh_mpm_ctx_cnf
uint8_t sgh_mpm_ctx_cnf
Definition: detect.h:857
DetectBufferType_::packet
bool packet
Definition: detect.h:427
SCSigOrderFunc_
Structure holding the signature ordering function used by the signature ordering module.
Definition: detect-engine-sigorder.h:69
PrefilterEngine
struct PrefilterEngine_ PrefilterEngine
DetectEngineMasterCtx_::multi_tenant_enabled
int multi_tenant_enabled
Definition: detect.h:1487
DetectRegisterThreadCtxFuncs
int DetectRegisterThreadCtxFuncs(DetectEngineCtx *, const char *name, void *(*InitFunc)(void *), void *data, void(*FreeFunc)(void *), int)
Register Thread keyword context Funcs.
Definition: detect-engine.c:3422
PrefilterEngine_::cb
union PrefilterEngine_::@101 cb
DetectEngineThreadCtx_::filestore_cnt
uint16_t filestore_cnt
Definition: detect.h:1076
DetectEngineFrameInspectionEngine
Definition: detect.h:477
SigFileLoaderStat
struct SigFileLoaderStat_ SigFileLoaderStat
Signature loader statistics.
DetectEngineCtx_::hcbd_buffer_limit
int hcbd_buffer_limit
Definition: detect.h:870
DetectEngineCtx_::max_uniq_toserver_groups
uint16_t max_uniq_toserver_groups
Definition: detect.h:854
DETECT_BUFFER_MPM_TYPE_PKT
@ DETECT_BUFFER_MPM_TYPE_PKT
Definition: detect.h:627
util-radix-tree.h
SCProfileData_
Definition: util-profiling-rules.c:44
TmEcode
TmEcode
Definition: tm-threads-common.h:81
DetectEnginePktInspectionEngine::Callback
InspectionBufferPktInspectFunc Callback
Definition: detect.h:459
DetectEngineCtx_::gh_unique
uint32_t gh_unique
Definition: detect.h:830
PrefilterEngine_::PrefilterFrame
PrefilterFrameFn PrefilterFrame
Definition: detect.h:1369
PrefilterEngine_::frame_type
uint8_t frame_type
Definition: detect.h:1357
Signature_::init_data
SignatureInitData * init_data
Definition: detect.h:620
ENGINE_PROFILE_MAX
@ ENGINE_PROFILE_MAX
Definition: detect.h:997
ADDRESS_ER
@ ADDRESS_ER
Definition: detect.h:123
DetectEngineCtx_::profile_keyword_ctx
struct SCProfileKeywordDetectCtx_ * profile_keyword_ctx
Definition: detect.h:918
DetectEngineCtx_::sgh_array_cnt
uint32_t sgh_array_cnt
Definition: detect.h:877
DetectEngineThreadCtx_::alert_queue_capacity
uint16_t alert_queue_capacity
Definition: detect.h:1121
SignatureInitData_::negated
bool negated
Definition: detect.h:504
DetectEngineCtx_::sgh_array
struct SigGroupHead_ ** sgh_array
Definition: detect.h:876
SigTableElmt_::Match
int(* Match)(DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *)
Definition: detect.h:1218
reputation.h
MpmStore
struct MpmStore_ MpmStore
ADDRESS_GE
@ ADDRESS_GE
Definition: detect.h:129
SignatureInitData_
Definition: detect.h:498
SignatureInitData_::smlists
struct SigMatch_ ** smlists
Definition: detect.h:543
SCFPSupportSMList_::priority
int priority
Definition: detect.h:710
HashListTable_
Definition: util-hashlist.h:37
DetectEngineCtx_::byte_extract_max_local_id
int32_t byte_extract_max_local_id
Definition: detect.h:886
SignatureInitData_::dst_contains_negation
bool dst_contains_negation
Definition: detect.h:509
DetectEnginePktInspectionEngine::sm_list_base
uint16_t sm_list_base
Definition: detect.h:456
DetectEngineTransforms::transforms
TransformData transforms[DETECT_TRANSFORMS_MAX]
Definition: detect.h:382
DetectEngineCtx_::hsbd_buffer_limit
int hsbd_buffer_limit
Definition: detect.h:872
Signature_::addr_dst_match6_cnt
uint16_t addr_dst_match6_cnt
Definition: detect.h:575
DetectEngineThreadCtx_::rule_perf_data
struct SCProfileData_ * rule_perf_data
Definition: detect.h:1202
DetectEngineThreadCtx
struct DetectEngineThreadCtx_ DetectEngineThreadCtx
SigGroupHead_::frame_engines
PrefilterEngine * frame_engines
Definition: detect.h:1428
SigGroupHeadInitData_::app_mpms
MpmCtx ** app_mpms
Definition: detect.h:1388
HttpReassembledBody_::decompressed_buffer
uint8_t * decompressed_buffer
Definition: detect.h:1010
DetectEngineFrameInspectionEngine::dir
uint8_t dir
Definition: detect.h:479
DetectEngineTransforms
struct DetectEngineTransforms DetectEngineTransforms
Signature_::sp
DetectPort * sp
Definition: detect.h:589
DetectEngineThreadCtx_::mtc
MpmThreadCtx mtc
Definition: detect.h:1147
SigString_::filename
char * filename
Definition: detect.h:748
DETECT_ENGINE_TYPE_TENANT
@ DETECT_ENGINE_TYPE_TENANT
Definition: detect.h:784
HttpReassembledBody_::decompressed_buffer_len
uint32_t decompressed_buffer_len
Definition: detect.h:1013
RuleMatchCandidateTx::flags
uint32_t * flags
Definition: detect.h:1028
DetectEngineCtx_::dup_sig_hash_table
HashListTable * dup_sig_hash_table
Definition: detect.h:839
DetectEngineCtx_::config_prefix
char config_prefix[64]
Definition: detect.h:926
DetectVarList_::type
int type
Definition: detect.h:701
DetectEngineAppInspectionEngine_::alproto
AppProto alproto
Definition: detect.h:400
InspectEngineFuncPtr2
uint8_t(* InspectEngineFuncPtr2)(struct DetectEngineCtx_ *de_ctx, struct DetectEngineThreadCtx_ *det_ctx, const struct DetectEngineAppInspectionEngine_ *engine, const struct Signature_ *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
Definition: detect.h:394
SigMatchCtx_
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
Definition: detect.h:318
Signature_::class_msg
char * class_msg
Definition: detect.h:612
DetectEngineThreadCtx_::discontinue_matching
uint16_t discontinue_matching
Definition: detect.h:1110
DetectEngineCtx_::sig_array_size
uint32_t sig_array_size
Definition: detect.h:810
ThresholdCtx_
threshold ctx
Definition: detect.h:739
DetectPatternTracker::sm_list
int sm_list
Definition: detect.h:680
DetectEngineAppInspectionEngine_::smd
SigMatchData * smd
Definition: detect.h:416
SigGroupHeadInitData_::pkt_engines
PrefilterEngineList * pkt_engines
Definition: detect.h:1392
DetectBufferType_::id
int id
Definition: detect.h:424
DetectGetTagSignature
Signature * DetectGetTagSignature(void)
DetectEnginePktInspectionEngine::GetData
InspectionBufferGetPktDataPtr GetData
Definition: detect.h:458
ENGINE_PROFILE_CUSTOM
@ ENGINE_PROFILE_CUSTOM
Definition: detect.h:996
DETECT_ENGINE_TYPE_NORMAL
@ DETECT_ENGINE_TYPE_NORMAL
Definition: detect.h:781
DetectEngineIPOnlyCtx_::ip_dst
IPOnlyCIDRItem * ip_dst
Definition: detect.h:726
MpmStore_::mpm_ctx
MpmCtx * mpm_ctx
Definition: detect.h:1309
util-file.h
DetectAddressHead_::ipv6_head
DetectAddress * ipv6_head
Definition: detect.h:156
DetectMetadataHashFree
void DetectMetadataHashFree(DetectEngineCtx *de_ctx)
Definition: detect-metadata.c:80
util-prefilter.h
SignatureInitData_::dsize_sm
SigMatch * dsize_sm
Definition: detect.h:516
DetectBufferType_::frame
bool frame
Definition: detect.h:428
FILE_DECODER_EVENT_LZMA_OPTIONS_ERROR
@ FILE_DECODER_EVENT_LZMA_OPTIONS_ERROR
Definition: detect.h:1271
DetectBufferMpmRegistery_::priority
int priority
Definition: detect.h:641
File_
Definition: util-file.h:75
DetectEngineIPOnlyCtx
struct DetectEngineIPOnlyCtx_ DetectEngineIPOnlyCtx
IP only rules matching ctx.
MPMB_TCP_PKT_TC
@ MPMB_TCP_PKT_TC
Definition: detect.h:1291
ADDRESS_LE
@ ADDRESS_LE
Definition: detect.h:125
DetectEngineCtx_::sig_stat
SigFileLoaderStat sig_stat
Definition: detect.h:977
DetectEngineCtx_::address_table
HashListTable * address_table
Definition: detect.h:947
DetectEngineThreadCtx_::to_clear_queue
uint32_t * to_clear_queue
Definition: detect.h:1097
DetectEngineThreadCtx_::inspect_list
int inspect_list
Definition: detect.h:1091
DetectEngineCtx_::profile_prefilter_ctx
struct SCProfilePrefilterDetectCtx_ * profile_prefilter_ctx
Definition: detect.h:919
TENANT_SELECTOR_DIRECT
@ TENANT_SELECTOR_DIRECT
Definition: detect.h:1469
InspectionBufferMultipleForList
struct InspectionBufferMultipleForList InspectionBufferMultipleForList
util-mpm.h
DetectBufferMpmRegistery_::pname
char pname[32]
Definition: detect.h:637
flags
uint8_t flags
Definition: decode-gre.h:0
Signature_::proto
DetectProto proto
Definition: detect.h:567
SigTableElmt_::alias
const char * alias
Definition: detect.h:1251
SigMatchCtx
struct SigMatchCtx_ SigMatchCtx
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
SigGroupHead_::non_pf_other_store_array
SignatureNonPrefilterStore * non_pf_other_store_array
Definition: detect.h:1415
DetectEngineMasterCtx_::keyword_id
int keyword_id
Definition: detect.h:1511
DetectBufferMpmRegistery_::type
uint8_t type
Definition: detect.h:670
SigMatchData_::is_last
uint8_t is_last
Definition: detect.h:334
suricata-common.h
SigMatch_::idx
uint16_t idx
Definition: detect.h:325
DetectEnginePktInspectionEngine::v1
struct DetectEnginePktInspectionEngine::@85 v1
SigString_::line
int line
Definition: detect.h:751
SigGroupHeadInitData_::frame_engines
PrefilterEngineList * frame_engines
Definition: detect.h:1395
SigMatch_::type
uint16_t type
Definition: detect.h:324
DETECT_BUFFER_MPM_TYPE_APP
@ DETECT_BUFFER_MPM_TYPE_APP
Definition: detect.h:628
SigGroupHeadInitData_::payload_engines
PrefilterEngineList * payload_engines
Definition: detect.h:1393
PORT_ES
@ PORT_ES
Definition: detect.h:180
DetectEngineThreadCtx_::tenant_id
uint32_t tenant_id
Definition: detect.h:1046
FILE_DECODER_EVENT_Z_DATA_ERROR
@ FILE_DECODER_EVENT_Z_DATA_ERROR
Definition: detect.h:1265
SigGroupHeadInitData_::match_array
Signature ** match_array
Definition: detect.h:1401
DetectEngineCtx_::buffer_type_hash_name
HashListTable * buffer_type_hash_name
Definition: detect.h:954
DetectEngineCtx_::next
struct DetectEngineCtx_ * next
Definition: detect.h:933
Signature_::dsize_high
uint16_t dsize_high
Definition: detect.h:556
SigGroupHead_::non_pf_other_store_cnt
uint32_t non_pf_other_store_cnt
Definition: detect.h:1413
Signature_::file_flags
uint8_t file_flags
Definition: detect.h:564
DetectBufferMpmRegistery_::tx_min_progress
int tx_min_progress
Definition: detect.h:656
detect-metadata.h
DETECT_ENGINE_TYPE_DD_STUB
@ DETECT_ENGINE_TYPE_DD_STUB
Definition: detect.h:782
TENANT_SELECTOR_VLAN
@ TENANT_SELECTOR_VLAN
Definition: detect.h:1470
DetectEngineFrameInspectionEngine::next
struct DetectEngineFrameInspectionEngine * next
Definition: detect.h:490
SigTableElmt_::Transform
void(* Transform)(InspectionBuffer *, void *context)
Definition: detect.h:1231
DetectEngineThreadCtx_::inspection_recursion_counter
int inspection_recursion_counter
Definition: detect.h:1127
DetectEngineThreadCtx_::prefilter_perf_data
struct SCProfilePrefilterData_ * prefilter_perf_data
Definition: detect.h:1209
DetectEnginePrefilterSetting
DetectEnginePrefilterSetting
Definition: detect.h:774
DetectPort_::prev
struct DetectPort_ * prev
Definition: detect.h:204
util-spm.h
DetectEnginePktInspectionEngine::next
struct DetectEnginePktInspectionEngine * next
Definition: detect.h:463
SigGroupHeadInitData_::sig_size
uint32_t sig_size
Definition: detect.h:1382
PrefilterEngineList_
Definition: detect.h:1316
SigFileLoaderStat_::total_files
int total_files
Definition: detect.h:759
DetectEngineIPOnlyCtx_::tree_ipv4dst
SCRadixTree * tree_ipv4dst
Definition: detect.h:722
DetectMatchAddressIPv4_::ip2
uint32_t ip2
Definition: detect.h:162
DetectEngineCtx_::profile_match_logging_threshold
uint32_t profile_match_logging_threshold
Definition: detect.h:922
IPOnlyCIDRItem_::ip
uint32_t ip[4]
Definition: detect.h:307
PrefilterEngine_::gid
uint32_t gid
Definition: detect.h:1373
Signature_::rev
uint32_t rev
Definition: detect.h:585
SignatureInitData_::sm_cnt
uint16_t sm_cnt
Definition: detect.h:500
DetectEngineCtx_::sig_list
Signature * sig_list
Definition: detect.h:800
PrefilterEngineList_::PrefilterTx
void(* PrefilterTx)(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p, Flow *f, void *tx, const uint64_t idx, const uint8_t flags)
Definition: detect.h:1332
DETECT_SM_LIST_TMATCH
@ DETECT_SM_LIST_TMATCH
Definition: detect.h:100
DetectEngineCtx_::profile_keyword_ctx_per_list
struct SCProfileKeywordDetectCtx_ ** profile_keyword_ctx_per_list
Definition: detect.h:920
RuleMatchCandidateTx
struct RuleMatchCandidateTx RuleMatchCandidateTx
DetectEngineCtx_::tcp_whitelist
DetectPort * tcp_whitelist
Definition: detect.h:943
DetectEngineCtx_::loader_id
int loader_id
Definition: detect.h:936
TransformData_::transform
int transform
Definition: detect.h:377
DetectEngineCtx_::pkt_inspect_engines
DetectEnginePktInspectionEngine * pkt_inspect_engines
Definition: detect.h:963
tv
ThreadVars * tv
Definition: fuzz_decodepcapfile.c:29
Signature_::prio
int prio
Definition: detect.h:586
DetectEngineThreadCtx_::non_pf_id_array
SigIntId * non_pf_id_array
Definition: detect.h:1053
DetectEngineAppInspectionEngine_::progress
int16_t progress
Definition: detect.h:407
DetectEngineThreadKeywordCtxItem_::FreeFunc
void(* FreeFunc)(void *)
Definition: detect.h:766
FILE_DECODER_EVENT_LZMA_BUF_ERROR
@ FILE_DECODER_EVENT_LZMA_BUF_ERROR
Definition: detect.h:1274
FILE_DECODER_EVENT_LZMA_DATA_ERROR
@ FILE_DECODER_EVENT_LZMA_DATA_ERROR
Definition: detect.h:1273
DetectMatchAddressIPv6_::ip
uint32_t ip[4]
Definition: detect.h:166
app-layer-events.h
SigGroupHeadInitData
struct SigGroupHeadInitData_ SigGroupHeadInitData
DetectAddress
struct DetectAddress_ DetectAddress
address structure for use in the detection engine.
SpmGlobalThreadCtx_
Definition: util-spm.h:49
DetectEngineCtx_::app_mpms_list_cnt
uint32_t app_mpms_list_cnt
Definition: detect.h:962
Signature_::addr_src_match6_cnt
uint16_t addr_src_match6_cnt
Definition: detect.h:576
InspectionBufferFrameInspectFunc
int(* InspectionBufferFrameInspectFunc)(struct DetectEngineThreadCtx_ *, const struct DetectEngineFrameInspectionEngine *engine, const struct Signature_ *s, Packet *p, const struct Frames *frames, const struct Frame *frame, const uint32_t idx)
Definition: detect.h:473
DetectProto_
Definition: detect-engine-proto.h:36
DetectFilestoreData_
Definition: detect-filestore.h:36
SigGroupHeadInitData_
Definition: detect.h:1378
InspectionBuffer::inspect_len
uint32_t inspect_len
Definition: detect.h:350
DetectEngineCtx_::app_inspect_engines
DetectEngineAppInspectionEngine * app_inspect_engines
Definition: detect.h:960
SignatureInitData_::dst
const DetectAddressHead * dst
Definition: detect.h:537
PrefilterEngine_::pectx
void * pectx
Definition: detect.h:1362
DetectEngineThreadCtx_::alert_queue
PacketAlert * alert_queue
Definition: detect.h:1122
DetectEngineThreadCtx_::pcre_match_start_offset
uint32_t pcre_match_start_offset
Definition: detect.h:1073
DetectEngineThreadCtx_::global_keyword_ctxs_size
int global_keyword_ctxs_size
Definition: detect.h:1180
Signature_::dp
DetectPort * dp
Definition: detect.h:589
DetectEngineCtx_::sm_types_prefilter
bool sm_types_prefilter[DETECT_TBLSIZE]
Definition: detect.h:982
DetectEngineCtx_::mpm_hash_table
HashListTable * mpm_hash_table
Definition: detect.h:835
InspectionBuffer::inspect
const uint8_t * inspect
Definition: detect.h:348
DumpPatterns
void DumpPatterns(DetectEngineCtx *de_ctx)
Definition: detect-engine-analyzer.c:977
Signature_::metadata
DetectMetadataHead * metadata
Definition: detect.h:616
DetectEngineThreadCtx_::tv
ThreadVars * tv
Definition: detect.h:1049
MPMB_UDP_TC
@ MPMB_UDP_TC
Definition: detect.h:1295
DetectEngineThreadCtx_::non_pf_store_cnt
uint32_t non_pf_store_cnt
Definition: detect.h:1142
DetectEngineThreadCtx_::counter_alerts
uint16_t counter_alerts
Definition: detect.h:1079
InspectionBuffer::len
uint32_t len
Definition: detect.h:355
SigGroupHead_::flags
uint32_t flags
Definition: detect.h:1409
DetectVarList_::key
uint8_t * key
Definition: detect.h:702
DetectEngineThreadCtx_::keyword_ctxs_array
void ** keyword_ctxs_array
Definition: detect.h:1177
Signature_::cidr_dst
IPOnlyCIDRItem * cidr_dst
Definition: detect.h:596
SigFileLoaderStat_::good_sigs_total
int good_sigs_total
Definition: detect.h:760
SigTableElmt_::SupportsPrefilter
bool(* SupportsPrefilter)(const Signature *s)
Definition: detect.h:1237
DetectEngineGetEvents
AppLayerDecoderEvents * DetectEngineGetEvents(DetectEngineThreadCtx *det_ctx)
Definition: detect-engine.c:4637
Signature_::addr_dst_match6
DetectMatchAddressIPv6 * addr_dst_match6
Definition: detect.h:580
DetectEngineMasterCtx_
Definition: detect.h:1483
Signature_::id
uint32_t id
Definition: detect.h:583
DetectEngineThreadKeywordCtxItem_::name
const char * name
Definition: detect.h:770
DetectEngineThreadCtx_::base64_decoded_len_max
int base64_decoded_len_max
Definition: detect.h:1185
DetectEngineLookupFlow
struct DetectEngineLookupFlow_ DetectEngineLookupFlow
RuleMatchCandidateTx::stream_reset
uint32_t stream_reset
Definition: detect.h:1034
PORT_GT
@ PORT_GT
Definition: detect.h:183
DisableDetectFlowFileFlags
void DisableDetectFlowFileFlags(Flow *f)
disable file features we don't need Called if we have no detection engine.
Definition: detect.c:1772
DetectBufferType_::transforms
DetectEngineTransforms transforms
Definition: detect.h:432
DetectEngineCtx_::content_limit
uint32_t content_limit
Definition: detect.h:910
DetectEngineType
DetectEngineType
Definition: detect.h:780
HttpReassembledBody_::offset
uint64_t offset
Definition: detect.h:1014
Signature_
Signature container.
Definition: detect.h:549
SCProfileDetectCtx_
Definition: util-profiling-rules.c:55
SigMatch_
a single match condition for a signature
Definition: detect.h:323
SCProfilePrefilterData_
Definition: util-profiling-prefilter.c:43
DetectEngineAppInspectionEngine_::transforms
const DetectEngineTransforms * transforms
Definition: detect.h:413
DETECT_SM_LIST_MAX
@ DETECT_SM_LIST_MAX
Definition: detect.h:106
detect-threshold.h
SigMatchCtx_::foo
int foo
Definition: detect.h:319
DetectBufferType_::parent_id
int parent_id
Definition: detect.h:425
DETECT_PREFILTER_MPM
@ DETECT_PREFILTER_MPM
Definition: detect.h:775
SignatureMask
#define SignatureMask
Definition: detect.h:282
DetectAddress_::next
struct DetectAddress_ * next
Definition: detect.h:150
DetectEngineTenantMapping_::traffic_id
uint32_t traffic_id
Definition: detect.h:1478
DetectBufferMpmRegistery_::pkt_v1
struct DetectBufferMpmRegistery_::@87::@90 pkt_v1
SigGroupHeadInitData_::protos
uint8_t protos[256]
Definition: detect.h:1384
DetectMatchAddressIPv6_
Definition: detect.h:165
MPMB_TCP_PKT_TS
@ MPMB_TCP_PKT_TS
Definition: detect.h:1290
DetectMatchAddressIPv4_
Definition: detect.h:160
DetectEngineCtx_::spm_matcher
uint16_t spm_matcher
Definition: detect.h:845
DetectEngineThreadCtx_::tx_id_set
bool tx_id_set
Definition: detect.h:1114
FILE_DECODER_EVENT_LZMA_MEMLIMIT_ERROR
@ FILE_DECODER_EVENT_LZMA_MEMLIMIT_ERROR
Definition: detect.h:1270
AlertQueueFree
void AlertQueueFree(DetectEngineThreadCtx *det_ctx)
Definition: detect-engine-alert.c:216
DetectEnginePktInspectionEngine
struct DetectEnginePktInspectionEngine DetectEnginePktInspectionEngine
DetectEngineThreadCtx_::base64_decoded
uint8_t * base64_decoded
Definition: detect.h:1183
Signature_::dsize_mode
uint8_t dsize_mode
Definition: detect.h:557
DetectEngineLookupFlow_
Definition: detect.h:730
DetectEngineCtx_::filedata_config_initialized
bool filedata_config_initialized
Definition: detect.h:914
DetectEngineCtx_::pkt_mpms_list
DetectBufferMpmRegistery * pkt_mpms_list
Definition: detect.h:964
PrefilterEngine_::ctx
union PrefilterEngine_::@100 ctx
DetectEngineCtx_::content_inspect_min_size
uint32_t content_inspect_min_size
Definition: detect.h:911
DetectEngineTransforms::cnt
int cnt
Definition: detect.h:383
PrefilterEngine_::is_last
bool is_last
Definition: detect.h:1374
DetectEngineThreadCtx_::de_ctx
DetectEngineCtx * de_ctx
Definition: detect.h:1175
DetectEngineCtx_::sig_array
Signature ** sig_array
Definition: detect.h:809
SigGroupHead_::non_pf_syn_store_array
SignatureNonPrefilterStore * non_pf_syn_store_array
Definition: detect.h:1417
PacketAlert_
Definition: decode.h:280
PrefilterEngineList_::tx_min_progress
uint8_t tx_min_progress
Definition: detect.h:1323
DetectEngineAppInspectionEngine_::dir
uint8_t dir
Definition: detect.h:401
DETECT_BUFFER_MPM_TYPE_SIZE
@ DETECT_BUFFER_MPM_TYPE_SIZE
Definition: detect.h:631
DETECT_ENGINE_TYPE_MT_STUB
@ DETECT_ENGINE_TYPE_MT_STUB
Definition: detect.h:783
SignatureNonPrefilterStore_::mask
SignatureMask mask
Definition: detect.h:1021
DetectEngineCtx_::buffer_type_id
uint32_t buffer_type_id
Definition: detect.h:956
Signature
struct Signature_ Signature
Signature container.
DetectEngineIPOnlyCtx_
IP only rules matching ctx.
Definition: detect.h:720
DetectEngineCtx_::sigerror
const char * sigerror
Definition: detect.h:903
DetectBufferType_::SetupCallback
void(* SetupCallback)(const struct DetectEngineCtx_ *, struct Signature_ *)
Definition: detect.h:430
DetectEngineThreadCtx_::mt_det_ctxs_cnt
uint32_t mt_det_ctxs_cnt
Definition: detect.h:1056
PORT_LT
@ PORT_LT
Definition: detect.h:177
DetectMetadataHashInit
int DetectMetadataHashInit(DetectEngineCtx *de_ctx)
Definition: detect-metadata.c:69
DetectEngineIPOnlyThreadCtx
struct DetectEngineIPOnlyThreadCtx_ DetectEngineIPOnlyThreadCtx
DetectEngineMasterCtx_::lock
SCMutex lock
Definition: detect.h:1484
DetectEnginePktInspectionEngine::mpm
bool mpm
Definition: detect.h:454
DetectEngineCtx_::spm_global_thread_ctx
SpmGlobalThreadCtx * spm_global_thread_ctx
Definition: detect.h:849
DetectFlowbitsAnalyze
int DetectFlowbitsAnalyze(DetectEngineCtx *de_ctx)
Definition: detect-flowbits.c:407
SigGroupHead_::pkt_engines
PrefilterEngine * pkt_engines
Definition: detect.h:1425
DetectEngineCtx_::flags
uint8_t flags
Definition: detect.h:795
ENGINE_PROFILE_HIGH
@ ENGINE_PROFILE_HIGH
Definition: detect.h:995
SigGroupHeadInitData_::whitelist
int whitelist
Definition: detect.h:1386
DetectEngineThreadCtx_::replist
DetectReplaceList * replist
Definition: detect.h:1163
SignatureInitData_::transforms
DetectEngineTransforms transforms
Definition: detect.h:529
SigString_::sig_str
char * sig_str
Definition: detect.h:749
DetectEngineCtx_::io_ctx
DetectEngineIPOnlyCtx io_ctx
Definition: detect.h:841
DetectEngineThreadCtx_::multi_inspect
struct DetectEngineThreadCtx_::@98 multi_inspect
DetectMatchAddressIPv4
struct DetectMatchAddressIPv4_ DetectMatchAddressIPv4
DetectEngineCtx_::rule_line
int rule_line
Definition: detect.h:900
MpmCtx_
Definition: util-mpm.h:88
DetectBufferMpmRegistery
struct DetectBufferMpmRegistery_ DetectBufferMpmRegistery
one time registration of keywords at start up
Signature_::addr_dst_match4
DetectMatchAddressIPv4 * addr_dst_match4
Definition: detect.h:577
DetectEngineThreadCtx_::inspect
struct DetectEngineThreadCtx_::@97 inspect
Signature_::msg
char * msg
Definition: detect.h:609
flow.h
DetectReplaceList_::cd
struct DetectContentData_ * cd
Definition: detect.h:686
sigmatch_table
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
Definition: detect-parse.c:73
Signature_::addr_src_match4_cnt
uint16_t addr_src_match4_cnt
Definition: detect.h:574
SigIntId
#define SigIntId
Definition: suricata-common.h:296
DetectEngineAppInspectionEngine
struct DetectEngineAppInspectionEngine_ DetectEngineAppInspectionEngine
DETECT_EVENT_TOO_MANY_BUFFERS
@ DETECT_EVENT_TOO_MANY_BUFFERS
Definition: detect.h:1277
TENANT_SELECTOR_LIVEDEV
@ TENANT_SELECTOR_LIVEDEV
Definition: detect.h:1471
Signature_::addr_dst_match4_cnt
uint16_t addr_dst_match4_cnt
Definition: detect.h:573
DetectEngineFrameInspectionEngine::type
uint8_t type
Definition: detect.h:480
DetectSigmatchListEnum
DetectSigmatchListEnum
Definition: detect.h:88
FILE_DECODER_EVENT_Z_STREAM_ERROR
@ FILE_DECODER_EVENT_Z_STREAM_ERROR
Definition: detect.h:1266
DetectEngineMasterCtx_::version
uint32_t version
Definition: detect.h:1490
DetectEngineCtx_::sig_array_len
uint32_t sig_array_len
Definition: detect.h:811
DetectBufferMpmRegistery_::sm_list
int16_t sm_list
Definition: detect.h:639
DetectEngineCtx_::metadata_table
HashTable * metadata_table
Definition: detect.h:950
DetectEngineIPOnlyCtx_::tree_ipv6src
SCRadixTree * tree_ipv6src
Definition: detect.h:723
DetectEngineCtx_::signum
uint32_t signum
Definition: detect.h:813
SigGroupHead_::filestore_cnt
uint16_t filestore_cnt
Definition: detect.h:1421
IPOnlyCIDRItem_::signum
SigIntId signum
Definition: detect.h:308
SigFileLoaderStat_
Signature loader statistics.
Definition: detect.h:756
DetectAddress_::flags
uint8_t flags
Definition: detect.h:145
DetectEngineCtx_::buffer_type_hash_id
HashListTable * buffer_type_hash_id
Definition: detect.h:955
DetectEngineCtx_::base64_decode_max_len
uint32_t base64_decode_max_len
Definition: detect.h:896
DetectEngineLookupFlow_::tcp
DetectPort * tcp
Definition: detect.h:731
ThresholdCtx
struct ThresholdCtx_ ThresholdCtx
threshold ctx
DETECT_SM_LIST_SUPPRESS
@ DETECT_SM_LIST_SUPPRESS
Definition: detect.h:103
SCMutex
#define SCMutex
Definition: threads-debug.h:114
DetectEngineCtx_::fp_support_smlist_list
SCFPSupportSMList * fp_support_smlist_list
Definition: detect.h:987
InspectionBufferMultipleForList::inspection_buffers
InspectionBuffer * inspection_buffers
Definition: detect.h:370
MpmStore_::sgh_mpm_context
int32_t sgh_mpm_context
Definition: detect.h:1307
InspectionBufferMultipleForList::max
uint32_t max
Definition: detect.h:372
DetectAddressHead_::ipv4_head
DetectAddress * ipv4_head
Definition: detect.h:155
PORT_EQ
@ PORT_EQ
Definition: detect.h:179
SigGroupHead_::id
uint32_t id
Definition: detect.h:1423
ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL
@ ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL
Definition: detect.h:1002
IPOnlyCIDRItem_::family
uint8_t family
Definition: detect.h:301
DetectEngineThreadCtx_::counter_mpm_list
uint16_t counter_mpm_list
Definition: detect.h:1085
DetectEngineFrameInspectionEngine
struct DetectEngineFrameInspectionEngine DetectEngineFrameInspectionEngine
SigMatchData
struct SigMatchData_ SigMatchData
Data needed for Match()
DetectEngineCtx_::failure_fatal
int failure_fatal
Definition: detect.h:796
MpmStore_::buffer
enum MpmBuiltinBuffers buffer
Definition: detect.h:1305
DetectEngineThreadCtx_::tenant_array_size
uint32_t tenant_array_size
Definition: detect.h:1061
DetectEngineThreadCtx_::tenant_array
struct DetectEngineTenantMapping_ * tenant_array
Definition: detect.h:1060
DetectEngineCtx_::sc_sig_order_funcs
struct SCSigOrderFunc_ * sc_sig_order_funcs
Definition: detect.h:820
MpmCtxFactoryContainer_
Definition: util-mpm.h:124
SigTableElmt_::RegisterTests
void(* RegisterTests)(void)
Definition: detect.h:1242
FILE_DECODER_EVENT_LZMA_DECODER_ERROR
@ FILE_DECODER_EVENT_LZMA_DECODER_ERROR
Definition: detect.h:1269
DetectEngineThreadCtx_::file_id
uint32_t file_id
Definition: detect.h:1171
DetectEngineThreadCtx_::io_ctx
DetectEngineIPOnlyThreadCtx io_ctx
Definition: detect.h:1157
DetectEngineThreadCtx_::mt_det_ctxs
struct DetectEngineThreadCtx_ ** mt_det_ctxs
Definition: detect.h:1057
Signature_::mask
SignatureMask mask
Definition: detect.h:559
DetectBufferMpmRegistery_::next
struct DetectBufferMpmRegistery_ * next
Definition: detect.h:674
RuleMatchCandidateTx
Definition: detect.h:1026
SignatureInitData_::smlists_array_size
uint32_t smlists_array_size
Definition: detect.h:541
DetectEngineThreadCtx_::TenantGetId
uint32_t(* TenantGetId)(const void *, const Packet *p)
Definition: detect.h:1063
DetectBufferType_::description
char description[128]
Definition: detect.h:423
DetectBufferMpmRegistery_::sm_list_base
int16_t sm_list_base
Definition: detect.h:640
DetectEngineIPOnlyCtx_::max_idx
uint32_t max_idx
Definition: detect.h:727
SigGroupHeadInitData_::frame_mpms
MpmCtx ** frame_mpms
Definition: detect.h:1390
SpmThreadCtx_
Definition: util-spm.h:56
DetectEngineFrameInspectionEngine::smd
SigMatchData * smd
Definition: detect.h:489
DetectEngineIPOnlyThreadCtx_::sig_match_size
uint32_t sig_match_size
Definition: detect.h:716
DetectEngineThreadCtx_::match_array
Signature ** match_array
Definition: detect.h:1131
DetectEngineIPOnlyThreadCtx_
Definition: detect.h:714