Go to the documentation of this file.
35 #define PARSE_REGEX "\\S[A-z]"
38 static int rfb_secresult_id = 0;
46 static void RfbSecresultRegisterTests(
void);
126 ret = rs_rfb_tx_get_secresult(txv, &resultcode);
131 if (
de->result < 3) {
133 if (resultcode ==
de->result) {
139 if (resultcode > 2) {
163 pcre2_match_data *match = NULL;
166 SCLogError(
"pcre_exec parse error, ret %" PRId32
", string %s", ret, rawstr);
171 if((strcasecmp(
results[i].result,rawstr)) == 0) {
178 SCLogError(
"unknown secresult value %s", rawstr);
188 pcre2_match_data_free(match);
193 pcre2_match_data_free(match);
217 de = DetectRfbSecresultParse(rawstr);
254 static int RfbSecresultTestParse01 (
void)
268 static int RfbSecresultTestParse02 (
void)
280 void RfbSecresultRegisterTests(
void)
282 UtRegisterTest(
"RfbSecresultTestParse01", RfbSecresultTestParse01);
283 UtRegisterTest(
"RfbSecresultTestParse02", RfbSecresultTestParse02);
@ DETECT_AL_RFB_SECRESULT
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
#define FAIL_IF_NULL(expr)
Fail a test if expression evaluates to NULL.
void(* Free)(DetectEngineCtx *, void *)
void DetectRfbSecresultRegister(void)
Registration function for rfb.secresult: keyword.
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
struct DetectRfbSecresult_ results[]
main detection engine ctx
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)
#define SIG_FLAG_TOCLIENT
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
int DetectBufferTypeGetByName(const char *name)
#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)
void DetectAppLayerInspectEngineRegister2(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr2 Callback2, InspectionBufferGetDataPtr GetData)
register inspect engine at start up time
void DetectRfbSecresultFree(DetectEngineCtx *, void *)
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
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.
#define SCLogError(...)
Macro used to log ERROR messages.
SigMatch * SigMatchAppendSMToList(DetectEngineCtx *de_ctx, Signature *s, uint16_t type, SigMatchCtx *ctx, const int list)
Append a SigMatch to the list type.
struct DetectRfbSecresultData_ DetectRfbSecresultData
void(* RegisterTests)(void)