Hi,

I have a problem in developing application with WinPcap 2.2 (Visual C++ 6.0)
I want to set a pcap filter on the open capture device but get fail.
This is my code example (I use a dymamic loading wpcap.dll and packet.dll):

-----------------------------
pcap_t *fp;
struct bpf_program fcode;
char *filter="icmp";
char *device="\Device\Packet_{D0B74528-2480-47DC-85FC-0C3E82F5438C}";
int r;

fp=(*pfnpcapopenlive)(device,500,TRUE,4,error);
r=(*pfnpcapcompile)(fp,&fcode,filter,0,0xffffff);
r=(*pfnpcapsetfilter)(fp,&fcode);

-----------------------------

After that, pcap_loop leads to exception.
I've got fcode structure filled by zeros in debugger. What's wrong?

Yours sincerely,
[EMAIL PROTECTED]



-
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

Reply via email to