diff --git a/asn1/gsmmap/gsmmap.cnf b/asn1/gsmmap/gsmmap.cnf index d14a480015..77434944e7 100644 --- a/asn1/gsmmap/gsmmap.cnf +++ b/asn1/gsmmap/gsmmap.cnf @@ -527,6 +527,24 @@ Component subtree = proto_item_add_subtree(item, ett_gsm_map_RAIdentity); de_gmm_rai(parameter_tvb, subtree, 0, 3, NULL,0); +#.FN_PARS LAIFixedLength + + VAL_PTR = ¶meter_tvb + +#.FN_BODY LAIFixedLength + + tvbuff_t *parameter_tvb; + proto_item *item; + proto_tree *subtree; + +%(DEFAULT_BODY)s + + if (!parameter_tvb) + return offset; + item = get_ber_last_created_item(); + subtree = proto_item_add_subtree(item, ett_gsm_map_LAIFixedLength); + dissect_e212_mcc_mnc(parameter_tvb, subtree, 0); + #---------------------------------------------------------------------------------------- #.TYPE_ATTR SS-Code TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ssCode_vals) diff --git a/asn1/gsmmap/packet-gsm_map-template.c b/asn1/gsmmap/packet-gsm_map-template.c index b344a9aea7..6cf53572ac 100644 --- a/asn1/gsmmap/packet-gsm_map-template.c +++ b/asn1/gsmmap/packet-gsm_map-template.c @@ -47,6 +47,7 @@ #include "packet-gsm_map.h" #include "packet-gsm_a.h" #include "packet-tcap.h" +#include "packet-e212.h" #define PNAME "GSM Mobile Application" #define PSNAME "GSM_MAP" @@ -122,6 +123,7 @@ static gint ett_gsm_map_GSMMAPPDU = -1; static gint ett_gsm_map_ext_qos_subscribed = -1; static gint ett_gsm_map_pdptypenumber = -1; static gint ett_gsm_map_RAIdentity = -1; +static gint ett_gsm_map_LAIFixedLength = -1; #include "packet-gsm_map-ett.c" @@ -828,7 +830,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(FALSE, tvb, offset, pinfo, tree, -1); + offset=dissect_gsm_map_ProvideRoamingNumberRes(TRUE, tvb, offset, pinfo, tree, -1); break; case 6: /*resumeCallHandling*/ offset=dissect_gsm_map_ResumeCallHandlingRes(FALSE, tvb, offset, pinfo, tree, -1); @@ -940,7 +942,7 @@ static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff case 56: /*sendAuthenticationInfo*/ octet = tvb_get_guint8(tvb,0) & 0xf; if ( octet == 3){ /* This is a V3 message ??? */ - offset = offset +2; + 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); @@ -1215,6 +1217,7 @@ dissect_gsm_map_GSMMAPPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, if (check_col(pinfo->cinfo, COL_INFO)){ col_set_str(pinfo->cinfo, COL_INFO, val_to_str(gsmmap_pdu_type, gsm_map_Component_vals, "Unknown GSM-MAP PDU (%u)")); + col_append_fstr(pinfo->cinfo, COL_INFO, " "); } offset = dissect_gsm_map_Component(FALSE, tvb, 0, pinfo, tree, hf_gsm_map_Component_PDU); return offset; @@ -1856,6 +1859,7 @@ void proto_register_gsm_map(void) { &ett_gsm_map_ext_qos_subscribed, &ett_gsm_map_pdptypenumber, &ett_gsm_map_RAIdentity, + &ett_gsm_map_LAIFixedLength, #include "packet-gsm_map-ettarr.c" }; diff --git a/epan/dissectors/packet-bssgp.c b/epan/dissectors/packet-bssgp.c index 480387e183..071aa0c976 100644 --- a/epan/dissectors/packet-bssgp.c +++ b/epan/dissectors/packet-bssgp.c @@ -38,6 +38,8 @@ #include #include +#include "packet-e212.h" + /*#define BSSGP_DEBUG*/ #define BSSGP_LITTLE_ENDIAN FALSE #define BSSGP_TRANSLATION_MAX_LEN 50 @@ -1386,15 +1388,12 @@ static char* decode_mcc_mnc(build_info_t *bi, proto_tree *parent_tree) { #define RES_LEN 15 const guint8 UNUSED_MNC3 = 0x0f; - proto_item *pi_mcc, *pi_mnc; guint8 mcc1, mcc2, mcc3, mnc1, mnc2, mnc3, data; guint16 start_offset, mcc, mnc; static char mcc_mnc[RES_LEN]; start_offset = bi->offset; - pi_mcc = proto_tree_add_text(parent_tree, bi->tvb, bi->offset, 3, "MCC"); - pi_mnc = proto_tree_add_text(parent_tree, bi->tvb, bi->offset, 3, "MNC"); data = tvb_get_guint8(bi->tvb, bi->offset); mcc2 = get_masked_guint8(data, BSSGP_MASK_LEFT_OCTET_HALF); @@ -1423,21 +1422,17 @@ decode_mcc_mnc(build_info_t *bi, proto_tree *parent_tree) { mnc += 10 * mnc + mnc3; } - proto_tree_add_uint_hidden(bi->bssgp_tree, hf_bssgp_mcc, + proto_tree_add_uint(parent_tree, hf_bssgp_mcc, bi->tvb, start_offset, 3, mcc); - proto_tree_add_uint_hidden(bi->bssgp_tree, hf_bssgp_mnc, + proto_tree_add_uint(parent_tree, hf_bssgp_mnc, bi->tvb, start_offset, 3, mnc); - proto_item_append_text(pi_mcc, ": %03u", mcc); - if (mnc3 != UNUSED_MNC3) { /* Three digits mnc */ - proto_item_append_text(pi_mnc, ": %03u", mnc); g_snprintf(mcc_mnc, RES_LEN, "%u-%03u", mcc, mnc); } else { /* Two digits mnc */ - proto_item_append_text(pi_mnc, ": %02u", mnc); g_snprintf(mcc_mnc, RES_LEN, "%u-%02u", mcc, mnc); } #undef RES_LEN @@ -5753,7 +5748,7 @@ proto_register_bssgp(void) }, { &hf_bssgp_mcc, { "MCC", "bssgp.mcc", - FT_UINT8, BASE_DEC, NULL, 0x0, + FT_UINT8, BASE_DEC, VALS(E212_codes), 0x0, "", HFILL } }, { &hf_bssgp_mnc, diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c index 9a667500f6..bbaac0c7da 100644 --- a/epan/dissectors/packet-gsm_map.c +++ b/epan/dissectors/packet-gsm_map.c @@ -55,6 +55,7 @@ #include "packet-gsm_map.h" #include "packet-gsm_a.h" #include "packet-tcap.h" +#include "packet-e212.h" #define PNAME "GSM Mobile Application" #define PSNAME "GSM_MAP" @@ -939,7 +940,7 @@ static int hf_gsm_map_SupportedGADShapes_ellipsoidPointWithAltitudeAndUncertaint static int hf_gsm_map_SupportedGADShapes_ellipsoidArc = -1; /*--- End of included file: packet-gsm_map-hf.c ---*/ -#line 112 "packet-gsm_map-template.c" +#line 113 "packet-gsm_map-template.c" /* Initialize the subtree pointers */ static gint ett_gsm_map = -1; @@ -953,6 +954,7 @@ static gint ett_gsm_map_GSMMAPPDU = -1; static gint ett_gsm_map_ext_qos_subscribed = -1; static gint ett_gsm_map_pdptypenumber = -1; static gint ett_gsm_map_RAIdentity = -1; +static gint ett_gsm_map_LAIFixedLength = -1; /*--- Included file: packet-gsm_map-ett.c ---*/ @@ -1355,7 +1357,7 @@ static gint ett_gsm_map_SecureTransportErrorParam = -1; static gint ett_gsm_map_ExtensionContainer = -1; /*--- End of included file: packet-gsm_map-ett.c ---*/ -#line 127 "packet-gsm_map-template.c" +#line 129 "packet-gsm_map-template.c" static dissector_table_t sms_dissector_table; /* SMS TPDU */ static dissector_handle_t data_handle; @@ -3465,8 +3467,23 @@ static int dissect_numberOfRequestedVectors(packet_info *pinfo, proto_tree *tree int dissect_gsm_map_LAIFixedLength(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) { +#line 535 "gsmmap.cnf" + + tvbuff_t *parameter_tvb; + proto_item *item; + proto_tree *subtree; + offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, - NULL); + ¶meter_tvb); + + + if (!parameter_tvb) + return offset; + item = get_ber_last_created_item(); + subtree = proto_item_add_subtree(item, ett_gsm_map_LAIFixedLength); + dissect_e212_mcc_mnc(parameter_tvb, subtree, 0); + + return offset; } @@ -14422,7 +14439,7 @@ static void dissect_Component_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree /*--- End of included file: packet-gsm_map-fn.c ---*/ -#line 345 "packet-gsm_map-template.c" +#line 347 "packet-gsm_map-template.c" const value_string gsm_map_opr_code_strings[] = { { 2, "updateLocation" }, @@ -14909,7 +14926,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(FALSE, tvb, offset, pinfo, tree, -1); + offset=dissect_gsm_map_ProvideRoamingNumberRes(TRUE, tvb, offset, pinfo, tree, -1); break; case 6: /*resumeCallHandling*/ offset=dissect_gsm_map_ResumeCallHandlingRes(FALSE, tvb, offset, pinfo, tree, -1); @@ -15021,7 +15038,7 @@ static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff case 56: /*sendAuthenticationInfo*/ octet = tvb_get_guint8(tvb,0) & 0xf; if ( octet == 3){ /* This is a V3 message ??? */ - offset = offset +2; + 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); @@ -15296,6 +15313,7 @@ dissect_gsm_map_GSMMAPPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, if (check_col(pinfo->cinfo, COL_INFO)){ col_set_str(pinfo->cinfo, COL_INFO, val_to_str(gsmmap_pdu_type, gsm_map_Component_vals, "Unknown GSM-MAP PDU (%u)")); + col_append_fstr(pinfo->cinfo, COL_INFO, " "); } offset = dissect_gsm_map_Component(FALSE, tvb, 0, pinfo, tree, hf_gsm_map_Component_PDU); return offset; @@ -19194,7 +19212,7 @@ void proto_register_gsm_map(void) { "", HFILL }}, /*--- End of included file: packet-gsm_map-hfarr.c ---*/ -#line 1844 "packet-gsm_map-template.c" +#line 1847 "packet-gsm_map-template.c" }; /* List of subtrees */ @@ -19210,6 +19228,7 @@ void proto_register_gsm_map(void) { &ett_gsm_map_ext_qos_subscribed, &ett_gsm_map_pdptypenumber, &ett_gsm_map_RAIdentity, + &ett_gsm_map_LAIFixedLength, /*--- Included file: packet-gsm_map-ettarr.c ---*/ @@ -19612,7 +19631,7 @@ void proto_register_gsm_map(void) { &ett_gsm_map_ExtensionContainer, /*--- End of included file: packet-gsm_map-ettarr.c ---*/ -#line 1861 "packet-gsm_map-template.c" +#line 1865 "packet-gsm_map-template.c" }; /* Register protocol */