diff options
author | Anders Broman <anders.broman@ericsson.com> | 2005-10-04 05:42:18 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2005-10-04 05:42:18 +0000 |
commit | e1ebb0953dde7a49420ca901047633008c3f75c6 (patch) | |
tree | 22f5af43a39f5c931bcd2ccccd5bc0158a14a58d /wiretap/atm.c | |
parent | 1f02bfa0afe8a039616ffb118ea85a06576d7c83 (diff) |
From Rene Piltz:
Due to the fact that 3G Signaling appears at an undefined VPI/VCI I added a heuristics (very simple) which should take care of this fact.
svn path=/trunk/; revision=16108
Diffstat (limited to 'wiretap/atm.c')
-rw-r--r-- | wiretap/atm.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/wiretap/atm.c b/wiretap/atm.c index fb730b7c19..7ddfe7aabc 100644 --- a/wiretap/atm.c +++ b/wiretap/atm.c @@ -88,7 +88,14 @@ 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; } void @@ -102,6 +109,10 @@ 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 @@ -110,7 +121,16 @@ atm_guess_lane_type(const guint8 *pd, guint32 len, * still be situations where the user has to * tell us. */ - pseudo_header->atm.subtype = TRAF_ST_LANE_802_3; + 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; + } } } } |