From: Victor Julien Date: Tue, 25 Nov 2014 10:07:03 +0000 (+0100) Subject: Define FlowThreadId and add it to the flow X-Git-Tag: suricata-2.1beta3~88 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51a782fd8c2dfdfda1047b9fe1083ef5c7395a09;p=thirdparty%2Fsuricata.git Define FlowThreadId and add it to the flow 16 bits id should be enough for threads for a while. --- diff --git a/src/flow-util.h b/src/flow-util.h index 8271c33207..8ed6fd8804 100644 --- a/src/flow-util.h +++ b/src/flow-util.h @@ -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)); \ diff --git a/src/flow.h b/src/flow.h index 802f61fd2a..12cda835aa 100644 --- a/src/flow.h +++ b/src/flow.h @@ -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. * */