aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorJeff Foster <jfoste@woodward.com>2001-01-16 20:12:30 +0000
committerJeff Foster <jfoste@woodward.com>2001-01-16 20:12:30 +0000
commit5ff4d8a72109336004586afd6740e26dd1494378 (patch)
tree19ee101518eff332262b68fcd2fee299aadf6494 /wiretap
parent5da16b932a780d7c17a50c6de4c8863b816a5479 (diff)
Moved settingg wth->file_encap from sniffer_encap to precede the
skip_header_records call because skip_header_records function may set the field based upon the header records svn path=/trunk/; revision=2903
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/ngsniffer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c
index aa543caee1..adcef00ab1 100644
--- a/wiretap/ngsniffer.c
+++ b/wiretap/ngsniffer.c
@@ -1,6 +1,6 @@
/* ngsniffer.c
*
- * $Id: ngsniffer.c,v 1.58 2001/01/16 09:17:34 guy Exp $
+ * $Id: ngsniffer.c,v 1.59 2001/01/16 20:12:30 jfoster Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@@ -436,6 +436,11 @@ int ngsniffer_open(wtap *wth, int *err)
wth->file_type = WTAP_FILE_NGSNIFFER_UNCOMPRESSED;
}
+ /* Set encap type before reading header records because the
+ * header record may change encap type.
+ */
+ wth->file_encap = sniffer_encap[version.network];
+
/*
* We don't know how to handle the remaining header record types,
* so we just skip them
@@ -480,7 +485,6 @@ int ngsniffer_open(wtap *wth, int *err)
wth->subtype_close = ngsniffer_close;
wth->snapshot_length = 16384; /* not available in header, only in frame */
wth->capture.ngsniffer->timeunit = Usec[version.timeunit];
- wth->file_encap = sniffer_encap[version.network];
wth->capture.ngsniffer->is_atm =
(wth->file_encap == WTAP_ENCAP_ATM_SNIFFER);