uint16_t replace_len;
/* for chopped fast pattern, the length */
uint16_t fp_chop_len;
+ /* for chopped fast pattern, the offset */
+ uint16_t fp_chop_offset;
/* would want to move PatIntId here and flags down to remove the padding
* gap, but I think the first four members was used as a template for
* casting. \todo check this and fix it if posssible */
PatIntId id;
uint16_t depth;
uint16_t offset;
- /* for chopped fast pattern, the offset */
- uint16_t fp_chop_offset;
int32_t distance;
int32_t within;
/* Boyer Moore context (for spm search) */
* always used, etc. */
typedef struct ContentHash_ {
DetectContentData *ptr;
- uint16_t cnt;
- uint8_t use; /* use no matter what */
+ uint32_t cnt;
+ int use; /* use no matter what */
} ContentHash;
typedef struct UricontentHash_ {
DetectContentData *ptr;
- uint16_t cnt;
- uint8_t use; /* use no matter what */
+ uint32_t cnt;
+ int use; /* use no matter what */
} UricontentHash;
uint32_t ContentHashFunc(HashTable *ht, void *data, uint16_t datalen)
uint8_t *pattern; /**< ptr to the pattern */
uint16_t pattern_len; /**< pattern len */
PatIntId id; /**< pattern id */
- uint16_t dup_count; /**< duplicate count */
- uint8_t sm_list; /**< SigMatch list */
+ uint32_t dup_count; /**< duplicate count */
+ int sm_list; /**< SigMatch list */
} MpmPatternIdTableElmt;
/** \brief Hash compare func for MpmPatternId api
/** hash table for looking up patterns for
* id sharing and id tracking. */
MpmPatternIdStore *mpm_pattern_id_store;
- uint16_t max_fp_id;
+ uint32_t max_fp_id;
MpmCtxFactoryContainer *mpm_ctx_factory_container;
#define SigIntId uint32_t
/** same for pattern id's */
-#define PatIntId uint16_t
+#define PatIntId uint32_t
/** FreeBSD does not define __WORDSIZE, but it uses __LONG_BIT */
#ifndef __WORDSIZE
}
if (ctx->pid_pat_list != NULL) {
- int i;
+ uint32_t i;
for (i = 0; i < (ctx->max_pat_id + 1); i++) {
if (ctx->pid_pat_list[i].cs != NULL)
SCFree(ctx->pid_pat_list[i].cs);
/* the size of each state */
uint16_t single_state_size;
- uint16_t max_pat_id;
+ uint32_t max_pat_id;
} SCACBSCtx;
typedef struct SCACBSThreadCtx_ {
}
if (ctx->pid_pat_list != NULL) {
- int i;
+ uint32_t i;
for (i = 0; i < (ctx->max_pat_id + 1); i++) {
if (ctx->pid_pat_list[i].cs != NULL)
SCFree(ctx->pid_pat_list[i].cs);
/* the size of each state */
uint16_t single_state_size;
- uint16_t max_pat_id;
+ uint32_t max_pat_id;
} SCACGfbsCtx;
typedef struct SCACGfbsThreadCtx_ {
}
if (ctx->pid_pat_list != NULL) {
- int i;
+ uint32_t i;
for (i = 0; i < (ctx->max_pat_id + 1); i++) {
if (ctx->pid_pat_list[i].cs != NULL)
SCFree(ctx->pid_pat_list[i].cs);
SCACPatternList *pid_pat_list;
/* the size of each state */
- uint16_t single_state_size;
- uint16_t max_pat_id;
+ uint32_t single_state_size;
+ uint32_t max_pat_id;
uint32_t allocated_state_count;