diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-10-04 08:30:36 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-10-04 08:30:36 +0000 |
commit | 3c9efdf4784d22a4a1a04a256acb50a815f59348 (patch) | |
tree | dd8723e71887cc681dd075b04afe17d4455121e7 /wiretap/toshiba.c | |
parent | f52303ffc9a0d12894edca2af06cf064f46a2a91 (diff) |
Use longs as file offsets, so that on platforms with 64-bit "long" we
can handle capture files bigger than 2GB.
svn path=/trunk/; revision=3993
Diffstat (limited to 'wiretap/toshiba.c')
-rw-r--r-- | wiretap/toshiba.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/wiretap/toshiba.c b/wiretap/toshiba.c index daafe782e5..de52620553 100644 --- a/wiretap/toshiba.c +++ b/wiretap/toshiba.c @@ -1,6 +1,6 @@ /* toshiba.c * - * $Id: toshiba.c,v 1.15 2001/03/10 06:33:58 guy Exp $ + * $Id: toshiba.c,v 1.16 2001/10/04 08:30:36 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -104,8 +104,8 @@ static const char toshiba_hdr_magic[] = static const char toshiba_rec_magic[] = { '[', 'N', 'o', '.' }; #define TOSHIBA_REC_MAGIC_SIZE (sizeof toshiba_rec_magic / sizeof toshiba_rec_magic[0]) -static gboolean toshiba_read(wtap *wth, int *err, int *data_offset); -static int toshiba_seek_read(wtap *wth, int seek_off, +static gboolean toshiba_read(wtap *wth, int *err, long *data_offset); +static int toshiba_seek_read(wtap *wth, long seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int len); static gboolean parse_single_hex_dump_line(char* rec, guint8 *buf, int byte_offset); static int parse_toshiba_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err); @@ -115,7 +115,7 @@ static int parse_toshiba_rec_hdr(wtap *wth, FILE_T fh, /* Seeks to the beginning of the next packet, and returns the byte offset. Returns -1 on failure. */ /* XXX - Handle I/O errors. */ -static int toshiba_seek_next_packet(wtap *wth) +static long toshiba_seek_next_packet(wtap *wth) { int byte; int level = 0; @@ -198,9 +198,9 @@ int toshiba_open(wtap *wth, int *err) } /* Find the next packet and parse it; called from wtap_loop(). */ -static gboolean toshiba_read(wtap *wth, int *err, int *data_offset) +static gboolean toshiba_read(wtap *wth, int *err, long *data_offset) { - int offset = 0; + long offset; guint8 *buf; int pkt_len; @@ -229,8 +229,8 @@ static gboolean toshiba_read(wtap *wth, int *err, int *data_offset) /* Used to read packets in random-access fashion */ static int -toshiba_seek_read (wtap *wth, int seek_off, union wtap_pseudo_header *pseudo_header, - guint8 *pd, int len) +toshiba_seek_read (wtap *wth, long seek_off, + union wtap_pseudo_header *pseudo_header, guint8 *pd, int len) { int pkt_len; int err; |