Add tag keyword stub

remotes/origin/master-1.0.x
Victor Julien 15 years ago
parent b2adf31595
commit d5c732f1f9

@ -71,6 +71,7 @@ detect-priority.c detect-priority.h \
detect-rev.c detect-rev.h \
detect-classtype.c detect-classtype.h \
detect-reference.c detect-reference.h \
detect-tag.c detect-tag.h \
detect-threshold.c detect-threshold.h \
detect-metadata.c detect-metadata.h \
detect-msg.c detect-msg.h \

@ -0,0 +1,20 @@
/* TAG part of the detection engine. */
#include "suricata-common.h"
#include "detect.h"
int DetectTagSetup (DetectEngineCtx *, Signature *s, SigMatch *m, char *str);
void DetectTagRegister (void) {
sigmatch_table[DETECT_TAG].name = "tag";
sigmatch_table[DETECT_TAG].Match = NULL;
sigmatch_table[DETECT_TAG].Setup = DetectTagSetup;
sigmatch_table[DETECT_TAG].Free = NULL;
sigmatch_table[DETECT_TAG].RegisterTests = NULL;
}
int DetectTagSetup (DetectEngineCtx *de_ctx, Signature *s, SigMatch *m, char *rawstr)
{
return 0;
}

@ -0,0 +1,8 @@
#ifndef __DETECT_TAG_H__
#define __DETECT_TAG_H__
/* prototypes */
void DetectTagRegister (void);
#endif /* __DETECT_TAG_H__ */

@ -44,6 +44,7 @@
#include "detect-priority.h"
#include "detect-classtype.h"
#include "detect-reference.h"
#include "detect-tag.h"
#include "detect-threshold.h"
#include "detect-metadata.h"
#include "detect-msg.h"
@ -2949,6 +2950,7 @@ void SigTableSetup(void) {
DetectRevRegister();
DetectClasstypeRegister();
DetectReferenceRegister();
DetectTagRegister();
DetectThresholdRegister();
DetectMetadataRegister();
DetectMsgRegister();
@ -3000,7 +3002,7 @@ void SigTableSetup(void) {
for (i = 0; i < DETECT_TBLSIZE; i++) {
if (sigmatch_table[i].RegisterTests == NULL) {
SCLogDebug("detection plugin %s has no unittest "
"registration function.\n", sigmatch_table[i].name);
"registration function.", sigmatch_table[i].name);
}
}
}

@ -435,6 +435,7 @@ enum {
DETECT_THRESHOLD,
DETECT_METADATA,
DETECT_REFERENCE,
DETECT_TAG,
DETECT_MSG,
DETECT_CONTENT, /* 8 */
DETECT_URICONTENT, /* 9 */

Loading…
Cancel
Save