Go to the documentation of this file.
   45             "Multi-threaded pcap file mode. Packets from each flow are assigned to a consistent " 
   55     const char *file = NULL;
 
   58     if (
SCConfGet(
"pcap-file.file", &file) == 0) {
 
   59         FatalError(
"Failed retrieving pcap-file from Conf");
 
   70                                                  "packetpool", 
"packetpool",
 
   71                                                  "packetpool", 
"packetpool",
 
   78     if (tm_module == NULL) {
 
   79         FatalError(
"TmModuleGetByName failed for ReceivePcap");
 
   84     if (tm_module == NULL) {
 
   85         FatalError(
"TmModuleGetByName DecodePcap failed");
 
   90     if (tm_module == NULL) {
 
   91         FatalError(
"TmModuleGetByName for FlowWorker failed");
 
  127     const char *file = NULL;
 
  128     if (
SCConfGet(
"pcap-file.file", &file) == 0) {
 
  129         FatalError(
"Failed retrieving pcap-file from Conf");
 
  151     if (thread_max > 1024)
 
  155     if (queues == NULL) {
 
  156         FatalError(
"RunmodeAutoFpCreatePickupQueuesString failed");
 
  164                                     "packetpool", 
"packetpool",
 
  169     if (tv_receivepcap == NULL) {
 
  173     if (tm_module == NULL) {
 
  174         FatalError(
"TmModuleGetByName failed for ReceivePcap");
 
  179     if (tm_module == NULL) {
 
  180         FatalError(
"TmModuleGetByName DecodePcap failed");
 
  190     for (thread = 0; thread < (uint16_t)thread_max; thread++) {
 
  192         snprintf(qname, 
sizeof(qname), 
"pickup%d", thread + 1);
 
  194         SCLogDebug(
"tname %s, qname %s", tname, qname);
 
  195         SCLogDebug(
"Assigning %s affinity to cpu %u", tname, cpu);
 
  200                                         "packetpool", 
"packetpool",
 
  202         if (tv_detect_ncpu == NULL) {
 
  207         if (tm_module == NULL) {
 
  208             FatalError(
"TmModuleGetByName for FlowWorker failed");
 
  220         if ((cpu + 1) == ncpus)
 
  
 
const char * thread_name_workers
TmEcode TmThreadSpawn(ThreadVars *tv)
Spawns a thread associated with the ThreadVars instance tv.
ThreadVars * TmThreadCreatePacketHandler(const char *name, const char *inq_name, const char *inqh_name, const char *outq_name, const char *outqh_name, const char *slots)
Creates and returns a TV instance for a Packet Processing Thread. This function doesn't support custo...
void TmThreadSetGroupName(ThreadVars *tv, const char *name)
int SCConfGet(const char *name, const char **vptr)
Retrieve the value of a configuration node.
const char * RunModeFilePcapGetDefaultMode(void)
const char * thread_name_autofp
const char * thread_name_single
#define TM_THREAD_NAME_MAX
TmModule * TmModuleGetByName(const char *name)
get a tm module ptr by name
char * RunmodeAutoFpCreatePickupQueuesString(int n)
create a queue string for autofp to pass to the flow queue handler.
Per thread variable structure.
#define TM_QUEUE_NAME_MAX
void RunModeRegisterNewRunMode(enum SCRunModes runmode, const char *name, const char *description, int(*RunModeFunc)(void), int(*RunModeIsIPSEnabled)(void))
Registers a new runmode.
void TmSlotSetFuncAppend(ThreadVars *tv, TmModule *tm, const void *data)
Appends a new entry to the slots.
void TimeModeSetOffline(void)
TmEcode TmThreadSetCPU(ThreadVars *tv, uint8_t type)
int TmThreadGetNbThreads(uint8_t type)
int RunModeFilePcapSingle(void)
Single thread version of the Pcap file processing.
void RunModeFilePcapRegister(void)
void PcapFileGlobalInit(void)
uint16_t UtilCpuGetNumProcessorsOnline(void)
Get the number of cpus online in the system.
float threading_detect_ratio
int RunModeFilePcapAutoFp(void)
RunModeFilePcapAutoFp set up the following thread packet handlers: