|
|
|
|
@ -46,6 +46,7 @@
|
|
|
|
|
#include "tm-threads.h"
|
|
|
|
|
#include "util-optimize.h"
|
|
|
|
|
#include "flow-manager.h"
|
|
|
|
|
#include "util-profiling.h"
|
|
|
|
|
|
|
|
|
|
extern uint8_t suricata_ctl_flags;
|
|
|
|
|
extern int max_pending_packets;
|
|
|
|
|
@ -123,6 +124,7 @@ void PcapFileCallbackLoop(char *user, struct pcap_pkthdr *h, u_char *pkt) {
|
|
|
|
|
if (unlikely(p == NULL)) {
|
|
|
|
|
SCReturn;
|
|
|
|
|
}
|
|
|
|
|
PACKET_PROFILING_TMM_START(p, TMM_RECEIVEPCAPFILE);
|
|
|
|
|
|
|
|
|
|
p->ts.tv_sec = h->ts.tv_sec;
|
|
|
|
|
p->ts.tv_usec = h->ts.tv_usec;
|
|
|
|
|
@ -135,8 +137,10 @@ void PcapFileCallbackLoop(char *user, struct pcap_pkthdr *h, u_char *pkt) {
|
|
|
|
|
|
|
|
|
|
if (unlikely(PacketCopyData(p, pkt, h->caplen))) {
|
|
|
|
|
TmqhOutputPacketpool(ptv->tv, p);
|
|
|
|
|
PACKET_PROFILING_TMM_END(p, TMM_RECEIVEPCAPFILE);
|
|
|
|
|
SCReturn;
|
|
|
|
|
}
|
|
|
|
|
PACKET_PROFILING_TMM_END(p, TMM_RECEIVEPCAPFILE);
|
|
|
|
|
|
|
|
|
|
if (TmThreadsSlotProcessPkt(ptv->tv, ptv->slot, p) != TM_ECODE_OK) {
|
|
|
|
|
pcap_breakloop(pcap_g.pcap_handle);
|
|
|
|
|
|