diff options
author | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2014-09-23 18:05:56 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-09-24 07:55:40 +0000 |
commit | ffe30fb0d3ee0ebe6f149cc4d8bbd189891bcaf0 (patch) | |
tree | c396d806aa5100a7e94a98834370d0399a587b22 | |
parent | 5f096acb454c3d57d23a786f49a884dd4afb0499 (diff) |
Allow the HandoverPreparationInfoPDU dissector to be looked up by name and called.
Change-Id: I9c22b74d5c3329b6c7d74547d26e940c84ffc66c
Reviewed-on: https://code.wireshark.org/review/4247
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | asn1/lte-rrc/packet-lte-rrc-template.c | 24 | ||||
-rw-r--r-- | epan/dissectors/packet-lte-rrc.c | 30 |
2 files changed, 51 insertions, 3 deletions
diff --git a/asn1/lte-rrc/packet-lte-rrc-template.c b/asn1/lte-rrc/packet-lte-rrc-template.c index 3922a290b6..b8971e2cf2 100644 --- a/asn1/lte-rrc/packet-lte-rrc-template.c +++ b/asn1/lte-rrc/packet-lte-rrc-template.c @@ -2407,6 +2407,29 @@ dissect_lte_rrc_MCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static void +dissect_lte_rrc_Handover_Preparation_Info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + proto_item *ti; + proto_tree *lte_rrc_tree; + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE_HO_Prep_Info"); + col_clear(pinfo->cinfo, COL_INFO); + + /* Don't want elements inside message updating Info column, so set now and + freeze during dissection of PDU */ + col_set_str(pinfo->cinfo, COL_INFO, "HandoverPreparationInformation"); + col_set_writable(pinfo->cinfo, FALSE); + + if (tree) { + ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA); + lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); + dissect_lte_rrc_HandoverPreparationInformation_PDU(tvb, pinfo, lte_rrc_tree, NULL); + } + + col_set_writable(pinfo->cinfo, TRUE); +} + +static void lte_rrc_init_protocol(void) { if (lte_rrc_etws_cmas_dcs_hash) { @@ -2926,6 +2949,7 @@ void proto_register_lte_rrc(void) { register_dissector("lte_rrc.bcch_dl_sch", dissect_lte_rrc_BCCH_DL_SCH, proto_lte_rrc); register_dissector("lte_rrc.pcch", dissect_lte_rrc_PCCH, proto_lte_rrc); register_dissector("lte_rrc.mcch", dissect_lte_rrc_MCCH, proto_lte_rrc); + register_dissector("lte_rrc.handover_prep_info", dissect_lte_rrc_Handover_Preparation_Info, proto_lte_rrc); /* Register fields and subtrees */ proto_register_field_array(proto_lte_rrc, hf, array_length(hf)); diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c index 87b854d703..de738b63da 100644 --- a/epan/dissectors/packet-lte-rrc.c +++ b/epan/dissectors/packet-lte-rrc.c @@ -35537,6 +35537,29 @@ dissect_lte_rrc_MCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static void +dissect_lte_rrc_Handover_Preparation_Info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + proto_item *ti; + proto_tree *lte_rrc_tree; + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE_HO_Prep_Info"); + col_clear(pinfo->cinfo, COL_INFO); + + /* Don't want elements inside message updating Info column, so set now and + freeze during dissection of PDU */ + col_set_str(pinfo->cinfo, COL_INFO, "HandoverPreparationInformation"); + col_set_writable(pinfo->cinfo, FALSE); + + if (tree) { + ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA); + lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); + dissect_lte_rrc_HandoverPreparationInformation_PDU(tvb, pinfo, lte_rrc_tree, NULL); + } + + col_set_writable(pinfo->cinfo, TRUE); +} + +static void lte_rrc_init_protocol(void) { if (lte_rrc_etws_cmas_dcs_hash) { @@ -44217,7 +44240,7 @@ void proto_register_lte_rrc(void) { NULL, HFILL }}, /*--- End of included file: packet-lte-rrc-hfarr.c ---*/ -#line 2430 "../../asn1/lte-rrc/packet-lte-rrc-template.c" +#line 2453 "../../asn1/lte-rrc/packet-lte-rrc-template.c" { &hf_lte_rrc_eutra_cap_feat_group_ind_1, { "Indicator 1", "lte-rrc.eutra_cap_feat_group_ind_1", @@ -45777,7 +45800,7 @@ void proto_register_lte_rrc(void) { &ett_lte_rrc_CandidateCellInfo_r10, /*--- End of included file: packet-lte-rrc-ettarr.c ---*/ -#line 2885 "../../asn1/lte-rrc/packet-lte-rrc-template.c" +#line 2908 "../../asn1/lte-rrc/packet-lte-rrc-template.c" &ett_lte_rrc_featureGroupIndicators, &ett_lte_rrc_featureGroupIndRel9Add, @@ -45822,6 +45845,7 @@ void proto_register_lte_rrc(void) { register_dissector("lte_rrc.bcch_dl_sch", dissect_lte_rrc_BCCH_DL_SCH, proto_lte_rrc); register_dissector("lte_rrc.pcch", dissect_lte_rrc_PCCH, proto_lte_rrc); register_dissector("lte_rrc.mcch", dissect_lte_rrc_MCCH, proto_lte_rrc); + register_dissector("lte_rrc.handover_prep_info", dissect_lte_rrc_Handover_Preparation_Info, proto_lte_rrc); /* Register fields and subtrees */ proto_register_field_array(proto_lte_rrc, hf, array_length(hf)); @@ -45846,7 +45870,7 @@ void proto_register_lte_rrc(void) { /*--- End of included file: packet-lte-rrc-dis-reg.c ---*/ -#line 2938 "../../asn1/lte-rrc/packet-lte-rrc-template.c" +#line 2962 "../../asn1/lte-rrc/packet-lte-rrc-template.c" register_init_routine(<e_rrc_init_protocol); } |