]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: inline commonly used getters
authorVictor Julien <vjulien@oisf.net>
Sun, 22 Jan 2023 07:05:58 +0000 (08:05 +0100)
committerVictor Julien <vjulien@oisf.net>
Sun, 22 Jan 2023 07:39:31 +0000 (08:39 +0100)
src/flow.c
src/flow.h

index a82165971ac69786cf7a35146150048737c8c8c1..1685bfb1cbd8cf84739a46275a5f24bc7fe22ebc 100644 (file)
@@ -1143,16 +1143,6 @@ int FlowSetProtoFreeFunc (uint8_t proto, void (*Free)(void *))
     return 1;
 }
 
-AppProto FlowGetAppProtocol(const Flow *f)
-{
-    return f->alproto;
-}
-
-void *FlowGetAppState(const Flow *f)
-{
-    return f->alstate;
-}
-
 /**
  *  \brief get 'disruption' flags: GAP/DEPTH/PASS
  *  \param f locked flow
index ac9c314dab64d55f406caa9aa53a7400834b97db..3431b2cd6ff8904ff66d395251e8d0541d829302 100644 (file)
@@ -605,6 +605,16 @@ uint16_t FlowGetDestinationPort(Flow *flow);
 
 /** ----- Inline functions ----- */
 
+static inline AppProto FlowGetAppProtocol(const Flow *f)
+{
+    return f->alproto;
+}
+
+static inline void *FlowGetAppState(const Flow *f)
+{
+    return f->alstate;
+}
+
 /** \brief Set the No Packet Inspection Flag without locking the flow.
  *
  * \param f Flow to set the flag in