diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-05-16 21:04:41 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-05-16 21:04:41 +0000 |
commit | 887c604334ac398f298bb1a8069981eddc4fa765 (patch) | |
tree | f0e6a364d09d86ff22255f0d5a75f4093ab4d9ba /wiretap/ascend-int.h | |
parent | b17cefcd66d7bc2ec2171777c773a3eaa73d50d2 (diff) |
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
Diffstat (limited to 'wiretap/ascend-int.h')
-rw-r--r-- | wiretap/ascend-int.h | 18 |
1 files changed, 8 insertions, 10 deletions
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 <glib.h> #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__ */ |