From 83d3873cfe29b0984bc1a0176edee173265175b8 Mon Sep 17 00:00:00 2001 From: martinm Date: Fri, 18 Jun 2010 07:07:55 +0000 Subject: Add new strings/dissector function for signalling RRC messages that will add lte_rrc root to the protocol tree. Makes filtering on call signalling easier. TODO: same for other RRC entry points... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33251 f5534014-38df-0310-8fa8-9805f1628bb7 --- asn1/lte-rrc/packet-lte-rrc-template.c | 56 ++++++++++++++++++++++++++++++ epan/dissectors/packet-lte-rrc.c | 62 ++++++++++++++++++++++++++++++++-- epan/dissectors/packet-mac-lte.c | 4 +-- epan/dissectors/packet-pdcp-lte.c | 8 ++--- epan/dissectors/packet-rlc-lte.c | 4 +-- 5 files changed, 123 insertions(+), 11 deletions(-) diff --git a/asn1/lte-rrc/packet-lte-rrc-template.c b/asn1/lte-rrc/packet-lte-rrc-template.c index ac58462cd0..bd21101162 100644 --- a/asn1/lte-rrc/packet-lte-rrc-template.c +++ b/asn1/lte-rrc/packet-lte-rrc-template.c @@ -80,9 +80,59 @@ dissect_lte_rrc_DL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); dissect_DL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree); } +} + +static void +dissect_lte_rrc_DL_DCCH(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 RRC DL_DCCH"); + col_clear(pinfo->cinfo, COL_INFO); + if (tree) { + + ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, FALSE); + lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); + dissect_DL_DCCH_Message_PDU(tvb, pinfo, lte_rrc_tree); + } } + +static void +dissect_lte_rrc_UL_CCCH(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 RRC UL_CCCH"); + col_clear(pinfo->cinfo, COL_INFO); + if (tree) { + + ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, FALSE); + lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); + dissect_UL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree); + } +} + +static void +dissect_lte_rrc_UL_DCCH(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 RRC UL_DCCH"); + col_clear(pinfo->cinfo, COL_INFO); + if (tree) { + + ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, FALSE); + lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); + dissect_UL_DCCH_Message_PDU(tvb, pinfo, lte_rrc_tree); + } +} + + + /*--- proto_register_rrc -------------------------------------------*/ void proto_register_lte_rrc(void) { @@ -101,7 +151,13 @@ void proto_register_lte_rrc(void) { /* Register protocol */ proto_lte_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME); + + /* These entry points will first create an lte_rrc root node */ register_dissector("lte_rrc.dl_ccch", dissect_lte_rrc_DL_CCCH, proto_lte_rrc); + register_dissector("lte_rrc.dl_dcch", dissect_lte_rrc_DL_DCCH, proto_lte_rrc); + register_dissector("lte_rrc.ul_ccch", dissect_lte_rrc_UL_CCCH, proto_lte_rrc); + register_dissector("lte_rrc.ul_dcch", dissect_lte_rrc_UL_DCCH, proto_lte_rrc); + /* Register fields and subtrees */ proto_register_field_array(proto_lte_rrc, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c index ed058389a4..05f3ebce58 100644 --- a/epan/dissectors/packet-lte-rrc.c +++ b/epan/dissectors/packet-lte-rrc.c @@ -18326,9 +18326,59 @@ dissect_lte_rrc_DL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); dissect_DL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree); } +} + +static void +dissect_lte_rrc_DL_DCCH(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 RRC DL_DCCH"); + col_clear(pinfo->cinfo, COL_INFO); + if (tree) { + + ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, FALSE); + lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); + dissect_DL_DCCH_Message_PDU(tvb, pinfo, lte_rrc_tree); + } } + +static void +dissect_lte_rrc_UL_CCCH(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 RRC UL_CCCH"); + col_clear(pinfo->cinfo, COL_INFO); + if (tree) { + + ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, FALSE); + lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); + dissect_UL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree); + } +} + +static void +dissect_lte_rrc_UL_DCCH(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 RRC UL_DCCH"); + col_clear(pinfo->cinfo, COL_INFO); + if (tree) { + + ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, FALSE); + lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc); + dissect_UL_DCCH_Message_PDU(tvb, pinfo, lte_rrc_tree); + } +} + + + /*--- proto_register_rrc -------------------------------------------*/ void proto_register_lte_rrc(void) { @@ -23240,7 +23290,7 @@ void proto_register_lte_rrc(void) { NULL, HFILL }}, /*--- End of included file: packet-lte-rrc-hfarr.c ---*/ -#line 93 "packet-lte-rrc-template.c" +#line 143 "packet-lte-rrc-template.c" }; /* List of subtrees */ @@ -23886,13 +23936,19 @@ void proto_register_lte_rrc(void) { &ett_lte_rrc_RRM_Config, /*--- End of included file: packet-lte-rrc-ettarr.c ---*/ -#line 99 "packet-lte-rrc-template.c" +#line 149 "packet-lte-rrc-template.c" }; /* Register protocol */ proto_lte_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME); + + /* These entry points will first create an lte_rrc root node */ register_dissector("lte_rrc.dl_ccch", dissect_lte_rrc_DL_CCCH, proto_lte_rrc); + register_dissector("lte_rrc.dl_dcch", dissect_lte_rrc_DL_DCCH, proto_lte_rrc); + register_dissector("lte_rrc.ul_ccch", dissect_lte_rrc_UL_CCCH, proto_lte_rrc); + register_dissector("lte_rrc.ul_dcch", dissect_lte_rrc_UL_DCCH, proto_lte_rrc); + /* Register fields and subtrees */ proto_register_field_array(proto_lte_rrc, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); @@ -23914,7 +23970,7 @@ void proto_register_lte_rrc(void) { /*--- End of included file: packet-lte-rrc-dis-reg.c ---*/ -#line 111 "packet-lte-rrc-template.c" +#line 167 "packet-lte-rrc-template.c" } diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c index ca11fb5d42..2b7b55d914 100644 --- a/epan/dissectors/packet-mac-lte.c +++ b/epan/dissectors/packet-mac-lte.c @@ -2644,10 +2644,10 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree /* Get appropriate dissector handle */ volatile dissector_handle_t protocol_handle = 0; if (p_mac_lte_info->direction == DIRECTION_UPLINK) { - protocol_handle = find_dissector("lte-rrc.ul.ccch"); + protocol_handle = find_dissector("lte_rrc.ul_ccch"); } else { - protocol_handle = find_dissector("lte-rrc.dl.ccch"); + protocol_handle = find_dissector("lte_rrc.dl_ccch"); } /* Hide raw view of bytes */ diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c index 895aead419..c3c248130e 100644 --- a/epan/dissectors/packet-pdcp-lte.c +++ b/epan/dissectors/packet-pdcp-lte.c @@ -1327,10 +1327,10 @@ static dissector_handle_t lookup_rrc_dissector_handle(struct pdcp_lte_info *p_p { case Channel_CCCH: if (p_pdcp_info->direction == DIRECTION_UPLINK) { - rrc_handle = find_dissector("lte-rrc.ul.ccch"); + rrc_handle = find_dissector("lte_rrc.ul_ccch"); } else { - rrc_handle = find_dissector("lte-rrc.dl.ccch"); + rrc_handle = find_dissector("lte_rrc.dl_ccch"); } break; case Channel_PCCH: @@ -1348,10 +1348,10 @@ static dissector_handle_t lookup_rrc_dissector_handle(struct pdcp_lte_info *p_p break; case Channel_DCCH: if (p_pdcp_info->direction == DIRECTION_UPLINK) { - rrc_handle = find_dissector("lte-rrc.ul.dcch"); + rrc_handle = find_dissector("lte_rrc.ul_dcch"); } else { - rrc_handle = find_dissector("lte-rrc.dl.dcch"); + rrc_handle = find_dissector("lte_rrc.dl_dcch"); } break; diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c index 23584f299d..c14e79af1f 100644 --- a/epan/dissectors/packet-rlc-lte.c +++ b/epan/dissectors/packet-rlc-lte.c @@ -1098,10 +1098,10 @@ static void dissect_rlc_lte_tm(tvbuff_t *tvb, packet_info *pinfo, switch (p_rlc_lte_info->channelType) { case CHANNEL_TYPE_CCCH: if (p_rlc_lte_info->direction == DIRECTION_UPLINK) { - protocol_handle = find_dissector("lte-rrc.ul.ccch"); + protocol_handle = find_dissector("lte_rrc.ul_ccch"); } else { - protocol_handle = find_dissector("lte-rrc.dl.ccch"); + protocol_handle = find_dissector("lte_rrc.dl_ccch"); } break; -- cgit v1.2.3