aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap.h
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-09-07 05:34:23 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-09-07 05:34:23 +0000
commitf52ffba40709c1d134671eef22086827cdeda0f3 (patch)
tree31fc7f12926ced1a03d1ebd95053a6131039c09b /wiretap/wtap.h
parente1f3604b376f38c081ff142d54d91aa3f68bd0f8 (diff)
Change wtap_read() API so that the data offset is set via a pointer, and
a "keep reading" boolean value is returned from the function. This avoids having to hack around the fact that some file formats truly do have records that start at offset 0. (i4btrace and csids have no file header. Neither does the pppdump-style file that I'm looking at right now). svn path=/trunk/; revision=2392
Diffstat (limited to 'wiretap/wtap.h')
-rw-r--r--wiretap/wtap.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index 3b248e9ff1..bc429651f8 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -1,6 +1,6 @@
/* wtap.h
*
- * $Id: wtap.h,v 1.77 2000/08/11 13:32:37 deniel Exp $
+ * $Id: wtap.h,v 1.78 2000/09/07 05:34:23 gram Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -273,8 +273,16 @@ typedef struct wtap_dumper wtap_dumper;
* a negative number, indicating the type of error, on other failures.
*/
struct wtap* wtap_open_offline(const char *filename, int *err, gboolean do_random);
-int wtap_loop(wtap *wth, int, wtap_handler, u_char*, int*);
-int wtap_read(wtap *wth, int *err);
+
+/* Returns TRUE if entire loop-reading was successful. If read failure
+ * happened, FALSE is returned and err is set. */
+gboolean wtap_loop(wtap *wth, int, wtap_handler, u_char*, int *err);
+
+/* Returns TRUE if read was successful. FALSE if failure. data_offset is
+ * set the the offset in the file where the data for the read packet is
+ * located. */
+gboolean wtap_read(wtap *wth, int *err, int *data_offset);
+
struct wtap_pkthdr *wtap_phdr(wtap *wth);
union wtap_pseudo_header *wtap_pseudoheader(wtap *wth);
guint8 *wtap_buf_ptr(wtap *wth);