aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/atm.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-10-04 10:13:15 +0000
committerGuy Harris <guy@alum.mit.edu>2005-10-04 10:13:15 +0000
commitad2023cdb8cb59a6dedf21487027470d98ea08cc (patch)
tree81f5a379989fcbf56762ebd849f7538e71a26257 /wiretap/atm.c
parentf7482d14481b03ed536919b10c62021a6df4200a (diff)
A heuristic that only treats packets that appear to be LANE-encapsulated
Ethernet packets with a length field as LANE packets, and doesn't do so for packets that appear to be LANE-encapsulated Ethernet packets with a type field, is too weak. Back out that part of the heuristics added in the previous checkin. svn path=/trunk/; revision=16111
Diffstat (limited to 'wiretap/atm.c')
-rw-r--r--wiretap/atm.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/wiretap/atm.c b/wiretap/atm.c
index 7ddfe7aabc..16a026f6fb 100644
--- a/wiretap/atm.c
+++ b/wiretap/atm.c
@@ -88,14 +88,13 @@ atm_guess_traffic_type(const guint8 *pd, guint32 len,
pseudo_header->atm.type = TRAF_LANE;
atm_guess_lane_type(pd, len, pseudo_header);
}
- return;
+ } else {
+ /*
+ * Not only VCI 5 is used for signaling. It might be
+ * one of these VCIs.
+ */
+ pseudo_header->atm.aal = AAL_SIGNALLING;
}
- else
- /*
- * Not only VCI 5 is used for signaling. It might be
- * one of these VCIs
- */
- pseudo_header->atm.aal = AAL_SIGNALLING;
}
void
@@ -109,10 +108,6 @@ atm_guess_lane_type(const guint8 *pd, guint32 len,
*/
pseudo_header->atm.subtype = TRAF_ST_LANE_LE_CTRL;
} else {
- guint32 len_802_3;
- len_802_3 = pd[10];
- len_802_3 <<= 8;
- len_802_3 |= pd[11];
/*
* XXX - Ethernet, or Token Ring?
* Assume Ethernet for now; if we see earlier
@@ -121,16 +116,7 @@ atm_guess_lane_type(const guint8 *pd, guint32 len,
* still be situations where the user has to
* tell us.
*/
- if (( len_802_3 + 5 + 5 + 2 ) == len )
- pseudo_header->atm.subtype = TRAF_ST_LANE_802_3;
- else
- /*
- * When it is not a 802.3 frame it might be a signalling one.
- */
- {
- pseudo_header->atm.aal = AAL_SIGNALLING;
- pseudo_header->atm.subtype = TRAF_ST_UNKNOWN;
- }
+ pseudo_header->atm.subtype = TRAF_ST_LANE_802_3;
}
}
}