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