1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-14 17:36:33 +00:00

Performance tweak for Windows. See #1327

This commit is contained in:
dmiller
2018-09-26 21:12:40 +00:00
parent 8f1bbf6be2
commit 534643aac6

View File

@@ -4153,7 +4153,11 @@ pcap_t *my_pcap_open_live(const char *device, int snaplen, int promisc, int to_m
/* This is unnecessary with Npcap since libpcap calls PacketSetMinToCopy(0)
* based on immediate mode. Have not determined if it is needed for WinPcap
* or not, but it's not hurting anything. */
pcap_setmintocopy(pt, 1);
pcap_setmintocopy(pt, 0);
/* Npcap sets kernel buffer size to 1MB, but user buffer size to 256KB.
* Memory is pretty cheap these days, so lets match the kernel buffer size
* for better performance. */
pcap_setuserbuffer(pt, 1000000);
#endif
return pt;