Feature #482 ยป 0001-482-use-decode_flag-for-all-decode-TMs.-Use-the-flag.patch
| src/flow-timeout.c | ||
|---|---|---|
|
stream_pseudo_pkt_detect_TV = NULL;
|
||
|
}
|
||
|
stream_pseudo_pkt_decode_tm_slot = TmThreadGetFirstTmSlotForPartialPattern("Decode");
|
||
|
SCMutexLock(&tv_root_lock);
|
||
|
ThreadVars *tv = tv_root[TVT_PPT];
|
||
|
int done = 0;
|
||
|
while (tv) {
|
||
|
TmSlot *slots = tv->tm_slots;
|
||
|
while (slots) {
|
||
|
TmModule *tm = TmModuleGetById(slots->tm_id);
|
||
|
if (tm->flags & TM_FLAG_DECODE_TM) {
|
||
|
done = 1;
|
||
|
stream_pseudo_pkt_decode_tm_slot = slots;
|
||
|
break;
|
||
|
}
|
||
|
slots = slots->slot_next;
|
||
|
}
|
||
|
if (done)
|
||
|
break;
|
||
|
tv = tv->next;
|
||
|
}
|
||
|
SCMutexUnlock(&tv_root_lock);
|
||
|
if (stream_pseudo_pkt_decode_tm_slot == NULL) {
|
||
|
/* yes, this is fatal! */
|
||
|
SCLogError(SC_ERR_TM_MODULES_ERROR, "Looks like we have failed to "
|
||
| src/source-af-packet.c | ||
|---|---|---|
|
tmm_modules[TMM_DECODEAFP].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODEAFP].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODEAFP].cap_flags = 0;
|
||
|
tmm_modules[TMM_DECODEAFP].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
/**
|
||
| ... | ... | |
|
tmm_modules[TMM_DECODEAFP].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODEAFP].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODEAFP].cap_flags = 0;
|
||
|
tmm_modules[TMM_DECODEAFP].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
static int AFPCreateSocket(AFPThreadVars *ptv, char *devname, int verbose);
|
||
| src/source-erf-dag.c | ||
|---|---|---|
|
tmm_modules[TMM_DECODEERFDAG].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODEERFDAG].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODEERFDAG].cap_flags = 0;
|
||
|
tmm_modules[TMM_DECODEERFDAG].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
TmEcode NoErfDagSupportExit(ThreadVars *tv, void *initdata, void **data)
|
||
| ... | ... | |
|
tmm_modules[TMM_DECODEERFDAG].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODEERFDAG].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODEERFDAG].cap_flags = 0;
|
||
|
tmm_modules[TMM_DECODEERFDAG].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
/**
|
||
| src/source-erf-file.c | ||
|---|---|---|
|
tmm_modules[TMM_DECODEERFFILE].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODEERFFILE].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODEERFFILE].cap_flags = 0;
|
||
|
tmm_modules[TMM_DECODEERFFILE].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
/**
|
||
| src/source-ipfw.c | ||
|---|---|---|
|
tmm_modules[TMM_DECODEIPFW].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODEIPFW].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODEIPFW].cap_flags = 0;
|
||
|
tmm_modules[TMM_DECODEIPFW].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
TmEcode NoIPFWSupportExit(ThreadVars *tv, void *initdata, void **data) {
|
||
| ... | ... | |
|
tmm_modules[TMM_DECODEIPFW].ThreadExitPrintStats = NULL;
|
||
|
tmm_modules[TMM_DECODEIPFW].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODEIPFW].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODEIPFW].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
static inline void IPFWMutexInit(IPFWQueueVars *nq)
|
||
| src/source-napatech.c | ||
|---|---|---|
|
tmm_modules[TMM_DECODENAPATECH].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODENAPATECH].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODENAPATECH].cap_flags = 0;
|
||
|
tmm_modules[TMM_DECODENAPATECH].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
TmEcode NoNapatechSupportExit(ThreadVars *tv, void *initdata, void **data)
|
||
| ... | ... | |
|
tmm_modules[TMM_DECODENAPATECH].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODENAPATECH].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODENAPATECH].cap_flags = 0;
|
||
|
tmm_modules[TMM_DECODENAPATECH].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
/**
|
||
| src/source-nfq.c | ||
|---|---|---|
|
tmm_modules[TMM_DECODENFQ].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODENFQ].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODENFQ].cap_flags = 0;
|
||
|
tmm_modules[TMM_DECODENFQ].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
TmEcode NoNFQSupportExit(ThreadVars *tv, void *initdata, void **data)
|
||
| ... | ... | |
|
tmm_modules[TMM_DECODENFQ].ThreadExitPrintStats = NULL;
|
||
|
tmm_modules[TMM_DECODENFQ].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODENFQ].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODENFQ].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
/** \brief To initialize the NFQ global configuration data
|
||
| src/source-pcap-file.c | ||
|---|---|---|
|
tmm_modules[TMM_DECODEPCAPFILE].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODEPCAPFILE].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODEPCAPFILE].cap_flags = 0;
|
||
|
tmm_modules[TMM_DECODEPCAPFILE].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
void PcapFileCallbackLoop(char *user, struct pcap_pkthdr *h, u_char *pkt) {
|
||
| src/source-pcap.c | ||
|---|---|---|
|
tmm_modules[TMM_DECODEPCAP].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODEPCAP].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODEPCAP].cap_flags = 0;
|
||
|
tmm_modules[TMM_DECODEPCAP].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
#if LIBPCAP_VERSION_MAJOR == 1
|
||
| src/source-pfring.c | ||
|---|---|---|
|
tmm_modules[TMM_DECODEPFRING].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODEPFRING].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODEPFRING].cap_flags = 0;
|
||
|
tmm_modules[TMM_DECODEPFRING].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
/**
|
||
| ... | ... | |
|
tmm_modules[TMM_DECODEPFRING].ThreadExitPrintStats = NULL;
|
||
|
tmm_modules[TMM_DECODEPFRING].ThreadDeinit = NULL;
|
||
|
tmm_modules[TMM_DECODEPFRING].RegisterTests = NULL;
|
||
|
tmm_modules[TMM_DECODEPFRING].flags = TM_FLAG_DECODE_TM;
|
||
|
}
|
||
|
/**
|
||
| src/tm-modules.h | ||
|---|---|---|
|
/* thread flags */
|
||
|
#define TM_FLAG_RECEIVE_TM 0x01
|
||
|
#define TM_FLAG_DECODE_TM 0x02
|
||
|
typedef struct TmModule_ {
|
||
|
char *name;
|
||