Hi. Why don't you use the pcap API? It is much more powerful, and platform independent. Using thw pcap api, you have a filter compiler to generate bpf code.
BTW the BPF code is a pseudo assembly, which is quite hard to create by hand, because it is link layer specific, you need to know all the details of protocol headers, and so on. GV ----- Original Message ----- From: "??? Chanjun Yu" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 09, 2002 3:36 AM Subject: [WinPcap-users] How to set filter with packet.dll My question is how to set a filter. (Only use packet32.h) PacketSetBpf(lpAdapter, bpf_program *filter) The second parameter is hard to set because there is no function like pcap_compile in packet32.
