#define TOSHIBA_MAX_PACKET_LEN 16384
static gboolean toshiba_read(wtap *wth, int *err, gchar **err_info,
- long *data_offset);
-static gboolean toshiba_seek_read(wtap *wth, long seek_off,
+ gint64 *data_offset);
+static gboolean toshiba_seek_read(wtap *wth, gint64 seek_off,
union wtap_pseudo_header *pseudo_header, guint8 *pd, int len,
int *err, gchar **err_info);
static gboolean parse_single_hex_dump_line(char* rec, guint8 *buf,
/* 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 toshiba_seek_next_packet(wtap *wth, int *err)
+static gint64 toshiba_seek_next_packet(wtap *wth, int *err)
{
int byte;
guint level = 0;
- long cur_off;
+ gint64 cur_off;
while ((byte = file_getc(wth->fh)) != EOF) {
if (byte == toshiba_rec_magic[level]) {
wth->snapshot_length = 0; /* not known */
wth->subtype_read = toshiba_read;
wth->subtype_seek_read = toshiba_seek_read;
+ wth->tsprecision = WTAP_FILE_TSPREC_CSEC;
return 1;
}
/* Find the next packet and parse it; called from wtap_read(). */
static gboolean toshiba_read(wtap *wth, int *err, gchar **err_info,
- long *data_offset)
+ gint64 *data_offset)
{
- long offset;
+ gint64 offset;
guint8 *buf;
int pkt_len;
/* Used to read packets in random-access fashion */
static gboolean
-toshiba_seek_read (wtap *wth, long seek_off,
+toshiba_seek_read (wtap *wth, gint64 seek_off,
union wtap_pseudo_header *pseudo_header, guint8 *pd, int len,
int *err, gchar **err_info)
{
}
if (wth) {
- wth->phdr.ts.tv_sec = hr * 3600 + min * 60 + sec;
- wth->phdr.ts.tv_usec = csec * 10000;
+ wth->phdr.ts.secs = hr * 3600 + min * 60 + sec;
+ wth->phdr.ts.nsecs = csec * 10000000;
wth->phdr.caplen = pkt_len;
wth->phdr.len = pkt_len;
}