aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/dbs-etherwatch.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2006-11-05 22:46:44 +0000
committerUlf Lamping <ulf.lamping@web.de>2006-11-05 22:46:44 +0000
commit59d6c8ea33b703a4282ac6694f2797202b64dfcb (patch)
treea4abb83c0c20eafb12ab250bcf7f32f74f281b44 /wiretap/dbs-etherwatch.c
parented837bc7a517040020da2717b392a0ca086e276a (diff)
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
Diffstat (limited to 'wiretap/dbs-etherwatch.c')
-rw-r--r--wiretap/dbs-etherwatch.c14
1 files changed, 7 insertions, 7 deletions
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)
{