[Winpcap-users] Winpcap-users Digest, Vol 72, Issue 8
Fish" (David B. Trout
fish at infidels.org
Wed Mar 30 19:07:17 PDT 2011
Gianluca Varenni wrote:
> 1. The driver code is still there (because we never removed it)
> but it's no longer used by Packet.dll. Timeouts are implemented
> in user mode.
How?
How can user code wait for packets to arrive without an event to wait on?
Even if you plan on providing support for asynchronous (OVERLAPPED) i/o,
there still has to be an event (such as the one in the OVERLAPPED struct)
for the user code to wait on, since a "polling" read loop such as:
for (;;)
{
ReadFile(... &dwBytesReceived, NULL);
if (dwBytesReceived > 0)
ProcessPackets();
}
is too inefficient and would consume too much CPU for very small (e.g. zero)
SetMinToCopy values.
One way or another there needs to be an event the user code can wait on that
gets signaled whenever packets arrive, Gianluca.
Or am I missing something?
--
"Fish" (David B. Trout)
fish at softdevlabs.com
More information about the Winpcap-users
mailing list