-/* Copyright (C) 2007-2012 Open Information Security Foundation
+/* Copyright (C) 2007-2013 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
return;
}
-/**
- * \brief increase the use cnt of a flow
- *
- * \param f flow to decrease use cnt for
- */
-void FlowIncrUsecnt(Flow *f)
-{
- if (f == NULL)
- return;
-
- (void) SC_ATOMIC_ADD(f->use_cnt, 1);
- return;
-}
-/**
- * \brief decrease the use cnt of a flow
- *
- * \param f flow to decrease use cnt for
- */
-void FlowDecrUsecnt(Flow *f)
-{
- if (f == NULL)
- return;
-
- (void) SC_ATOMIC_SUB(f->use_cnt, 1);
- return;
-}
-
/**
* \brief determine the direction of the packet compared to the flow
* \retval 0 to_server
-/* Copyright (C) 2007-2012 Open Information Security Foundation
+/* Copyright (C) 2007-2013 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
void FlowSetIPOnlyFlag(Flow *, char);
void FlowSetIPOnlyFlagNoLock(Flow *, char);
-void FlowIncrUsecnt(Flow *);
-void FlowDecrUsecnt(Flow *);
-
void FlowRegisterTests (void);
int FlowSetProtoTimeout(uint8_t ,uint32_t ,uint32_t ,uint32_t);
int FlowSetProtoEmergencyTimeout(uint8_t ,uint32_t ,uint32_t ,uint32_t);
f->flags |= FLOW_NO_APPLAYER_INSPECTION;
}
+/**
+ * \brief increase the use count of a flow
+ *
+ * \param f flow to decrease use count for
+ */
+static inline void FlowIncrUsecnt(Flow *f)
+{
+ if (f == NULL)
+ return;
+
+ (void) SC_ATOMIC_ADD(f->use_cnt, 1);
+}
+
+/**
+ * \brief decrease the use count of a flow
+ *
+ * \param f flow to decrease use count for
+ */
+static inline void FlowDecrUsecnt(Flow *f)
+{
+ if (f == NULL)
+ return;
+
+ (void) SC_ATOMIC_SUB(f->use_cnt, 1);
+}
+
#define FlowReference(dst_f_ptr, f) do { \
if ((f) != NULL) { \
FlowIncrUsecnt((f)); \