On Tue, Jul 16, 2002 at 12:15:33PM -0700, Fulvio Risso wrote: > Hi. > The fact is that we believe the actual API is a bit confusing, so in our > docs we suggest not to use these calls. > Instead, we defined a pcap_read_ex() which reads a packet at a time > (like pcap_next() ), it is non blocking,
I think that could be implemented without too much pain on UNIX, by having "pcap_read_ex()" set non-blocking mode on the descriptor if it's not currently set, and having "pcap_read()" set or clear non-blocking mode to match what was set with "pcap_setnonblock()". (For a memory-mapped device, "pcap_read_ex()" would just check the buffer to see if any packets were available, and not block if there aren't any.) > - (1) if a packet has been read without problems Is the intent that it's like "pcap_next()", in that there may be a buffer with multiple packets in it, and it'll just return the next packet from the buffer? - This is the TCPDUMP workers list. It is archived at http://www.tcpdump.org/lists/workers/index.html To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe
