path: root/ringbuffer.c
diff options
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 /ringbuffer.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 'ringbuffer.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/ringbuffer.c b/ringbuffer.c
index 84d2983d57..4f1d5fe0da 100644
--- a/ringbuffer.c
+++ b/ringbuffer.c
@@ -241,7 +241,7 @@ ringbuf_init_wtap_dump_fdopen(int filetype, int linktype, int snaplen, int *err)
rb_data.linktype = linktype;
rb_data.snaplen = snaplen;
- rb_data.pdh = wtap_dump_fdopen(rb_data.fd, filetype, linktype, snaplen, err);
+ rb_data.pdh = wtap_dump_fdopen(rb_data.fd, filetype, linktype, snaplen, FALSE /* compressed */, err);
return rb_data.pdh;