This is probably more of a WinPcap question, but I call pcap_next_ex as follows: int iRes = pcap_next_ex(pPcapDev, &pHdr, (const u_char**)&pubFrmBuf); and it never returns. But sending works: pcap_sendpacket(pPcapDev, pubBuf, (int)ulLen); Has anyone else seen this or know why pcap_next_ex fails to return an error at least. Thanks, Brian asked 11 Dec '12, 10:43 brwiese |
One Answer:
Yes, it is. The best places to ask WinPcap questions would be:
What This is why there's a timeout argument - to allow packets to be buffered, so that there isn't a potentially-costly process wakeup for each packet received, but so that the packets will be delivered to your program after a relatively short period of time if the packets aren't arriving fast enough. Tcpdump sets the timeout to 1 second (1000 milliseconds), and dumpcap sets it to 1/4 second (250 milliseconds). answered 11 Dec '12, 11:09 Guy Harris ♦♦ |