]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: rename InspectEngineFuncPtr2 to InspectEngineFuncPtr
authorJason Ish <jason.ish@oisf.net>
Sun, 12 Nov 2023 13:15:11 +0000 (14:15 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 13 Dec 2023 18:17:17 +0000 (19:17 +0100)
Version 1 of the API no longer exists.

src/detect-engine.c
src/detect-engine.h
src/detect-parse.h
src/detect.h

index 22166127f44f86bbc83f2046fbe9db1996bcd9e4..3e1ce93cf671d2caedcf4e706995dce5a62401f7 100644 (file)
@@ -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) {
index a5bfc329a94e232477a2144b3a1c7d3dbdb7140c..c0b694eb017f5cc6f04063c75fc6da0b02138582 100644 (file)
@@ -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,
index 2eecd286f6316ec5b69a8c608f28a79e9cf33c63..990180141058b1f85b141c1ff63537f035f8a5b1 100644 (file)
@@ -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;
index 36e4e2ba3b25351bc8634025e295b4d70bceaade..8278290a2992001d4548a681a4764176b8f9e0fe 100644 (file)
@@ -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;