[Winpcap-users] How to save packets to a file?
He Zhiyu
zhiyu_he at hotmail.com
Tue May 17 03:19:02 GMT 2005
Hello,
I'm writing a sniffer for my graduation project(protocol analyzer),I have
finished most functions of it.I captured packets and created a dynamic list
to save all the packets in the buffer.Every node of the list contains a
struct pcap_pkthdr *header and a u_char *pkt_data.I have a problem.How to
save the packets in the buffer to a file,and read packets from the dump
file? (I'm not able to use pcap_dump to do this,because pcap_dump_open
needs a parameter(pcap_t *p) from pcap_open,but I should save the packets
from the buffer to the file,not from the adapter to the file!)
Thanks a lot
Best regards
_________________________________________________________________
ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/cn
More information about the Winpcap-users
mailing list