From 887c604334ac398f298bb1a8069981eddc4fa765 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 16 May 2013 21:04:41 +0000 Subject: Hoist a bunch of common code between ascend_read() and ascend_seek_read() into parse_ascend(). Adjust the buffer size *before* attempting to fill it up. svn path=/trunk/; revision=49343 --- wiretap/ascend-int.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'wiretap/ascend-int.h') diff --git a/wiretap/ascend-int.h b/wiretap/ascend-int.h index faa7f03259..e53b472865 100644 --- a/wiretap/ascend-int.h +++ b/wiretap/ascend-int.h @@ -33,14 +33,6 @@ #include #include "ws_symbol_export.h" -typedef struct { - time_t start_time; - time_t secs; - int usecs; - guint32 caplen; - guint32 len; -} ascend_pkthdr; - extern int at_eof; extern const gchar *ascend_parse_error; @@ -50,6 +42,12 @@ extern const gchar *ascend_parse_error; */ extern struct ascend_phdr *pseudo_header; +typedef struct { + time_t inittime; + gboolean adjusted; + gint64 next_packet_seek_start; +} ascend_t; + /* Here we provide interfaces to make our scanner act and look like lex */ int ascendlex(void); @@ -60,7 +58,7 @@ typedef enum { PARSED_NONRECORD, PARSE_FAILED } parse_t; -parse_t parse_ascend(FILE_T fh, guint8 *pd, struct ascend_phdr *phdr, - ascend_pkthdr *hdr, gint64 *start_of_data); +parse_t parse_ascend(ascend_t *ascend, FILE_T fh, struct wtap_pkthdr *phdr, + guint8 *pd); #endif /* ! __ASCEND_INT_H__ */ -- cgit v1.2.3