Go to the documentation of this file.
41 static void GidRegisterTests(
void);
74 unsigned long gid = 0;
76 gid = strtoul(rawstr, &endptr, 10);
77 if (endptr == NULL || *endptr !=
'\0') {
82 if (gid >= UINT_MAX) {
83 SCLogError(
"gid value to high, max %u", UINT_MAX);
87 s->
gid = (uint32_t)gid;
103 static int GidTestParse01 (
void)
121 static int GidTestParse02 (
void)
136 static int GidTestParse03 (
void)
142 de_ctx,
"alert tcp any any -> any any (content:\"ABC\"; gid:\";)"));
151 static void GidRegisterTests(
void)
#define FAIL_IF_NULL(expr)
Fail a test if expression evaluates to NULL.
void(* Free)(DetectEngineCtx *, void *)
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
void DetectGidRegister(void)
Registration function for gid: keyword.
main detection engine ctx
void DetectEngineCtxFree(DetectEngineCtx *)
Free a DetectEngineCtx::
Signature * DetectEngineAppendSig(DetectEngineCtx *, const char *)
Parse and append a Signature into the Detection Engine Context signature list.
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
#define FAIL_IF_NOT_NULL(expr)
Fail a test if expression evaluates to non-NULL.
#define PASS
Pass the test.
int(* Match)(DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *)
#define FAIL_IF(expr)
Fail a test if expression evaluates to true.
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
#define SCLogError(...)
Macro used to log ERROR messages.
DetectEngineCtx * DetectEngineCtxInit(void)
void(* RegisterTests)(void)