From 59d6c8ea33b703a4282ac6694f2797202b64dfcb Mon Sep 17 00:00:00 2001 From: Ulf Lamping Date: Sun, 5 Nov 2006 22:46:44 +0000 Subject: change all file offsets from long to gint64 so we can - theoretically - handle files > 2GB correct. Please distclean Win32 builds! svn path=/trunk/; revision=19814 --- wiretap/dbs-etherwatch.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'wiretap/dbs-etherwatch.c') diff --git a/wiretap/dbs-etherwatch.c b/wiretap/dbs-etherwatch.c index 984a5b28ed..4230aebe07 100644 --- a/wiretap/dbs-etherwatch.c +++ b/wiretap/dbs-etherwatch.c @@ -85,8 +85,8 @@ static const char dbs_etherwatch_rec_magic[] = #define DBS_ETHERWATCH_MAX_PACKET_LEN 16384 static gboolean dbs_etherwatch_read(wtap *wth, int *err, gchar **err_info, - long *data_offset); -static gboolean dbs_etherwatch_seek_read(wtap *wth, long seek_off, + gint64 *data_offset); +static gboolean dbs_etherwatch_seek_read(wtap *wth, gint64 seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len, int *err, gchar **err_info); static int parse_dbs_etherwatch_packet(wtap *wth, FILE_T fh, guint8* buf, @@ -97,11 +97,11 @@ static guint parse_hex_dump(char* dump, guint8 *buf, char seperator, char end); /* Seeks to the beginning of the next packet, and returns the byte offset. Returns -1 on failure, and sets "*err" to the error. */ -static long dbs_etherwatch_seek_next_packet(wtap *wth, int *err) +static gint64 dbs_etherwatch_seek_next_packet(wtap *wth, int *err) { int byte; unsigned int level = 0; - long cur_off; + gint64 cur_off; while ((byte = file_getc(wth->fh)) != EOF) { if (byte == dbs_etherwatch_rec_magic[level]) { @@ -206,9 +206,9 @@ int dbs_etherwatch_open(wtap *wth, int *err, gchar **err_info _U_) /* Find the next packet and parse it; called from wtap_read(). */ static gboolean dbs_etherwatch_read(wtap *wth, int *err, gchar **err_info, - long *data_offset) + gint64 *data_offset) { - long offset; + gint64 offset; guint8 *buf; int pkt_len; @@ -238,7 +238,7 @@ static gboolean dbs_etherwatch_read(wtap *wth, int *err, gchar **err_info, /* Used to read packets in random-access fashion */ static gboolean -dbs_etherwatch_seek_read (wtap *wth, long seek_off, +dbs_etherwatch_seek_read (wtap *wth, gint64 seek_off, union wtap_pseudo_header *pseudo_header _U_, guint8 *pd, int len, int *err, gchar **err_info) { -- cgit v1.2.3