diff options
author | Anders Broman <anders.broman@ericsson.com> | 2006-02-18 23:29:51 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2006-02-18 23:29:51 +0000 |
commit | 06d62952872508243c53c521f531f66afe06cacc (patch) | |
tree | 47e600ff46978be88df6fbdf4f8315d501df415e /asn1/gsmmap | |
parent | accc35dd2a2f9f4324bd050a2cc37e1de1d37927 (diff) |
From Florent.Drouin@alcatel.fr
Add the same workaround used in packet-ftam.c for the bad handling of the asn "IMPLICIT SEQUENCE", in the packet-gsm_map-template.c. This patch concerns Map V3 messages, not correctly decoded with the previous workaround "offset=offset+2".
Change a parameter for Provide Roaming Number decoding.
Add a decoding fonction for "Channel needed" parameter to avoid a decoding error for Paging messages
with a change to actually dissct channel needed.
svn path=/trunk/; revision=17350
Diffstat (limited to 'asn1/gsmmap')
-rw-r--r-- | asn1/gsmmap/packet-gsm_map-template.c | 90 |
1 files changed, 67 insertions, 23 deletions
diff --git a/asn1/gsmmap/packet-gsm_map-template.c b/asn1/gsmmap/packet-gsm_map-template.c index 6cf53572ac..d2c8bfb3a8 100644 --- a/asn1/gsmmap/packet-gsm_map-template.c +++ b/asn1/gsmmap/packet-gsm_map-template.c @@ -555,7 +555,12 @@ dissect_gsm_map_Opcode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pac } static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) { - + + gint8 bug_class; + gboolean bug_pc, bug_ind_field; + gint32 bug_tag; + guint32 bug_len1; + guint8 octet; switch(opcode){ @@ -564,8 +569,12 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv break; case 3: /*cancelLocation*/ octet = tvb_get_guint8(tvb,0) & 0xf; - if ( octet == 3){ /* */ - offset = offset +2; + if ( octet == 3){ /* */ + /* XXX asn2eth can not yet handle tagged assignment yes so this + * XXX is some conformance file magic to work around that bug + */ + offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag); + offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field); offset=dissect_gsm_map_CancelLocationArg(TRUE, tvb, offset, pinfo, tree, -1); }else{ offset=dissect_gsm_map_CancelLocationArgV2(FALSE, tvb, offset, pinfo, tree, -1); @@ -632,8 +641,12 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv break; case 29: /*sendEndSignal*/ octet = tvb_get_guint8(tvb,0) & 0xf; - if ( octet == 3){ /* This is a V3 message ??? */ - offset = offset +2; + if ( octet == 3){ /* This is a V3 message ??? */ + /* XXX asn2eth can not yet handle tagged assignment yes so this + * XXX is some conformance file magic to work around that bug + */ + offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag); + offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field); offset=dissect_gsm_map_SendEndSignalArgV3(TRUE, tvb, offset, pinfo, tree, hf_gsm_mapSendEndSignal); }else{ offset=dissect_gsm_map_Bss_APDU(FALSE, tvb, offset, pinfo, tree, hf_gsm_mapSendEndSignal); @@ -647,8 +660,12 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv break; case 33: /*processAccessSignalling*/ octet = tvb_get_guint8(tvb,0) & 0xf; - if ( octet == 3){ /* This is a V3 message ??? */ - offset = offset +2; + if ( octet == 3){ /* This is a V3 message ??? */ + /* XXX asn2eth can not yet handle tagged assignment yes so this + * XXX is some conformance file magic to work around that bug + */ + offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag); + offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field); offset = dissect_gsm_map_ProcessAccessSignallingArgV3(TRUE, tvb, offset, pinfo, tree, hf_gsm_mapSendEndSignal); }else{ offset=dissect_gsm_map_Bss_APDU(FALSE, tvb, offset, pinfo, tree, -1); @@ -657,7 +674,11 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv case 34: /*forwardAccessSignalling*/ octet = tvb_get_guint8(tvb,0) & 0xf; if ( octet == 3){ /* This is a V3 message ??? */ - offset = offset +2; + /* XXX asn2eth can not yet handle tagged assignment yes so this + * XXX is some conformance file magic to work around that bug + */ + offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag); + offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field); offset=dissect_gsm_map_ForwardAccessSignallingArgV3(TRUE, tvb, offset, pinfo, tree, -1); }else{ offset=dissect_gsm_map_Bss_APDU(FALSE, tvb, offset, pinfo, tree, -1); @@ -748,8 +769,12 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv break; case 68: /*prepareHandover*/ octet = tvb_get_guint8(tvb,0) & 0xf; - if ( octet == 3){ /* This is a V3 message ??? */ - offset = offset +2; + if ( octet == 3){ /* This is a V3 message ??? */ + /* XXX asn2eth can not yet handle tagged assignment yes so this + * XXX is some conformance file magic to work around that bug + */ + offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag); + offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field); offset=dissect_gsm_map_PrepareHO_ArgV3(TRUE, tvb, offset, pinfo, tree, -1); }else{ offset=dissect_gsm_map_PrepareHO_Arg(FALSE, tvb, offset, pinfo, tree, -1); @@ -814,6 +839,11 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) { + + gint8 bug_class; + gboolean bug_pc, bug_ind_field; + gint32 bug_tag; + guint32 bug_len1; guint8 octet; switch(opcode){ @@ -830,7 +860,7 @@ static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff offset=dissect_gsm_map_CancelLocationRes(FALSE, tvb, offset, pinfo, tree, -1); break; case 4: /*provideRoamingNumber*/ - offset=dissect_gsm_map_ProvideRoamingNumberRes(TRUE, tvb, offset, pinfo, tree, -1); + offset=dissect_gsm_map_ProvideRoamingNumberRes(FALSE, tvb, offset, pinfo, tree, -1); // TRUE florent break; case 6: /*resumeCallHandling*/ offset=dissect_gsm_map_ResumeCallHandlingRes(FALSE, tvb, offset, pinfo, tree, -1); @@ -875,7 +905,8 @@ static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff break; case 22: /*sendRoutingInfo*/ /* This is done to get around a problem with IMPLICIT tag:s */ - offset = offset +2; + offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag); + offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field); offset=dissect_gsm_map_SendRoutingInfoRes(TRUE, tvb, offset, pinfo, tree, -1); break; case 23: /*updateGprsLocation*/ @@ -934,20 +965,29 @@ static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff * however if the tag (3) is stripped of it should work with the 'new' def.(?) */ octet = tvb_get_guint8(tvb,0) & 0xf; - if ( octet == 3){ /* This is a V3 message ??? */ - offset = offset +2; + if ( octet == 3){ /* This is a V3 message ??? */ + /* XXX asn2eth can not yet handle tagged assignment yes so this + * XXX is some conformance file magic to work around that bug + */ + offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag); + offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field); } offset=dissect_gsm_map_SendIdentificationRes(TRUE, tvb, offset, pinfo, tree, -1); break; case 56: /*sendAuthenticationInfo*/ - octet = tvb_get_guint8(tvb,0) & 0xf; - if ( octet == 3){ /* This is a V3 message ??? */ - offset = offset + 2; - offset=dissect_gsm_map_SendAuthenticationInfoResV3(TRUE, tvb, offset, pinfo, tree, hf_gsm_map_SendAuthenticationInfoRes); - }else{ - offset=dissect_gsm_map_SendAuthenticationInfoRes(FALSE, tvb, offset, pinfo, tree, -1); - } - break; + octet = tvb_get_guint8(tvb,0) & 0xf; + if ( octet == 3){ /* This is a V3 message ??? */ + /* XXX asn2eth can not yet handle tagged assignment yes so this + * XXX is some conformance file magic to work around that bug + */ + offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag); + offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field); + + offset=dissect_gsm_map_SendAuthenticationInfoResV3(TRUE, tvb, offset, pinfo, tree, hf_gsm_map_SendAuthenticationInfoRes); + }else{ + offset=dissect_gsm_map_SendAuthenticationInfoRes(FALSE, tvb, offset, pinfo, tree, -1); + } + break; case 57: /*restoreData*/ offset=dissect_gsm_map_RestoreDataRes(FALSE, tvb, offset, pinfo, tree, -1); break; @@ -979,7 +1019,11 @@ static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff case 68: /*prepareHandover*/ octet = tvb_get_guint8(tvb,0) & 0xf; if ( octet == 3){ /* This is a V3 message ??? */ - offset = offset +2; + /* XXX asn2eth can not yet handle tagged assignment yes so this + * XXX is some conformance file magic to work around that bug + */ + offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag); + offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field); offset=dissect_gsm_map_PrepareHO_ResV3(TRUE, tvb, offset, pinfo, tree, hf_gsm_mapSendEndSignal); }else{ offset=dissect_gsm_map_PrepareHO_Res(FALSE, tvb, offset, pinfo, tree, -1); |