} direction_enum;
static gboolean pppdump_read(wtap *wth, int *err, gchar **err_info,
- long *data_offset);
-static gboolean pppdump_seek_read(wtap *wth, long seek_off,
+ gint64 *data_offset);
+static gboolean pppdump_seek_read(wtap *wth, gint64 seek_off,
union wtap_pseudo_header *pseudo_header, guint8 *pd, int len,
int *err, gchar **err_info);
wth->subtype_read = pppdump_read;
wth->subtype_seek_read = pppdump_seek_read;
wth->subtype_close = pppdump_close;
+ wth->tsprecision = WTAP_FILE_TSPREC_DSEC;
state->seek_state = g_malloc(sizeof(pppdump_t));
/* Find the next packet and parse it; called from wtap_read(). */
static gboolean
-pppdump_read(wtap *wth, int *err, gchar **err_info, long *data_offset)
+pppdump_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset)
{
int num_bytes;
direction_enum direction;
wth->phdr.len = num_bytes;
wth->phdr.caplen = num_bytes;
- wth->phdr.ts.tv_sec = state->timestamp;
- wth->phdr.ts.tv_usec = state->tenths * 100000;
+ wth->phdr.ts.secs = state->timestamp;
+ wth->phdr.ts.nsecs = state->tenths * 100000000;
wth->phdr.pkt_encap = WTAP_ENCAP_PPP_WITH_PHDR;
wth->pseudo_header.p2p.sent = (direction == DIRECTION_SENT ? TRUE : FALSE);
pkt->sd_offset = state->offset;
}
+ if (n == 0)
+ continue;
+
g_assert(num_bytes_to_skip < n);
while (num_bytes_to_skip) {
if (file_getc(fh) == EOF)
/* Used to read packets in random-access fashion */
static gboolean
pppdump_seek_read(wtap *wth,
- long seek_off,
+ gint64 seek_off,
union wtap_pseudo_header *pseudo_header,
guint8 *pd,
int len,