Asynchronous libpcap: losing packets?
问题 I have a program that sends a set of TCP SYN packets to a host (using raw sockets) and uses libpcap (with a filter) to obtain the responses. I'm trying to implement this in an asynchronous I/O framework, but it seems that libpcap is missing some of the responses (namely the first packets of a series when it takes less than 100 microseconds between the TCP SYN and the response). The pcap handle is setup like this: pcap_t* pcap = pcap_open_live(NULL, -1, false, -1, errorBuffer); pcap