detect: rename InspectEngineFuncPtr2 to InspectEngineFuncPtr

Version 1 of the API no longer exists.
pull/10047/head
Jason Ish 1 year ago committed by Victor Julien
parent b11bb1c412
commit 66ff23f9bf

@ -214,7 +214,7 @@ void DetectFrameInspectEngineRegister(const char *name, int dir,
*
* \note errors are fatal */
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir,
int progress, InspectEngineFuncPtr2 Callback2, InspectionBufferGetDataPtr GetData)
int progress, InspectEngineFuncPtr Callback, InspectionBufferGetDataPtr GetData)
{
BUG_ON(progress >= 48);
@ -225,15 +225,12 @@ void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uin
}
SCLogDebug("name %s id %d", name, sm_list);
if ((alproto >= ALPROTO_FAILED) ||
(!(dir == SIG_FLAG_TOSERVER || dir == SIG_FLAG_TOCLIENT)) ||
(sm_list < DETECT_SM_LIST_MATCH) || (sm_list >= SHRT_MAX) ||
(progress < 0 || progress >= SHRT_MAX) ||
(Callback2 == NULL))
{
if ((alproto >= ALPROTO_FAILED) || (!(dir == SIG_FLAG_TOSERVER || dir == SIG_FLAG_TOCLIENT)) ||
(sm_list < DETECT_SM_LIST_MATCH) || (sm_list >= SHRT_MAX) ||
(progress < 0 || progress >= SHRT_MAX) || (Callback == NULL)) {
SCLogError("Invalid arguments");
BUG_ON(1);
} else if (Callback2 == DetectEngineInspectBufferGeneric && GetData == NULL) {
} else if (Callback == DetectEngineInspectBufferGeneric && GetData == NULL) {
SCLogError("Invalid arguments: must register "
"GetData with DetectEngineInspectBufferGeneric");
BUG_ON(1);
@ -256,7 +253,7 @@ void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uin
new_engine->sm_list = (uint16_t)sm_list;
new_engine->sm_list_base = (uint16_t)sm_list;
new_engine->progress = (int16_t)progress;
new_engine->v2.Callback = Callback2;
new_engine->v2.Callback = Callback;
new_engine->v2.GetData = GetData;
if (g_app_inspect_engines == NULL) {

@ -162,7 +162,7 @@ int DetectEngineInspectPktBufferGeneric(
* \param Callback The engine callback.
*/
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir,
int progress, InspectEngineFuncPtr2 Callback2, InspectionBufferGetDataPtr GetData);
int progress, InspectEngineFuncPtr Callback2, InspectionBufferGetDataPtr GetData);
void DetectPktInspectEngineRegister(const char *name,
InspectionBufferGetPktDataPtr GetPktData,

@ -33,7 +33,7 @@ typedef struct DetectFileHandlerTableElmt_ {
const char *name;
int priority;
PrefilterRegisterFunc PrefilterFn;
InspectEngineFuncPtr2 Callback;
InspectEngineFuncPtr Callback;
InspectionBufferGetDataPtr GetData;
int al_protocols[MAX_DETECT_ALPROTO_CNT];
int tx_progress;

@ -413,7 +413,7 @@ typedef InspectionBuffer *(*InspectionBufferGetDataPtr)(
void *txv, const int list_id);
struct DetectEngineAppInspectionEngine_;
typedef uint8_t (*InspectEngineFuncPtr2)(struct DetectEngineCtx_ *de_ctx,
typedef uint8_t (*InspectEngineFuncPtr)(struct DetectEngineCtx_ *de_ctx,
struct DetectEngineThreadCtx_ *det_ctx,
const struct DetectEngineAppInspectionEngine_ *engine, const struct Signature_ *s, Flow *f,
uint8_t flags, void *alstate, void *txv, uint64_t tx_id);
@ -430,7 +430,7 @@ typedef struct DetectEngineAppInspectionEngine_ {
struct {
InspectionBufferGetDataPtr GetData;
InspectEngineFuncPtr2 Callback;
InspectEngineFuncPtr Callback;
/** pointer to the transforms in the 'DetectBuffer entry for this list */
const DetectEngineTransforms *transforms;
} v2;

Loading…
Cancel
Save