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