diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-03-10 06:33:58 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-03-10 06:33:58 +0000 |
commit | a251addb63587c5e064bcc58422c0951c4dc4c97 (patch) | |
tree | c5e776c62f153404ad4617c940bafc4c4fb4d74f /wiretap/etherpeek.c | |
parent | 9b1133892b4a545eb142ce4529a53de353f41410 (diff) |
Obliging every capture file reader's "open()" routine to seek to the
beginning of the file before reading anything from the file is bogus -
do that in the loop that tries each of the open routines, instead.
(They may have to reset the seek pointer later if, for example, the
capture file begins with the first packet, and the "open()" routine
looks at that packet to try to guess whether the packet is in the file
format in question.)
Set "wth->data_offset" to 0 while you're at it, so capture file readers
don't have to do that, either.
svn path=/trunk/; revision=3123
Diffstat (limited to 'wiretap/etherpeek.c')
-rw-r--r-- | wiretap/etherpeek.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/wiretap/etherpeek.c b/wiretap/etherpeek.c index 6fa81e8aff..5a6181b55f 100644 --- a/wiretap/etherpeek.c +++ b/wiretap/etherpeek.c @@ -2,7 +2,7 @@ * Routines for opening etherpeek files * Copyright (c) 2001, Daniel Thompson <d.thompson@gmx.net> * - * $Id: etherpeek.c,v 1.2 2001/03/09 06:34:59 guy Exp $ + * $Id: etherpeek.c,v 1.3 2001/03/10 06:33:57 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org> @@ -129,9 +129,6 @@ int etherpeek_open(wtap *wth, int *err) * support */ - file_seek(wth->fh, 0, SEEK_SET); - wth->data_offset = 0; - g_assert(sizeof(ep_hdr.master) == ETHERPEEK_MASTER_HDR_SIZE); wtap_file_read_unknown_bytes( &ep_hdr.master, sizeof(ep_hdr.master), wth->fh, err); |