[Winpcap-users] Is pcap_next_ex() buffer circular?

Rich Detering rldetering at ieee.org
Thu Sep 21 02:15:11 GMT 2006


Our application is to read "raw" (layer 2 type) Ethernet packets being 
transmitted from proprietary hardware to a dedicated NIC in the host 
computer.  The procedure is to setup a test condition in the external 
hardware, read the data response contained in the Ethernet packets with 
pcap_next_ex() then setup a new test condition and read the data and so 
on.  There is significant time between reads and the expectation is that a 
new pcap_next_ex() call would return the most recent packets.  However, it 
looks like the 1 MByte buffer created by pcap_next_ex() fills with data 
then new data is ignored until calls to pcap_next_ex() pulls off old data 
to "make room" for new data.

If the pcap_next_ex() buffer is not circular, what's the best way to flush 
it in preparation for new data?

Rich 



More information about the Winpcap-users mailing list