Go to the documentation of this file.
41 #define PARSE_REGEX "\\S[A-z]"
49 static void IpOptsRegisterTests(
void);
132 int ret = 0, found = 0;
141 if((strcasecmp(
ipopts[i].ipopt_name,rawstr)) == 0) {
179 de = DetectIpOptsParse(rawstr);
221 static int IpOptsTestParse01 (
void)
235 static int IpOptsTestParse02 (
void)
249 static int IpOptsTestParse03 (
void)
257 memset(&ip4h, 0,
sizeof(
IPV4Hdr));
283 static int IpOptsTestParse04 (
void)
291 memset(&ip4h, 0,
sizeof(
IPV4Hdr));
305 FAIL_IF(DetectIpOptsMatch(NULL, p, NULL, sm->
ctx));
317 void IpOptsRegisterTests(
void)
#define FAIL_IF_NULL(expr)
Fail a test if expression evaluates to NULL.
int DetectParsePcreExec(DetectParseRegex *parse_regex, const char *str, int start_offset, int options)
void(* Free)(DetectEngineCtx *, void *)
#define PKT_IS_PSEUDOPKT(p)
return 1 if the packet is a pseudo packet
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
main detection engine ctx
void DetectIpOptsRegister(void)
Registration function for ipopts: keyword.
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
#define FAIL_IF_NOT(expr)
Fail a test if expression evaluates to false.
struct DetectIpOpts_ ipopts[]
#define FAIL_IF_NOT_NULL(expr)
Fail a test if expression evaluates to non-NULL.
#define PASS
Pass the test.
void DetectSetupParseRegexes(const char *parse_str, DetectParseRegex *detect_parse)
Per thread variable structure.
int(* Match)(DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *)
SigMatch * SigMatchAlloc(void)
void DetectIpOptsFree(DetectEngineCtx *, void *)
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
#define FAIL_IF(expr)
Fail a test if expression evaluates to true.
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
#define SCLogError(err_code,...)
Macro used to log ERROR messages.
Packet * PacketGetFromAlloc(void)
Get a malloced packet.
a single match condition for a signature
void SigMatchAppendSMToList(Signature *s, SigMatch *new, int list)
Append a SigMatch to the list type.
void(* RegisterTests)(void)
#define SIG_FLAG_REQUIRE_PACKET