From: Victor Julien Date: Sun, 22 Jan 2023 07:05:58 +0000 (+0100) Subject: flow: inline commonly used getters X-Git-Tag: suricata-7.0.0-rc1~140 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b62a513c4734ddaaf1ac195918ca352ac8c075d7;p=thirdparty%2Fsuricata.git flow: inline commonly used getters --- diff --git a/src/flow.c b/src/flow.c index a82165971a..1685bfb1cb 100644 --- a/src/flow.c +++ b/src/flow.c @@ -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 diff --git a/src/flow.h b/src/flow.h index ac9c314dab..3431b2cd6f 100644 --- a/src/flow.h +++ b/src/flow.h @@ -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