Move FlowGetFlowState to flow-private.h so that all parts of the flow
engine can use it.
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
*
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__ */