Go to the documentation of this file.
38 #define PARSE_REGEX "^\\s*([A-z0-9\\.]+|\"[A-z0-9_\\.]+\")\\s*$"
43 uint8_t,
void *,
void *,
const Signature *,
48 static void DetectKrb5MsgTypeRegisterTests (
void);
51 static int g_krb5_msg_type_list_id = 0;
81 SCLogDebug(
"g_krb5_msg_type_list_id %d", g_krb5_msg_type_list_id);
105 rs_krb5_tx_get_msgtype(txv, &msg_type);
128 pcre2_match_data *match = NULL;
131 SCLogError(
"parse error, ret %" PRId32
"", ret);
135 pcre2len =
sizeof(arg1);
136 res = pcre2_substring_copy_bynumber(match, 1, (PCRE2_UCHAR8 *)arg1, &pcre2len);
138 SCLogError(
"pcre2_substring_copy_bynumber failed");
146 (
const char *)arg1) < 0) {
149 pcre2_match_data_free(match);
154 pcre2_match_data_free(match);
179 krb5d = DetectKrb5MsgTypeParse(krb5str);
184 g_krb5_msg_type_list_id) == NULL) {
192 DetectKrb5MsgTypeFree(
de_ctx, krb5d);
213 static int DetectKrb5MsgTypeParseTest01 (
void)
218 DetectKrb5MsgTypeFree(NULL, krb5d);
222 static int DetectKrb5MsgTypeSignatureTest01 (
void)
237 static void DetectKrb5MsgTypeRegisterTests(
void)
239 UtRegisterTest(
"DetectKrb5MsgTypeParseTest01", DetectKrb5MsgTypeParseTest01);
241 DetectKrb5MsgTypeSignatureTest01);
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
#define FAIL_IF_NULL(expr)
Fail a test if expression evaluates to NULL.
SigTableElmt * sigmatch_table
void(* Free)(DetectEngineCtx *, void *)
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
main detection engine ctx
void DetectEngineCtxFree(DetectEngineCtx *)
Free a DetectEngineCtx::
int(* AppLayerTxMatch)(DetectEngineThreadCtx *, Flow *, uint8_t flags, void *alstate, void *txv, const Signature *, const SigMatchCtx *)
int DetectParsePcreExec(DetectParseRegex *parse_regex, pcre2_match_data **match, const char *str, int start_offset, int options)
Signature * DetectEngineAppendSig(DetectEngineCtx *, const char *)
Parse and append a Signature into the Detection Engine Context signature list.
#define SIG_FLAG_TOCLIENT
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
int StringParseUint8(uint8_t *res, int base, size_t len, const char *str)
#define SIG_FLAG_TOSERVER
#define PASS
Pass the test.
void DetectSetupParseRegexes(const char *parse_str, DetectParseRegex *detect_parse)
#define PARSE_REGEX
Regex for parsing our keyword options.
int(* Match)(DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *)
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.
int DetectBufferTypeRegister(const char *name)
uint8_t DetectEngineInspectGenericList(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const struct DetectEngineAppInspectionEngine_ *engine, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
Do the content inspection & validation for a signature.
void DetectKrb5MsgTypeRegister(void)
Registration function for krb5_msg_type: keyword.
#define SCLogError(...)
Macro used to log ERROR messages.
DetectEngineCtx * DetectEngineCtxInit(void)
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr Callback, InspectionBufferGetDataPtr GetData)
Registers an app inspection engine.
SigMatch * SigMatchAppendSMToList(DetectEngineCtx *de_ctx, Signature *s, uint16_t type, SigMatchCtx *ctx, const int list)
Append a SigMatch to the list type.
void(* RegisterTests)(void)