2 * Routines for Universal Mobile Telecommunications System (UMTS);
3 * Radio Resource Control (RRC) protocol specification
4 * (3GPP TS 25.331 version 6.7.0 Release 6) packet dissection
5 * Copyright 2006, Anders Broman <anders.broman@ericsson.com>
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 * Ref: 3GPP TS 25.423 version 6.7.0 Release 6
35 #include <epan/packet.h>
36 #include <epan/conversation.h>
37 #include <epan/asn1.h>
42 #include "packet-ber.h"
43 #include "packet-per.h"
46 /* disable: "warning C4049: compiler limit : terminating line number emission" */
47 #pragma warning(disable:4049)
48 /* disable: "warning C4146: unary minus operator applied to unsigned type, result still unsigned" */
49 #pragma warning(disable:4146)
52 #define PNAME "Radio Resource Control (RRC) protocol"
56 static dissector_handle_t gsm_a_dtap_handle;
58 /* Include constants */
59 #include "packet-rrc-val.h"
61 /* Initialize the protocol and registered fields */
62 static int proto_rrc = -1;
64 #include "packet-rrc-hf.c"
66 /* Initialize the subtree pointers */
67 static int ett_rrc = -1;
69 #include "packet-rrc-ett.c"
71 /* Global variables */
72 static proto_tree *top_tree;
74 #include "packet-rrc-fn.c"
77 TODO: Remove the dummy function when these functions are taken into use
79 These functions are not referenced from the ASN1 specifications
80 as this generates a lot of unsued code warings from GCC this dummy function
81 is introduced to reduce the number of warnings until the proper use is discovered
85 dissect_rrc_dymmy_remove_unused_code_warnings(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_){
87 /* Dummy code to keep GCC happy */
90 dissect_rrc_UE_RadioAccessCapabilityInfo( tvb, offset, actx , tree, hf_index);
91 dissect_rrc_UL_PhysChCapabilityFDD_r6( tvb, offset, actx , tree, hf_index);
92 dissect_rrc_UE_Positioning_GANSS_Data( tvb, offset, actx , tree, hf_index);
93 dissect_rrc_ToTargetRNC_Container( tvb, offset, actx , tree, hf_index);
94 dissect_rrc_TargetRNC_ToSourceRNC_Container( tvb, offset, actx , tree, hf_index);
102 dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
104 /* FIX ME Currently don't know the 'starting point' of this protocol
105 * exported DL-DCCH-Message is the entry point.
107 proto_item *rrc_item = NULL;
108 proto_tree *rrc_tree = NULL;
112 /* make entry in the Protocol column on summary display */
113 if (check_col(pinfo->cinfo, COL_PROTOCOL))
114 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRC");
116 /* create the rrc protocol tree */
117 rrc_item = proto_tree_add_item(tree, proto_rrc, tvb, 0, -1, FALSE);
118 rrc_tree = proto_item_add_subtree(rrc_item, ett_rrc);
121 /*--- proto_register_rrc -------------------------------------------*/
122 void proto_register_rrc(void) {
125 static hf_register_info hf[] = {
127 #include "packet-rrc-hfarr.c"
130 /* List of subtrees */
131 static gint *ett[] = {
133 #include "packet-rrc-ettarr.c"
137 /* Register protocol */
138 proto_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME);
139 /* Register fields and subtrees */
140 proto_register_field_array(proto_rrc, hf, array_length(hf));
141 proto_register_subtree_array(ett, array_length(ett));
143 register_dissector("rrc", dissect_rrc, proto_rrc);
145 #include "packet-rrc-dis-reg.c"
150 /*--- proto_reg_handoff_rrc ---------------------------------------*/
152 proto_reg_handoff_rrc(void)
155 gsm_a_dtap_handle = find_dissector("gsm_a_dtap");