#define MAX_ALPROTO_NAME 50
-static int DetectAppLayerEventPktMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectAppLayerEventPktMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx);
static int DetectAppLayerEventSetupP1(DetectEngineCtx *, Signature *, const char *);
static void DetectAppLayerEventRegisterTests(void);
}
-static int DetectAppLayerEventPktMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectAppLayerEventPktMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectAppLayerEventData *aled = (const DetectAppLayerEventData *)ctx;
static void DetectAppLayerProtocolRegisterTests(void);
-static int DetectAppLayerProtocolPacketMatch(ThreadVars *tv,
+static int DetectAppLayerProtocolPacketMatch(
DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
/* delimiters for functions/arguments */
const char *ASN_DELIM = " \t,\n";
-static int DetectAsn1Match(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectAsn1Match(DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectAsn1Setup (DetectEngineCtx *, Signature *, const char *);
static void DetectAsn1RegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectAsn1Match(ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectAsn1Match(DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
uint8_t ret = 0;
#include "util-unittest-helper.h"
#include "util-device.h"
-static int DetectBypassMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectBypassMatch(DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectBypassSetup(DetectEngineCtx *, Signature *, const char *);
static void DetectBypassRegisterTests(void);
return 0;
}
-static int DetectBypassMatch(ThreadVars *tv, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectBypassMatch(DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
PacketBypassCallback(p);
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectBytejumpMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectBytejumpMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx);
static DetectBytejumpData *DetectBytejumpParse(const char *optstr, char **offset);
static int DetectBytejumpSetup(DetectEngineCtx *de_ctx, Signature *s, const char *optstr);
SCReturnInt(1);
}
-static int DetectBytejumpMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectBytejumpMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectBytejumpData *data = (const DetectBytejumpData *)ctx;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectBytetestMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectBytetestMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx);
static int DetectBytetestSetup(DetectEngineCtx *de_ctx, Signature *s, const char *optstr);
static void DetectBytetestFree(void *ptr);
}
-static int DetectBytetestMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectBytetestMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
return DetectBytetestDoMatch(det_ctx, s, ctx, p->payload, p->payload_len,
#include "util-profiling.h"
/* prototypes for the "ipv4-csum" rule keyword */
-static int DetectIPV4CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectIPV4CsumMatch(DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
static int DetectIPV4CsumSetup(DetectEngineCtx *, Signature *, const char *);
static void DetectIPV4CsumFree(void *);
/* prototypes for the "tcpv4-csum" rule keyword */
-static int DetectTCPV4CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTCPV4CsumMatch(DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
static int DetectTCPV4CsumSetup(DetectEngineCtx *, Signature *, const char *);
static void DetectTCPV4CsumFree(void *);
/* prototypes for the "tcpv6-csum" rule keyword */
-static int DetectTCPV6CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTCPV6CsumMatch(DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
static int DetectTCPV6CsumSetup(DetectEngineCtx *, Signature *, const char *);
static void DetectTCPV6CsumFree(void *);
/* prototypes for the "udpv4-csum" rule keyword */
-static int DetectUDPV4CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectUDPV4CsumMatch(DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
static int DetectUDPV4CsumSetup(DetectEngineCtx *, Signature *, const char *);
static void DetectUDPV4CsumFree(void *);
/* prototypes for the "udpv6-csum" rule keyword */
-static int DetectUDPV6CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectUDPV6CsumMatch(DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
static int DetectUDPV6CsumSetup(DetectEngineCtx *, Signature *, const char *);
static void DetectUDPV6CsumFree(void *);
/* prototypes for the "icmpv4-csum" rule keyword */
-static int DetectICMPV4CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectICMPV4CsumMatch(DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
static int DetectICMPV4CsumSetup(DetectEngineCtx *, Signature *, const char *);
static void DetectICMPV4CsumFree(void *);
/* prototypes for the "icmpv6-csum" rule keyword */
-static int DetectICMPV6CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectICMPV6CsumMatch(DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
static int DetectICMPV6CsumSetup(DetectEngineCtx *, Signature *, const char *);
static void DetectICMPV6CsumFree(void *);
*
* \retval 1 if the Packet contents match the keyword option; 0 otherwise
*/
-static int DetectIPV4CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectIPV4CsumMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectCsumData *cd = (const DetectCsumData *)ctx;
*
* \retval 1 if the Packet contents match the keyword option; 0 otherwise
*/
-static int DetectTCPV4CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTCPV4CsumMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectCsumData *cd = (const DetectCsumData *)ctx;
*
* \retval 1 if the Packet contents match the keyword option; 0 otherwise
*/
-static int DetectTCPV6CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTCPV6CsumMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectCsumData *cd = (const DetectCsumData *)ctx;
*
* \retval 1 if the Packet contents match the keyword option; 0 otherwise
*/
-static int DetectUDPV4CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectUDPV4CsumMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectCsumData *cd = (const DetectCsumData *)ctx;
*
* \retval 1 if the Packet contents match the keyword option; 0 otherwise
*/
-static int DetectUDPV6CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectUDPV6CsumMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectCsumData *cd = (const DetectCsumData *)ctx;
*
* \retval 1 if the Packet contents match the keyword option; 0 otherwise
*/
-static int DetectICMPV4CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectICMPV4CsumMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectCsumData *cd = (const DetectCsumData *)ctx;
*
* \retval 1 if the Packet contents match the keyword option; 0 otherwise
*/
-static int DetectICMPV6CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectICMPV6CsumMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectCsumData *cd = (const DetectCsumData *)ctx;
static pcre *parse_regex = NULL;
static pcre_extra *parse_regex_study = NULL;
-static int DetectDceIfaceMatchRust(ThreadVars *t,
- DetectEngineThreadCtx *det_ctx,
+static int DetectDceIfaceMatchRust(DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv,
const Signature *s, const SigMatchCtx *m);
static int DetectDceIfaceSetup(DetectEngineCtx *, Signature *, const char *);
* \retval 1 On Match.
* \retval 0 On no match.
*/
-static int DetectDceIfaceMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectDceIfaceMatch(DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv,
const Signature *s, const SigMatchCtx *m)
{
SCReturnInt(ret);
}
-static int DetectDceIfaceMatchRust(ThreadVars *t,
- DetectEngineThreadCtx *det_ctx,
+static int DetectDceIfaceMatchRust(DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv,
const Signature *s, const SigMatchCtx *m)
{
SCEnter();
if (f->alproto == ALPROTO_DCERPC) {
- return DetectDceIfaceMatch(t, det_ctx, f, flags,
+ return DetectDceIfaceMatch(det_ctx, f, flags,
state, txv, s, m);
}
static pcre *parse_regex = NULL;
static pcre_extra *parse_regex_study = NULL;
-static int DetectDceOpnumMatchRust(ThreadVars *t,
- DetectEngineThreadCtx *det_ctx,
- Flow *f, uint8_t flags, void *state, void *txv,
- const Signature *s, const SigMatchCtx *m);
+static int DetectDceOpnumMatchRust(DetectEngineThreadCtx *det_ctx,
+ Flow *f, uint8_t flags, void *state, void *txv,
+ const Signature *s, const SigMatchCtx *m);
static int DetectDceOpnumSetup(DetectEngineCtx *, Signature *, const char *);
static void DetectDceOpnumFree(void *);
static void DetectDceOpnumRegisterTests(void);
* \retval 1 On Match.
* \retval 0 On no match.
*/
-static int DetectDceOpnumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectDceOpnumMatch(DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv,
const Signature *s, const SigMatchCtx *m)
{
SCReturnInt(0);
}
-static int DetectDceOpnumMatchRust(ThreadVars *t,
- DetectEngineThreadCtx *det_ctx,
- Flow *f, uint8_t flags, void *state, void *txv,
- const Signature *s, const SigMatchCtx *m)
+static int DetectDceOpnumMatchRust(DetectEngineThreadCtx *det_ctx,
+ Flow *f, uint8_t flags, void *state, void *txv,
+ const Signature *s, const SigMatchCtx *m)
{
SCEnter();
if (f->alproto == ALPROTO_DCERPC) {
- return DetectDceOpnumMatch(t, det_ctx, f, flags,
+ return DetectDceOpnumMatch(det_ctx, f, flags,
state, txv, s, m);
}
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectDetectionFilterMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectDetectionFilterMatch(DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
static int DetectDetectionFilterSetup(DetectEngineCtx *, Signature *, const char *);
static void DetectDetectionFilterRegisterTests(void);
DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study);
}
-static int DetectDetectionFilterMatch (ThreadVars *thv, DetectEngineThreadCtx *det_ctx,
+static int DetectDetectionFilterMatch (DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
return 1;
SCReturn;
}
-static int DetectDNP3FuncMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectDNP3FuncMatch(DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv, const Signature *s,
const SigMatchCtx *ctx)
{
return match;
}
-static int DetectDNP3ObjMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectDNP3ObjMatch(DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv, const Signature *s,
const SigMatchCtx *ctx)
{
return 0;
}
-static int DetectDNP3IndMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectDNP3IndMatch(DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv, const Signature *s,
const SigMatchCtx *ctx)
{
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectDsizeMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectDsizeMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectDsizeSetup (DetectEngineCtx *, Signature *s, const char *str);
static void DsizeRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectDsizeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectDsizeMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
SCEnter();
while (1) {
/* tags are set only for alerts */
KEYWORD_PROFILING_START;
- sigmatch_table[smd->type].Match(NULL, det_ctx, p, (Signature *)s, smd->ctx);
+ sigmatch_table[smd->type].Match(det_ctx, p, (Signature *)s, smd->ctx);
KEYWORD_PROFILING_END(det_ctx, smd->type, 1);
if (smd->is_last)
break;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectEngineEventMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectEngineEventMatch (DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
static int DetectEngineEventSetup (DetectEngineCtx *, Signature *, const char *);
static int DetectDecodeEventSetup (DetectEngineCtx *, Signature *, const char *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectEngineEventMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectEngineEventMatch (DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
SCEnter();
sm->type = DETECT_DECODE_EVENT;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectEngineEventMatch(&tv,NULL,p,NULL,sm->ctx);
+ ret = DetectEngineEventMatch(NULL,p,NULL,sm->ctx);
if(ret) {
SCFree(p);
if (sigmatch_table[smd->type].FileMatch != NULL) {
KEYWORD_PROFILING_START;
match = sigmatch_table[smd->type].
- FileMatch(tv, det_ctx, f, flags, file, s, smd->ctx);
+ FileMatch(det_ctx, f, flags, file, s, smd->ctx);
KEYWORD_PROFILING_END(det_ctx, smd->type, (match > 0));
if (match == 0) {
r = DETECT_ENGINE_INSPECT_SIG_CANT_MATCH_FILES;
if (fd->scope > FILESTORE_SCOPE_DEFAULT) {
KEYWORD_PROFILING_START;
match = sigmatch_table[smd->type].
- FileMatch(tv, det_ctx, f, flags, /* no file */NULL, s, smd->ctx);
+ FileMatch(det_ctx, f, flags, /* no file */NULL, s, smd->ctx);
KEYWORD_PROFILING_END(det_ctx, smd->type, (match > 0));
if (match == 1) {
while (1) {
DEBUG_VALIDATE_BUG_ON(!(sigmatch_table[smd->type].flags & SIGMATCH_IPONLY_COMPAT));
KEYWORD_PROFILING_START;
- if (sigmatch_table[smd->type].Match(tv, det_ctx, p, s, smd->ctx) > 0) {
+ if (sigmatch_table[smd->type].Match(det_ctx, p, s, smd->ctx) > 0) {
KEYWORD_PROFILING_END(det_ctx, smd->type, 1);
if (smd->is_last)
break;
if (smd != NULL) {
while (1) {
KEYWORD_PROFILING_START;
- (void)sigmatch_table[smd->type].Match(tv, det_ctx, p, s, smd->ctx);
+ (void)sigmatch_table[smd->type].Match(det_ctx, p, s, smd->ctx);
KEYWORD_PROFILING_END(det_ctx, smd->type, 1);
if (smd->is_last)
break;
SCLogDebug("running match functions, sm %p", smd);
while (1) {
KEYWORD_PROFILING_START;
- if (sigmatch_table[smd->type].Match(tv, det_ctx, p, s, smd->ctx) <= 0) {
+ if (sigmatch_table[smd->type].Match(det_ctx, p, s, smd->ctx) <= 0) {
KEYWORD_PROFILING_END(det_ctx, smd->type, 0);
SCLogDebug("no match");
return false;
if (smd != NULL) {
while (1) {
int match = 0;
-#ifdef PROFILING
KEYWORD_PROFILING_START;
-#endif
match = sigmatch_table[smd->type].
- AppLayerTxMatch(tv, det_ctx, f, flags, alstate, txv, s, smd->ctx);
-#ifdef PROFILING
+ AppLayerTxMatch(det_ctx, f, flags, alstate, txv, s, smd->ctx);
KEYWORD_PROFILING_END(det_ctx, smd->type, (match == 1));
-#endif
if (match == 0)
return DETECT_ENGINE_INSPECT_SIG_NO_MATCH;
if (match == 2) {
/**
* \brief Match the specified file hash
*
- * \param t thread local vars
* \param det_ctx pattern matcher thread local data
* \param f *LOCKED* flow
* \param flags direction flags
* \retval 0 no match
* \retval 1 match
*/
-int DetectFileHashMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+int DetectFileHashMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m)
{
SCEnter();
int ReadHashString(uint8_t *, const char *, const char *, int, uint16_t);
int LoadHashTable(ROHashTable *, const char *, const char *, int, uint32_t);
-int DetectFileHashMatch(ThreadVars *, DetectEngineThreadCtx *, Flow *, uint8_t,
+int DetectFileHashMatch(DetectEngineThreadCtx *, Flow *, uint8_t,
File *, const Signature *, const SigMatchCtx *);
int DetectFileHashSetup(DetectEngineCtx *, Signature *, const char *, uint32_t, int);
void DetectFileHashFree(void *);
#include "stream-tcp.h"
#include "detect-fileext.h"
-static int DetectFileextMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectFileextMatch (DetectEngineThreadCtx *, Flow *,
uint8_t, File *, const Signature *, const SigMatchCtx *);
static int DetectFileextSetup (DetectEngineCtx *, Signature *, const char *);
static void DetectFileextRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectFileextMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFileextMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m)
{
SCEnter();
#else /* HAVE_MAGIC */
-static int DetectFilemagicMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectFilemagicMatch (DetectEngineThreadCtx *, Flow *,
uint8_t, File *, const Signature *, const SigMatchCtx *);
static int DetectFilemagicSetup (DetectEngineCtx *, Signature *, const char *);
static void DetectFilemagicRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectFilemagicMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFilemagicMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m)
{
SCEnter();
#include "detect-filename.h"
#include "app-layer-parser.h"
-static int DetectFilenameMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectFilenameMatch (DetectEngineThreadCtx *, Flow *,
uint8_t, File *, const Signature *, const SigMatchCtx *);
static int DetectFilenameSetup (DetectEngineCtx *, Signature *, const char *);
static int DetectFilenameSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectFilenameMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFilenameMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m)
{
SCEnter();
static pcre_extra *parse_regex_study;
/*prototypes*/
-static int DetectFilesizeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Flow *f,
+static int DetectFilesizeMatch (DetectEngineThreadCtx *det_ctx, Flow *f,
uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m);
static int DetectFilesizeSetup (DetectEngineCtx *, Signature *, const char *);
static void DetectFilesizeFree (void *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectFilesizeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Flow *f,
+static int DetectFilesizeMatch (DetectEngineThreadCtx *det_ctx, Flow *f,
uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m)
{
SCEnter();
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectFilestoreMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectFilestoreMatch (DetectEngineThreadCtx *,
Flow *, uint8_t, File *, const Signature *, const SigMatchCtx *);
-static int DetectFilestorePostMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFilestorePostMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx);
static int DetectFilestoreSetup (DetectEngineCtx *, Signature *, const char *);
static void DetectFilestoreFree(void *);
* When we are sure all parts of the signature matched, we run this function
* to finalize the filestore.
*/
-static int DetectFilestorePostMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFilestorePostMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
uint8_t flags = 0;
* \todo when we start supporting more protocols, the logic in this function
* needs to be put behind a api.
*/
-static int DetectFilestoreMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Flow *f,
+static int DetectFilestoreMatch (DetectEngineThreadCtx *det_ctx, Flow *f,
uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m)
{
uint32_t file_id = 0;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-int DetectFlowMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+int DetectFlowMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectFlowSetup (DetectEngineCtx *, Signature *, const char *);
void DetectFlowRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-int DetectFlowMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+int DetectFlowMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
SCEnter();
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-int DetectFlowbitMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+int DetectFlowbitMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectFlowbitSetup (DetectEngineCtx *, Signature *, const char *);
void DetectFlowbitFree (void *);
* -1: error
*/
-int DetectFlowbitMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+int DetectFlowbitMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
const DetectFlowbitsData *fd = (const DetectFlowbitsData *)ctx;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-int DetectFlowintMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+int DetectFlowintMatch(DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectFlowintSetup(DetectEngineCtx *, Signature *, const char *);
void DetectFlowintFree(void *);
* \retval 1 match, when a var is initialized well, add/substracted, or a true
* condition
*/
-int DetectFlowintMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+int DetectFlowintMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectFlowintData *sfd = (const DetectFlowintData *)ctx;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-int DetectFlowvarMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+int DetectFlowvarMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectFlowvarSetup (DetectEngineCtx *, Signature *, const char *);
-static int DetectFlowvarPostMatch(ThreadVars *tv, DetectEngineThreadCtx *det_ctx,
+static int DetectFlowvarPostMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx);
static void DetectFlowvarDataFree(void *ptr);
* -1: error
*/
-int DetectFlowvarMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+int DetectFlowvarMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
int ret = 0;
* \param sm sigmatch containing the idx to store
* \retval 1 or -1 in case of error
*/
-static int DetectFlowvarPostMatch(ThreadVars *tv,
+static int DetectFlowvarPostMatch(
DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectFragBitsMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectFragBitsMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectFragBitsSetup (DetectEngineCtx *, Signature *, const char *);
static void DetectFragBitsFree(void *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectFragBitsMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFragBitsMatch (DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
if (!ctx || !PKT_IS_IPV4(p) || PKT_IS_PSEUDOPKT(p))
sm->type = DETECT_FRAGBITS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFragBitsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFragBitsMatch(NULL, p, NULL, sm->ctx);
FAIL_IF(ret == 0);
FlowShutdown();
sm->type = DETECT_FRAGBITS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFragBitsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFragBitsMatch(NULL, p, NULL, sm->ctx);
FAIL_IF(ret);
SCFree(de);
SCFree(sm);
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectFragOffsetMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectFragOffsetMatch(DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
static int DetectFragOffsetSetup(DetectEngineCtx *, Signature *, const char *);
void DetectFragOffsetRegisterTests(void);
* \retval 1 match
*
*/
-static int DetectFragOffsetMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFragOffsetMatch (DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
uint16_t frag = 0;
#include "stream-tcp.h"
#include "util-byte.h"
-static int DetectFtpbounceALMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectFtpbounceALMatch(DetectEngineThreadCtx *,
Flow *, uint8_t, void *, void *,
const Signature *, const SigMatchCtx *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectFtpbounceALMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFtpbounceALMatch(DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags,
void *state, void *txv,
const Signature *s, const SigMatchCtx *m)
static pcre_extra *parse_regex_study;
/* Prototypes of functions registered in DetectFtpdataRegister below */
-static int DetectFtpdataMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectFtpdataMatch(DetectEngineThreadCtx *,
Flow *, uint8_t, void *, void *,
const Signature *, const SigMatchCtx *);
static int DetectFtpdataSetup (DetectEngineCtx *, Signature *, const char *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectFtpdataMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFtpdataMatch(DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags,
void *state, void *txv,
const Signature *s, const SigMatchCtx *m)
#include <GeoIP.h>
-static int DetectGeoipMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectGeoipMatch(DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectGeoipSetup(DetectEngineCtx *, Signature *, const char *);
static void DetectGeoipRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectGeoipMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectGeoipMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectGeoipData *geoipdata = (const DetectGeoipData *)ctx;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectHostbitMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectHostbitMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectHostbitSetup (DetectEngineCtx *, Signature *, const char *);
void DetectHostbitFree (void *);
* -1: error
*/
-static int DetectHostbitMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectHostbitMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
const DetectXbitsData *xd = (const DetectXbitsData *)ctx;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectIcmpIdMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectIcmpIdMatch(DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectIcmpIdSetup(DetectEngineCtx *, Signature *, const char *);
void DetectIcmpIdRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectIcmpIdMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectIcmpIdMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
uint16_t pid;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectIcmpSeqMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectIcmpSeqMatch(DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectIcmpSeqSetup(DetectEngineCtx *, Signature *, const char *);
void DetectIcmpSeqRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectIcmpSeqMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectIcmpSeqMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
uint16_t seqn;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectICodeMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectICodeMatch(DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectICodeSetup(DetectEngineCtx *, Signature *, const char *);
void DetectICodeRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectICodeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectICodeMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
if (PKT_IS_PSEUDOPKT(p))
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectIdMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectIdMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectIdSetup (DetectEngineCtx *, Signature *, const char *);
void DetectIdRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectIdMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectIdMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
const DetectIdData *id_d = (const DetectIdData *)ctx;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectIpOptsMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectIpOptsMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectIpOptsSetup (DetectEngineCtx *, Signature *, const char *);
void IpOptsRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectIpOptsMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectIpOptsMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
const DetectIpOptsData *de = (const DetectIpOptsData *)ctx;
sm->type = DETECT_IPOPTS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectIpOptsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectIpOptsMatch(NULL, p, NULL, sm->ctx);
if(ret) {
SCFree(p);
sm->type = DETECT_IPOPTS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectIpOptsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectIpOptsMatch(NULL, p, NULL, sm->ctx);
if(ret) {
SCFree(p);
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectIPRepMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectIPRepMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectIPRepSetup (DetectEngineCtx *, Signature *, const char *);
void DetectIPRepFree (void *);
* 1: match
* -1: error
*/
-static int DetectIPRepMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectIPRepMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
const DetectIPRepData *rd = (const DetectIPRepData *)ctx;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectITypeMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectITypeMatch(DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectITypeSetup(DetectEngineCtx *, Signature *, const char *);
void DetectITypeRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectITypeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectITypeMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
if (PKT_IS_PSEUDOPKT(p))
static pcre_extra *parse_regex_study;
/* Prototypes of functions registered in DetectKrb5ErrCodeRegister below */
-static int DetectKrb5ErrCodeMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectKrb5ErrCodeMatch (DetectEngineThreadCtx *, Flow *,
uint8_t, void *, void *, const Signature *,
const SigMatchCtx *);
static int DetectKrb5ErrCodeSetup (DetectEngineCtx *, Signature *, const char *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectKrb5ErrCodeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectKrb5ErrCodeMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state,
void *txv, const Signature *s,
const SigMatchCtx *ctx)
static pcre_extra *parse_regex_study;
/* Prototypes of functions registered in DetectKrb5MsgTypeRegister below */
-static int DetectKrb5MsgTypeMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectKrb5MsgTypeMatch (DetectEngineThreadCtx *, Flow *,
uint8_t, void *, void *, const Signature *,
const SigMatchCtx *);
static int DetectKrb5MsgTypeSetup (DetectEngineCtx *, Signature *, const char *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectKrb5MsgTypeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectKrb5MsgTypeMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state,
void *txv, const Signature *s,
const SigMatchCtx *ctx)
#include "util-lua.h"
-static int DetectLuaMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectLuaMatch (DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
-static int DetectLuaAppTxMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectLuaAppTxMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags,
void *state, void *txv, const Signature *s,
const SigMatchCtx *ctx);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectLuaMatch (ThreadVars *tv, DetectEngineThreadCtx *det_ctx,
+static int DetectLuaMatch (DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
SCEnter();
else if (p->flowflags & FLOW_PKT_TOCLIENT)
flags = STREAM_TOCLIENT;
- LuaStateSetThreadVars(tlua->luastate, tv);
+ LuaStateSetThreadVars(tlua->luastate, det_ctx->tv);
LuaExtensionsMatchSetup(tlua->luastate, lua, det_ctx,
p->flow, p, flags);
SCReturnInt(ret);
}
-static int DetectLuaAppMatchCommon (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectLuaAppMatchCommon (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state,
const Signature *s, const SigMatchCtx *ctx)
{
* \retval 0 no match
* \retval 1 match
*/
-static int DetectLuaAppTxMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectLuaAppTxMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags,
void *state, void *txv, const Signature *s,
const SigMatchCtx *ctx)
{
- return DetectLuaAppMatchCommon(t, det_ctx, f, flags, state, s, ctx);
+ return DetectLuaAppMatchCommon(det_ctx, f, flags, state, s, ctx);
}
#ifdef UNITTESTS
static pcre_extra *parse_regex_study;
static int DetectMarkSetup (DetectEngineCtx *, Signature *, const char *);
-static int DetectMarkPacket(ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectMarkPacket(DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx);
void DetectMarkDataFree(void *ptr);
}
-static int DetectMarkPacket(ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectMarkPacket(DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
#ifdef NFQ
Flow *f, uint8_t flags, void *alstate,
void *txv, uint64_t tx_id);
-static int DetectNfsProcedureMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectNfsProcedureMatch (DetectEngineThreadCtx *, Flow *,
uint8_t, void *, void *, const Signature *,
const SigMatchCtx *);
* \retval 0 no match.
* \retval 1 match.
*/
-static int DetectNfsProcedureMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectNfsProcedureMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state,
void *txv, const Signature *s,
const SigMatchCtx *ctx)
Flow *f, uint8_t flags, void *alstate,
void *txv, uint64_t tx_id);
-static int DetectNfsVersionMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectNfsVersionMatch (DetectEngineThreadCtx *, Flow *,
uint8_t, void *, void *, const Signature *,
const SigMatchCtx *);
* \retval 0 no match.
* \retval 1 match.
*/
-static int DetectNfsVersionMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectNfsVersionMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state,
void *txv, const Signature *s,
const SigMatchCtx *ctx)
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectPktvarMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectPktvarMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectPktvarSetup (DetectEngineCtx *, Signature *, const char *);
* -1: error
*/
-static int DetectPktvarMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectPktvarMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
int ret = 0;
static int DetectReplaceSetup(DetectEngineCtx *, Signature *, const char *);
void DetectReplaceRegisterTests(void);
-static int DetectReplacePostMatch(ThreadVars *tv,
- DetectEngineThreadCtx *det_ctx,
+static int DetectReplacePostMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx);
void DetectReplaceRegister (void)
sigmatch_table[DETECT_REPLACE].flags = (SIGMATCH_QUOTES_MANDATORY|SIGMATCH_HANDLE_NEGATION);
}
-static int DetectReplacePostMatch(ThreadVars *tv,
- DetectEngineThreadCtx *det_ctx,
+static int DetectReplacePostMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
if (det_ctx->replist) {
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectRpcMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectRpcMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectRpcSetup (DetectEngineCtx *, Signature *, const char *);
void DetectRpcRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectRpcMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectRpcMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
/* PrintRawDataFp(stdout, p->payload, p->payload_len); */
#include "util-unittest.h"
#include "util-unittest-helper.h"
-static int DetectSameipMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectSameipMatch(DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectSameipSetup(DetectEngineCtx *, Signature *, const char *);
static void DetectSameipRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectSameipMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSameipMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
return CMP_ADDR(&p->src, &p->dst) ? 1 : 0;
Flow *f, uint8_t flags, void *alstate,
void *txv, uint64_t tx_id);
-static int DetectSNMPPduTypeMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectSNMPPduTypeMatch (DetectEngineThreadCtx *, Flow *,
uint8_t, void *, void *, const Signature *,
const SigMatchCtx *);
* \retval 0 no match.
* \retval 1 match.
*/
-static int DetectSNMPPduTypeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSNMPPduTypeMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state,
void *txv, const Signature *s,
const SigMatchCtx *ctx)
Flow *f, uint8_t flags, void *alstate,
void *txv, uint64_t tx_id);
-static int DetectSNMPVersionMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectSNMPVersionMatch (DetectEngineThreadCtx *, Flow *,
uint8_t, void *, void *, const Signature *,
const SigMatchCtx *);
* \retval 0 no match.
* \retval 1 match.
*/
-static int DetectSNMPVersionMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSNMPVersionMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state,
void *txv, const Signature *s,
const SigMatchCtx *ctx)
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectSshVersionMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectSshVersionMatch (DetectEngineThreadCtx *,
Flow *, uint8_t, void *, void *,
const Signature *, const SigMatchCtx *);
static int DetectSshVersionSetup (DetectEngineCtx *, Signature *, const char *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectSshVersionMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSshVersionMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv,
const Signature *s, const SigMatchCtx *m)
{
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectSshSoftwareVersionMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectSshSoftwareVersionMatch (DetectEngineThreadCtx *,
Flow *, uint8_t, void *, void *,
const Signature *, const SigMatchCtx *);
static int DetectSshSoftwareVersionSetup (DetectEngineCtx *, Signature *, const char *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectSshSoftwareVersionMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSshSoftwareVersionMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv,
const Signature *s, const SigMatchCtx *m)
{
static pcre *parse_regex2;
static pcre_extra *parse_regex2_study;
-static int DetectSslStateMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectSslStateMatch(DetectEngineThreadCtx *,
Flow *, uint8_t, void *, void *,
const Signature *, const SigMatchCtx *);
static int DetectSslStateSetup(DetectEngineCtx *, Signature *, const char *);
* \retval 1 Match.
* \retval 0 No match.
*/
-static int DetectSslStateMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSslStateMatch(DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *alstate, void *txv,
const Signature *s, const SigMatchCtx *m)
{
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectSslVersionMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectSslVersionMatch(DetectEngineThreadCtx *,
Flow *, uint8_t, void *, void *,
const Signature *, const SigMatchCtx *);
static int DetectSslVersionSetup(DetectEngineCtx *, Signature *, const char *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectSslVersionMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSslVersionMatch(DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv,
const Signature *s, const SigMatchCtx *m)
{
static pcre_extra *parse_regex_study;
/*prototypes*/
-static int DetectStreamSizeMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectStreamSizeMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectStreamSizeSetup (DetectEngineCtx *, Signature *, const char *);
void DetectStreamSizeFree(void *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectStreamSizeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectStreamSizeMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
p->tcph = &tcph;
sm.ctx = (SigMatchCtx*)sd;
- result = DetectStreamSizeMatch(&tv, &dtx, p, &s, sm.ctx);
+ result = DetectStreamSizeMatch(&dtx, p, &s, sm.ctx);
if (result == 0) {
printf("result 0 != 1: ");
}
p->ip4h = &ip4h;
sm.ctx = (SigMatchCtx*)sd;
- if (!DetectStreamSizeMatch(&tv, &dtx, p, &s, sm.ctx))
+ if (!DetectStreamSizeMatch(&dtx, p, &s, sm.ctx))
result = 1;
SCFree(p);
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectTagMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectTagMatch(DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectTagSetup(DetectEngineCtx *, Signature *, const char *);
void DetectTagRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectTagMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectTagMatch(DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
const DetectTagData *td = (const DetectTagData *)ctx;
/* prototypes */
static int DetectAckSetup(DetectEngineCtx *, Signature *, const char *);
-static int DetectAckMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectAckMatch(DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
static void DetectAckRegisterTests(void);
static void DetectAckFree(void *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectAckMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectAckMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectAckData *data = (const DetectAckData *)ctx;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectFlagsMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectFlagsMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectFlagsSetup (DetectEngineCtx *, Signature *, const char *);
static void DetectFlagsFree(void *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectFlagsMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectFlagsMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
SCEnter();
sm->type = DETECT_FLAGS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
if(ret) {
if (de) SCFree(de);
sm->type = DETECT_FLAGS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
if(ret) {
if (de) SCFree(de);
sm->type = DETECT_FLAGS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
if(ret) {
if (de) SCFree(de);
sm->type = DETECT_FLAGS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
if(ret) {
if (de) SCFree(de);
sm->type = DETECT_FLAGS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
if(ret) {
if (de) SCFree(de);
sm->type = DETECT_FLAGS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
if(ret) {
if (de) SCFree(de);
sm->type = DETECT_FLAGS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
if(ret) {
if (de) SCFree(de);
sm->type = DETECT_FLAGS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
if(ret) {
if (de) SCFree(de);
sm->type = DETECT_FLAGS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
if(ret) {
if (de) SCFree(de);
sm->type = DETECT_FLAGS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
if(ret) {
if (de) SCFree(de);
sm->type = DETECT_FLAGS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
if (ret) {
if (de)
sm->type = DETECT_FLAGS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
if (ret) {
if (de)
sm->type = DETECT_FLAGS;
sm->ctx = (SigMatchCtx *)de;
- ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+ ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
if (ret == 0) {
if (de)
#include "util-debug.h"
static int DetectSeqSetup(DetectEngineCtx *, Signature *, const char *);
-static int DetectSeqMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectSeqMatch(DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
static void DetectSeqRegisterTests(void);
static void DetectSeqFree(void *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectSeqMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSeqMatch(DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectSeqData *data = (const DetectSeqData *)ctx;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectWindowMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectWindowMatch(DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectWindowSetup(DetectEngineCtx *, Signature *, const char *);
void DetectWindowRegisterTests(void);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectWindowMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectWindowMatch(DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
const DetectWindowData *wd = (const DetectWindowData *)ctx;
static pcre_extra *parse_regex_study;
/* prototypes */
-static int DetectTcpmssMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectTcpmssMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectTcpmssSetup (DetectEngineCtx *, Signature *, const char *);
void DetectTcpmssFree (void *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectTcpmssMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectTcpmssMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
static pcre_extra *parse_regex_study;
/* Prototypes of functions registered in DetectTemplateRegister below */
-static int DetectTemplateMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTemplateMatch (DetectEngineThreadCtx *,
Packet *, const Signature *, const SigMatchCtx *);
static int DetectTemplateSetup (DetectEngineCtx *, Signature *, const char *);
static void DetectTemplateFree (void *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectTemplateMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectTemplateMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
int ret = 0;
static pcre_extra *parse_regex_study;
/* prototypes */
-static int DetectTemplate2Match (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectTemplate2Match (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectTemplate2Setup (DetectEngineCtx *, Signature *, const char *);
void DetectTemplate2Free (void *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectTemplate2Match (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectTemplate2Match (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectThresholdMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectThresholdMatch(DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectThresholdSetup(DetectEngineCtx *, Signature *, const char *);
static void DetectThresholdFree(void *);
DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study);
}
-static int DetectThresholdMatch(ThreadVars *thv, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectThresholdMatch(DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
return 1;
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectTlsValidityMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectTlsValidityMatch (DetectEngineThreadCtx *, Flow *,
uint8_t, void *, void *, const Signature *,
const SigMatchCtx *);
* \retval 0 no match.
* \retval 1 match.
*/
-static int DetectTlsValidityMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsValidityMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state,
void *txv, const Signature *s,
const SigMatchCtx *ctx)
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectTlsVersionMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTlsVersionMatch (DetectEngineThreadCtx *,
Flow *, uint8_t, void *, void *,
const Signature *, const SigMatchCtx *);
static int DetectTlsVersionSetup (DetectEngineCtx *, Signature *, const char *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectTlsVersionMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsVersionMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv,
const Signature *s, const SigMatchCtx *m)
{
static pcre *fingerprint_parse_regex;
static pcre_extra *fingerprint_parse_regex_study;
-static int DetectTlsSubjectMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTlsSubjectMatch (DetectEngineThreadCtx *,
Flow *, uint8_t, void *, void *,
const Signature *, const SigMatchCtx *);
static int DetectTlsSubjectSetup (DetectEngineCtx *, Signature *, const char *);
static void DetectTlsSubjectRegisterTests(void);
static void DetectTlsSubjectFree(void *);
-static int DetectTlsIssuerDNMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTlsIssuerDNMatch (DetectEngineThreadCtx *,
Flow *, uint8_t, void *, void *,
const Signature *, const SigMatchCtx *);
static int DetectTlsIssuerDNSetup (DetectEngineCtx *, Signature *, const char *);
static void DetectTlsIssuerDNRegisterTests(void);
static void DetectTlsIssuerDNFree(void *);
-static int DetectTlsFingerprintMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTlsFingerprintMatch (DetectEngineThreadCtx *,
Flow *, uint8_t, void *, void *,
const Signature *, const SigMatchCtx *);
static int DetectTlsFingerprintSetup (DetectEngineCtx *, Signature *, const char *);
static void DetectTlsFingerprintFree(void *);
static int DetectTlsStoreSetup (DetectEngineCtx *, Signature *, const char *);
-static int DetectTlsStorePostMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsStorePostMatch (DetectEngineThreadCtx *det_ctx,
Packet *, const Signature *s, const SigMatchCtx *unused);
static int g_tls_cert_list_id = 0;
* \retval 0 no match
* \retval 1 match
*/
-static int DetectTlsSubjectMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsSubjectMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv,
const Signature *s, const SigMatchCtx *m)
{
* \retval 0 no match
* \retval 1 match
*/
-static int DetectTlsIssuerDNMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsIssuerDNMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv,
const Signature *s, const SigMatchCtx *m)
{
* \retval 0 no match
* \retval 1 match
*/
-static int DetectTlsFingerprintMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsFingerprintMatch (DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *state, void *txv,
const Signature *s, const SigMatchCtx *m)
{
}
/** \warning modifies Flow::alstate */
-static int DetectTlsStorePostMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsStorePostMatch (DetectEngineThreadCtx *det_ctx,
Packet *p, const Signature *s, const SigMatchCtx *unused)
{
SCEnter();
static pcre_extra *parse_regex_study;
static int DetectTosSetup(DetectEngineCtx *, Signature *, const char *);
-static int DetectTosMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectTosMatch(DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static void DetectTosRegisterTests(void);
static void DetectTosFree(void *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectTosMatch(ThreadVars *tv, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectTosMatch(DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
const DetectTosData *tosd = (const DetectTosData *)ctx;
static pcre_extra *parse_regex_study;
/* prototypes */
-static int DetectTtlMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectTtlMatch (DetectEngineThreadCtx *, Packet *,
const Signature *, const SigMatchCtx *);
static int DetectTtlSetup (DetectEngineCtx *, Signature *, const char *);
void DetectTtlFree (void *);
* \retval 0 no match
* \retval 1 match
*/
-static int DetectTtlMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectTtlMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
const Signature *s, const SigMatchCtx *ctx)
{
if (PKT_IS_PSEUDOPKT(p))
static pcre *parse_regex;
static pcre_extra *parse_regex_study;
-static int DetectXbitMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *);
+static int DetectXbitMatch (DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *);
static int DetectXbitSetup (DetectEngineCtx *, Signature *, const char *);
void DetectXbitFree (void *);
void XBitsRegisterTests(void);
* -1: error
*/
-static int DetectXbitMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p, const Signature *s, const SigMatchCtx *ctx)
+static int DetectXbitMatch (DetectEngineThreadCtx *det_ctx, Packet *p, const Signature *s, const SigMatchCtx *ctx)
{
const DetectXbitsData *fd = (const DetectXbitsData *)ctx;
if (fd == NULL)
while (1) {
KEYWORD_PROFILING_START;
- (void)sigmatch_table[smd->type].Match(tv, det_ctx, p, s, smd->ctx);
+ (void)sigmatch_table[smd->type].Match(det_ctx, p, s, smd->ctx);
KEYWORD_PROFILING_END(det_ctx, smd->type, 1);
if (smd->is_last)
break;
*/
typedef struct SigTableElmt_ {
/** Packet match function pointer */
- int (*Match)(ThreadVars *, DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *);
+ int (*Match)(DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *);
/** AppLayer TX match function pointer */
- int (*AppLayerTxMatch)(ThreadVars *, DetectEngineThreadCtx *, Flow *,
+ int (*AppLayerTxMatch)(DetectEngineThreadCtx *, Flow *,
uint8_t flags, void *alstate, void *txv,
const Signature *, const SigMatchCtx *);
/** File match function pointer */
- int (*FileMatch)(ThreadVars *, /**< thread local vars */
- DetectEngineThreadCtx *,
+ int (*FileMatch)(DetectEngineThreadCtx *,
Flow *, /**< *LOCKED* flow */
uint8_t flags, File *, const Signature *, const SigMatchCtx *);