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