diff --git a/src/flow-manager.c b/src/flow-manager.c index 864668580f..1ae68b954a 100644 --- a/src/flow-manager.c +++ b/src/flow-manager.c @@ -121,8 +121,11 @@ void FlowDisableFlowManagerThread(void) /* flow manager thread(s) is/are a part of mgmt threads */ tv = tv_root[TVT_MGMT]; - while (tv != NULL) { - if (strncasecmp(tv->name, "FM", 2) == 0) { + while (tv != NULL) + { + if (strncasecmp(tv->name, thread_name_flow_mgr, + strlen(thread_name_flow_mgr)) == 0) + { TmThreadsSetFlag(tv, THV_KILL); cnt++; @@ -731,11 +734,12 @@ void FlowManagerThreadSpawn() StatsRegisterGlobalCounter("flow.memuse", FlowGetMemuse); uint32_t u; - for (u = 0; u < flowmgr_number; u++) { + for (u = 0; u < flowmgr_number; u++) + { ThreadVars *tv_flowmgr = NULL; char name[32] = ""; - snprintf(name, sizeof(name), "FM%02u", u+1); + snprintf(name, sizeof(name), "%s#%02u", thread_name_flow_mgr, u+1); tv_flowmgr = TmThreadCreateMgmtThreadByName(SCStrdup(name), "FlowManager", 0); @@ -894,16 +898,12 @@ void FlowRecyclerThreadSpawn() uint32_t u; - for (u = 0; u < flowrec_number; u++) { + for (u = 0; u < flowrec_number; u++) + { ThreadVars *tv_flowmgr = NULL; -<<<<<<< HEAD - char name[32]; - snprintf(name, sizeof(name), "FlowRecyclerThread%02u", u+1); -======= char name[32] = ""; - snprintf(name, sizeof(name), "FR%02u", u+1); ->>>>>>> Changed naming of flowmanager/recycler. + snprintf(name, sizeof(name), "%s#%02u", thread_name_flow_rec, u+1); tv_flowmgr = TmThreadCreateMgmtThreadByName(SCStrdup(name), "FlowRecycler", 0); @@ -956,8 +956,11 @@ void FlowDisableFlowRecyclerThread(void) /* flow recycler thread(s) is/are a part of mgmt threads */ tv = tv_root[TVT_MGMT]; - while (tv != NULL) { - if (strncasecmp(tv->name, "FR", 2) == 0) { + while (tv != NULL) + { + if (strncasecmp(tv->name, thread_name_flow_rec, + strlen(thread_name_flow_rec)) == 0) + { TmThreadsSetFlag(tv, THV_KILL); cnt++; diff --git a/src/runmode-af-packet.c b/src/runmode-af-packet.c index e561559a93..ee44042a2c 100644 --- a/src/runmode-af-packet.c +++ b/src/runmode-af-packet.c @@ -514,7 +514,7 @@ int RunModeIdsAFPAutoFp(void) ret = RunModeSetLiveCaptureAutoFp(ParseAFPConfig, AFPConfigGeThreadsCount, "ReceiveAFP", - "DecodeAFP", "RxAFP", + "DecodeAFP", thread_name_autofp, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Unable to start runmode"); @@ -556,7 +556,7 @@ int RunModeIdsAFPSingle(void) ret = RunModeSetLiveCaptureSingle(ParseAFPConfig, AFPConfigGeThreadsCount, "ReceiveAFP", - "DecodeAFP", "AFPacket", + "DecodeAFP", thread_name_single, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Unable to start runmode"); @@ -601,7 +601,7 @@ int RunModeIdsAFPWorkers(void) ret = RunModeSetLiveCaptureWorkers(ParseAFPConfig, AFPConfigGeThreadsCount, "ReceiveAFP", - "DecodeAFP", "AFPacket", + "DecodeAFP", thread_name_workers, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Unable to start runmode"); diff --git a/src/runmode-erf-dag.c b/src/runmode-erf-dag.c index 5653b9ecfb..a27544f22f 100644 --- a/src/runmode-erf-dag.c +++ b/src/runmode-erf-dag.c @@ -85,7 +85,7 @@ int RunModeIdsErfDagSingle(void) DagConfigGetThreadCount, "ReceiveErfDag", "DecodeErfDag", - "RxDAG", + thread_name_single, NULL); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "DAG single runmode failed to start"); @@ -111,7 +111,7 @@ int RunModeIdsErfDagAutoFp(void) DagConfigGetThreadCount, "ReceiveErfDag", "DecodeErfDag", - "RxDAG", + thread_name_autofp, NULL); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "DAG autofp runmode failed to start"); @@ -137,7 +137,7 @@ int RunModeIdsErfDagWorkers(void) DagConfigGetThreadCount, "ReceiveErfDag", "DecodeErfDag", - "RxDAG", + thread_name_workers, NULL); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "DAG workers runmode failed to start"); diff --git a/src/runmode-napatech.c b/src/runmode-napatech.c index 7c161ad864..6d883f7402 100644 --- a/src/runmode-napatech.c +++ b/src/runmode-napatech.c @@ -204,12 +204,12 @@ static int NapatechInit(int runmode) case NT_RUNMODE_AUTOFP: ret = RunModeSetLiveCaptureAutoFp(NapatechConfigParser, NapatechGetThreadsCount, "NapatechStream", "NapatechDecode", - "RxNT", NULL); + thread_name_autofp, NULL); break; case NT_RUNMODE_WORKERS: ret = RunModeSetLiveCaptureWorkers(NapatechConfigParser, NapatechGetThreadsCount, "NapatechStream", "NapatechDecode", - "RxNT", NULL); + thread_name_workers, NULL); break; default: ret = -1; diff --git a/src/runmode-netmap.c b/src/runmode-netmap.c index 3289275ed3..75eb0c6fe2 100644 --- a/src/runmode-netmap.c +++ b/src/runmode-netmap.c @@ -372,7 +372,7 @@ int RunModeIdsNetmapAutoFp(void) ParseNetmapConfig, NetmapConfigGeThreadsCount, "ReceiveNetmap", - "DecodeNetmap", "RxNetmap", + "DecodeNetmap", thread_name_autofp, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Unable to start runmode"); @@ -405,7 +405,7 @@ int RunModeIdsNetmapSingle(void) ParseNetmapConfig, NetmapConfigGeThreadsCount, "ReceiveNetmap", - "DecodeNetmap", "NetmapPkt", + "DecodeNetmap", thread_name_single, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Unable to start runmode"); @@ -441,7 +441,7 @@ int RunModeIdsNetmapWorkers(void) ParseNetmapConfig, NetmapConfigGeThreadsCount, "ReceiveNetmap", - "DecodeNetmap", "NetmapPkt", + "DecodeNetmap", thread_name_workers, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Unable to start runmode"); diff --git a/src/runmode-nflog.c b/src/runmode-nflog.c index 9c08f9aef0..f312ad6420 100644 --- a/src/runmode-nflog.c +++ b/src/runmode-nflog.c @@ -184,7 +184,7 @@ int RunModeIdsNflogAutoFp(void) NflogConfigGeThreadsCount, "ReceiveNFLOG", "DecodeNFLOG", - "RecvNFLOG", + thread_name_autofp, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Unable to start runmode"); @@ -212,7 +212,7 @@ int RunModeIdsNflogSingle(void) NflogConfigGeThreadsCount, "ReceiveNFLOG", "DecodeNFLOG", - "RecvNFLOG", + thread_name_single, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Unable to start runmode"); @@ -240,7 +240,7 @@ int RunModeIdsNflogWorkers(void) NflogConfigGeThreadsCount, "ReceiveNFLOG", "DecodeNFLOG", - "RecvNFLOG", + thread_name_workers, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Unable to start runmode"); diff --git a/src/runmode-pcap.c b/src/runmode-pcap.c index 6561c1c8c4..52eff0f9bf 100644 --- a/src/runmode-pcap.c +++ b/src/runmode-pcap.c @@ -242,7 +242,7 @@ int RunModeIdsPcapSingle(void) ret = RunModeSetLiveCaptureSingle(ParsePcapConfig, PcapConfigGeThreadsCount, "ReceivePcap", - "DecodePcap", "PcapLive", + "DecodePcap", thread_name_single, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Runmode start failed"); @@ -283,7 +283,7 @@ int RunModeIdsPcapAutoFp(void) ret = RunModeSetLiveCaptureAutoFp(ParsePcapConfig, PcapConfigGeThreadsCount, "ReceivePcap", - "DecodePcap", "RxPcap", + "DecodePcap", thread_name_autofp, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Runmode start failed"); @@ -315,7 +315,7 @@ int RunModeIdsPcapWorkers(void) ret = RunModeSetLiveCaptureWorkers(ParsePcapConfig, PcapConfigGeThreadsCount, "ReceivePcap", - "DecodePcap", "RxPcap", + "DecodePcap", thread_name_workers, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Unable to start runmode"); diff --git a/src/runmode-pfring.c b/src/runmode-pfring.c index f08bdad802..ca37649c7c 100644 --- a/src/runmode-pfring.c +++ b/src/runmode-pfring.c @@ -437,7 +437,7 @@ int RunModeIdsPfringAutoFp(void) ret = RunModeSetLiveCaptureAutoFp(tparser, PfringConfigGeThreadsCount, "ReceivePfring", - "DecodePfring", "RxPFR", + "DecodePfring", thread_name_autofp, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Runmode start failed"); @@ -474,7 +474,7 @@ int RunModeIdsPfringSingle(void) ret = RunModeSetLiveCaptureSingle(tparser, PfringConfigGeThreadsCount, "ReceivePfring", - "DecodePfring", "RxPFR", + "DecodePfring", thread_name_single, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Runmode start failed"); @@ -511,7 +511,7 @@ int RunModeIdsPfringWorkers(void) ret = RunModeSetLiveCaptureWorkers(tparser, PfringConfigGeThreadsCount, "ReceivePfring", - "DecodePfring", "RxPFR", + "DecodePfring", thread_name_workers, live_dev); if (ret != 0) { SCLogError(SC_ERR_RUNMODE, "Runmode start failed");