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