Venkatramani, Bharath wrote:
This is what I'm trying to do.

1. Dump packets into a file (we'll call it src.cap).
2. Apply a filter to that file (say, "udp").
3. Dump the filtered packets into a different file (dest.cap).

Is there a winpcap function that does this?

No, but there are WinPcap functions (plural) that would let you write a program that does that. Open the source file with pcap_open_offline(), create the destination file with pcap_dump_open(), compile the filter with pcap_compile(), use pcap_loop() to read the file, use pcap_dump() as the callback to write the packets out, and, when pcap_loop() returns, close the input file with pcap_close() and close the output file with pcap_dump_close().

This is the WinPcap users list. It is archived at

To unsubscribe use mailto: [EMAIL PROTECTED]

Reply via email to