exported / pypcap

Automatically exported from code.google.com/p/pypcap
Other
0 stars 0 forks source link

[patch] Add dumpfile support #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There is currently no support for saving a capture file with pypac. The 
attached patch adds the support for the pcap_dump_open, pcap_dump_close, and 
pcap_dump API functions internally, and exposes to python the setdumpfile(self, 
filename) function to set up the packet dumper. Once enabled, any packet that 
passes the filter will be logged to the dumpfile.

Not included is a way to selectively dump individual packets from python, as 
that would require re-architecting things in such a way as to make pcap_pkthdrs 
available to python to pass to pcap_dump(). Not impossible, but it would change 
the semantics a bit.

Original issue reported on code.google.com by otherwis...@gmail.com on 8 Dec 2011 at 5:25

Attachments: