]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
misc: move prototypes to correct header
authorJason Ish <jason.ish@oisf.net>
Fri, 24 May 2024 22:45:10 +0000 (16:45 -0600)
committerVictor Julien <victor@inliniac.net>
Mon, 27 May 2024 10:12:25 +0000 (12:12 +0200)
Move prototypes for functions that exist in util-port-interval-tree.c
from detect-engine-port.h to util-port-interval-tree.h.

Fix header guard names while there.

src/detect-engine-port.h
src/util-port-interval-tree.h

index a9a1f997badcc256282af992cd9204a8c70f2e90..5f197bbe0346767f7bbd62c131905fabcd220748 100644 (file)
@@ -21,8 +21,8 @@
  * \author Victor Julien <victor@inliniac.net>
  */
 
-#ifndef SURICATA_DETECT_PORT_H
-#define SURICATA_DETECT_PORT_H
+#ifndef SURICATA_DETECT_ENGINE_PORT_H
+#define SURICATA_DETECT_ENGINE_PORT_H
 
 #include "interval-tree.h"
 #include "detect.h"
@@ -41,17 +41,6 @@ IRB_HEAD(PI, SCPortIntervalNode); /* head of the interval tree */
 IRB_PROTOTYPE(PI, SCPortIntervalNode, irb,
         SCPortIntervalCompare); /* prototype definition of the interval tree */
 
-typedef struct SCPortIntervalTree_ {
-    struct PI tree;
-    SCPortIntervalNode *head;
-} SCPortIntervalTree;
-
-SCPortIntervalTree *SCPortIntervalTreeInit(void);
-void SCPortIntervalTreeFree(DetectEngineCtx *, SCPortIntervalTree *);
-int SCPortIntervalInsert(DetectEngineCtx *, SCPortIntervalTree *, const DetectPort *);
-void SCPortIntervalFindOverlappingRanges(
-        DetectEngineCtx *, const uint16_t, const uint16_t, const struct PI *, DetectPort **);
-
 /* prototypes */
 int DetectPortParse(const DetectEngineCtx *, DetectPort **head, const char *str);
 
@@ -80,4 +69,4 @@ int DetectPortHashInit(DetectEngineCtx *de_ctx);
 void DetectPortTests(void);
 #endif
 
-#endif /* SURICATA_DETECT_PORT_H */
+#endif /* SURICATA_DETECT_ENGINE_PORT_H */
index d84c3527bb8aa213bb563883b2bddc7cf55edd8d..03baa75e69e76d23274421592280adbaee87435d 100644 (file)
  * \author Shivani Bhardwaj <shivani@oisf.net>
  */
 
-#ifndef SURICATA_UTIL_INTERVAL_TREE_H
-#define SURICATA_UTIL_INTERVAL_TREE_H
+#ifndef SURICATA_UTIL_PORT_INTERVAL_TREE_H
+#define SURICATA_UTIL_PORT_INTERVAL_TREE_H
 
 #include "detect-engine-port.h"
 
-#endif /* SURICATA_UTIL_INTERVAL_TREE_H */
+typedef struct SCPortIntervalTree_ {
+    struct PI tree;
+    SCPortIntervalNode *head;
+} SCPortIntervalTree;
+
+SCPortIntervalTree *SCPortIntervalTreeInit(void);
+void SCPortIntervalTreeFree(DetectEngineCtx *, SCPortIntervalTree *);
+int SCPortIntervalInsert(DetectEngineCtx *, SCPortIntervalTree *, const DetectPort *);
+void SCPortIntervalFindOverlappingRanges(
+        DetectEngineCtx *, const uint16_t, const uint16_t, const struct PI *, DetectPort **);
+
+#endif /* SURICATA_UTIL_PORT_INTERVAL_TREE_H */