Inspired by a recent Zeek blog post, this could speed up PCAP
processing by a few percent.
Ticket: #7155.
SCReturnInt(TM_ECODE_FAILED);
}
+ errno = 0;
+ if (setvbuf(pcap_file(pfv->pcap_handle), pfv->buffer, _IOFBF, sizeof(pfv->buffer)) < 0) {
+ SCLogWarning("Failed to setvbuf on PCAP file handle: %s", strerror(errno));
+ }
+
if (pfv->shared != NULL && pfv->shared->bpf_string != NULL) {
SCLogInfo("using bpf-filter \"%s\"", pfv->shared->bpf_string);
const u_char *first_pkt_data;
struct pcap_pkthdr *first_pkt_hdr;
struct timeval first_pkt_ts;
+
+ char buffer[131072];
} PcapFileFileVars;
/**