Update FlowManager/Recycler to use global name.
Also add # into thread number.
Update af-packet to use global threadnames.
Update pcap to use global threadnames.
Update pfring to use global threadnames.
Update erf-dag to use global threadnames.
Update nflog to use global threadnames.
Update netmap to use global threadnames.
Update napatech to use global threadnames.
/* 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++;
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);
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);
/* 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++;
ret = RunModeSetLiveCaptureAutoFp(ParseAFPConfig,
AFPConfigGeThreadsCount,
"ReceiveAFP",
- "DecodeAFP", "RxAFP",
+ "DecodeAFP", thread_name_autofp,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Unable to start runmode");
ret = RunModeSetLiveCaptureSingle(ParseAFPConfig,
AFPConfigGeThreadsCount,
"ReceiveAFP",
- "DecodeAFP", "AFPacket",
+ "DecodeAFP", thread_name_single,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Unable to start runmode");
ret = RunModeSetLiveCaptureWorkers(ParseAFPConfig,
AFPConfigGeThreadsCount,
"ReceiveAFP",
- "DecodeAFP", "AFPacket",
+ "DecodeAFP", thread_name_workers,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Unable to start runmode");
DagConfigGetThreadCount,
"ReceiveErfDag",
"DecodeErfDag",
- "RxDAG",
+ thread_name_single,
NULL);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "DAG single runmode failed to start");
DagConfigGetThreadCount,
"ReceiveErfDag",
"DecodeErfDag",
- "RxDAG",
+ thread_name_autofp,
NULL);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "DAG autofp runmode failed to start");
DagConfigGetThreadCount,
"ReceiveErfDag",
"DecodeErfDag",
- "RxDAG",
+ thread_name_workers,
NULL);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "DAG workers runmode failed to start");
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;
ParseNetmapConfig,
NetmapConfigGeThreadsCount,
"ReceiveNetmap",
- "DecodeNetmap", "RxNetmap",
+ "DecodeNetmap", thread_name_autofp,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Unable to start runmode");
ParseNetmapConfig,
NetmapConfigGeThreadsCount,
"ReceiveNetmap",
- "DecodeNetmap", "NetmapPkt",
+ "DecodeNetmap", thread_name_single,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Unable to start runmode");
ParseNetmapConfig,
NetmapConfigGeThreadsCount,
"ReceiveNetmap",
- "DecodeNetmap", "NetmapPkt",
+ "DecodeNetmap", thread_name_workers,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Unable to start runmode");
NflogConfigGeThreadsCount,
"ReceiveNFLOG",
"DecodeNFLOG",
- "RecvNFLOG",
+ thread_name_autofp,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Unable to start runmode");
NflogConfigGeThreadsCount,
"ReceiveNFLOG",
"DecodeNFLOG",
- "RecvNFLOG",
+ thread_name_single,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Unable to start runmode");
NflogConfigGeThreadsCount,
"ReceiveNFLOG",
"DecodeNFLOG",
- "RecvNFLOG",
+ thread_name_workers,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Unable to start runmode");
ret = RunModeSetLiveCaptureSingle(ParsePcapConfig,
PcapConfigGeThreadsCount,
"ReceivePcap",
- "DecodePcap", "PcapLive",
+ "DecodePcap", thread_name_single,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Runmode start failed");
ret = RunModeSetLiveCaptureAutoFp(ParsePcapConfig,
PcapConfigGeThreadsCount,
"ReceivePcap",
- "DecodePcap", "RxPcap",
+ "DecodePcap", thread_name_autofp,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Runmode start failed");
ret = RunModeSetLiveCaptureWorkers(ParsePcapConfig,
PcapConfigGeThreadsCount,
"ReceivePcap",
- "DecodePcap", "RxPcap",
+ "DecodePcap", thread_name_workers,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Unable to start runmode");
ret = RunModeSetLiveCaptureAutoFp(tparser,
PfringConfigGeThreadsCount,
"ReceivePfring",
- "DecodePfring", "RxPFR",
+ "DecodePfring", thread_name_autofp,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Runmode start failed");
ret = RunModeSetLiveCaptureSingle(tparser,
PfringConfigGeThreadsCount,
"ReceivePfring",
- "DecodePfring", "RxPFR",
+ "DecodePfring", thread_name_single,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Runmode start failed");
ret = RunModeSetLiveCaptureWorkers(tparser,
PfringConfigGeThreadsCount,
"ReceivePfring",
- "DecodePfring", "RxPFR",
+ "DecodePfring", thread_name_workers,
live_dev);
if (ret != 0) {
SCLogError(SC_ERR_RUNMODE, "Runmode start failed");