summaryrefslogtreecommitdiff
path: root/wiretap/ngsniffer.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-01-11 05:54:52 +0000
committerGuy Harris <guy@alum.mit.edu>2003-01-11 05:54:52 +0000
commit61e9a95dbab1b7f3c0e04c828511bf14c759882d (patch)
tree7128a3822002a4f76a5d7d62e192ed301a51744c /wiretap/ngsniffer.c
parent9f4148decfc9d402c7547758a8d8531bf25d00bd (diff)
downloadwireshark-61e9a95dbab1b7f3c0e04c828511bf14c759882d.tar.gz
If it doesn't begin with FF 00 it can't be LANE LE Control; if it's
LANE, claimed to be LE Control, but doesn't begin with FF 00, call it 802.3. svn path=/trunk/; revision=6901
Diffstat (limited to 'wiretap/ngsniffer.c')
-rw-r--r--wiretap/ngsniffer.c34
1 files changed, 29 insertions, 5 deletions
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c
index 5f93e96caf..60491592ff 100644
--- a/wiretap/ngsniffer.c
+++ b/wiretap/ngsniffer.c
@@ -1,6 +1,6 @@
/* ngsniffer.c
*
- * $Id: ngsniffer.c,v 1.106 2003/01/10 09:04:44 guy Exp $
+ * $Id: ngsniffer.c,v 1.107 2003/01/11 05:54:52 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -1694,11 +1694,35 @@ static int fix_pseudo_header(int encap, const guint8 *pd, int len,
* If the Windows Sniffer writes out one of its ATM
* capture files in DOS Sniffer format, it doesn't
* distinguish between LE Control and LANE encapsulated
- * LAN frames, so we fix that up here.
+ * LAN frames, it just marks them as LAN frames,
+ * so we fix that up here.
+ *
+ * I've also seen DOS Sniffer captures claiming that
+ * LANE packets that *don't* start with FF 00 are
+ * marked as LE Control frames, so we fix that up
+ * as well.
*/
- if (pseudo_header->atm.type == TRAF_LANE && len >= 2 &&
- pd[0] == 0xff && pd[1] == 0x00)
- pseudo_header->atm.subtype = TRAF_ST_LANE_LE_CTRL;
+ if (pseudo_header->atm.type == TRAF_LANE && len >= 2) {
+ if (pd[0] == 0xff && pd[1] == 0x00) {
+ /*
+ * This must be LE Control.
+ */
+ pseudo_header->atm.subtype =
+ TRAF_ST_LANE_LE_CTRL;
+ } else {
+ /*
+ * This can't be LE Control.
+ */
+ if (pseudo_header->atm.subtype ==
+ TRAF_ST_LANE_LE_CTRL) {
+ /*
+ * XXX - Ethernet or Token Ring?
+ */
+ pseudo_header->atm.subtype =
+ TRAF_ST_LANE_802_3;
+ }
+ }
+ }
break;
}
return encap;