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