Sanitize epan includes
[obnox/wireshark/wip.git] / epan / dissectors / packet-uma.c
1 /* packet-uma.c
2  * Routines for Unlicensed Mobile Access(UMA) dissection
3  * Copyright 2005-2006,2009, Anders Broman <anders.broman[at]ericsson.com>
4  *
5  * $Id$
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24  *
25  * References:
26  * http://www.umatechnology.org/
27  * UMA Protocols (Stage 3) R1.0.4 (5/16/2005)
28  *
29  * 3GPP TS 44.318 version 8.4.0 Release 8
30  *
31  * http://www.3gpp.org/specs/numbering.htm
32  * 3GPP TS 24.008 V6.2.0 (2003-09)
33  * Technical Specification
34  * 3rd Generation Partnership Project;
35  * Technical Specification Group Core Network;
36  * Mobile radio interface Layer 3 specification;
37  * Core network protocols; Stage 3
38  * (Release 6)
39  *
40  * 3GPP TS 44.018 V6.11.0 (2005-01)
41  * 3rd Generation Partnership Project;
42  * Technical Specification Group GSM/EDGE Radio Access Network;
43  * Mobile radio interface layer 3 specification;
44  * Radio Resource Control (RRC) protocol
45  * (Release 6)
46  *
47  * 3GPP TS 45.009 V6.1.0 (2004-02)
48  * 3rd Generation Partnership Project;
49  * Technical Specification Group GSM/EDGE
50  * Radio Access Network;
51  * Link adaptation
52  * (Release 6)
53  *
54  */
55
56 #ifdef HAVE_CONFIG_H
57 # include "config.h"
58 #endif
59
60 #include <stdio.h>
61 #include <stdlib.h>
62 #include <string.h>
63
64 #include <glib.h>
65 #include <epan/conversation.h>
66
67 #include <epan/packet.h>
68 #include <epan/asn1.h>
69
70 #include <epan/prefs.h>
71 #include "packet-bssap.h"
72 #include "packet-gsm_a_common.h"
73 #include "packet-gsm_map.h"
74 #include "packet-rtp.h"
75 #include "packet-rtcp.h"
76 #include "packet-e212.h"
77 #include "packet-tcp.h"
78 #include "packet-rrc.h"
79
80 /* Length field is 2 bytes and comes first */
81 #define UMA_HEADER_SIZE 2
82 static gboolean uma_desegment = TRUE;
83
84 static dissector_handle_t uma_tcp_handle;
85 static dissector_handle_t uma_udp_handle;
86 static dissector_handle_t data_handle;
87 static dissector_table_t  bssap_pdu_type_table;
88 static dissector_handle_t rtp_handle;
89 static dissector_handle_t rtcp_handle;
90 static dissector_handle_t llc_handle;
91
92 /* Initialize the protocol and registered fields */
93 static int proto_uma                                    = -1;
94 static int hf_uma_length_indicator              = -1;
95 static int hf_uma_pd                                    = -1;
96 static int hf_uma_skip_ind                              = -1;
97 static int hf_uma_urr_msg_type                  = -1;
98 static int hf_uma_urlc_msg_type                 = -1;
99 static int hf_uma_urlc_TLLI                             = -1;
100 static int hf_uma_urlc_seq_nr                   = -1;
101 static int hf_uma_urr_IE                                = -1;
102 static int hf_uma_urr_IE_len                    = -1;
103 static int hf_uma_urr_mobile_identity_type              = -1;
104 static int hf_uma_urr_odde_even_ind             = -1;
105 static int hf_uma_urr_imsi                              = -1;
106 static int hf_uma_urr_imei                              = -1;
107 static int hf_uma_urr_imeisv                    = -1;
108 static int hf_uma_urr_tmsi_p_tmsi               = -1;
109 static int hf_uma_urr_uri                               = -1;
110 static int hf_uma_urr_radio_type_of_id  = -1;
111 static int hf_uma_urr_radio_id                  = -1;
112 static int hf_uma_urr_cell_id                   = -1;
113 static int hf_uma_urr_mcc                               = -1;
114 static int hf_uma_urr_mnc                               = -1;
115 static int hf_uma_urr_lac                               = -1;
116 static int hf_uma_urr_gci                               = -1;
117 static int hf_uma_urr_tura                              = -1;
118 static int hf_uma_urr_gc                                = -1;
119 static int hf_uma_urr_uc                                = -1;
120 static int hf_uma_urr_rrs                               = -1;
121 static int hf_uma_urr_gmsi                              = -1;
122 static int hf_uma_urr_psho                              = -1;
123 static int hf_uma_urr_IP_Address_type   = -1;
124 static int hf_uma_urr_FQDN                              = -1;
125 static int hf_uma_urr_sgw_ipv4                  = -1;
126 static int hf_uma_urr_redirection_counter = -1;
127 static int hf_uma_urr_dis_rej_cau               = -1;
128 static int hf_uma_urr_MSCR                              = -1;
129 static int hf_uma_urr_ATT                               = -1;
130 static int hf_uma_urr_DTM                               = -1;
131 static int hf_uma_urr_GPRS                              = -1;
132 static int hf_uma_urr_NMO                               = -1;
133 static int hf_uma_urr_ECMC                              = -1;
134 static int hf_uma_urr_T3212_timer                       = -1;
135 static int hf_uma_urr_RAC                               = -1;
136 static int hf_uma_urr_ap_location                       = -1;
137 static int hf_uma_urr_SGSNR                             = -1;
138 static int hf_uma_urr_ECMP                              = -1;
139 static int hf_uma_urr_RE                                = -1;
140 static int hf_uma_urr_PFCFM                             = -1;
141 static int hf_uma_urr_3GECS                             = -1;
142 static int hf_uma_urr_bcc                               = -1;
143 static int hf_uma_urr_ncc                               = -1;
144 static int hf_uma_urr_TU3907_timer                      = -1;
145 static int hf_uma_urr_GSM_RR_state                      = -1;
146 static int hf_uma_urr_gan_band                          = -1;
147 static int hf_uma_urr_URR_state                         = -1;
148 static int hf_uma_urr_register_reject_cause             = -1;
149 static int hf_uma_urr_TU3906_timer                      = -1;
150 static int hf_uma_urr_TU3910_timer                      = -1;
151 static int hf_uma_urr_TU3902_timer                      = -1;
152 static int hf_uma_urr_communication_port                = -1;
153 static int hf_uma_urr_L3_Message                        = -1;
154 static int hf_uma_urr_L3_protocol_discriminator         = -1;
155 static int hf_uma_urr_sc                                = -1;
156 static int hf_uma_urr_algorithm_id                      = -1;
157 static int hf_uma_urr_GPRS_resumption                   = -1;
158 static int hf_uma_urr_ULQI                              = -1;
159 static int hf_uma_urr_TU3920_timer                      = -1;
160 static int hf_uma_urr_peak_tpt_cls                      = -1;
161 static int hf_uma_urr_radio_pri                         = -1;
162 static int hf_uma_urr_rlc_mode                          = -1;
163 static int hf_uma_urr_ga_psr_cause                              = -1;
164 static int hf_uma_urr_udr                               = -1;
165 static int hf_uma_urr_TU4001_timer                      = -1;
166 static int hf_uma_urr_LS                                = -1;
167 static int hf_uma_urr_cipher_res                        = -1;
168 static int hf_uma_urr_rand_val                          = -1;
169 static int hf_uma_urr_ciphering_command_mac             = -1;
170 static int hf_uma_urr_ciphering_key_seq_num             = -1;
171 static int hf_uma_urr_sapi_id                           = -1;
172 static int hf_uma_urr_establishment_cause               = -1;
173 static int hf_uma_urr_channel                           = -1;
174 static int hf_uma_urr_PDU_in_error                      = -1;
175 static int hf_uma_urr_sample_size                       = -1;
176 static int hf_uma_urr_payload_type                      = -1;
177 static int hf_uma_urr_LLC_PDU                           = -1;
178 static int hf_uma_urr_LBLI                              = -1;
179 static int hf_uma_urr_RI                                = -1;
180 static int hf_uma_urr_TU4003_timer                      = -1;
181 static int hf_uma_urr_ap_service_name_type              = -1;
182 static int hf_uma_urr_ap_Service_name_value             = -1;
183 static int hf_uma_urr_uma_service_zone_icon_ind         = -1;
184 static int hf_uma_urr_uma_service_zone_str_len          = -1;
185 static int hf_uma_urr_window_size                       = -1;
186 static int hf_uma_urr_uma_codec_mode                    = -1;
187 static int hf_uma_urr_UTRAN_cell_id_disc                = -1;
188 static int hf_uma_urr_ms_radio_id                       = -1;
189 static int hf_uma_urr_uma_service_zone_str              = -1;
190 static int hf_uma_urr_suti                              = -1;
191 static int hf_uma_urr_uma_mps                           = -1;
192 static int hf_uma_urr_num_of_plms                       = -1;
193 static int hf_uma_urr_cbs                               = -1;
194 static int hf_uma_urr_num_of_cbs_frms                   = -1;
195 static int hf_uma_urr_unc_ipv4                          = -1;
196 static int hf_uma_unc_FQDN                              = -1;
197 static int hf_uma_urr_GPRS_user_data_transport_ipv4     = -1;
198 static int hf_uma_urr_GPRS_port                         = -1;
199 static int hf_uma_urr_UNC_tcp_port                      = -1;
200 static int hf_uma_urr_RTP_port                          = -1;
201 static int hf_uma_urr_RTCP_port                         = -1;
202 static int hf_uma_urr_RXLEV_NCELL                       = -1;
203
204 /* Initialize the subtree pointers */
205 static int ett_uma     = -1;
206 static int ett_uma_toc = -1;
207 static int ett_urr_ie  = -1;
208
209 /* The dynamic payload type which will be dissected as uma */
210
211 static range_t *global_uma_tcp_port_range;
212
213 #define DEFAULT_UMA_PORT_RANGE "14001"
214
215 /* Global variables */
216 static  guint32         sgw_ipv4_address;
217 static  guint32         unc_ipv4_address;
218 /** static      guint32         rtp_ipv4_address; **/
219 static  guint32         rtcp_ipv4_address;
220 static  guint32         GPRS_user_data_ipv4_address;
221
222 /*
223  * Protocol Discriminator (PD)
224  */
225 static const value_string uma_pd_vals[] = {
226         { 0,            "URR_C"},
227         { 1,            "URR"},
228         { 2,            "URLC"},
229         { 0,    NULL }
230 };
231 /*
232  * Message types for Unlicensed Radio Resources management
233  */
234 static const value_string uma_urr_msg_type_vals[] = {
235         { 1,            "GA-RC DISCOVERY REQUEST"},
236         { 2,            "GA-RC DISCOVERY ACCEPT"},
237         { 3,            "GA-RC DISCOVERY REJECT"},
238         { 16,           "GA-RC REGISTER REQUEST"},
239         { 17,           "GA-RC REGISTER ACCEPT"},
240         { 18,           "GA-RC REGISTER REDIRECT"},
241         { 19,           "GA-RC REGISTER REJECT"},
242         { 20,           "GA-RC DEREGISTER"},
243         { 21,           "GA-RC REGISTER UPDATE UPLINK"},
244         { 22,           "GA-RC REGISTER UPDATE DOWNLINK"},
245         { 23,           "GA-RC CELL BROADCAST INFO"},
246         { 32,           "GA-CSR CIPHERING MODE COMMAND"},
247         { 33,           "GA-CSR CIPHERING MODE COMPLETE"},
248         { 48,           "GA-CSR ACTIVATE CHANNEL"},
249         { 49,           "GA-CSR ACTIVATE CHANNEL ACK"},
250         { 50,           "GA-CSR ACTIVATE CHANNEL COMPLETE"},
251         { 51,           "GA-CSR ACTIVATE CHANNEL FAILURE"},
252         { 52,           "GA-CSR CHANNEL MODE MODIFY"},
253         { 53,           "GA-CSR CHANNEL MODE MODIFY ACKNOWLEDGE"},
254         { 64,           "GA-CSR RELEASE"},
255         { 65,           "GA-CSR RELEASE COMPLETE"},
256         { 66,           "GA-CSR CLEAR REQUEST"},
257         { 80,           "GA-CSR HANDOVER ACCESS"},
258         { 81,           "GA-CSR HANDOVER COMPLETE"},
259         { 82,           "GA-CSR UPLINK QUALITY INDICATION"},
260         { 83,           "GA-CSR HANDOVER INFORMATION"},
261         { 84,           "GA-CSR HANDOVER COMMAND"},
262         { 85,           "GA-CSR HANDOVER FAILURE"},
263         { 96,           "GA-CSR PAGING REQUEST"},
264         { 97,           "GA-CSR PAGING RESPONSE"},
265         { 112,          "GA-CSR UPLINK DIRECT TRANSFER"},
266         { 113,          "URR INITIAL DIRECT TRANSFER"},
267         { 114,          "GA-CSR DOWNLINK DIRECT TRANSFER"},
268         { 115,          "GA-CSR STATUS"},
269         { 116,          "GA-CSR KEEP ALIVE"},
270         { 117,          "GA-CSR CLASSMARK ENQUIRY"},
271         { 118,          "GA-CSR CLASSMARK CHANGE"},
272         { 119,          "URR GPRS SUSPENSION REQUEST"},
273         { 120,          "GA-CSR SYNCHRONIZATION INFORMATION"},
274         { 121,          "GA-CSR UTRAN CLASSMARK CHANGE"},
275         { 128,          "GA-CSR REQUEST"},
276         { 129,          "GA-CSR REQUEST ACCEPT"},
277         { 130,          "GA-CSR REQUEST REJECT"},
278         { 0,    NULL }
279 };
280 /*
281  * Message types for URLC signaling
282  */
283 static const value_string uma_urlc_msg_type_vals[] = {
284         { 1,            "URLC-DATA"},
285         { 2,            "URLC UNITDATA"},
286         { 3,            "URLC-PS-PAGE"},
287         { 6,            "URLC-UFC-REQ"},
288         { 7,            "URLC-DFC-REQ"},
289         { 8,            "URLC-ACTIVATE-UTC-REQ"},
290         { 9,            "URLC-ACTIVATE-UTC-ACK"},
291         { 10,           "URLC-DEACTIVATE-UTC-REQ"},
292         { 11,           "URLC-DEACTIVATE-UTC-ACK"},
293         { 12,           "URLC STATUS"},
294         { 0,    NULL }
295 };
296 /*
297  * IE type and identifiers for Unlicensed Radio Resources management
298  */
299 static const value_string uma_urr_IE_type_vals[] = {
300         { 1,            "Mobile Identity"},
301         { 2,            "GAN Release Indicator"},
302         { 3,            "Radio Identity"},
303         { 4,            "GERAN Cell Identity"},
304         { 5,            "Location Area Identification"},
305         { 6,            "GERAN/UTRAN Coverage Indicator"},
306         { 7,            "GAN Classmark"},
307         { 8,            "Geographical Location"},
308         { 9,            "GANC-SEGW IP Address"},
309         { 10,           "GANC-SEGW Fully Qualified Domain/Host Name"},
310         { 11,           "Redirection Counter"},
311         { 12,           "Discovery Reject Cause"},
312         { 13,           "GAN Cell Description"},
313         { 14,           "GAN Control Channel Description"},
314         { 15,           "Cell Identifier List"},
315         { 16,           "TU3907 Timer"},
316         { 17,           "GSM RR/UTRAN RRC State"},
317         { 18,           "Routing Area Identification"},
318         { 19,           "GAN Band"},
319         { 20,           "GA-RC/GA-CSR/GA-PSR State"},
320         { 21,           "Register Reject Cause"},
321         { 22,           "TU3906 Timer"},
322         { 23,           "TU3910 Timer"},
323         { 24,           "TU3902 Timer"},
324         { 25,           "Communication Port Identity"},
325         { 26,           "L3 Message"},
326         { 27,           "Channel Mode"},
327         { 28,           "Mobile Station Classmark 2"},
328         { 29,           "RR Cause"},
329         { 30,           "Cipher Mode Setting"},
330         { 31,           "GPRS Resumption"},
331         { 32,           "Handover From GAN Command"},
332         { 33,           "UL Quality Indication"},
333         { 34,           "TLLI"},
334         { 35,           "Packet Flow Identifier"},
335         { 36,           "Suspension Cause"},
336         { 37,           "TU3920 Timer"},
337         { 38,           "QoS"},
338         { 39,           "GA-PSR Cause"},
339         { 40,           "User Data Rate"},
340         { 41,           "Routing Area Code"},
341         { 42,           "AP Location"},
342         { 43,           "TU4001 Timer"},
343         { 44,           "Location Status"},
344         { 45,           "Cipher Response"},
345         { 46,           "Ciphering Command RAND"},
346         { 47,           "Ciphering Command MAC"},
347         { 48,           "Ciphering Key Sequence Number"},
348         { 49,           "SAPI ID"},
349         { 50,           "Establishment Cause"},
350         { 51,           "Channel Needed"},
351         { 52,           "PDU in Error"},
352         { 53,           "Sample Size"},
353         { 54,           "Payload Type"},
354         { 55,           "Multi-rate Configuration"},
355         { 56,           "Mobile Station Classmark 3"},
356         { 57,           "LLC-PDU"},
357         { 58,           "Location Black List indicator"},
358         { 59,           "Reset Indicator"},
359         { 60,           "TU4003 Timer"},
360         { 61,           "AP Service Name"},
361         { 62,           "GAN Service Zone Information"},
362         { 63,           "RTP Redundancy Configuration"},
363         { 64,           "UTRAN Classmark"},
364         { 65,           "Classmark Enquiry Mask"},
365         { 66,           "UTRAN Cell Identifier List"},
366         { 67,           "Serving UNC table indicator"},
367         { 68,           "Registration indicators"},
368         { 69,           "GAN PLMN List"},
369         { 70,           "Received Signal Level List"},
370         { 71,           "Required GAN Services"},
371         { 72,           "Broadcast Container"},
372         { 73,           "3G Cell Identity"},
373         { 96,           "MS Radio Identity"},
374         { 97,           "GANC IP Address"},
375         { 98,           "GANC Fully Qualified Domain/Host Name"},
376         { 99,           "IP address for GPRS user data transport"},
377         { 100,          "UDP Port for GPRS user data transport"},
378         { 103,          "GANC TCP port"},
379         { 104,          "RTP UDP port"},
380         { 105,          "RTCP UDP port"},
381         { 106,          "GERAN Received Signal Level List"},
382         { 107,          "UTRAN Received Signal Level List"},
383         { 108,          "PS Handover to GERAN Command"},                        /* 11.2.74 */
384         { 109,          "PS Handover to UTRAN Command"},                        /* 11.2.75 */
385         { 110,          "PS Handover to GERAN PSI"},                            /* 11.2.76 */
386         { 111,          "PS Handover to GERAN SI"},                                     /* 11.2.77 */
387         { 112,          "TU4004 Timer"},                                                        /* 11.2.78 */
388         { 79,           "GAN Mode Indicator"},                                          /* 11.2.79 */
389         { 80,           "CN Domain Identity"},                                          /* 11.2.80 */
390         { 81,           "GAN Iu Mode Cell Description"},                        /* 11.2.81 */
391         { 82,           "3G UARFCN"},                                                           /* 11.2.82 */
392         { 83,           "RAB ID"},                                                                      /* 11.2.83 */
393         { 84,           "RAB ID List"},                                                         /* 11.2.84 */
394         { 85,           "GA-RRC Establishment Cause"},                          /* 11.2.85 */
395         { 86,           "GA-RRC Cause"},                                                        /* 11.2.86 */
396         { 87,           "GA-RRC Paging Cause"},                                         /* 11.2.87 */
397         { 88,           "Intra Domain NAS Node Selector"},                      /* 11.2.88 */
398         { 89,           "CTC Activation List"},                                         /* 11.2.89 */
399         { 90,           "CTC Description"},                                                     /* 11.2.90 */
400         { 91,           "CTC Activation Ack List"},                                     /* 11.2.91 */
401         { 92,           "CTC Activation Ack Description"},                      /* 11.2.92 */
402         { 93,           "CTC Modification List"},                                       /* 11.2.93 */
403         { 94,           "CTC Modification Ack List"},                           /* 11.2.94 */
404         { 95,           "CTC Modification Ack Description"},            /* 11.2.95 */
405         { 115,          "PTC Activation List"},                                         /* 11.2.96 */
406         { 116,          "PTC Description"},                                                     /* 11.2.97 */
407         { 117,          "PTC Activation Ack List"},                                     /* 11.2.98 */
408         { 118,          "PTC Activation Ack Description"},                      /* 11.2.99 */
409         { 119,          "PTC Modification List"},                                       /* 11.2.100 */
410         { 120,          "PTC Modification Ack List"},                           /* 11.2.101 */
411         { 121,          "PTC Modification Ack Description"},            /* 11.2.102 */
412         { 122,          "RAB Configuration"},                                           /* 11.2.103 */
413         { 123,          "Multi-rate Configuration 2"},                          /* 11.2.104 */
414         { 124,          "Selected Integrity Protection Algorithm"},     /* 11.2.105 */
415         { 125,          "Selected Encryption Algorithm"},                       /* 11.2.106 */
416         { 126,          "CN Domains to Handover"},                                      /* 11.2.107 */
417         { 74,           "3G Security Capability"},                                      /* 11.2.108 */
418         { 75,           "NAS Synchronisation Indicator"},                       /* 11.2.109 */
419         { 76,           "GANC TEID"},                                                           /* 11.2.110 */
420         { 77,           "MS TEID"},                                                                     /* 11.2.110 */
421         { 78,           "UTRAN RRC Message"},                                           /* 11.2.111 */
422         { 0,    NULL }
423 };
424
425 static const value_string uma_urr_mobile_identity_type_vals[] = {
426         { 1,            "IMSI"},
427         { 2,            "IMEI"},
428         { 3,            "IMEISV"},
429         { 4,            "TMSI/P-TMSI"},
430         { 0,            "No Identity"},
431         { 0,    NULL }
432 };
433
434 static const value_string uma_urr_gan_rel_ind_vals[] = {
435         { 1,            "Release 1 (i.e. 3GPP Release-6)"},
436         { 2,            "Release 2 (i.e. 3GPP Release-7)"},
437         { 3,            "Release 3 (i.e. 3GPP Release-8)"},
438         { 0,    NULL }
439 };
440
441 static const value_string uma_urr_oddevenind_vals[] = {
442         { 0,            "Even number of identity digits"},
443         { 1,            "Odd number of identity digits"},
444         { 0,    NULL }
445 };
446
447 static const value_string radio_type_of_id_vals[] = {
448         { 0,            "IEEE MAC-address format"},
449         { 0,    NULL }
450 };
451
452 /* GCI, GSM Coverage Indicator (octet 3) */
453 static const value_string uma_gci_vals[] = {
454         { 0,            "Normal Service in the GERAN"},
455         { 1,            "Limited Service in the GERAN"},
456         { 2,            "MS has not found GSM coverage (LAI information taken from SIM, if available)"},
457         { 3,            "MS has found GSM coverage, service state unknown"},
458         { 0,    NULL }
459 };
460 /* TURA, Type of Unlicensed Radio (octet 3) */
461 static const value_string uma_tura_vals[] = {
462         { 0,            "No radio"},
463         { 1,            "Bluetooth"},
464         { 2,            "WLAN 802.11"},
465         { 15,           "Unspecified"},
466         { 0,    NULL }
467 };
468 /* GC, GERAN Capable (octet 3) */
469 static const value_string uma_gc_vals[] = {
470         { 0,            "The MS is not GERAN capable."},
471         { 1,            "The MS is GERAN capable."},
472         { 0,    NULL }
473 };
474 /* UC, UTRAN Capable (octet 3) */
475 static const value_string uma_uc_vals[] = {
476         { 0,            "The MS is not UTRAN  capable."},
477         { 1,            "The MS is UTRAN  capable."},
478         { 0,    NULL }
479 };
480 /*RRS, RTP Redundancy Support (octet 4)*/
481 static const value_string uma_rrs_vals[] = {
482         { 0,            "RTP Redundancy not supported"},
483         { 1,            "RTP Redundancy supported"},
484         { 0,    NULL }
485 };
486 /*
487  * PS HO, PS Handover Capable (octet 4) Bit 2
488  */
489 static const value_string uma_ps_ho_vals[] = {
490         { 0,            "The MS does not support PS handover to/from GAN A/Gb mode"},
491         { 1,            "The MS supports PS handover to/from GAN A/Gb mode"},
492         { 0,    NULL }
493 };
494 /*
495  * GMSI, GAN Mode Support Indicator (octet 4)v Bits 4 3
496  */
497
498 static const value_string uma_gmsi_vals[] = {
499         { 0,            "Unspecified"},
500         { 1,            "The MS supports GAN A/Gb mode only"},
501         { 2,            "The MS supports GAN Iu mode only"},
502         { 3,            "The MS supports GAN A/Gb mode and GAN Iu mode"},
503         { 0,    NULL }
504 };
505
506 /*IP address type number value (octet 3)*/
507 static const value_string IP_address_type_vals[] = {
508         { 0x21,         "IPv4 address"},
509         { 0x57,         "IPv6 address"},
510         { 0,    NULL }
511 };
512
513 /*Discovery Reject Cause (octet 3) */
514 static const value_string uma_discovery_reject_cause_vals[] = {
515         { 0,            "Network Congestion"},
516         { 1,            "Unspecified"},
517         { 2,            "IMSI not allowed"},
518         { 0,    NULL }
519 };
520 /*EC Emergency Call allowed (octet 3)*/
521 static const value_string EC_vals[] _U_ = {
522         { 0,            "Emergency call allowed in the cell to all MSs"},
523         { 1,            "Emergency call not allowed in the cell except for the MSs that belong to one of the classes between 11 to 15."},
524         { 0,    NULL }
525 };
526 /*ECMC, Early Classmark Sending Control (octet 3)*/
527 static const value_string ECMC_vals[] = {
528         { 0,            "Early Classmark Sending is allowed"},
529         { 1,            "Early Classmark Sending is forbidden"},
530         { 0,    NULL }
531 };
532 /*NMO, Network Mode of Operation (octet 3)*/
533 static const value_string NMO_vals[] = {
534         { 0,            "Network Mode of Operation I"},
535         { 1,            "Network Mode of Operation II"},
536         { 2,            "Network Mode of Operation III"},
537         { 3,            "Reserved"},
538         { 0,    NULL }
539 };
540 /*GPRS, GPRS Availability (octet 3)*/
541 static const value_string GPRS_avail_vals[] = {
542         { 0,            "GPRS available"},
543         { 1,            "GPRS not available"},
544         { 0,    NULL }
545 };
546 /*DTM, Dual Transfer Mode of Operation by network (octet 3)*/
547 static const value_string DTM_vals[] = {
548         { 0,            "Network does not support dual transfer mode"},
549         { 1,            "Network supports dual transfer mode"},
550         { 0,    NULL }
551 };
552 /*ATT, Attach-detach allowed (octet 3)*/
553 static const value_string ATT_vals[] = {
554         { 0,            "MSs in the cell are not allowed to apply IMSI attach and detach procedure."},
555         { 1,            "MSs in the cell shall apply IMSI attach and detach procedure."},
556         { 0,    NULL }
557 };
558 /*MSCR, MSC Release (octet 3)*/
559 static const value_string MSCR_vals[] = {
560         { 0,            "MSC is Release '98 or older"},
561         { 1,            "MSC is Release '99 onwards"},
562         { 0,    NULL }
563 };
564
565 /* SGSNR, SGSN Release (octet 6)*/
566 static const value_string SGSNR_vals[] = {
567         { 0,            "SGSN is Release '98 or older"},
568         { 1,            "SGSN is Release '99 onwards"},
569         { 0,    NULL }
570 };
571 /* ECMP, Emergency Call Mode Preference (octet 6)*/
572
573 static const value_string ECMP_vals[] = {
574         { 0,            "GSM GERAN is preferred for Emergency calls"},
575         { 1,            "UMAN is preferred for Emergency calls"},
576         { 0,    NULL }
577 };
578 /* RE, Call reestablishment allowed (octet 6) */
579 static const value_string RE_vals[] = {
580         { 0,            "Call Reestablishment allowed in the cell"},
581         { 1,            "Call Reestablishment not allowed in the cell"},
582         { 0,    NULL }
583 };
584 /* PFCFM, PFC_FEATURE_MODE (octet 6) */
585 static const value_string PFCFM_vals[] = {
586         { 0,            "The network does not support packet flow context procedures"},
587         { 1,            "The network supports packet flow context procedures"},
588         { 0,    NULL }
589 };
590
591 /* 3GECS, 3G Early Classmark Sending Restriction (octet 6) */
592 static const value_string Three_GECS_vals[] = {
593         { 0,            "UTRAN classmark change message shall be sent with the Early classmark sending"},
594         { 1,            "The sending of UTRAN Classmark Sending messages is controlled by the Early Classmark Sending Control parameter"},
595         { 0,    NULL }
596 };
597
598 /*GRS, GSM RR State (octet 3)*/
599 static const value_string uma_GRS_GSM_RR_State_vals[] = {
600         { 0,            "GSM RR is in IDLE state"},
601         { 1,            "GSM RR is in DEDICATED state"},
602         { 2,            "UTRAN RRC is in IDLE STATE"},
603         { 3,            "UTRAN RRC is in CELL_DCH STATE"},
604         { 4,            "UTRAN RRC is in CELL_FACH STATE"},
605         { 5,            "UTRAN RRC is in CELL_PCH STATE"},
606         { 6,            "UTRAN RRC is in URA_PCH STATE"},
607         { 7,            "Unknown"},
608         { 0,    NULL }
609 };
610 /* UMA Band (4 bit field) */
611 static const value_string uma_gan_band_vals[] = {
612         { 0,            "E-GSM is supported"},
613         { 1,            "P-GSM is supported"},
614         { 2,            "GSM 1800 is supported"},
615         { 3,            "GSM 450 is supported"},
616         { 4,            "GSM 480 is supported"},
617         { 5,            "GSM 850 is supported"},
618         { 6,            "GSM 1900 is supported"},
619         { 7,            "GSM 700 is supported"},
620         { 0,    NULL }
621 };
622 /*URS, URR State (octet 3) */
623 static const value_string URR_state_vals[] = {
624         { 0,            "GA-CSR is in GA-CSR-IDLE state"},
625         { 1,            "GA-CSR is in GA-CSR-DEDICATED state"},
626         { 2,            "GA-RC is in GA-RC-REGISTERED state while in GERAN/UTRAN mode"},
627         { 0,    NULL }
628 };
629 /*
630 UPS, GA-PSR State (octet 3)
631 Bit
632 3
633 0 GA-PSR is in GA-PSR-STANDBY state.
634 1 GA-PSR is in GA-PSR-ACTIVE state.
635 GA-RRC-CS, GA-RRC (CS) State (octet 3)
636 Bit
637 4
638 0 GA-RRC (CS) is in GA-RRC-IDLE state.
639 1 GA-RRC (CS) is in GA-RRC-CONNECTED
640 state.
641 GA-RRC-PS, GA-RRC (PS) State (octet 3)
642 Bit
643 5
644 0 GA-RRC (PS) is in GA-RRC-IDLE state.
645 1 GA-RRC (PS) is in GA-RRC-CONNECTED
646 state.
647 */
648
649 /* Register Reject Cause (octet 3) */
650 static const value_string register_reject_cause_vals[] = {
651         { 0,            "Network Congestion"},
652         { 1,            "AP not allowed"},
653         { 2,            "Location not allowed"},
654         { 3,            "Invalid GANC"},
655         { 4,            "Geo Location not known"},
656         { 5,            "IMSI not allowed"},
657         { 6,            "Unspecified"},
658         { 7,            "GANC-SEGW certificate not valid"},
659         { 8,            "EAP_SIM authentication failed"},
660         { 9,            "TCP establishment failed"},
661         { 10,           "Redirection"},
662         { 11,           "EAP-AKA authentication failed"},
663         /* 12 to 255 Reserved for future use. */
664         { 0,    NULL }
665 };
666
667 /* L3 Protocol discriminator values according to TS 24 007 (640)  */
668 #if 0  /** See packet-gms_a-dtap.c **/
669 static const value_string protocol_discriminator_vals[] = {
670         {0x0,           "Group call control"},
671         {0x1,           "Broadcast call control"},
672         {0x2,           "Reserved: was allocated in earlier phases of the protocol"},
673         {0x3,           "Call Control; call related SS messages"},
674         {0x4,           "GPRS Transparent Transport Protocol (GTTP)"},
675         {0x5,           "Mobility Management messages"},
676         {0x6,           "Radio Resources Management messages"},
677         {0x7,           "Unknown"},
678         {0x8,           "GPRS mobility management messages"},
679         {0x9,           "SMS messages"},
680         {0xa,           "GPRS session management messages"},
681         {0xb,           "Non call related SS messages"},
682         {0xc,           "Location services specified in 3GPP TS 44.071 [8a]"},
683         {0xd,           "Unknown"},
684         {0xe,           "Reserved for extension of the PD to one octet length "},
685         {0xf,           "Reserved for tests procedures described in 3GPP TS 44.014 [5a] and 3GPP TS 34.109 [17a]."},
686         { 0,    NULL }
687 };
688 #endif
689
690 /* algorithm identifier
691  * If SC=1 then:
692  * bits
693  * 4 3 2
694  */
695  static const value_string algorithm_identifier_vals[] = {
696         { 0,            "Cipher with algorithm A5/1"},
697         { 1,            "Cipher with algorithm A5/2"},
698         { 2,            "Cipher with algorithm A5/3"},
699         { 3,            "Cipher with algorithm A5/4"},
700         { 4,            "Cipher with algorithm A5/5"},
701         { 5,            "Cipher with algorithm A5/6"},
702         { 6,            "Cipher with algorithm A5/7"},
703         { 7,            "Reserved"},
704         { 0,    NULL }
705 };
706 /*  GPRS Resumption */
707  static const value_string GPRS_resumption_vals[] = {
708         { 0,            "Resumption of GPRS services not successfully acknowledged"},
709         { 1,            "Resumption of GPRS services successfully acknowledged"},
710         { 0,    NULL }
711 };
712 /* SC (octet 1) */
713 static const value_string SC_vals[] = {
714         { 0,            "No ciphering"},
715         { 1,            "Start ciphering"},
716         { 0,    NULL }
717 };
718
719 /* ULQI, UL Quality Indication (octet 3) */
720 static const value_string uma_ulqi_vals[] = {
721         { 0,            "Quality ok"},
722         { 1,            "Radio problem"},
723         { 2,            "Network problem"},
724         { 4,            "Undetermined problem"},
725         { 0,    NULL }
726 };
727
728 static const value_string radio_pri_vals[] = {
729         { 0,            "Radio priority 1"},
730         { 1,            "Radio priority 2"},
731         { 2,            "Radio priority 3"},
732         { 3,            "Radio priority 4"},
733         { 3,            "Radio Priority Unknown"},
734         { 0,    NULL }
735 };
736
737 static const value_string rlc_mode_vals[] = {
738         { 0,            "RLC acknowledged mode"},
739         { 1,            "RLC unacknowledged mode"},
740         { 0,    NULL }
741 };
742
743 /*URLC Cause (octet 3) */
744 static const value_string uma_ga_psr_cause_vals[] = {
745         { 0,            "success"},
746         { 2,            "no available resources"},
747         { 3,            "GANC failure"},
748         { 4,            "not authorized for data service"},
749         { 5,            "message type non existent or not implemented"},
750         { 6,            "message type not compatible with the protocol state"},
751         { 7,            "invalid mandatory information"},
752         { 8,            "syntactically incorrect message"},
753         { 9,            "GPRS suspended"},
754         { 10,           "normal deactivation"},
755         { 12,           "conditional IE error"},
756         { 13,           "semantically incorrect message"},
757         { 14,           "PS handover failure - incorrect handover command"},
758         { 15,           "PS handover failure - target RAT access failure"},
759         { 16,           "PS handover failure - missing SI/PSI information"},
760         { 17,           "PS handover failure - no uplink TBF allocation"},
761         { 0,    NULL }
762 };
763
764 /* LS, Location Status (octet 3) */
765 static const value_string LS_vals[] = {
766         { 0,            "MS location known"},
767         { 1,            "MS location unknown"},
768         { 0,    NULL }
769 };
770
771 /* CR Cipher Response (octet 1) */
772 static const value_string CR_vals[] = {
773         { 0,            "IMEISV shall not be included"},
774         { 1,            "IMEISV shall be included"},
775         { 0,    NULL }
776 };
777
778 /* SAPI ID, SAPI Identifier (octet 3) */
779 static const value_string sapi_id_vals[] = {
780         { 0,            "SAPI 0 (all other except SMS)"},
781         { 3,            "SAPI 3 (SMS)"},
782         { 0,    NULL }
783 };
784 /*      Sample Size (octet 3)*/
785 static const value_string sample_size_vals[] = {
786         { 20,           "20 ms of CS payload included in each RTP/UDP packet"},
787         { 40,           "40 ms of CS payload included in each RTP/UDP packet"},
788         { 60,           "60 ms of CS payload included in each RTP/UDP packet"},
789         { 80,           "80 ms of CS payload included in each RTP/UDP packet"},
790         { 0,    NULL }
791 };
792
793
794 /* MPS, Manual PLMN Selection indicator (octet 3) */
795 static const value_string mps_vals[] = {
796         { 0,            "The MS is in Automatic PLMN selection mode."},
797         { 1,            "The MS is in Manual PLMN selection mode and request the listof PLMN identities that may provide UMAN service in the current location."},
798         { 2,            "The MS is in Manual PLMN selection mode and tries to register; no PLMN list is needed."},
799         { 0,    NULL }
800 };
801
802 /* CBS Cell Broadcast Service (octet 3) */
803 static const value_string cbs_vals[] = {
804         { 0,            "CBS is not required by the Mobile station"},
805         { 1,            "CBS is required by the mobile station"},
806         { 0,    NULL }
807 };
808
809 /* LBLI, Location Black List indicator (octet 3) */
810 static const value_string LBLI_vals[] = {
811         { 0,            "MCC"},
812         { 1,            "MCC and MNC"},
813         { 2,            "MCC, MNC and LAC"},
814         { 0,    NULL }
815 };
816 /* AP Service Name type */
817 static const value_string ap_service_name_type_vals[] = {
818         { 0,            "SSID"},
819         { 1,            "PAN Service Name"},
820         { 0,    NULL }
821 };
822
823 /* UMA Service Zone Icon Indicator, octet 3 */
824 static const value_string uma_service_zone_icon_ind_vals[] = {
825         { 1,            "Unlimited Calls"},
826         { 0,    NULL }
827 };
828 /*Establishment Cause (octet 3)*/
829 static const value_string establishment_cause_vals[] = {
830         { 0xa0,         "Emergency"},
831         { 0xc0,         "Call re-establishment"},
832         { 0x00,         "Location Update"},
833         { 0x10,         "Other SDCCH procedures including IMSI Detach, SMS, SS, paging response"},
834 /* note: Paging response for SDCCH needed is using codepoint  0001 0000 */
835         { 0x20,         "Paging response (TCH/F needed)"},
836         { 0x30,         "Paging response (TCH/F or TCH/H needed)"},
837         { 0x80,         "Paging response (any channel needed)"},
838         { 0x40,         "Originating speech call from dual-rate mobile station when TCH/H is sufficient"},
839         { 0x50,         "Originating data call from dual-rate mobile station when TCH/H is sufficient"},
840         { 0xe0,         "Originating speech call and TCH/F is needed"},
841         { 0xf0,         "Originating data call and TCH/F is needed"},
842         { 0,    NULL }
843 };
844 /*CHANNEL (octet 3) */
845 static const value_string channel_vals[] = {
846         { 0,            "Any channel"},
847         { 1,            "SDCCH"},
848         { 2,            "TCH/F (Full rate)"},
849         { 3,            "TCH/H or TCH/F (Dual rate)"},
850         { 0,    NULL }
851 };
852
853 /*RI, Reset Indicator (octet 3)*/
854 /*CHANNEL (octet 3) */
855 static const value_string RI_vals[] = {
856         { 0,            "The flow control condition continues to exist"},
857         { 1,            "The flow control condition no longer exists"},
858         { 0,    NULL }
859 };
860
861 /* Window Size (octet 3 to octet n) */
862
863 static const value_string window_size_vals[] = {
864         { 0,            "Window size 1, No redundancy"},
865         { 1,            "Window size 2 (single redundancy)"},
866         { 2,            "Window size 3 (double redundancy)"},
867         { 0,    NULL }
868 };
869
870 static const value_string UTRAN_cell_id_disc_vals[] = {
871         { 0,            "PLMN-ID, LAC and a 28-bit Cell Id are used to identify the target UTRAN cell."},
872         { 0,    NULL }
873 };
874
875 /* SUTI, Serving UNC table indicator indicator (octet 3) */
876
877 static const value_string suti_vals[] = {
878         { 0,            "The MS is not allowed to store information in the stored Serving UNC table."},
879         { 1,            "The MS is allowed to store information in the stored Serving UNC table."},
880         { 0,    NULL }
881 };
882         /* Code to actually dissect the packets */
883
884 static int
885 dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
886 {
887         tvbuff_t        *l3_tvb;
888         tvbuff_t        *llc_tvb;
889         tvbuff_t        *new_tvb;
890         int             ie_offset;
891         guint8          ie_value;
892         guint16         ie_len = 0;
893         guint8          octet;
894         proto_item      *urr_ie_item;
895         proto_tree      *urr_ie_tree;
896         const guint8    *haddr;
897         char            *string;
898         guint16         GPRS_user_data_transport_UDP_port,UNC_tcp_port,RTP_UDP_port,RTCP_UDP_port, communication_port;
899         guint32         udr;
900         conversation_t *conversation;
901         address         dst_addr, null_addr;
902         guint8          str_len;
903         address         src_addr;
904
905         ie_value = tvb_get_guint8(tvb,offset);
906         urr_ie_item = proto_tree_add_text(tree,tvb,offset,-1,"%s",
907                 val_to_str(ie_value, uma_urr_IE_type_vals, "Unknown IE (%u)"));
908         urr_ie_tree = proto_item_add_subtree(urr_ie_item, ett_urr_ie);
909
910         proto_tree_add_item(urr_ie_tree, hf_uma_urr_IE, tvb, offset, 1, FALSE);
911         offset++;
912         /* Some IE:s might have a length field of 2 octets */
913         ie_len = tvb_get_guint8(tvb,offset);
914         if ( (ie_len & 0x80) == 0x80 ){
915                 offset++;
916                 ie_len = (ie_len & 0x7f) << 8;
917                 ie_len = ie_len | (tvb_get_guint8(tvb,offset));
918                 proto_item_set_len(urr_ie_item, ie_len + 3);
919                 proto_tree_add_uint(urr_ie_tree, hf_uma_urr_IE_len , tvb, offset-1, 2, ie_len );
920                 ie_offset = offset +1;
921         }else{
922                 proto_item_set_len(urr_ie_item, ie_len + 2);
923                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_IE_len, tvb, offset, 1, FALSE);
924                 ie_offset = offset +1;
925         }
926
927         switch(ie_value){
928         /* 11.2.1 Mobile Identity */
929         case 1:
930         /* Mobile Identity
931          * The rest of the IE is coded as in [TS 24.008] not including IEI and
932          * length, if present.(10.5.1.4)
933          */
934                 de_mid(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
935                 break;
936
937         case 2:
938                 /* UMA Release Indicator */
939                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uri, tvb, ie_offset, 1, FALSE);
940                 break;
941         case 3:                 /* Radio Identity */
942                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_radio_type_of_id, tvb, ie_offset, 1, FALSE);
943                 octet = tvb_get_guint8(tvb,ie_offset);
944                 if (( octet & 0xf) == 0){ /* IEEE MAC-address format */
945                         ie_offset++;
946                         haddr = tvb_get_ptr(tvb, ie_offset, ie_len);
947                         proto_tree_add_ether(urr_ie_tree, hf_uma_urr_radio_id, tvb, ie_offset, ie_len, haddr);
948                 }else{
949                         proto_tree_add_text(urr_ie_tree, tvb, ie_offset, ie_len,"Unknown format");
950                 }
951                 break;
952         case 4:
953                 /* Cell Identity
954                  * The rest of the IE is coded as in [TS 24.008] not including IEI and length, if present.
955                  */
956                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_cell_id, tvb, ie_offset, 2, FALSE);
957                 break;
958         case 5:
959                 /* Location Area Identification
960                  * The rest of the IE is coded as in [TS 24.008] not including IEI and
961                  * length, if present.
962                  */
963                 de_lai(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
964                 break;
965         case 6:
966                 /* GSM Coverage Indicator */
967                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_gci, tvb, ie_offset, 1, FALSE);
968                 break;
969         case 7:
970                 /* 11.2.7 GAN Classmark */
971                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_tura, tvb, ie_offset, 1, FALSE);
972                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_gc, tvb, ie_offset, 1, FALSE);
973                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uc, tvb, ie_offset, 1, FALSE);
974                 /* UMA Protocols (Stage 3) R1.0.3 */
975                 if(ie_len>1){
976                         ie_offset++;
977                         proto_tree_add_item(urr_ie_tree, hf_uma_urr_gmsi, tvb, ie_offset, 1, FALSE);
978                         proto_tree_add_item(urr_ie_tree, hf_uma_urr_psho, tvb, ie_offset, 1, FALSE);
979                         proto_tree_add_item(urr_ie_tree, hf_uma_urr_rrs, tvb, ie_offset, 1, FALSE);
980                 }
981                 break;
982         case 8:
983                 /* Geographical Location
984                  * The Location Estimate field is composed of 1 or more octets with an internal structure
985                  * according to section 7 in [23.032].
986                  */
987                 new_tvb = tvb_new_subset(tvb, ie_offset,ie_len, ie_len );
988                 dissect_geographical_description(new_tvb, pinfo, urr_ie_tree);
989                 break;
990         case 9:
991                 /* UNC SGW IP Address
992                  * IP Address type
993                  */
994                 octet = tvb_get_guint8(tvb,ie_offset);
995                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_IP_Address_type, tvb, ie_offset, 1, FALSE);
996                 ie_offset++;
997                 if ( octet == 0x57 ){ /* IPv6 */
998
999                 }else{ /* All other values shall be interpreted as Ipv4 address in this version of the protocol.*/
1000                         sgw_ipv4_address = tvb_get_ipv4(tvb, ie_offset);
1001                         proto_tree_add_ipv4(urr_ie_tree, hf_uma_urr_sgw_ipv4, tvb, ie_offset, 4, sgw_ipv4_address);
1002
1003                 }
1004                 break;
1005         case 10:                /* UNC SGW Fully Qualified Domain/Host Name */
1006                 if ( ie_len > 0){
1007                         string = (gchar*)tvb_get_ephemeral_string(tvb, ie_offset, ie_len);
1008                         proto_tree_add_string(urr_ie_tree, hf_uma_urr_FQDN, tvb, ie_offset, ie_len, string);
1009                 }else{
1010                         proto_tree_add_text(urr_ie_tree,tvb,offset,1,"FQDN not present");
1011                 }
1012                 break;
1013         case 11:                /* Redirection Counter */
1014                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_redirection_counter, tvb, ie_offset, 1, FALSE);
1015                 break;
1016         case 12:                /* 11.2.12 Discovery Reject Cause */
1017                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_dis_rej_cau, tvb, ie_offset, 1, FALSE);
1018                 break;
1019         case 13:
1020                 /* 11.2.13 GAN Cell Description
1021                  * The rest of the IE is coded as in [TS 44.018], Cell Description IE, not including IEI and length, if present
1022                  */
1023                 de_rr_cell_dsc(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1024                 break;
1025         case 14:
1026                 /* 
1027                  * 11.2.14 GAN Control Channel Description
1028                  */
1029                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ECMC, tvb, ie_offset, 1, FALSE);
1030                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_NMO, tvb, ie_offset, 1, FALSE);
1031                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_GPRS, tvb, ie_offset, 1, FALSE);
1032                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_DTM, tvb, ie_offset, 1, FALSE);
1033                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ATT, tvb, ie_offset, 1, FALSE);
1034                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_MSCR, tvb, ie_offset, 1, FALSE);
1035                 /* T3212 timeout value */
1036                 ie_offset++;
1037                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_T3212_timer, tvb, ie_offset, 1, FALSE);
1038                 /* RAC, Routing Area Code (octet 5) */
1039                 ie_offset++;
1040                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RAC, tvb, ie_offset, 1, FALSE);
1041                 ie_offset++;
1042                 /* SGSNR, SGSN Release (octet 6) B1*/
1043                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_SGSNR, tvb, ie_offset, 1, FALSE);
1044                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ECMP, tvb, ie_offset, 1, FALSE);
1045                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RE, tvb, ie_offset, 1, FALSE);
1046                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_PFCFM, tvb, ie_offset, 1, FALSE);
1047                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_3GECS, tvb, ie_offset, 1, FALSE);
1048                 /* PS HO, PS Handover indicator (octet 6) Bit 6 */
1049
1050                 ie_offset++;
1051                 proto_tree_add_text(urr_ie_tree,tvb,ie_offset,2,"Access Control Class N");
1052                 /* These fields are specified and described in 3GPP TS 44.018 and 3GPP TS 22.011. */
1053                 break;
1054         case 15:
1055                 /* 11.2.15 Cell Identifier List
1056                  * The rest of the IE is coded as in [TS 48.008], not including IEI and length, if present
1057                  */
1058                 be_cell_id_list(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1059                 break;
1060         case 16:                /* TU3907 Timer */
1061                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3907_timer, tvb, ie_offset, 2, FALSE);
1062                 break;
1063         case 17:                /* 11.2.17 GSM RR/UTRAN RRC State */
1064                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_GSM_RR_state, tvb, ie_offset, 1, FALSE);
1065                 break;
1066         case 18:                /* 11.2.18 Routing Area Identification */
1067                 /* The rest of the IE is coded as in [TS 24.008] not including IEI and length, if present.*/
1068                 de_gmm_rai(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1069                 break;
1070         case 19:                /* 11.2.19 GAN Band */
1071                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_gan_band, tvb, ie_offset, 1, FALSE);
1072                 break;
1073         case 20:                /* 11.2.20 GAN State */
1074                 /* URS, GA-RC/GA-CSR State (octet 3) Bits 2-1 */
1075                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_URR_state, tvb, ie_offset, 1, FALSE);
1076                 /* UPS, GA-PSR State (octet 3) Bit 3 */
1077                 /* GA-RRC-CS, GA-RRC (CS) State (octet 3) Bit 4 */
1078                 /* GA-RRC-PS, GA-RRC (PS) State (octet 3) Bit 5 */
1079                 break;
1080         case 21:                /* 11.2.21 Register Reject Cause */
1081                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_register_reject_cause, tvb, ie_offset, 1, FALSE);
1082                 break;
1083         case 22:                /* 11.2.22 TU3906 Timer */
1084                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3906_timer, tvb, ie_offset, 2, FALSE);
1085                 break;
1086         case 23:                /* 11.2.23 TU3910 Timer */
1087                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3910_timer, tvb, ie_offset, 2, FALSE);
1088                 break;
1089         case 24:                /* 11.2.24 TU3902 Timer */
1090                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3902_timer, tvb, ie_offset, 2, FALSE);
1091                 break;
1092         case 25:
1093                 /* 11.2.25 Communication Port Identity */
1094                 communication_port = tvb_get_ntohs(tvb,ie_offset);
1095                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_communication_port, tvb, ie_offset, 2, FALSE);
1096                 break;
1097
1098         case 26:                
1099                 /* 11.2.26 L3 Message 
1100                  * The L3 Message information element contains the upper layer message to be transported
1101                  * using the GA-CSR protocol or the GA-RRC protocol between the MS and the core network.
1102                  */
1103                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_protocol_discriminator, tvb, ie_offset, 1, FALSE);
1104                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_Message, tvb, ie_offset, ie_len, FALSE);
1105                 l3_tvb = tvb_new_subset(tvb, ie_offset,ie_len, ie_len );
1106                 if  (!dissector_try_port(bssap_pdu_type_table,BSSAP_PDU_TYPE_DTAP, l3_tvb, pinfo, urr_ie_tree))
1107                                 call_dissector(data_handle, l3_tvb, pinfo, urr_ie_tree);
1108                 break;
1109         case 27:
1110                 /* 11.2.27 Channel Mode
1111                  * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present
1112                  */
1113                 de_rr_ch_mode(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1114                 break;
1115         case 28:
1116                 /* 11.2.28 Mobile Station Classmark 2
1117                  * The rest of the IE is coded as in [TS 24.008], not including IEI and length, if present
1118                  */
1119                 de_ms_cm_2(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1120                 break;
1121         case 29:
1122                 /* 11.2.29 RR Cause
1123                  * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present
1124                  */
1125                 de_rr_cause(tvb, urr_ie_tree, ie_offset, 1, NULL, 0);
1126                 break;
1127         case 30:
1128                 /* 11.2.30 Cipher Mode Setting
1129                  * Note: The coding of fields SC and algorithm identifier is defined in [44.018]
1130                  * as part of the Cipher Mode Setting IE.
1131                  */
1132                 de_rr_cip_mode_set(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1133                 break;
1134         case 31:
1135                 /* 11.2.31 GPRS Resumption
1136                  * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present
1137                  */
1138                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_GPRS_resumption, tvb, ie_offset, 1, FALSE);
1139                 break;
1140         case 32:
1141                 /* 11.2.32 Handover From GAN Command
1142                  * If the target RAT is GERAN, the rest of the IE is coded as HANDOVER COMMAND message in [TS 44.018]
1143                  * If the target RAT is UTRAN, the rest of the IE is coded as
1144                  * HANDOVER TO UTRAN COMMAND message in [TS 25.331].
1145                  */
1146                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_protocol_discriminator, tvb, ie_offset, 1, FALSE);
1147                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_Message, tvb, ie_offset, ie_len, FALSE);
1148                 /* XXX the dissector to call should depend on the RAT type ??? */
1149                 l3_tvb = tvb_new_subset(tvb, ie_offset,ie_len, ie_len );
1150                 if  (!dissector_try_port(bssap_pdu_type_table,BSSAP_PDU_TYPE_DTAP, l3_tvb, pinfo, urr_ie_tree))
1151                                 call_dissector(data_handle, l3_tvb, pinfo, urr_ie_tree);
1152                 break;
1153         case 33:                
1154                 /* 11.2.33 UL Quality Indication */
1155                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ULQI, tvb, ie_offset, 1, FALSE);
1156                 break;
1157         case 34:
1158                 /* 11.2.34 TLLI
1159                  * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present.
1160                  * [TS 44.018]:10.5.2.41a
1161                  * The TLLI is encoded as a binary number with a length of 4 octets. TLLI is defined in 3GPP TS 23.003
1162                  */
1163                 de_rr_tlli(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1164                 break;
1165         case 35:
1166                 /* 11.2.35 Packet Flow Identifier
1167                  * The rest of the IE is coded as in [TS 24.008], not including IEI and length, if present.
1168                  */
1169                 de_sm_pflow_id(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1170                 break;
1171         case 36:
1172                 /* 11.2.36 Suspension Cause
1173                  * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present.
1174                  */
1175                 de_rr_sus_cau(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1176                 break;
1177         case 37:                /* 11.2.37 TU3920 Timer */
1178                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3920_timer, tvb, ie_offset, 2, FALSE);
1179                 break;
1180                 /* 11.2.38 QoS */
1181         case 38:
1182                 /* QoS
1183                  * PEAK_THROUGHPUT_CLASS (octet 3, bits 1-4)
1184                  * This field is coded as PEAK_THROUGHPUT_CLASS field in
1185                  * the Channel Request Description information
1186                  * element specified in [TS 44.060]
1187                  */
1188                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_peak_tpt_cls, tvb, ie_offset, 1, FALSE);
1189                 /* RADIO_PRIORITY (octet 3, bits 5-6) */
1190                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_radio_pri, tvb, ie_offset, 1, FALSE);
1191                 /* RLC_MODE (octet 3, bit 7) */
1192                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_rlc_mode, tvb, ie_offset, 1, FALSE);
1193                 /* PEAK_THROUGHPUT_CLASS (octet 3, bits 1-4)*/
1194                 break;
1195         case 39:                /* 11.2.39 GA-PSR Cause */
1196                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ga_psr_cause, tvb, ie_offset, 1, FALSE);
1197                 break;
1198         case 40:                /* 11.2.40 User Data Rate */
1199                 /* The R field is the binary encoding of the rate information expressed in 100 bits/sec
1200                  * increments, starting from 0 x 100 bits/sec until 16777215 x 100 bits/sec (1.6 Gbps).
1201                  */
1202                 udr = tvb_get_ntoh24(tvb, ie_offset) * 100;
1203                 proto_tree_add_uint(urr_ie_tree, hf_uma_urr_udr , tvb, ie_offset, 3, udr );
1204                 break;
1205         case 41:
1206                 /* 11.2.41 Routing Area Code
1207                  * The rest of the IE is coded as in [TS 23.003] not including IEI and length, if present.
1208                  */
1209                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RAC, tvb, ie_offset, 1, FALSE);
1210                 break;
1211         case 42:
1212                 /* 11.2.42 AP Location
1213                  * The rest of the IE is coded as in [GEOPRIV], not including IEI and length, if present
1214                  * http://www.ietf.org/internet-drafts/draft-ietf-geopriv-dhcp-civil-05.txt
1215                  */
1216                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ap_location, tvb, ie_offset, ie_len, FALSE);
1217                 break;
1218         case 43:                /* 11.2.43 TU4001 Timer */
1219                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU4001_timer, tvb, ie_offset, 2, FALSE);
1220                 break;
1221         case 44:                /* 11.2.44 Location Status */
1222                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_LS, tvb, ie_offset, 1, FALSE);
1223                 break;
1224         case 45:                /* Cipher Response */
1225                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_cipher_res, tvb, ie_offset, 1, FALSE);
1226                 break;
1227         case 46:                /* Ciphering Command RAND */
1228                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_rand_val, tvb, ie_offset, ie_len, FALSE);
1229                 break;
1230         case 47:                /* Ciphering Command MAC (Message Authentication Code)*/
1231                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ciphering_command_mac, tvb, ie_offset, ie_len, FALSE);
1232                 break;
1233         case 48:                /* Ciphering Key Sequence Number */
1234                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ciphering_key_seq_num, tvb, ie_offset, 1, FALSE);
1235                 break;
1236         case 49:                /* SAPI ID */
1237                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_sapi_id, tvb, ie_offset, 1, FALSE);
1238                 break;
1239         case 50:                /* 11.2.50 Establishment Cause */
1240                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_establishment_cause, tvb, ie_offset, 1, FALSE);
1241                 break;
1242         case 51:                /* Channel Needed */
1243                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_channel, tvb, ie_offset, 1, FALSE);
1244                 break;
1245         case 52:                /* PDU in Error */
1246                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_PDU_in_error, tvb, ie_offset, ie_len, FALSE);
1247                 break;
1248         case 53:
1249                 /* Sample Size
1250                  */
1251                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_sample_size, tvb, ie_offset, 1, FALSE);
1252                 break;
1253         case 54:
1254                 /* 11.2.54 Payload Type
1255                  * Payload Type (octet 3) Allowed values are between 96 and 127.
1256                  */
1257                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_payload_type, tvb, ie_offset, 1, FALSE);
1258                 break;
1259         /* 11.2.55 Multirate Configuration */
1260         case 55:
1261                 /* Multi-rate Configuration
1262                  * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present
1263                  */
1264                 de_rr_multirate_conf(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1265                 break;
1266         case 56:
1267                 /* 11.2.56 Mobile Station Classmark 3
1268                  * The rest of the IE is coded as in [TS 24.008], not including IEI and length, if present
1269                  */
1270                 de_ms_cm_3(tvb, urr_ie_tree, offset, ie_len, NULL, 0);
1271                 break;
1272         case 57:
1273                 /* 11.2.57 LLC-PDU
1274                  * The rest of the IE is coded as in [TS 48.018], not including IEI and length, if present
1275                  */
1276                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_LLC_PDU, tvb, ie_offset, ie_len, FALSE);
1277                 llc_tvb = tvb_new_subset(tvb, ie_offset,ie_len, ie_len );
1278                   if (llc_handle) {
1279                           if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
1280                                         col_append_str(pinfo->cinfo, COL_PROTOCOL, "/");
1281                                         col_set_fence(pinfo->cinfo, COL_PROTOCOL);
1282                           }
1283
1284                           call_dissector(llc_handle, llc_tvb, pinfo, urr_ie_tree);
1285                   }else{
1286                           if (data_handle)
1287                                   call_dissector(data_handle, llc_tvb, pinfo, urr_ie_tree);
1288                   }
1289                 break;
1290         case 58:                /* 11.2.58 Location Black List indicator */
1291                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_LBLI, tvb, ie_offset, 1, FALSE);
1292                 break;
1293         case 59:                /* 11.2.59 Reset Indicator */
1294                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RI, tvb, ie_offset, 1, FALSE);
1295                 break;
1296         case 60:                /* TU4003 Timer */
1297                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU4003_timer, tvb, ie_offset, 2, FALSE);
1298                 break;
1299         case 61:
1300                 /* AP Service Name */
1301                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ap_service_name_type, tvb, ie_offset, 1, FALSE);
1302                 ie_offset++;
1303                 /* AP Service Name value (octet 4 to octet n)
1304                  * The AP Service Name is coded as a string according to UTF-8 format defined in RFC
1305                  * 3629 [50]. This means that the 1st octet of the UTF-8 string is coded in octet 4 and the
1306                  * last octet of the UTF-8 string is coded in the last octet of this IE (octet n).
1307                  */
1308                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ap_Service_name_value, tvb, ie_offset, ie_len -1, FALSE);
1309                 break;
1310         case 62:
1311                 /* 11.2.62 GAN Service Zone Information
1312                  * UMA Service Zone Icon Indicator, octet 3
1313                  */
1314                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_service_zone_icon_ind, tvb, ie_offset, 1, FALSE);
1315                 ie_offset++;
1316                 /* Length of UMA Service Zone string */
1317                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_service_zone_str_len, tvb, ie_offset, 1, FALSE);
1318                 str_len = tvb_get_guint8(tvb,ie_offset);
1319                 ie_offset++;
1320                 /* UMA Service Zone string, 1st character */
1321                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_service_zone_str, tvb, ie_offset, str_len, FALSE);
1322                 break;
1323         /* 11.2.63 RTP Redundancy Configuration */
1324         case 63:
1325                 /* RTP Redundancy Configuration */
1326                 /* For each mode of the AMR Active Mode Set, as signaled in the Multi-rate Configuration IE, the window size for
1327                  * including redundant frames is indicated. So if e.g. the Active Mode Set contains four active modes, then the
1328                  * Redundancy Configuration IE consists of six octets, of which four indicate the Codec Mode to Window Size mapping.
1329                  */
1330                 /* XXX TODO: loop ower the octets */
1331                 /* Window Size (octet 3 to octet n) Bits 2 1 */
1332                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_window_size, tvb, ie_offset, 1, FALSE);
1333                 /* GAN A/Gb Mode Codec Mode (octet 3 to octet n) Bits 8 7 
1334                  * The GAN A/Gb Mode Codec Mode is coded as in [47] sub-clause 3.4.1
1335                  */
1336                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_codec_mode, tvb, ie_offset, 1, FALSE);
1337                 /* GAN Iu Mode Codec Mode (octet 3 to octet n) Bits 6 5 4 3 */
1338                 break;
1339         case 64:
1340                 /* 11.2.64 UTRAN Classmark
1341                  * The rest of the IE is the INTER RAT HANDOVER INFO coded as in
1342                  * [TS 25.331], not including IEI and length, if present
1343                  */
1344                 new_tvb = tvb_new_subset(tvb, ie_offset,ie_len, ie_len );
1345                 dissect_rrc_InterRATHandoverInfo_PDU(new_tvb, pinfo, urr_ie_tree);
1346                 break;
1347         case 65:
1348                 /* 11.2.65 Classmark Enquiry Mask
1349                  * The rest of the IE is the Classmark Enquiry Mask coded as in [TS 44.018], not including IEI and length, if present
1350                  */
1351                 de_rr_cm_enq_mask(tvb, urr_ie_tree, offset, ie_len, NULL, 0);
1352                 break;
1353         case 66:
1354                 /* 11.2.66 UTRAN Cell Identifier List
1355                  * UTRAN Cell Identification Discriminator
1356                  */
1357                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_UTRAN_cell_id_disc, tvb, ie_offset, 1, FALSE);
1358                 octet = tvb_get_guint8(tvb,ie_offset);
1359                 ie_offset++;
1360                 if ( octet == 0 ){
1361                         ie_offset = dissect_e212_mcc_mnc(tvb, urr_ie_tree, ie_offset);
1362                         proto_tree_add_item(urr_ie_tree, hf_uma_urr_lac, tvb, ie_offset, 2, FALSE);
1363                         ie_offset = ie_offset + 2;
1364                         /* The octets 9-12 are coded as shown in 3GPP TS 25.331, Table 'Cell identity'.
1365                          * 10.3.2.2 Cell identity
1366                          * This information element identifies a cell unambiguously within a PLMN.
1367                          * NOTE: This information element may carry any implementation dependent identity that unambiguously identifies a
1368                          * cell within a PLMN.
1369                          * Cell identity - bit string(28)
1370                          */
1371                 }
1372                 break;
1373         case 67:
1374                 /* 11.2.67 Serving GANC table indicator */
1375                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_suti, tvb, ie_offset, 1, FALSE);
1376                 break;
1377         case 68:
1378                 /* 11.2.68 Registration indicators */
1379                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_mps, tvb, ie_offset, 1, FALSE);
1380                 break;
1381         case 69:
1382                 /* 11.2.69 GAN PLMN List */
1383                 octet = tvb_get_guint8(tvb,ie_offset);
1384                 proto_tree_add_uint(urr_ie_tree, hf_uma_urr_num_of_plms , tvb, ie_offset, 1, octet);
1385                 /* TODO insert while loop here */
1386                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_lac, tvb, ie_offset, 2, FALSE);
1387                 break;
1388         case 70:
1389                 /* 11.2.70 GERAN Received Signal Level List */
1390                 while(ie_offset<=(offset + ie_len)){
1391                         proto_tree_add_item(urr_ie_tree, hf_uma_urr_RXLEV_NCELL, tvb, ie_offset, 1, FALSE);
1392                         ie_offset++;
1393                 }
1394                 break;
1395         case 71:
1396                 /* 11.2.71 Required GAN Services */
1397                 /* CBS Cell Broadcast Service (octet 3) */
1398                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_cbs, tvb, ie_offset, 1, FALSE);
1399                 break;
1400         case 72:
1401                 /* 11.2.72 Broadcast Container */
1402                 octet = tvb_get_guint8(tvb,ie_offset);
1403                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_num_of_cbs_frms , tvb, ie_offset, 1, FALSE);
1404                 /* The coding of the page of the CBS message is defined in sub-clause 9.4.1 in TS 23.041. */
1405                 proto_tree_add_text(urr_ie_tree, tvb, ie_offset + 1, ie_len-1,"CBS Frames - Not decoded");
1406                 break;
1407         case 73:
1408                 /* 11.2.73 3G Cell Identity */
1409                 /* The rest of the IE is coded as in [TS 25.331] not including IEI and length, if present.
1410                  * See Annex F for coding
1411                  */
1412                 break;
1413         case 79:
1414                 /* 11.2.79 GAN Mode Indicator */
1415         case 80:
1416                 /* 11.2.80 CN Domain Identity */
1417         case 81:
1418                 /* 11.2.81 GAN Iu Mode Cell Description */
1419         case 82:
1420                 /* 11.2.82 3G UARFCN */
1421         case 83:
1422                 /* 11.2.83 RAB ID */
1423         case 84:
1424                 /* 11.2.84 RAB ID List */
1425         case 85:
1426                 /* 11.2.85 GA-RRC Establishment Cause */
1427         case 86:
1428                 /* 11.2.86 GA-RRC Cause */
1429         case 87:
1430                 /* 11.2.87 GA-RRC Paging Cause */
1431         case 88:
1432                 /* 11.2.88 Intra Domain NAS Node Selector */
1433         case 89:
1434                 /* 11.2.89 CTC Activation List */
1435         case 90:
1436                 /* 11.2.90 CTC Description */
1437         case 91:
1438                 /* 11.2.91 CTC Activation Ack List */
1439         case 92:
1440                 /* 11.2.92 CTC Activation Ack Description */
1441         case 93:
1442                 /* 11.2.93 CTC Modification List */
1443         case 94:
1444                 /* 11.2.94 CTC Modification Ack List */
1445         case 95:
1446                 /* 11.2.95 CTC Modification Ack Description */
1447                 proto_tree_add_text(urr_ie_tree,tvb,ie_offset,ie_len,"DATA");
1448                 break;
1449         case 96:                /* MS Radio Identity */
1450                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_radio_type_of_id, tvb, ie_offset, 1, FALSE);
1451                 octet = tvb_get_guint8(tvb,ie_offset);
1452                 if (( octet & 0xf) == 0){ /* IEEE MAC-address format */
1453                         ie_offset++;
1454                         haddr = tvb_get_ptr(tvb, ie_offset, ie_len);
1455                         proto_tree_add_ether(urr_ie_tree, hf_uma_urr_ms_radio_id, tvb, ie_offset, ie_len, haddr);
1456                 }else{
1457                         proto_tree_add_text(urr_ie_tree, tvb, ie_offset, ie_len,"Unknown format");
1458                 }
1459                 break;
1460
1461         case 97:
1462                 /* UNC IP Address
1463                  * IP Address type
1464                  */
1465                 octet = tvb_get_guint8(tvb,ie_offset);
1466                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_IP_Address_type, tvb, ie_offset, 1, FALSE);
1467                 if (ie_len > 4 )
1468                 ie_offset++;
1469                 if ( octet == 0x57 ){ /* IPv6 */
1470
1471                 }else{ /* All other values shall be interpreted as Ipv4 address in this version of the protocol.*/
1472                         unc_ipv4_address = tvb_get_ipv4(tvb, ie_offset);
1473                         proto_tree_add_ipv4(urr_ie_tree, hf_uma_urr_unc_ipv4, tvb, ie_offset, 4, unc_ipv4_address);
1474                 }
1475                 break;
1476         case 98:                
1477                 /* UNC Fully Qualified Domain/Host Name */
1478                 if ( ie_len > 0){
1479                         string = (gchar*)tvb_get_ephemeral_string(tvb, ie_offset, ie_len);
1480                         proto_tree_add_string(urr_ie_tree, hf_uma_unc_FQDN, tvb, ie_offset, ie_len, string);
1481                 }else{
1482                         proto_tree_add_text(urr_ie_tree,tvb,offset,1,"UNC FQDN not present");
1483                 }
1484                 break;
1485         case 99:
1486                 /* IP address for GPRS user data transport
1487                  * IP Address type
1488                  */
1489                 octet = tvb_get_guint8(tvb,ie_offset);
1490                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_IP_Address_type, tvb, ie_offset, 1, FALSE);
1491                 ie_offset++;
1492                 if ( octet == 0x57 ){ /* IPv6 */
1493
1494                 }else{ /* All other values shall be interpreted as Ipv4 address in this version of the protocol.*/
1495                         GPRS_user_data_ipv4_address = tvb_get_ipv4(tvb, ie_offset);
1496                         proto_tree_add_ipv4(urr_ie_tree, hf_uma_urr_GPRS_user_data_transport_ipv4, tvb, ie_offset, 4, GPRS_user_data_ipv4_address);
1497
1498                 }
1499                 break;
1500         case 100:               /* UDP Port for GPRS user data transport */
1501                 GPRS_user_data_transport_UDP_port = tvb_get_ntohs(tvb,ie_offset);
1502                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_GPRS_port, tvb, ie_offset, 2, FALSE);
1503                 /*
1504                  * If this isn't the first time this packet has been processed,
1505                  * we've already done this work, so we don't need to do it
1506                  * again.
1507                  */
1508                 if (pinfo->fd->flags.visited)
1509                 {
1510                         break;
1511                 }
1512                 SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
1513
1514                 dst_addr.type=AT_IPv4;
1515                 dst_addr.len=4;
1516                 dst_addr.data=(guint8 *)&GPRS_user_data_ipv4_address;
1517
1518                 conversation = find_conversation(pinfo->fd->num,&dst_addr,
1519                         &null_addr, PT_UDP, GPRS_user_data_transport_UDP_port,
1520                         0, NO_ADDR_B|NO_PORT_B);
1521
1522                 if (conversation == NULL) {
1523                         /* It's not part of any conversation - create a new one. */
1524                         conversation = conversation_new(pinfo->fd->num, &dst_addr,
1525                             &null_addr, PT_UDP,GPRS_user_data_transport_UDP_port ,
1526                             0, NO_ADDR2|NO_PORT2);
1527
1528                 /* Set dissector */
1529                 conversation_set_dissector(conversation, uma_udp_handle);
1530                 }
1531
1532                 break;
1533         case 103:               /* UNC TCP port */
1534                 UNC_tcp_port = tvb_get_ntohs(tvb,ie_offset);
1535                 proto_tree_add_uint(urr_ie_tree, hf_uma_urr_UNC_tcp_port , tvb, ie_offset, 2, UNC_tcp_port);
1536
1537                 /*
1538                  * If this isn't the first time this packet has been processed,
1539                  * we've already done this work, so we don't need to do it
1540                  * again.
1541                  */
1542                 if (pinfo->fd->flags.visited)
1543                 {
1544                         break;
1545                 }
1546                 SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
1547
1548                 dst_addr.type=AT_IPv4;
1549                 dst_addr.len=4;
1550                 dst_addr.data=(guint8 *)&unc_ipv4_address;
1551
1552                 conversation = find_conversation(pinfo->fd->num,&dst_addr,
1553                         &null_addr, PT_TCP, UNC_tcp_port,
1554                         0, NO_ADDR_B|NO_PORT_B);
1555
1556                 if (conversation == NULL) {
1557                         /* It's not part of any conversation - create a new one. */
1558                         conversation = conversation_new(pinfo->fd->num, &dst_addr,
1559                             &null_addr, PT_TCP,UNC_tcp_port ,
1560                             0, NO_ADDR2|NO_PORT2);
1561                         /* Set dissector */
1562                         conversation_set_dissector(conversation, uma_tcp_handle);
1563                 }
1564
1565                 break;
1566         case 104:               /* RTP UDP port */
1567                 RTP_UDP_port = tvb_get_ntohs(tvb,ie_offset);
1568                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RTP_port, tvb, ie_offset, 2, FALSE);
1569                 /* TODO find out exactly which element contains IP addr */
1570                 /* Debug
1571                 proto_tree_add_text(urr_ie_tree,tvb,ie_offset,ie_len,"IP %u, Port %u Handle %u",
1572                         rtp_ipv4_address,RTP_UDP_port,rtp_handle);
1573                         */
1574                 if(unc_ipv4_address!=0){
1575                         src_addr.type=AT_IPv4;
1576                         src_addr.len=4;
1577                         src_addr.data=(guint8 *)&unc_ipv4_address;
1578                 }else{
1579                         /* Set Source IP = own IP */
1580                         src_addr = pinfo->src;
1581                 }
1582                 if((!pinfo->fd->flags.visited) && RTP_UDP_port!=0 && rtp_handle){
1583
1584                         rtp_add_address(pinfo, &src_addr, RTP_UDP_port, 0, "UMA", pinfo->fd->num, FALSE, 0);
1585                         if ((RTP_UDP_port & 0x1) == 0){ /* Even number RTP port RTCP should follow on odd number */
1586                                 RTCP_UDP_port = RTP_UDP_port + 1;
1587                                 rtcp_add_address(pinfo, &src_addr, RTCP_UDP_port, 0, "UMA", pinfo->fd->num);
1588                         }
1589                 }
1590                 break;
1591         case 105:               /* RTCP UDP port */
1592                 RTCP_UDP_port = tvb_get_ntohs(tvb,ie_offset);
1593                 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RTCP_port, tvb, ie_offset, 2, FALSE);
1594                 /* TODO find out exactly which element contains IP addr */
1595                 if((!pinfo->fd->flags.visited) && rtcp_ipv4_address!=0 && RTCP_UDP_port!=0 && rtcp_handle){
1596                         src_addr.type=AT_IPv4;
1597                         src_addr.len=4;
1598                         src_addr.data=(guint8 *)&rtcp_ipv4_address;
1599
1600                         rtcp_add_address(pinfo, &src_addr, RTCP_UDP_port, 0, "UMA", pinfo->fd->num);
1601                 }
1602                 break;
1603         case 106:
1604                 /* 11.2.70 GERAN Received Signal Level List */
1605                 while(ie_offset<=(offset + ie_len)){
1606                         proto_tree_add_item(urr_ie_tree, hf_uma_urr_RXLEV_NCELL, tvb, ie_offset, 1, FALSE);
1607                         ie_offset++;
1608                 }
1609                 break;
1610         case 107:
1611                 /* 11.2.70 UTRAN Received Signal Level List */
1612                 while(ie_offset<=(offset + ie_len)){
1613                         proto_tree_add_item(urr_ie_tree, hf_uma_urr_RXLEV_NCELL, tvb, ie_offset, 1, FALSE);
1614                         ie_offset++;
1615                 }
1616                 break;
1617         case 108:
1618                 /* 11.2.74 PS Handover to GERAN Command */
1619         case 109:
1620                 /* 11.2.75 PS Handover to UTRAN Command */
1621         case 110:
1622                 /* 11.2.76 PS Handover to GERAN PSI */
1623         case 111:
1624                 /* 11.2.77 PS Handover to GERAN SI */
1625         case 112:
1626                 /* 11.2.78 TU4004 Timer */
1627         case 115:
1628                 /* 11.2.96 PTC Activation List */
1629         case 116:
1630                 /* 11.2.97 PTC Description */
1631         case 117:
1632                 /* 11.2.98 PTC Activation Ack List */
1633         case 118:
1634                 /* 11.2.99 PTC Activation Ack Description */
1635         case 119:
1636                 /* 11.2.100 PTC Modification List */
1637         case 120:
1638                 /* 11.2.101 PTC Modification Ack List */
1639         case 121:
1640                 /* 11.2.102 PTC Modification Ack Description */
1641         case 122:
1642                 /* 11.2.103 RAB Configuration */
1643         case 123:
1644                 /* 11.2.104 Multi-rate Configuration 2 */
1645         case 124:
1646                 /* 11.2.105 Selected Integrity Protection Algorithm */
1647         case 125:
1648                 /* 11.2.106 Selected Encryption Algorithm */
1649         case 126:
1650                 /* 11.2.107 CN Domains to Handover */
1651         default:
1652                 proto_tree_add_text(urr_ie_tree,tvb,ie_offset,ie_len,"DATA");
1653                 break;
1654         }
1655         offset = offset + ie_len;
1656         return offset;
1657 }
1658
1659
1660
1661 static void
1662 dissect_uma(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1663 {
1664         int             offset = 0;
1665         guint8  octet, pd;
1666         guint16 msg_len;
1667
1668 /* Set up structures needed to add the protocol subtree and manage it */
1669         proto_item *ti;
1670         proto_tree *uma_tree;
1671
1672 /* Make entries in Protocol column and Info column on summary display */
1673         col_set_str(pinfo->cinfo, COL_PROTOCOL, "UMA");
1674         col_clear(pinfo->cinfo, COL_INFO);
1675
1676         ti = proto_tree_add_item(tree, proto_uma, tvb, 0, -1, FALSE);
1677         uma_tree = proto_item_add_subtree(ti, ett_uma);
1678
1679 /* add an item to the subtree, see section 1.6 for more information */
1680         msg_len = tvb_get_ntohs(tvb,offset);
1681         proto_tree_add_item(uma_tree, hf_uma_length_indicator, tvb, offset, 2, FALSE);
1682         offset = offset + 2;
1683         octet = tvb_get_guint8(tvb,offset);
1684         pd = octet & 0x0f;
1685         proto_tree_add_item(uma_tree, hf_uma_skip_ind, tvb, offset, 1, FALSE);
1686         if ((octet & 0xf0) != 0 ){
1687                 proto_tree_add_text(uma_tree, tvb,offset,-1,"Skip this message");
1688                 return;
1689         }
1690
1691         proto_tree_add_item(uma_tree, hf_uma_pd, tvb, offset, 1, FALSE);
1692         switch  ( pd ){
1693         case 0: /* URR_C */
1694         case 1: /* URR */
1695                 offset++;
1696                 octet = tvb_get_guint8(tvb,offset);
1697                 proto_tree_add_item(uma_tree, hf_uma_urr_msg_type, tvb, offset, 1, FALSE);
1698                 if (check_col(pinfo->cinfo, COL_INFO))
1699                         col_add_str(pinfo->cinfo, COL_INFO, val_to_str(octet, uma_urr_msg_type_vals, "Unknown URR (%u)"));
1700                 while ((msg_len + 1) > offset ){
1701                         offset++;
1702                         offset = dissect_uma_IE(tvb, pinfo, uma_tree, offset);
1703                 }
1704                 break;
1705         case 2: /* URLC */
1706                 offset++;
1707                 octet = tvb_get_guint8(tvb,offset);
1708                 proto_tree_add_item(uma_tree, hf_uma_urlc_msg_type, tvb, offset, 1, FALSE);
1709                 if (check_col(pinfo->cinfo, COL_INFO)){
1710                         col_add_str(pinfo->cinfo, COL_INFO, val_to_str(octet, uma_urlc_msg_type_vals, "Unknown URLC (%u)"));
1711                         col_set_fence(pinfo->cinfo,COL_INFO);
1712                 }
1713                 offset++;
1714                 proto_tree_add_item(uma_tree, hf_uma_urlc_TLLI, tvb, offset, 4, FALSE);
1715                 offset = offset + 3;
1716                 while ((msg_len + 1) > offset ){
1717                         offset++;
1718                         offset = dissect_uma_IE(tvb, pinfo, uma_tree, offset);
1719                 }
1720                 break;
1721         default:
1722                 proto_tree_add_text(uma_tree, tvb,offset,-1,"Unknown protocol %u",pd);
1723                 break;
1724         }
1725 }
1726
1727 static guint
1728 get_uma_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
1729 {
1730         /* PDU length = Message length + length of length indicator */
1731         return tvb_get_ntohs(tvb,offset)+2;
1732 }
1733
1734 static void
1735 dissect_uma_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1736 {
1737         tcp_dissect_pdus(tvb, pinfo, tree, uma_desegment, UMA_HEADER_SIZE,
1738             get_uma_pdu_len, dissect_uma);
1739 }
1740
1741 static int
1742 dissect_uma_urlc_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1743 {
1744
1745         int             offset = 0;
1746         guint8  octet;
1747         guint16 msg_len;
1748
1749 /* Set up structures needed to add the protocol subtree and manage it */
1750         proto_item *ti;
1751         proto_tree *uma_tree;
1752
1753 /* Make entries in Protocol column and Info column on summary display */
1754         col_set_str(pinfo->cinfo, COL_PROTOCOL, "UMA");
1755         col_clear(pinfo->cinfo, COL_INFO);
1756
1757         ti = proto_tree_add_item(tree, proto_uma, tvb, 0, -1, FALSE);
1758         uma_tree = proto_item_add_subtree(ti, ett_uma);
1759
1760         octet = tvb_get_guint8(tvb,offset);
1761         proto_tree_add_item(uma_tree, hf_uma_urlc_msg_type, tvb, offset, 1, FALSE);
1762         if (check_col(pinfo->cinfo, COL_INFO)){
1763                 col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",val_to_str(octet, uma_urlc_msg_type_vals, "Unknown URLC (%u)"));
1764                 col_set_fence(pinfo->cinfo,COL_INFO);
1765         }
1766         msg_len = tvb_length_remaining(tvb,offset) - 1;
1767
1768         switch  ( octet ){
1769
1770         case 2: /* RLC UNITDATA */
1771         case 6: /* URLC-UFC-REQ */
1772         case 7: /* URLC-DFC-REQ only allowed message types*/
1773                 offset++;
1774                 proto_tree_add_item(uma_tree, hf_uma_urlc_TLLI, tvb, offset, 4, FALSE);
1775                 offset = offset + 4;
1776                 proto_tree_add_item(uma_tree, hf_uma_urlc_seq_nr, tvb, offset, 2, FALSE);
1777                 offset++;
1778                 while (msg_len > offset){
1779                         offset++;
1780                         offset = dissect_uma_IE(tvb, pinfo, uma_tree, offset);
1781                 }
1782                 return offset;
1783         default:
1784                 proto_tree_add_text(uma_tree, tvb,offset,-1,"Wrong message type %u",octet);
1785                 return tvb_length(tvb);
1786
1787         }
1788
1789 }
1790
1791 static void
1792 range_delete_callback(guint32 port)
1793 {
1794     dissector_delete("tcp.port", port, uma_tcp_handle);
1795 }
1796
1797 static void
1798 range_add_callback(guint32 port)
1799 {
1800     dissector_add("tcp.port", port, uma_tcp_handle);
1801 }
1802
1803 /* Register the protocol with Wireshark */
1804 /* If this dissector uses sub-dissector registration add a registration routine.
1805    This format is required because a script is used to find these routines and
1806    create the code that calls these routines.
1807 */
1808 void
1809 proto_reg_handoff_uma(void)
1810 {
1811         static gboolean Initialized=FALSE;
1812         static range_t *uma_tcp_port_range;
1813
1814         if (!Initialized) {
1815                 uma_tcp_handle = find_dissector("umatcp");
1816                 uma_udp_handle = find_dissector("umaudp");
1817                 dissector_add_handle("udp.port", uma_udp_handle);  /* for "decode-as" */
1818                 data_handle = find_dissector("data");
1819                 rtp_handle = find_dissector("rtp");
1820                 rtcp_handle = find_dissector("rtcp");
1821                 llc_handle = find_dissector("llcgprs");
1822                 bssap_pdu_type_table = find_dissector_table("bssap.pdu_type");
1823                 Initialized=TRUE;
1824         } else {
1825                 range_foreach(uma_tcp_port_range, range_delete_callback);
1826                 g_free(uma_tcp_port_range);
1827         }
1828
1829         uma_tcp_port_range = range_copy(global_uma_tcp_port_range);
1830         range_foreach(uma_tcp_port_range, range_add_callback);
1831 }
1832
1833 /* this format is require because a script is used to build the C function
1834    that calls all the protocol registration.
1835 */
1836
1837 void
1838 proto_register_uma(void)
1839 {
1840
1841         module_t *uma_module;
1842
1843 /* Setup list of header fields  See Section 1.6.1 for details*/
1844         static hf_register_info hf[] = {
1845                 { &hf_uma_length_indicator,
1846                         { "Length Indicator","uma.li",
1847                         FT_UINT16, BASE_DEC, NULL, 0x0,
1848                         NULL, HFILL }
1849                 },
1850                 { &hf_uma_pd,
1851                         { "Protocol Discriminator","uma.pd",
1852                         FT_UINT8, BASE_DEC, VALS(uma_pd_vals), 0x0f,
1853                         NULL, HFILL }
1854                 },
1855                 { &hf_uma_skip_ind,
1856                         { "Skip Indicator",           "uma.skip.ind",
1857                         FT_UINT8, BASE_DEC, NULL, 0xf0,
1858                         NULL, HFILL }
1859                 },
1860                 { &hf_uma_urr_msg_type,
1861                         { "URR Message Type", "uma.urr.msg.type",
1862                         FT_UINT16, BASE_DEC, VALS(uma_urr_msg_type_vals), 0x0,
1863                         NULL, HFILL }
1864                 },
1865                 { &hf_uma_urlc_msg_type,
1866                         { "URLC Message Type", "uma.urlc.msg.type",
1867                         FT_UINT8, BASE_DEC, VALS(uma_urlc_msg_type_vals), 0x0,
1868                         NULL, HFILL }
1869                 },
1870                 { &hf_uma_urlc_TLLI,
1871                         { "Temporary Logical Link Identifier","uma.urlc.tlli",
1872                         FT_BYTES,BASE_NONE,  NULL, 0x0,
1873                         NULL, HFILL }
1874                 },
1875                 { &hf_uma_urlc_seq_nr,
1876                         { "Sequence Number","uma.urlc.seq.nr",
1877                         FT_BYTES,BASE_NONE,  NULL, 0x0,
1878                         NULL, HFILL }
1879                 },
1880                 { &hf_uma_urr_IE,
1881                         { "URR Information Element","uma.urr.ie.type",
1882                         FT_UINT8, BASE_DEC, VALS(uma_urr_IE_type_vals), 0x0,
1883                         NULL, HFILL }
1884                 },
1885                 { &hf_uma_urr_IE_len,
1886                         { "URR Information Element length","uma.urr.ie.len",
1887                         FT_UINT16, BASE_DEC, NULL, 0x0,
1888                         NULL, HFILL }
1889                 },
1890                 { &hf_uma_urr_mobile_identity_type,
1891                         { "Mobile Identity Type","uma.urr.ie.mobileid.type",
1892                         FT_UINT8, BASE_DEC, VALS(uma_urr_mobile_identity_type_vals), 0x07,
1893                         NULL, HFILL }
1894                 },
1895                 { &hf_uma_urr_odde_even_ind,
1896                         { "Odd/even indication","uma.urr.oddevenind",
1897                         FT_UINT8, BASE_DEC, uma_urr_oddevenind_vals, 0x08,
1898                         "Mobile Identity", HFILL }
1899                 },
1900                 { &hf_uma_urr_imsi,
1901                         { "IMSI", "uma_urr.imsi",
1902                         FT_STRING, BASE_NONE, NULL, 0,
1903                         NULL, HFILL }
1904                 },
1905                 { &hf_uma_urr_imei,
1906                         { "IMEI", "uma_urr.imei",
1907                         FT_STRING, BASE_NONE, NULL, 0,
1908                         NULL, HFILL }
1909                 },
1910                 { &hf_uma_urr_imeisv,
1911                         { "IMEISV", "uma_urr.imeisv",
1912                         FT_STRING, BASE_NONE, NULL, 0,
1913                         NULL, HFILL }
1914                 },
1915                 { &hf_uma_urr_tmsi_p_tmsi,
1916                         { "TMSI/P-TMSI", "uma_urr.tmsi_p_tmsi",
1917                         FT_STRING, BASE_NONE, NULL, 0,
1918                         NULL, HFILL }
1919                 },
1920                 { &hf_uma_urr_uri,
1921                         { "GAN Release Indicator","uma.urr.uri",
1922                         FT_UINT8, BASE_DEC, VALS(uma_urr_gan_rel_ind_vals), 0x07,
1923                         "URI", HFILL }
1924                 },
1925                 { &hf_uma_urr_radio_type_of_id,
1926                         { "Type of identity","uma.urr.radio_type_of_id",
1927                         FT_UINT8, BASE_DEC, VALS(radio_type_of_id_vals), 0x0f,
1928                         NULL, HFILL }
1929                 },
1930                 { &hf_uma_urr_radio_id,
1931                         { "Radio Identity","uma.urr.radio_id",
1932                         FT_ETHER, BASE_NONE, NULL, 0x00,
1933                         NULL, HFILL }
1934                 },
1935
1936                 { &hf_uma_urr_cell_id,
1937                         { "Cell Identity","uma.urr.cell_id",
1938                         FT_UINT16, BASE_DEC, NULL, 0x00,
1939                         NULL, HFILL }
1940                 },
1941
1942                 { &hf_uma_urr_mcc,
1943                         { "Mobile Country Code","uma.urr.mcc",
1944                         FT_UINT16, BASE_DEC, NULL, 0x0,
1945                         NULL, HFILL }
1946                 },
1947                 { &hf_uma_urr_mnc,
1948                         { "Mobile network code","uma.urr.mnc",
1949                         FT_UINT16, BASE_DEC, NULL, 0x0,
1950                         NULL, HFILL }
1951                 },
1952                 { &hf_uma_urr_lac,
1953                         { "Location area code","uma.urr.lac",
1954                         FT_UINT16, BASE_DEC, NULL, 0x0,
1955                         NULL, HFILL }
1956                 },
1957                 { &hf_uma_urr_gci,
1958                         { "GCI, GSM Coverage Indicator","uma.urr.gci",
1959                         FT_UINT8, BASE_DEC,  VALS(uma_gci_vals), 0x0,
1960                         NULL, HFILL }
1961                 },
1962                 { &hf_uma_urr_tura,
1963                         { "TURA, Type of Unlicensed Radio","uma.urr.tura",
1964                         FT_UINT8,BASE_DEC,  VALS(uma_tura_vals), 0xf,
1965                         NULL, HFILL }
1966                 },
1967                 { &hf_uma_urr_gc,
1968                         { "GC, GERAN Capable","uma.urr.gc",
1969                         FT_UINT8,BASE_DEC,  VALS(uma_gc_vals), 0x10,
1970                         NULL, HFILL }
1971                 },
1972                 { &hf_uma_urr_uc,
1973                         { "UC, UTRAN Capable","uma.urr.uc",
1974                         FT_UINT8,BASE_DEC,  VALS(uma_uc_vals), 0x20,
1975                         "GC, GERAN Capable", HFILL }
1976                 },
1977                 { &hf_uma_urr_rrs,
1978                         { "RTP Redundancy Support(RRS)","uma.urr.rrs",
1979                         FT_UINT8,BASE_DEC, VALS(uma_rrs_vals), 0x01,
1980                         NULL, HFILL }
1981                 },
1982                 { &hf_uma_urr_gmsi,
1983                         { "GMSI, GAN Mode Support Indicator)","uma.urr.gmsi",
1984                         FT_UINT8,BASE_DEC, VALS(uma_gmsi_vals), 0x06,
1985                         "GMSI, GAN Mode Support Indicator", HFILL }
1986                 },
1987                 { &hf_uma_urr_psho,
1988                         { "PS HO, PS Handover Capable","uma.urr.psho",
1989                         FT_UINT8,BASE_DEC, VALS(uma_ps_ho_vals), 0x02,
1990                         NULL, HFILL }
1991                 },
1992                 { &hf_uma_urr_IP_Address_type,
1993                         { "IP address type number value","uma.urr.ip_type",
1994                         FT_UINT8,BASE_DEC,  VALS(IP_address_type_vals), 0x0,
1995                         NULL, HFILL }
1996                 },
1997                 { &hf_uma_urr_FQDN,
1998                        { "Fully Qualified Domain/Host Name (FQDN)", "uma.urr.fqdn",
1999                        FT_STRING, BASE_NONE,NULL,0x0,
2000                         NULL, HFILL }
2001                 },
2002                 { &hf_uma_urr_sgw_ipv4,
2003                         { "SGW IPv4 address","uma.urr.sgwipv4",
2004                         FT_IPv4,BASE_NONE,  NULL, 0x0,
2005                         NULL, HFILL }
2006                 },
2007                 { &hf_uma_urr_redirection_counter,
2008                         { "Redirection Counter","uma.urr.redirection_counter",
2009                         FT_UINT8,BASE_DEC,  NULL, 0x0,
2010                         NULL, HFILL }
2011                 },
2012                 { &hf_uma_urr_dis_rej_cau,
2013                         { "Discovery Reject Cause","uma.urr.is_rej_cau",
2014                         FT_UINT8,BASE_DEC,  VALS(uma_discovery_reject_cause_vals), 0x0,
2015                         NULL, HFILL }
2016                 },
2017                 { &hf_uma_urr_ECMC,
2018                         { "ECMC, Early Classmark Sending Control","uma.urr.is_rej_cau",
2019                         FT_UINT8,BASE_DEC,  VALS(ECMC_vals), 0x2,
2020                         NULL, HFILL }
2021                 },
2022                 { &hf_uma_urr_NMO,
2023                         { "NMO, Network Mode of Operation","uma.urr.NMO",
2024                         FT_UINT8,BASE_DEC,  VALS(NMO_vals), 0xc,
2025                         NULL, HFILL }
2026                 },
2027                 { &hf_uma_urr_GPRS,
2028                         { "GPRS, GPRS Availability","uma.urr.is_rej_cau",
2029                         FT_UINT8,BASE_DEC,  VALS(GPRS_avail_vals), 0x10,
2030                         NULL, HFILL }
2031                 },
2032                 { &hf_uma_urr_DTM,
2033                         { "DTM, Dual Transfer Mode of Operation by network","uma.urr.dtm",
2034                         FT_UINT8,BASE_DEC,  VALS(DTM_vals), 0x20,
2035                         NULL, HFILL }
2036                 },
2037                 { &hf_uma_urr_ATT,
2038                         { "ATT, Attach-detach allowed","uma.urr.att",
2039                         FT_UINT8,BASE_DEC,  VALS(ATT_vals), 0x40,
2040                         NULL, HFILL }
2041                 },
2042                 { &hf_uma_urr_MSCR,
2043                         { "MSCR, MSC Release","uma.urr.mscr",
2044                         FT_UINT8,BASE_DEC,  VALS(MSCR_vals), 0x80,
2045                         NULL, HFILL }
2046                 },
2047                 { &hf_uma_urr_T3212_timer,
2048                         { "T3212 Timer value(seconds)","uma.urr.t3212",
2049                         FT_UINT8,BASE_DEC,  NULL, 0x0,
2050                         NULL, HFILL }
2051                 },
2052                 { &hf_uma_urr_RAC,
2053                         { "Routing Area Code","uma.urr.rac",
2054                         FT_UINT8,BASE_DEC,  NULL, 0x0,
2055                         NULL, HFILL }
2056                 },
2057                 { &hf_uma_urr_ap_location,
2058                         { "AP Location","uma.urr.ap_location",
2059                         FT_BYTES,BASE_NONE,  NULL, 0x0,
2060                         NULL, HFILL }
2061                 },
2062                 { &hf_uma_urr_SGSNR,
2063                         { "SGSN Release","uma.urr.SGSNR",
2064                         FT_UINT8,BASE_DEC,  VALS(SGSNR_vals), 0x01,
2065                         NULL, HFILL }
2066                 },
2067                 { &hf_uma_urr_ECMP,
2068                         { "ECMP, Emergency Call Mode Preference","uma.urr.ECMP",
2069                         FT_UINT8,BASE_DEC,  VALS(ECMP_vals), 0x02,
2070                         NULL, HFILL }
2071                 },
2072                 { &hf_uma_urr_RE,
2073                         { "RE, Call reestablishment allowed","uma.urr.RE",
2074                         FT_UINT8,BASE_DEC,  VALS(RE_vals), 0x04,
2075                         NULL, HFILL }
2076                 },
2077                 { &hf_uma_urr_PFCFM,
2078                         { "PFCFM, PFC_FEATURE_MODE","uma.urr.PFCFM",
2079                         FT_UINT8,BASE_DEC,  VALS(PFCFM_vals), 0x08,
2080                         NULL, HFILL }
2081                 },
2082                 { &hf_uma_urr_3GECS,
2083                         { "3GECS, 3G Early Classmark Sending Restriction","uma.urr.3GECS",
2084                         FT_UINT8,BASE_DEC,  VALS(Three_GECS_vals), 0x10,
2085                         NULL, HFILL }
2086                 },
2087                 { &hf_uma_urr_bcc,
2088                         { "BCC","uma.urr.bcc",
2089                         FT_UINT8,BASE_DEC,  NULL, 0x07,
2090                         NULL, HFILL }
2091                 },
2092                 { &hf_uma_urr_ncc,
2093                         { "NCC","uma.urr.ncc",
2094                         FT_UINT8,BASE_DEC,  NULL, 0x38,
2095                         NULL, HFILL }
2096                 },
2097                 { &hf_uma_urr_TU3907_timer,
2098                         { "TU3907 Timer value(seconds)","uma.urr.tu3907",
2099                         FT_UINT16,BASE_DEC,  NULL, 0x0,
2100                         NULL, HFILL }
2101                 },
2102                 { &hf_uma_urr_GSM_RR_state,
2103                         { "GSM RR State value","uma.urr.gsmrrstate",
2104                         FT_UINT8,BASE_DEC,  VALS(uma_GRS_GSM_RR_State_vals), 0x7,
2105                         NULL, HFILL }
2106                 },
2107                 { &hf_uma_urr_gan_band,
2108                         { "UMA Band","uma.urr.umaband",
2109                         FT_UINT8,BASE_DEC,  VALS(uma_gan_band_vals), 0x0f,
2110                         NULL, HFILL }
2111                 },
2112                 { &hf_uma_urr_URR_state,
2113                         { "URR State","uma.urr.state",
2114                         FT_UINT8,BASE_DEC,  VALS(URR_state_vals), 0x03,
2115                         NULL, HFILL }
2116                 },
2117                 { &hf_uma_urr_register_reject_cause,
2118                         { "Register Reject Cause","uma.urr.state",
2119                         FT_UINT8,BASE_DEC,  VALS(register_reject_cause_vals), 0x0,
2120                         NULL, HFILL }
2121                 },
2122                 { &hf_uma_urr_TU3906_timer,
2123                         { "TU3907 Timer value(seconds)","uma.urr.tu3906",
2124                         FT_UINT16,BASE_DEC,  NULL, 0x0,
2125                         "TU3906 Timer value(seconds)", HFILL }
2126                 },
2127                 { &hf_uma_urr_TU3910_timer,
2128                         { "TU3907 Timer value(seconds)","uma.urr.tu3910",
2129                         FT_UINT16,BASE_DEC,  NULL, 0x0,
2130                         "TU3910 Timer value(seconds)", HFILL }
2131                 },
2132                 { &hf_uma_urr_TU3902_timer,
2133                         { "TU3902 Timer value(seconds)","uma.urr.tu3902",
2134                         FT_UINT16,BASE_DEC,  NULL, 0x0,
2135                         NULL, HFILL }
2136                 },
2137                 { &hf_uma_urr_communication_port,
2138                         { "Communication Port","uma.urr.communication_port",
2139                         FT_UINT16,BASE_DEC,  NULL, 0x0,
2140                         NULL, HFILL }
2141                 },
2142                 { &hf_uma_urr_L3_Message,
2143                         { "L3 message contents","uma.urr.l3",
2144                         FT_BYTES,BASE_NONE,  NULL, 0x0,
2145                         NULL, HFILL }
2146                 },
2147                 { &hf_uma_urr_L3_protocol_discriminator,
2148                         { "Protocol discriminator","uma.urr.L3_protocol_discriminator",
2149                         FT_UINT8,BASE_DEC,  VALS(protocol_discriminator_vals), 0x0f,
2150                         NULL, HFILL }
2151                 },
2152                 { &hf_uma_urr_sc,
2153                         { "SC","uma.urr.SC",
2154                         FT_UINT8,BASE_DEC,  VALS(SC_vals), 0x1,
2155                         NULL, HFILL }
2156                 },
2157                 { &hf_uma_urr_algorithm_id,
2158                         { "Algorithm identifier","uma.urr.algorithm_identifier",
2159                         FT_UINT8,BASE_DEC,  VALS(algorithm_identifier_vals), 0xe,
2160                         "Algorithm_identifier", HFILL }
2161                 },
2162                 { &hf_uma_urr_GPRS_resumption,
2163                         { "GPRS resumption ACK","uma.urr.GPRS_resumption",
2164                         FT_UINT8,BASE_DEC,  VALS(GPRS_resumption_vals), 0x1,
2165                         NULL, HFILL }
2166                 },
2167                 { &hf_uma_urr_ULQI,
2168                         { "ULQI, UL Quality Indication","uma.urr.ULQI",
2169                         FT_UINT8,BASE_DEC,  VALS(uma_ulqi_vals), 0x0f,
2170                         NULL, HFILL }
2171                 },
2172                 { &hf_uma_urr_TU3920_timer,
2173                         { "TU3920 Timer value(seconds)","uma.urr.tu3920",
2174                         FT_UINT16,BASE_DEC,  NULL, 0x0,
2175                         "TU3920 Timer value(hundreds of of ms)", HFILL }
2176                 },
2177                 { &hf_uma_urr_peak_tpt_cls,
2178                         { "PEAK_THROUGHPUT_CLASS","uma.urr.peak_tpt_cls",
2179                         FT_UINT8,BASE_DEC,  NULL, 0x0f,
2180                         NULL, HFILL }
2181                 },
2182                 { &hf_uma_urr_radio_pri,
2183                         { "Radio Priority","uma.urr.radio_pri",
2184                         FT_UINT8,BASE_DEC,  VALS(radio_pri_vals), 0x30,
2185                         "RADIO_PRIORITY", HFILL }
2186                 },
2187                 { &hf_uma_urr_rlc_mode,
2188                         { "RLC mode","uma.urr.rrlc_mode",
2189                         FT_UINT8,BASE_DEC,  VALS(rlc_mode_vals), 0x80,
2190                         NULL, HFILL }
2191                 },
2192                 { &hf_uma_urr_ga_psr_cause,
2193                         { "GA-PSR Cause","uma.urr.ga_psr_cause",
2194                         FT_UINT8,BASE_DEC,  VALS(uma_ga_psr_cause_vals), 0x0,
2195                         NULL, HFILL }
2196                 },
2197                 { &hf_uma_urr_udr,
2198                         { "User Data Rate value (bits/s)","uma.urr.URLCcause",
2199                         FT_UINT32,BASE_DEC,  NULL, 0x0,
2200                         NULL, HFILL }
2201                 },
2202                 { &hf_uma_urr_TU4001_timer,
2203                         { "TU4001 Timer value(seconds)","uma.urr.tu4001",
2204                         FT_UINT16,BASE_DEC,  NULL, 0x0,
2205                         NULL, HFILL }
2206                 },
2207                 { &hf_uma_urr_LS,
2208                         { "Location Status(LS)","uma.urr.LS",
2209                         FT_UINT8,BASE_DEC,  VALS(LS_vals), 0x3,
2210                         NULL, HFILL }
2211                 },
2212                 { &hf_uma_urr_cipher_res,
2213                         { "Cipher Response(CR)","uma.urr.CR",
2214                         FT_UINT8,BASE_DEC,  VALS(CR_vals), 0x3,
2215                         NULL, HFILL }
2216                 },
2217                 { &hf_uma_urr_rand_val,
2218                         { "Ciphering Command RAND value","uma.rand_val",
2219                         FT_BYTES,BASE_NONE,  NULL, 0x0,
2220                         NULL, HFILL }
2221                 },
2222                 { &hf_uma_urr_ciphering_command_mac,
2223                         { "Ciphering Command MAC (Message Authentication Code)","uma.ciphering_command_mac",
2224                         FT_BYTES,BASE_NONE,  NULL, 0x0,
2225                         NULL, HFILL }
2226                 },
2227                 { &hf_uma_urr_ciphering_key_seq_num,
2228                         { "Values for the ciphering key","uma.ciphering_key_seq_num",
2229                         FT_UINT8,BASE_DEC,  NULL, 0x7,
2230                         NULL, HFILL }
2231                 },
2232                 { &hf_uma_urr_sapi_id,
2233                         { "SAPI ID","uma.sapi_id",
2234                         FT_UINT8,BASE_DEC,  VALS(sapi_id_vals), 0x7,
2235                         NULL, HFILL }
2236                 },
2237                 { &hf_uma_urr_establishment_cause,
2238                         { "Establishment Cause","uma.urr.establishment_cause",
2239                         FT_UINT8,BASE_DEC,  VALS(establishment_cause_vals), 0x0,
2240                         NULL, HFILL }
2241                 },
2242                 { &hf_uma_urr_channel,
2243                         { "Channel","uma.urr.establishment_cause",
2244                         FT_UINT8,BASE_DEC,  VALS(channel_vals), 0x3,
2245                         NULL, HFILL }
2246                 },
2247                 { &hf_uma_urr_PDU_in_error,
2248                         { "PDU in Error,","uma.urr.PDU_in_error",
2249                         FT_BYTES,BASE_NONE,  NULL, 0x0,
2250                         NULL, HFILL }
2251                 },
2252                 { &hf_uma_urr_sample_size,
2253                         { "Sample Size","uma.urr.sample_size",
2254                         FT_UINT8,BASE_DEC,  VALS(sample_size_vals), 0x0,
2255                         NULL, HFILL }
2256                 },
2257                 { &hf_uma_urr_payload_type,
2258                         { "Payload Type","uma.urr.sample_size",
2259                         FT_UINT8,BASE_DEC,  NULL, 0x0,
2260                         NULL, HFILL }
2261                 },
2262                 { &hf_uma_urr_LLC_PDU,
2263                         { "LLC-PDU","uma.urr.llc_pdu",
2264                         FT_BYTES,BASE_NONE,  NULL, 0x0,
2265                         NULL, HFILL }
2266                 },
2267                 { &hf_uma_urr_LBLI,
2268                         { "LBLI, Location Black List indicator","uma.urr.LBLI",
2269                         FT_UINT8,BASE_DEC,  VALS(LBLI_vals), 0x0,
2270                         NULL, HFILL }
2271                 },
2272                 { &hf_uma_urr_RI,
2273                         { "Reset Indicator(RI)","uma.urr.RI",
2274                         FT_UINT8,BASE_DEC,  VALS(RI_vals), 0x1,
2275                         NULL, HFILL }
2276                 },
2277                 { &hf_uma_urr_TU4003_timer,
2278                         { "TU4003 Timer value(seconds)","uma.urr.tu4003",
2279                         FT_UINT16,BASE_DEC,  NULL, 0x0,
2280                         NULL, HFILL }
2281                 },
2282                 { &hf_uma_urr_ap_service_name_type,
2283                         { "AP Service Name type","uma.urr.ap_service_name_type",
2284                         FT_UINT8,BASE_DEC,  VALS(ap_service_name_type_vals), 0x0,
2285                         NULL, HFILL }
2286                 },
2287                 { &hf_uma_urr_ap_Service_name_value,
2288                         { "AP Service Name Value","uma.urr.ap_service_name_value",
2289                         FT_STRING,BASE_NONE,  NULL, 0x0,
2290                         NULL, HFILL }
2291                 },
2292                 { &hf_uma_urr_uma_service_zone_icon_ind,
2293                         { "UMA Service Zone Icon Indicator","uma.urr.uma_service_zone_icon_ind",
2294                         FT_UINT8,BASE_DEC,  VALS(uma_service_zone_icon_ind_vals), 0x0,
2295                         NULL, HFILL }
2296                 },
2297                 { &hf_uma_urr_uma_service_zone_str_len,
2298                         { "Length of UMA Service Zone string","uma.urr.service_zone_str_len",
2299                         FT_UINT8,BASE_DEC,  NULL, 0x0,
2300                         NULL, HFILL }
2301                 },
2302                 { &hf_uma_urr_window_size,
2303                         { "Window Size","uma.urr.uma_window_size",
2304                         FT_UINT8,BASE_DEC,  VALS(window_size_vals), 0x03,
2305                         NULL, HFILL }
2306                 },
2307                 { &hf_uma_urr_uma_codec_mode,
2308                         { "GAN A/Gb Mode Codec Mode","uma.urr.uma_codec_mode",
2309                         FT_UINT8,BASE_DEC,  NULL, 0xc0,
2310                         NULL, HFILL }
2311                 },
2312                 { &hf_uma_urr_UTRAN_cell_id_disc,
2313                         { "UTRAN Cell Identification Discriminator","uma.urr.uma_UTRAN_cell_id_disc",
2314                         FT_UINT8,BASE_DEC,  VALS(UTRAN_cell_id_disc_vals), 0x0f,
2315                         NULL, HFILL }
2316                 },
2317                 { &hf_uma_urr_suti,
2318                         { "SUTI, Serving GANC table indicator","uma.urr.uma_suti",
2319                         FT_UINT8,BASE_DEC,  VALS(suti_vals), 0x01,
2320                         NULL, HFILL }
2321                 },
2322                 { &hf_uma_urr_uma_mps,
2323                         { "UMPS, Manual PLMN Selection indicator","uma.urr.mps",
2324                         FT_UINT8,BASE_DEC,  VALS(mps_vals), 0x3,
2325                         "MPS, Manual PLMN Selection indicator", HFILL }
2326                 },
2327                 { &hf_uma_urr_num_of_plms,
2328                         { "Number of PLMN:s","uma.urr.num_of_plms",
2329                         FT_UINT8,BASE_DEC,  NULL, 0x0,
2330                         NULL, HFILL }
2331                 },
2332                 { &hf_uma_urr_cbs,
2333                         { "CBS Cell Broadcast Service","uma.urr.cbs",
2334                         FT_UINT8,BASE_DEC,  VALS(cbs_vals), 0x01,
2335                         NULL, HFILL }
2336                 },
2337                 { &hf_uma_urr_num_of_cbs_frms,
2338                         { "Number of CBS Frames","uma.urr.num_of_cbs_frms",
2339                         FT_UINT8,BASE_DEC,  NULL, 0x0,
2340                         NULL, HFILL }
2341                 },
2342                 { &hf_uma_urr_ms_radio_id,
2343                         { "MS Radio Identity","uma.urr.ms_radio_id",
2344                         FT_ETHER, BASE_NONE, NULL, 0x00,
2345                         NULL, HFILL }
2346                 },
2347                 { &hf_uma_urr_uma_service_zone_str,
2348                         { "UMA Service Zone string,","uma.urr.uma_service_zone_str",
2349                         FT_STRING,BASE_NONE,  NULL, 0x0,
2350                         NULL, HFILL }
2351                 },
2352                 { &hf_uma_urr_unc_ipv4,
2353                         { "UNC IPv4 address","uma.urr.uncipv4",
2354                         FT_IPv4,BASE_NONE,  NULL, 0x0,
2355                         NULL, HFILL }
2356                 },
2357                 { &hf_uma_unc_FQDN,
2358                        { "UNC Fully Qualified Domain/Host Name (FQDN)", "uma.urr.unc_fqdn",
2359                        FT_STRING, BASE_NONE,NULL,0x0,
2360                         NULL, HFILL }
2361                 },
2362                 { &hf_uma_urr_GPRS_user_data_transport_ipv4,
2363                         { "IP address for GPRS user data transport","uma.urr.gprs_usr_data_ipv4",
2364                         FT_IPv4,BASE_NONE,  NULL, 0x0,
2365                         NULL, HFILL }
2366                 },
2367                 { &hf_uma_urr_GPRS_port,
2368                         { "UDP Port for GPRS user data transport","uma.urr.gprs_port",
2369                         FT_UINT16,BASE_DEC,  NULL, 0x0,
2370                         NULL, HFILL }
2371                 },
2372                 { &hf_uma_urr_UNC_tcp_port,
2373                         { "UNC TCP port","uma.urr.gprs_port",
2374                         FT_UINT16,BASE_DEC,  NULL, 0x0,
2375                         "UDP Port for GPRS user data transport", HFILL }
2376                 },
2377                 { &hf_uma_urr_RTP_port,
2378                         { "RTP UDP port","uma.urr.rtp_port",
2379                         FT_UINT16,BASE_DEC,  NULL, 0x0,
2380                         NULL, HFILL }
2381                 },
2382                 { &hf_uma_urr_RTCP_port,
2383                         { "RTCP UDP port","uma.urr.rtcp_port",
2384                         FT_UINT16,BASE_DEC,  NULL, 0x0,
2385                         NULL, HFILL }
2386                 },
2387                 { &hf_uma_urr_RXLEV_NCELL,
2388                         { "RX Level","uma.urr.rxlevel",
2389                         FT_UINT8,BASE_DEC,  NULL, 0x0,
2390                         NULL, HFILL }
2391                 },
2392         };
2393
2394 /* Setup protocol subtree array */
2395         static gint *ett[] = {
2396                 &ett_uma,
2397                 &ett_uma_toc,
2398                 &ett_urr_ie,
2399         };
2400
2401 /* Register the protocol name and description */
2402         proto_uma = proto_register_protocol("Unlicensed Mobile Access","UMA", "uma");
2403         /* subdissector code */
2404         register_dissector("umatcp", dissect_uma_tcp, proto_uma);
2405         new_register_dissector("umaudp", dissect_uma_urlc_udp, proto_uma);
2406
2407 /* Required function calls to register the header fields and subtrees used */
2408         proto_register_field_array(proto_uma, hf, array_length(hf));
2409         proto_register_subtree_array(ett, array_length(ett));
2410
2411         /* Register a configuration option for port */
2412         uma_module = prefs_register_protocol(proto_uma, proto_reg_handoff_uma);
2413
2414         /* Set default TCP ports */
2415         range_convert_str(&global_uma_tcp_port_range, DEFAULT_UMA_PORT_RANGE, MAX_UDP_PORT);
2416
2417         prefs_register_bool_preference(uma_module, "desegment_ucp_messages",
2418                 "Reassemble UMA messages spanning multiple TCP segments",
2419                 "Whether the UMA dissector should reassemble messages spanning multiple TCP segments."
2420                 " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
2421                 &uma_desegment);
2422         prefs_register_obsolete_preference(uma_module, "tcp.port1");
2423         prefs_register_obsolete_preference(uma_module, "udp.ports");
2424         prefs_register_range_preference(uma_module, "tcp.ports", "UMA TCP ports",
2425                                   "TCP ports to be decoded as UMA (default: "
2426                                   DEFAULT_UMA_PORT_RANGE ")",
2427                                   &global_uma_tcp_port_range, MAX_UDP_PORT);
2428
2429 }