BackupGGCode / pypcap

simplified object-oriented Python extension module for libpcap
Other
0 stars 1 forks source link

dump class #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
pypcap doesn't support saving packets offline. here is a nice patch for that.

Original issue reported on code.google.com by getxs...@gmail.com on 7 Jul 2009 at 1:10

Attachments:

GoogleCodeExporter commented 9 years ago
pypcap not implementing dump file support is a definite problem and is making it
difficult for me to switch off of using pcapy. The attached patch does the 
following
things:

 * Kludges in an 'api' flag to the pcap initializer, allowing the caller to choose
whether callbacks passed to dispatch() and loop() are given a full pcap_pkthdr 
or
pypcap's timestamp. This is so that pcap_dump can be used directly.
 * Adds a dumpfile class which is created from a pcap object and a file descriptor
which handles dumping packets.
 * Adds a gz_dumpfile class similar to the above, but which uses zlib to compress all
data before it's written to disk.
 * Alters setup.py (poorly) so pcap.so gets linked against zlib.

Original comment by jesseke...@gmail.com on 14 Dec 2009 at 7:20

Attachments: