mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Performance tweak for Windows. See #1327
This commit is contained in:
parent
8f1bbf6be2
commit
534643aac6
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue