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