aboutsummaryrefslogtreecommitdiffstats
path: root/randpkt.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-09-14 21:57:30 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-09-14 21:57:30 +0000
commit84cf7ce7675b450311dcec0b34b785974b2e85d0 (patch)
tree714a0f5ff24c62c46cc312f5a3a5eb7fe1ee581c /randpkt.c
parent1d0e5b105ca2c952f8a252b07a65e7ff883ee8b4 (diff)
added compression support for capture file output. The Save/As dialog now has a checkbox "Compress with gzip"
currently limited to Ethereal and all the variants of libpcap filetypes only. We might want to add output compression support to the other tools as well (tethereal, mergecap, ...). We might also want to add support for the other filetypes, but this is only possible if the filetype functions doesn't use special output operations like fseek. One bug is still left: if the input and output filetypes while saving are the same, Ethereal currently optimizes this by simply copy the binary file instead of using wiretap (so it will be faster but it will ignore the compress setting). Don't know a good workaround for this, as I don't know a way to find out if the input file is currently compressed or not. One idea might be to use a heuristic on the filesize (compared to the packet size summmary). Another workaround I see is to remove this optimization, which is of course not the way I like to do it ... svn path=/trunk/; revision=15804
Diffstat (limited to 'randpkt.c')
-rw-r--r--randpkt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/randpkt.c b/randpkt.c
index 65873fa..965189b 100644
--- a/randpkt.c
+++ b/randpkt.c
@@ -482,7 +482,7 @@ main(int argc, char **argv)
pkthdr.pkt_encap = example->sample_wtap_encap;
dump = wtap_dump_open(produce_filename, WTAP_FILE_PCAP,
- example->sample_wtap_encap, produce_max_bytes, &err);
+ example->sample_wtap_encap, produce_max_bytes, FALSE /* compressed */, &err);
seed();