diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-12-24 00:20:09 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-12-24 00:20:09 +0000 |
commit | 0d7a48a8bfb2b9f954d0f6b37172bb28e0239a92 (patch) | |
tree | 1ed37fc09109411f1581cc5ae34a32b28a5d80cc /epan/dissectors/packet-gsm_map.c | |
parent | 57c6542aaf3e0c60a46dd60f9d0c6a814928bc8d (diff) |
Add a ENC_3GPP_TS_23_038 encoding, for the standard SMS alphabet in a
bit-packed string, and use it in some places.
svn path=/trunk/; revision=54428
Diffstat (limited to 'epan/dissectors/packet-gsm_map.c')
-rw-r--r-- | epan/dissectors/packet-gsm_map.c | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c index bf44cae516..cb39c895be 100644 --- a/epan/dissectors/packet-gsm_map.c +++ b/epan/dissectors/packet-gsm_map.c @@ -3546,7 +3546,7 @@ static const ber_sequence_t gsm_map_ExternalSignalInfo_sequence[] = { int dissect_gsm_map_ExternalSignalInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 764 "../../asn1/gsm_map/gsm_map.cnf" +#line 758 "../../asn1/gsm_map/gsm_map.cnf" /* -- Information about the internal structure is given in -- clause 7.6.9. @@ -3762,7 +3762,7 @@ dissect_gsm_map_AlertingPattern(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in int dissect_gsm_map_GSN_Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 589 "../../asn1/gsm_map/gsm_map.cnf" +#line 583 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; guint8 octet; @@ -3913,7 +3913,7 @@ dissect_gsm_map_HLR_List(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse int dissect_gsm_map_GlobalCellId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 844 "../../asn1/gsm_map/gsm_map.cnf" +#line 838 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -4190,7 +4190,7 @@ dissect_gsm_map_TA_Id(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _ int dissect_gsm_map_RAIdentity(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 613 "../../asn1/gsm_map/gsm_map.cnf" +#line 607 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -4238,7 +4238,7 @@ dissect_gsm_map_CellGlobalIdOrServiceAreaIdFixedLength(gboolean implicit_tag _U_ int dissect_gsm_map_LAIFixedLength(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 625 "../../asn1/gsm_map/gsm_map.cnf" +#line 619 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -4531,7 +4531,7 @@ dissect_gsm_map_ss_ForwardingOptions(gboolean implicit_tag _U_, tvbuff_t *tvb _U offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); -#line 532 "../../asn1/gsm_map/gsm_map.cnf" +#line 526 "../../asn1/gsm_map/gsm_map.cnf" proto_tree_add_item(tree, hf_gsm_map_notification_to_forwarding_party, tvb, 0,1,ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_map_redirecting_presentation, tvb, 0,1,ENC_BIG_ENDIAN); @@ -4897,13 +4897,7 @@ dissect_gsm_map_ss_USSD_String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int switch(sms_encoding){ case SMS_ENCODING_7BIT: case SMS_ENCODING_7BIT_LANG: - out_len = gsm_sms_char_7bit_unpack(0, length, sizeof(msgbuf), - tvb_get_ptr(parameter_tvb, 0, length), - msgbuf); - - msgbuf[out_len] = '\0'; - utf8_text = gsm_sms_chars_to_utf8(msgbuf, out_len); - proto_tree_add_text(tree, parameter_tvb, 0, length, "USSD String: %s", utf8_text); + proto_tree_add_text(tree, parameter_tvb , 0, length, "USSD String: %s", tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, length, ENC_3GPP_TS_23_038|ENC_NA)); break; case SMS_ENCODING_8BIT: /* XXX - ASCII, or some extended ASCII? */ @@ -8479,7 +8473,7 @@ dissect_gsm_map_ms_SGSN_Capability(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, static int dissect_gsm_map_ms_APN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 878 "../../asn1/gsm_map/gsm_map.cnf" +#line 872 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; int length, name_len, tmp; @@ -8726,7 +8720,7 @@ dissect_gsm_map_ms_UpdateGprsLocationRes(gboolean implicit_tag _U_, tvbuff_t *tv static int dissect_gsm_map_ms_IntegrityProtectionInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 661 "../../asn1/gsm_map/gsm_map.cnf" +#line 655 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; asn1_ctx_t asn1_ctx; @@ -8749,7 +8743,7 @@ dissect_gsm_map_ms_IntegrityProtectionInformation(gboolean implicit_tag _U_, tvb static int dissect_gsm_map_ms_EncryptionInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 673 "../../asn1/gsm_map/gsm_map.cnf" +#line 667 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; asn1_ctx_t asn1_ctx; @@ -8834,7 +8828,7 @@ dissect_gsm_map_ms_AllowedUMTS_Algorithms(gboolean implicit_tag _U_, tvbuff_t *t static int dissect_gsm_map_ms_RadioResourceInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 637 "../../asn1/gsm_map/gsm_map.cnf" +#line 631 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -8905,7 +8899,7 @@ dissect_gsm_map_ms_BSSMAP_ServiceHandover(gboolean implicit_tag _U_, tvbuff_t *t static int dissect_gsm_map_ms_RANAP_ServiceHandover(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 649 "../../asn1/gsm_map/gsm_map.cnf" +#line 643 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; asn1_ctx_t asn1_ctx; @@ -9851,7 +9845,7 @@ static int dissect_gsm_map_ms_T_forwardingOptions(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_gsm_map_ms_Ext_ForwOptions(implicit_tag, tvb, offset, actx, tree, hf_index); -#line 538 "../../asn1/gsm_map/gsm_map.cnf" +#line 532 "../../asn1/gsm_map/gsm_map.cnf" proto_tree_add_item(tree, hf_gsm_map_notification_to_forwarding_party, tvb, 0,1,ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_map_redirecting_presentation, tvb, 0,1,ENC_BIG_ENDIAN); @@ -11014,7 +11008,7 @@ dissect_gsm_map_ms_VlrCamelSubscriptionInfo(gboolean implicit_tag _U_, tvbuff_t static int dissect_gsm_map_ms_PDP_Type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 546 "../../asn1/gsm_map/gsm_map.cnf" +#line 540 "../../asn1/gsm_map/gsm_map.cnf" guint8 pdp_type_org; tvbuff_t *parameter_tvb; @@ -11047,7 +11041,7 @@ dissect_gsm_map_ms_PDP_Type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of int dissect_gsm_map_ms_QoS_Subscribed(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 568 "../../asn1/gsm_map/gsm_map.cnf" +#line 562 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; @@ -11069,7 +11063,7 @@ dissect_gsm_map_ms_QoS_Subscribed(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int dissect_gsm_map_ms_Ext_QoS_Subscribed(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 579 "../../asn1/gsm_map/gsm_map.cnf" +#line 573 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; @@ -12572,7 +12566,7 @@ dissect_gsm_map_ms_GeographicalInformation(gboolean implicit_tag _U_, tvbuff_t * static int dissect_gsm_map_ms_LocationNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 905 "../../asn1/gsm_map/gsm_map.cnf" +#line 899 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; const char *digit_str; @@ -15423,7 +15417,7 @@ dissect_gsm_map_lcs_ProvideSubscriberLocation_Arg(gboolean implicit_tag _U_, tvb int dissect_gsm_map_lcs_Ext_GeographicalInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 856 "../../asn1/gsm_map/gsm_map.cnf" +#line 850 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -16849,7 +16843,7 @@ static const ber_sequence_t gsm_old_Bss_APDU_sequence[] = { static int dissect_gsm_old_Bss_APDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 686 "../../asn1/gsm_map/gsm_map.cnf" +#line 680 "../../asn1/gsm_map/gsm_map.cnf" guint8 octet; guint8 length; tvbuff_t *next_tvb; @@ -18396,7 +18390,7 @@ dissect_gsm_ss_LCS_PeriodicLocationCancellationArg(gboolean implicit_tag _U_, tv static int dissect_gsm_map_ericsson_T_locationInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 934 "../../asn1/gsm_map/gsm_map.cnf" +#line 928 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; guint8 rat; |