diff --git a/src/flow-manager.c b/src/flow-manager.c index bea4b6b351..fb6d2a1077 100644 --- a/src/flow-manager.c +++ b/src/flow-manager.c @@ -127,24 +127,6 @@ void FlowKillFlowManagerThread(void) return; } -/** \internal - * \brief Get the flow's state - * - * \param f flow - * - * \retval state either FLOW_STATE_NEW, FLOW_STATE_ESTABLISHED or FLOW_STATE_CLOSED - */ -static inline int FlowGetFlowState(Flow *f) { - if (flow_proto[f->protomap].GetProtoState != NULL) { - return flow_proto[f->protomap].GetProtoState(f->protoctx); - } else { - if ((f->flags & FLOW_TO_SRC_SEEN) && (f->flags & FLOW_TO_DST_SEEN)) - return FLOW_STATE_ESTABLISHED; - else - return FLOW_STATE_NEW; - } -} - /** \internal * \brief get timeout for flow * diff --git a/src/flow-private.h b/src/flow-private.h index bd25960b2b..32163c75d2 100644 --- a/src/flow-private.h +++ b/src/flow-private.h @@ -96,5 +96,23 @@ uint32_t flowbits_removed; SCMutex flowbits_mutex; #endif /* FLOWBITS_STATS */ +/** \internal + * \brief Get the flow's state + * + * \param f flow + * + * \retval state either FLOW_STATE_NEW, FLOW_STATE_ESTABLISHED or FLOW_STATE_CLOSED + */ +static inline int FlowGetFlowState(Flow *f) { + if (flow_proto[f->protomap].GetProtoState != NULL) { + return flow_proto[f->protomap].GetProtoState(f->protoctx); + } else { + if ((f->flags & FLOW_TO_SRC_SEEN) && (f->flags & FLOW_TO_DST_SEEN)) + return FLOW_STATE_ESTABLISHED; + else + return FLOW_STATE_NEW; + } +} + #endif /* __FLOW_PRIVATE_H__ */