From 25e8c37489cf6503e7ce8c436f19f54bf7a5027a Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 29 Apr 2006 17:54:46 +0000 Subject: Have the ring buffer routines take a pointer to a "bytes written" count as an argument, rather than keeping the count to themselves, so the count kept by the capturing program can be updated correctly - including getting reset when files are switched. Fixes bug 895. svn path=/trunk/; revision=18032 --- ringbuffer.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ringbuffer.h') diff --git a/ringbuffer.h b/ringbuffer.h index 8989f5c4aa..63af28bce9 100644 --- a/ringbuffer.h +++ b/ringbuffer.h @@ -40,8 +40,10 @@ int ringbuf_init(const char *capture_name, guint num_files); const gchar *ringbuf_current_filename(void); -FILE *ringbuf_init_libpcap_fdopen(int linktype, int snaplen, int *err); -gboolean ringbuf_switch_file(FILE **pdh, gchar **save_file, int *save_file_fd, int *err); +FILE *ringbuf_init_libpcap_fdopen(int linktype, int snaplen, + long *bytes_written, int *err); +gboolean ringbuf_switch_file(FILE **pdh, gchar **save_file, int *save_file_fd, + long *bytes_written, int *err); gboolean ringbuf_libpcap_dump_close(gchar **save_file, int *err); void ringbuf_free(void); void ringbuf_error_cleanup(void); -- cgit v1.2.1