I see no evident problems, however the code snippet is very short.
Did you give a look at the winpcap developer's pack? It contains a couple of
samples that show how to compile and set a filter, you can use them as a
reference.

Loris

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 12:57 PM
Subject: [WinPcap-users]


> hello,
>      i am trying to set packet filter for my application using winpcap but
it
> doesn't seem to work. Otherwise the application is capturing packets. The
> moment the filters are imposed, the application kind of hangs for the want
of
> packet.
> the code is:
>
> struct bpf_program filter;
> char filter_app[] = "port 80";
> pcap_compile(handle, &filter, filter_app, 0, net);
> pcap_setfilter(handle, &filter);
>
> can some one help please...is there a problem with the code...?
>
> Regards
>
> anshuman.
>
>
> ---------------------------------------------
> This message was sent using Endymion MailMan.
> http://www.endymion.com/products/mailman/
>
>
>


Reply via email to