Define FlowThreadId and add it to the flow

16 bits id should be enough for threads for a while.
pull/1267/head
Victor Julien 11 years ago
parent a260cba32b
commit 51a782fd8c

@ -55,6 +55,7 @@
(f)->data_al_so_far[0] = 0; \
(f)->data_al_so_far[1] = 0; \
(f)->de_ctx_id = 0; \
(f)->thread_id = 0; \
(f)->alparser = NULL; \
(f)->alstate = NULL; \
(f)->de_state = NULL; \
@ -97,6 +98,7 @@
(f)->data_al_so_far[0] = 0; \
(f)->data_al_so_far[1] = 0; \
(f)->de_ctx_id = 0; \
(f)->thread_id = 0; \
if ((f)->de_state != NULL) { \
SCMutexLock(&(f)->de_state_m); \
DetectEngineStateReset((f)->de_state, (STREAM_TOSERVER | STREAM_TOCLIENT)); \

@ -272,6 +272,9 @@ typedef unsigned int FlowRefCount;
typedef unsigned short FlowRefCount;
#endif
/** Local Thread ID */
typedef uint16_t FlowThreadId;
/**
* \brief Flow data structure.
*
@ -357,6 +360,9 @@ typedef struct Flow_
* de_state and stored sgh ptrs are reset. */
uint32_t de_ctx_id;
/** Thread ID for the stream/detect portion of this flow */
FlowThreadId thread_id;
/** application level storage ptrs.
*
*/

Loading…
Cancel
Save