On Friday, July 11, 2003, at 6:28 PM, Daniel Frimerman wrote:
To the main part. I had a look at pcap_compile and fainted. Has anyone coded a separate routine to compile filter strings which doesn't take any wpcap.dll specific values such as the first parameter of adapter returned by other pcap functions, that can be used with packet.dll?
I don't know of any. pcap_compile comes straight from libpcap, so it's not surprising that it expects a pcap_t as an argument.
If you want to use it to compile a filter expression into BPF code without using "pcap_open_live()" to get your capture handle, you could use "pcap_open_dead()", at least in WinPcap 3.x (2.3 might have it as well - I forget when it was added to libpcap); use the appropriate DLT_ value as the "linktype" argument. (You'd get that type by using "PacketGetNetType()" and then mapping the Windows NDIS NdisMedium value you get from it to the appropriate DLT_ value.)
================================================================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/[EMAIL PROTECTED]/
To unsubscribe use mailto: [EMAIL PROTECTED]
==================================================================
