diff --git a/src/detect-engine.c b/src/detect-engine.c index b1f06cc0b5..be0a15e854 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -102,13 +102,7 @@ static uint32_t DetectEngineTentantGetIdFromPcap(const void *ctx, const Packet * static DetectEngineAppInspectionEngine *g_app_inspect_engines = NULL; void DetectAppLayerInspectEngineRegister(AppProto alproto, - uint32_t dir, int32_t sm_list, - int (*Callback)(ThreadVars *tv, - DetectEngineCtx *de_ctx, - DetectEngineThreadCtx *det_ctx, - const Signature *sig, Flow *f, - uint8_t flags, void *alstate, - void *tx, uint64_t tx_id)) + uint32_t dir, int32_t sm_list, InspectEngineFuncPtr Callback) { if ((alproto >= ALPROTO_FAILED) || (!(dir == SIG_FLAG_TOSERVER || dir == SIG_FLAG_TOCLIENT)) || diff --git a/src/detect-engine.h b/src/detect-engine.h index 498dd22d8a..935a3d79e3 100644 --- a/src/detect-engine.h +++ b/src/detect-engine.h @@ -84,14 +84,7 @@ int DetectEngineInspectGenericList(ThreadVars *, const DetectEngineCtx *, * \param Callback The engine callback. */ void DetectAppLayerInspectEngineRegister(AppProto alproto, - uint32_t dir, - int32_t sm_list, - int (*Callback)(ThreadVars *tv, - DetectEngineCtx *de_ctx, - DetectEngineThreadCtx *det_ctx, - const Signature *sig, Flow *f, - uint8_t flags, void *alstate, - void *tx, uint64_t tx_id)); + uint32_t dir, int32_t sm_list, InspectEngineFuncPtr Callback); int DetectEngineAppInspectionEngine2Signature(Signature *s); diff --git a/src/detect.h b/src/detect.h index 66951f6a52..72280b6ead 100644 --- a/src/detect.h +++ b/src/detect.h @@ -375,6 +375,11 @@ typedef struct SigMatchData_ { struct DetectEngineThreadCtx_;// DetectEngineThreadCtx; +typedef int (*InspectEngineFuncPtr)(ThreadVars *tv, + struct DetectEngineCtx_ *de_ctx, struct DetectEngineThreadCtx_ *det_ctx, + const struct Signature_ *sig, Flow *f, uint8_t flags, void *alstate, + void *tx, uint64_t tx_id); + typedef struct DetectEngineAppInspectionEngine_ { AppProto alproto; uint8_t dir; @@ -387,10 +392,7 @@ typedef struct DetectEngineAppInspectionEngine_ { * 3 Special value used by filestore sigs to indicate disabling * filestore for the tx. */ - int (*Callback)(ThreadVars *tv, - struct DetectEngineCtx_ *de_ctx, struct DetectEngineThreadCtx_ *det_ctx, - const struct Signature_ *sig, Flow *f, uint8_t flags, void *alstate, - void *tx, uint64_t tx_id); + InspectEngineFuncPtr Callback; struct DetectEngineAppInspectionEngine_ *next; } DetectEngineAppInspectionEngine;