}
#endif
-
-/* \todo there is another copy of this same macro inside flow-util.h. The
- * reason we have this duplicate is because we couldn't solve endless
- * header files cross-reference. */
-#define FlowDeReference(src_f_ptr) do { \
- if (*(src_f_ptr) != NULL) { \
- FlowDecrUsecnt(*(src_f_ptr)); \
- *(src_f_ptr) = NULL; \
- } \
- } while (0)
-
/**
* \brief Recycle a packet structure for reuse.
* \todo the mutex destroy & init is necessary because of the memset, reconsider
#define FLOW_CHECK_MEMCAP(size) \
((((uint64_t)SC_ATOMIC_GET(flow_memuse) + (uint64_t)(size)) <= flow_config.memcap))
-#define FlowReference(dst_f_ptr, f) do { \
- if ((f) != NULL) { \
- FlowIncrUsecnt((f)); \
- *(dst_f_ptr) = f; \
- } \
- } while (0)
-
-/* \todo there is another copy of this same macro inside decode.h. The reason
- * we have this duplicate is because we couldn't solve endless header
- * files cross-reference. */
-#define FlowDeReference(src_f_ptr) do { \
- if (*(src_f_ptr) != NULL) { \
- FlowDecrUsecnt(*(src_f_ptr)); \
- *(src_f_ptr) = NULL; \
- } \
- } while (0)
-
Flow *FlowAlloc(void);
Flow *FlowAllocDirect(void);
void FlowFree(Flow *);
f->flags |= FLOW_NO_APPLAYER_INSPECTION;
}
+#define FlowReference(dst_f_ptr, f) do { \
+ if ((f) != NULL) { \
+ FlowIncrUsecnt((f)); \
+ *(dst_f_ptr) = f; \
+ } \
+ } while (0)
+
+/* \todo there is another copy of this same macro inside decode.h. The reason
+ * we have this duplicate is because we couldn't solve endless header
+ * files cross-reference. */
+#define FlowDeReference(src_f_ptr) do { \
+ if (*(src_f_ptr) != NULL) { \
+ FlowDecrUsecnt(*(src_f_ptr)); \
+ *(src_f_ptr) = NULL; \
+ } \
+ } while (0)
+
int FlowClearMemory(Flow *,uint8_t );
#endif /* __FLOW_H__ */