On Sun, Jul 13, 2003 at 01:32:16AM +0100, Daniel Frimerman wrote:
> Can anyone please tell me why do I need to supply netmask for pcap_compile?
Because the filter expression "ip broadcast" requires it. To quote from
the man page:
ip broadcast
True if the packet is an IP broadcast
packet. It checks for both the all-zeroes
and all-ones broadcast conventions, and
looks up the local subnet mask.
"It" in "it ... looks up the local subnet mask" is, in that context,
tcpdump; any other application would have to do so as well.
However, if you can't get the netmask, you can supply, for example, 0;
that will only cause "ip broadcast" not to work, every other expression
will work OK.
==================================================================
This is the WinPcap users list. It is archived at
http://www.mail-archive.com/[EMAIL PROTECTED]/
To unsubscribe use
mailto: [EMAIL PROTECTED]
==================================================================