aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2012-06-19 18:21:53 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2012-06-19 18:21:53 +0000
commit6356f914c40fbb73c3da552e9905be8e99109446 (patch)
tree8037393f8e75ac679fb24ba2c8ed40593fdeddc6
parentaab480d1916077f7c2f115cb5874268b6c8f6a6f (diff)
Use newly introduced proto_tree_add_unicode_string() to add UTF-8 strings
svn path=/trunk/; revision=43379
-rw-r--r--asn1/lte-rrc/lte-rrc.cnf7
-rw-r--r--asn1/rrc/rrc.cnf7
-rw-r--r--epan/dissectors/packet-lte-rrc.c18
-rw-r--r--epan/dissectors/packet-rrc.c24
4 files changed, 42 insertions, 14 deletions
diff --git a/asn1/lte-rrc/lte-rrc.cnf b/asn1/lte-rrc/lte-rrc.cnf
index 80b700bf9c..ba1c541ea0 100644
--- a/asn1/lte-rrc/lte-rrc.cnf
+++ b/asn1/lte-rrc/lte-rrc.cnf
@@ -722,6 +722,13 @@ if(ue_eutra_cap_tvb){
#.TYPE_ATTR
SystemInformationBlockType9/hnb-Name TYPE=FT_STRING DISPLAY=BASE_NONE
+#.FN_BODY SystemInformationBlockType9/hnb-Name VAL_PTR = &hnb_name_tvb HF_INDEX = -1
+ tvbuff_t *hnb_name_tvb = NULL;
+
+%(DEFAULT_BODY)s
+ proto_tree_add_unicode_string(tree, hf_index, hnb_name_tvb, 0, -1,
+ tvb_get_ephemeral_string(hnb_name_tvb, 0, tvb_length(hnb_name_tvb)));
+
#.FN_BODY RRCConnectionReject-r8-IEs/waitTime
%(DEFAULT_BODY)s
proto_item_append_text(actx->created_item, "s");
diff --git a/asn1/rrc/rrc.cnf b/asn1/rrc/rrc.cnf
index 7cce69fe0b..7b3381415a 100644
--- a/asn1/rrc/rrc.cnf
+++ b/asn1/rrc/rrc.cnf
@@ -599,6 +599,13 @@ tvbuff_t *parameter_tvb=NULL;
#.TYPE_ATTR
HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
+#.FN_BODY HNBName VAL_PTR = &hnbname_tvb HF_INDEX = -1
+ tvbuff_t *hnbname_tvb = NULL;
+
+%(DEFAULT_BODY)s
+ proto_tree_add_unicode_string(tree, hf_index, hnbname_tvb, 0, -1,
+ tvb_get_ephemeral_string(hnbname_tvb, 0, tvb_length(hnbname_tvb)));
+
#.FN_BODY CN-DomainIdentity VAL_PTR = (guint32*)(&rrc_nas_sys_info_gsm_map_type)
%(DEFAULT_BODY)s
diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c
index 80df88871f..1e0bef6b90 100644
--- a/epan/dissectors/packet-lte-rrc.c
+++ b/epan/dissectors/packet-lte-rrc.c
@@ -863,7 +863,7 @@ static int hf_lte_rrc_ac_Barring15_r9 = -1; /* INTEGER_0_7 */
static int hf_lte_rrc_ac_BarringMsg_r9 = -1; /* INTEGER_0_7 */
static int hf_lte_rrc_ac_BarringReg_r9 = -1; /* INTEGER_0_7 */
static int hf_lte_rrc_ac_BarringEmg_r9 = -1; /* INTEGER_0_7 */
-static int hf_lte_rrc_hnb_Name = -1; /* OCTET_STRING_SIZE_1_48 */
+static int hf_lte_rrc_hnb_Name = -1; /* T_hnb_Name */
static int hf_lte_rrc_messageIdentifier = -1; /* BIT_STRING_SIZE_16 */
static int hf_lte_rrc_serialNumber = -1; /* BIT_STRING_SIZE_16 */
static int hf_lte_rrc_warningType = -1; /* OCTET_STRING_SIZE_2 */
@@ -7719,16 +7719,22 @@ dissect_lte_rrc_SystemInformationBlockType8(tvbuff_t *tvb _U_, int offset _U_, a
static int
-dissect_lte_rrc_OCTET_STRING_SIZE_1_48(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
- offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
- 1, 48, FALSE, NULL);
+dissect_lte_rrc_T_hnb_Name(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+ tvbuff_t *hnb_name_tvb = NULL;
+
+ offset = dissect_per_octet_string(tvb, offset, actx, tree, -1,
+ 1, 48, FALSE, &hnb_name_tvb);
+
+ proto_tree_add_unicode_string(tree, hf_index, hnb_name_tvb, 0, -1,
+ tvb_get_ephemeral_string(hnb_name_tvb, 0, tvb_length(hnb_name_tvb)));
+
return offset;
}
static const per_sequence_t SystemInformationBlockType9_sequence[] = {
- { &hf_lte_rrc_hnb_Name , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_lte_rrc_OCTET_STRING_SIZE_1_48 },
+ { &hf_lte_rrc_hnb_Name , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_lte_rrc_T_hnb_Name },
{ &hf_lte_rrc_lateNonCriticalExtension, ASN1_NOT_EXTENSION_ROOT, ASN1_OPTIONAL , dissect_lte_rrc_OCTET_STRING },
{ NULL, 0, 0, NULL }
};
@@ -30297,7 +30303,7 @@ void proto_register_lte_rrc(void) {
{ &hf_lte_rrc_hnb_Name,
{ "hnb-Name", "lte-rrc.hnb_Name",
FT_STRING, BASE_NONE, NULL, 0,
- "OCTET_STRING_SIZE_1_48", HFILL }},
+ NULL, HFILL }},
{ &hf_lte_rrc_messageIdentifier,
{ "messageIdentifier", "lte-rrc.messageIdentifier",
FT_BYTES, BASE_NONE, NULL, 0,
diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c
index 4713b4a7ed..865d817c45 100644
--- a/epan/dissectors/packet-rrc.c
+++ b/epan/dissectors/packet-rrc.c
@@ -15180,7 +15180,7 @@ dissect_rrc_PLMN_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
static int
dissect_rrc_NAS_SystemInformationGSM_MAP(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 622 "../../asn1/rrc/rrc.cnf"
+#line 629 "../../asn1/rrc/rrc.cnf"
tvbuff_t *nas_sys_info_gsm_map_tvb = NULL;
guint32 length;
proto_item *item;
@@ -15222,7 +15222,7 @@ dissect_rrc_NAS_SystemInformationGSM_MAP(tvbuff_t *tvb _U_, int offset _U_, asn1
static int
dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 606 "../../asn1/rrc/rrc.cnf"
+#line 613 "../../asn1/rrc/rrc.cnf"
rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index);
@@ -15242,7 +15242,7 @@ static const value_string rrc_CN_DomainIdentity_vals[] = {
static int
dissect_rrc_CN_DomainIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 603 "../../asn1/rrc/rrc.cnf"
+#line 610 "../../asn1/rrc/rrc.cnf"
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
2, (guint32*)(&rrc_nas_sys_info_gsm_map_type), FALSE, 0, NULL);
@@ -19127,7 +19127,7 @@ dissect_rrc_E_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
static int
dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo_01(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 610 "../../asn1/rrc/rrc.cnf"
+#line 617 "../../asn1/rrc/rrc.cnf"
rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index);
@@ -77364,7 +77364,7 @@ dissect_rrc_UE_ConnTimersAndConstants(tvbuff_t *tvb _U_, int offset _U_, asn1_ct
static int
dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo_02(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 614 "../../asn1/rrc/rrc.cnf"
+#line 621 "../../asn1/rrc/rrc.cnf"
rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index);
@@ -121013,8 +121013,16 @@ dissect_rrc_ExtSIBTypeInfoSchedulingInfo_List2(tvbuff_t *tvb _U_, int offset _U_
static int
dissect_rrc_HNBName(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
- offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
- 1, maxHNBNameSize, FALSE, NULL);
+#line 603 "../../asn1/rrc/rrc.cnf"
+ tvbuff_t *hnbname_tvb = NULL;
+
+ offset = dissect_per_octet_string(tvb, offset, actx, tree, -1,
+ 1, maxHNBNameSize, FALSE, &hnbname_tvb);
+
+ proto_tree_add_unicode_string(tree, hf_index, hnbname_tvb, 0, -1,
+ tvb_get_ephemeral_string(hnbname_tvb, 0, tvb_length(hnbname_tvb)));
+
+
return offset;
}
@@ -121284,7 +121292,7 @@ dissect_rrc_SIB_ReferenceList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
static int
dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo_03(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 618 "../../asn1/rrc/rrc.cnf"
+#line 625 "../../asn1/rrc/rrc.cnf"
rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index);