Fulvio Risso wrote:

This beaviour is needed, otherwise you may receive packets satifying the old
filter after setting the new one.

Absolutely. The same is done in the BPF code in BSD. It's not done in the Linux socket filter code - but people complained about that, because they set a filter but got packets that wouldn't have passed the filter, so the libpcap support for Linux was changed to flush all packets when the filter was set.

Perhaps an option to allow applications to set a filter without flushing, for cases where it's known that the new filter will accept all packets that the old filter would (such as the case in the original message), would be useful - but even if the WinPcap driver, or the BPF code, or the Linux libpcap code, or... did that, there'd be no guarantee that the relevant packets won't be discarded before the new filter is set, so it can't be *guaranteed* that no relevant packets will be lost.

================================================================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/winpcap-users@winpcap.polito.it/

To unsubscribe use mailto: [EMAIL PROTECTED]

Reply via email to