2 * Routines for Unlicensed Mobile Access(UMA) dissection
3 * Copyright 2005-2006, Anders Broman <anders.broman[at]ericsson.com>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
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.
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.
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.
26 * http://www.umatechnology.org/
27 * UMA Protocols (Stage 3) R1.0.4 (5/16/2005)
29 * http://www.3gpp.org/specs/numbering.htm
30 * 3GPP TS 24.008 V6.2.0 (2003-09)
31 * Technical Specification
32 * 3rd Generation Partnership Project;
33 * Technical Specification Group Core Network;
34 * Mobile radio interface Layer 3 specification;
35 * Core network protocols; Stage 3
38 * 3GPP TS 44.018 V6.11.0 (2005-01)
39 * 3rd Generation Partnership Project;
40 * Technical Specification Group GSM/EDGE Radio Access Network;
41 * Mobile radio interface layer 3 specification;
42 * Radio Resource Control (RRC) protocol
45 * 3GPP TS 45.009 V6.1.0 (2004-02)
46 * 3rd Generation Partnership Project;
47 * Technical Specification Group GSM/EDGE
48 * Radio Access Network;
63 #include <epan/conversation.h>
65 #include <epan/packet.h>
66 #include <epan/asn1.h>
69 #include "packet-bssap.h"
70 #include "packet-gsm_a.h"
71 #include "packet-gsm_map.h"
72 #include "packet-rtp.h"
73 #include "packet-rtcp.h"
74 #include "packet-e212.h"
75 #include <epan/emem.h>
76 #include "packet-tcp.h"
78 /* Length field is 2 bytes and comes first */
79 #define UMA_HEADER_SIZE 2
80 gboolean uma_desegment = TRUE;
82 static dissector_handle_t uma_tcp_handle = NULL;
83 static dissector_handle_t uma_udp_handle = NULL;
84 static dissector_handle_t data_handle = NULL;
85 static dissector_table_t bssap_pdu_type_table=NULL;
86 static dissector_handle_t rtp_handle = NULL;
87 static dissector_handle_t rtcp_handle = NULL;
88 static dissector_handle_t llc_handle = NULL;
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_IP_Address_type = -1;
120 static int hf_uma_urr_FQDN = -1;
121 static int hf_uma_urr_sgw_ipv4 = -1;
122 static int hf_uma_urr_redirection_counter = -1;
123 static int hf_uma_urr_dis_rej_cau = -1;
124 static int hf_uma_urr_MSCR = -1;
125 static int hf_uma_urr_ATT = -1;
126 static int hf_uma_urr_DTM = -1;
127 static int hf_uma_urr_GPRS = -1;
128 static int hf_uma_urr_NMO = -1;
129 static int hf_uma_urr_ECMC = -1;
130 static int hf_uma_urr_T3212_timer = -1;
131 static int hf_uma_urr_RAC = -1;
132 static int hf_uma_urr_ap_location = -1;
133 static int hf_uma_urr_SGSNR = -1;
134 static int hf_uma_urr_ECMP = -1;
135 static int hf_uma_urr_RE = -1;
136 static int hf_uma_urr_PFCFM = -1;
137 static int hf_uma_urr_3GECS = -1;
138 static int hf_uma_urr_bcc = -1;
139 static int hf_uma_urr_ncc = -1;
140 static int hf_uma_urr_TU3907_timer = -1;
141 static int hf_uma_urr_GSM_RR_state = -1;
142 static int hf_uma_urr_UMA_band = -1;
143 static int hf_uma_urr_URR_state = -1;
144 static int hf_uma_urr_register_reject_cause = -1;
145 static int hf_uma_urr_TU3906_timer = -1;
146 static int hf_uma_urr_TU3910_timer = -1;
147 static int hf_uma_urr_TU3902_timer = -1;
148 static int hf_uma_urr_communication_port = -1;
149 static int hf_uma_urr_L3_Message = -1;
150 static int hf_uma_urr_L3_protocol_discriminator = -1;
151 static int hf_uma_urr_sc = -1;
152 static int hf_uma_urr_algorithm_id = -1;
153 static int hf_uma_urr_GPRS_resumption = -1;
154 static int hf_uma_urr_ULQI = -1;
155 static int hf_uma_urr_TU3920_timer = -1;
156 static int hf_uma_urr_peak_tpt_cls = -1;
157 static int hf_uma_urr_radio_pri = -1;
158 static int hf_uma_urr_rlc_mode = -1;
159 static int hf_uma_urr_URLCcause = -1;
160 static int hf_uma_urr_udr = -1;
161 static int hf_uma_urr_TU4001_timer = -1;
162 static int hf_uma_urr_LS = -1;
163 static int hf_uma_urr_cipher_res = -1;
164 static int hf_uma_urr_rand_val = -1;
165 static int hf_uma_urr_ciphering_command_mac = -1;
166 static int hf_uma_urr_ciphering_key_seq_num = -1;
167 static int hf_uma_urr_sapi_id = -1;
168 static int hf_uma_urr_establishment_cause = -1;
169 static int hf_uma_urr_channel = -1;
170 static int hf_uma_urr_PDU_in_error = -1;
171 static int hf_uma_urr_sample_size = -1;
172 static int hf_uma_urr_payload_type = -1;
173 static int hf_uma_urr_LLC_PDU = -1;
174 static int hf_uma_urr_LBLI = -1;
175 static int hf_uma_urr_RI = -1;
176 static int hf_uma_urr_TU4003_timer = -1;
177 static int hf_uma_urr_ap_service_name_type = -1;
178 static int hf_uma_urr_ap_Service_name_value = -1;
179 static int hf_uma_urr_uma_service_zone_icon_ind = -1;
180 static int hf_uma_urr_uma_service_zone_str_len = -1;
181 static int hf_uma_urr_window_size = -1;
182 static int hf_uma_urr_uma_codec_mode = -1;
183 static int hf_uma_urr_UTRAN_cell_id_disc = -1;
184 static int hf_uma_urr_ms_radio_id = -1;
185 static int hf_uma_urr_uma_service_zone_str = -1;
186 static int hf_uma_urr_suti = -1;
187 static int hf_uma_urr_uma_mps = -1;
188 static int hf_uma_urr_num_of_plms = -1;
189 static int hf_uma_urr_cbs = -1;
190 static int hf_uma_urr_num_of_cbs_frms = -1;
191 static int hf_uma_urr_unc_ipv4 = -1;
192 static int hf_uma_unc_FQDN = -1;
193 static int hf_uma_urr_GPRS_user_data_transport_ipv4 = -1;
194 static int hf_uma_urr_GPRS_port = -1;
195 static int hf_uma_urr_UNC_tcp_port = -1;
196 static int hf_uma_urr_RTP_port = -1;
197 static int hf_uma_urr_RTCP_port = -1;
198 static int hf_uma_urr_RXLEV_NCELL = -1;
200 /* Initialize the subtree pointers */
201 static int ett_uma = -1;
202 static int ett_uma_toc = -1;
203 static int ett_urr_ie = -1;
205 /* The dynamic payload type which will be dissected as uma */
207 static range_t *global_uma_tcp_port_range;
208 static range_t *uma_tcp_port_range;
209 #define DEFAULT_UMA_PORT_RANGE "14001,14001"
211 /* Global variables */
212 guint32 sgw_ipv4_address;
213 guint32 unc_ipv4_address;
214 guint32 rtp_ipv4_address;
215 guint32 rtcp_ipv4_address;
216 guint32 GPRS_user_data_ipv4_address;
219 * Protocol Discriminator (PD)
221 static const value_string uma_pd_vals[] = {
228 * Message types for Unlicensed Radio Resources management
230 static const value_string uma_urr_msg_type_vals[] = {
231 { 1, "URR DISCOVERY REQUEST"},
232 { 2, "URR DISCOVERY ACCEPT"},
233 { 3, "URR DISCOVERY REJECT"},
234 { 16, "URR REGISTER REQUEST"},
235 { 17, "URR REGISTER ACCEPT"},
236 { 18, "URR REGISTER REDIRECT"},
237 { 19, "URR REGISTER REJECT"},
238 { 20, "URR DEREGISTER"},
239 { 21, "URR REGISTER UPDATE UPLINK"},
240 { 22, "URR REGISTER UPDATE DOWNLINK"},
241 { 23, "URR CELL BROADCAST INFO"},
242 { 32, "URR CIPHERING MODE COMMAND"},
243 { 33, "URR CIPHERING MODE COMPLETE"},
244 { 48, "URR ACTIVATE CHANNEL"},
245 { 49, "URR ACTIVATE CHANNEL ACK"},
246 { 50, "URR ACTIVATE CHANNEL COMPLETE"},
247 { 51, "URR ACTIVATE CHANNEL FAILURE"},
248 { 52, "URR CHANNEL MODE MODIFY"},
249 { 53, "URR CHANNEL MODE MODIFY ACKNOWLEDGE"},
250 { 64, "URR RELEASE"},
251 { 65, "URR RELEASE COMPLETE"},
252 { 66, "URR CLEAR REQUEST"},
253 { 80, "URR HANDOVER ACCESS"},
254 { 81, "URR HANDOVER COMPLETE"},
255 { 82, "URR UPLINK QUALITY INDICATION"},
256 { 83, "URR HANDOVER REQUIRED"},
257 { 84, "URR HANDOVER COMMAND"},
258 { 85, "URR HANDOVER FAILURE"},
259 { 96, "URR PAGING REQUEST"},
260 { 97, "URR PAGING RESPONSE"},
261 { 112, "URR UPLINK DIRECT TRANSFER"},
262 { 113, "URR INITIAL DIRECT TRANSFER"},
263 { 114, "URR DOWNLINK DIRECT TRANSFER"},
264 { 115, "URR STATUS"},
265 { 116, "URR KEEP ALIVE"},
266 { 117, "URR CLASSMARK ENQUIRY"},
267 { 118, "URR CLASSMARK CHANGE"},
268 { 119, "URR GPRS SUSPENSION REQUEST"},
269 { 120, "URR SYNCHRONIZATION INFORMATION"},
270 { 128, "URR REQUEST"},
271 { 129, "URR REQUEST ACCEPT"},
272 { 130, "URR REQUEST REJECT"},
276 * Message types for URLC signaling
278 static const value_string uma_urlc_msg_type_vals[] = {
280 { 2, "URLC UNITDATA"},
281 { 3, "URLC-PS-PAGE"},
282 { 6, "URLC-UFC-REQ"},
283 { 7, "URLC-DFC-REQ"},
284 { 8, "URLC-ACTIVATE-UTC-REQ"},
285 { 9, "URLC-ACTIVATE-UTC-ACK"},
286 { 10, "URLC-DEACTIVATE-UTC-REQ"},
287 { 11, "URLC-DEACTIVATE-UTC-ACK"},
288 { 12, "URLC STATUS"},
292 * IE type and identifiers for Unlicensed Radio Resources management
294 static const value_string uma_urr_IE_type_vals[] = {
295 { 1, "Mobile Identity"},
296 { 2, "UMA Release Indicator"},
297 { 3, "Radio Identity"},
298 { 4, "GERAN Cell Identity"},
299 { 5, "Location Area Identification"},
300 { 6, "GERAN/UTRAN Coverage Indicator"},
301 { 7, "UMA Classmark"},
302 { 8, "Geographical Location"},
303 { 9, "UNC SGW IP Address"},
304 { 10, "UNC SGW Fully Qualified Domain/Host Name"},
305 { 11, "Redirection Counter"},
306 { 12, "Discovery Reject Cause"},
307 { 13, "UMA Cell Description"},
308 { 14, "UMA Control Channel Description"},
309 { 15, "Cell Identifier List"},
310 { 16, "TU3907 Timer"},
311 { 17, "GSM RR/UTRAN RRC State"},
312 { 18, "Routing Area Identification"},
315 { 21, "Register Reject Cause"},
316 { 22, "TU3906 Timer"},
317 { 23, "TU3910 Timer"},
318 { 24, "TU3902 Timer"},
319 { 25, "Communication Port Identity"},
321 { 27, "Channel Mode"},
322 { 28, "Mobile Station Classmark 2"},
324 { 30, "Cipher Mode Setting"},
325 { 31, "GPRS Resumption"},
326 { 32, "Handover From UMAN Command"},
327 { 33, "UL Quality Indication"},
329 { 35, "Packet Flow Identifier"},
330 { 36, "Suspension Cause"},
331 { 37, "TU3920 Timer"},
334 { 40, "User Data Rate"},
335 { 41, "Routing Area Code"},
336 { 42, "AP Location"},
337 { 43, "TU4001 Timer"},
338 { 44, "Location Status"},
339 { 45, "Cipher Response"},
340 { 46, "Ciphering Command RAND"},
341 { 47, "Ciphering Command MAC"},
342 { 48, "Ciphering Key Sequence Number"},
344 { 50, "Establishment Cause"},
345 { 51, "Channel Needed"},
346 { 52, "PDU in Error"},
347 { 53, "Sample Size"},
348 { 54, "Payload Type"},
349 { 55, "Multi-rate Configuration"},
350 { 56, "Mobile Station Classmark 3"},
352 { 58, "Location Black List indicator"},
353 { 59, "Reset Indicator"},
354 { 60, "TU4003 Timer"},
355 { 61, "AP Service Name"},
356 { 62, "UMA Service Zone Information"},
357 { 63, "RTP Redundancy Configuration"},
358 { 64, "UTRAN Classmark"},
359 { 65, "Classmark Enquiry Mask"},
360 { 66, "UTRAN Cell Identifier List"},
361 { 67, "Serving UNC table indicator"},
362 { 68, "Registration indicators"},
363 { 69, "UMA PLMN List"},
364 { 70, "Received Signal Level List"},
365 { 71, "Required UMA Services"},
366 { 72, "Broadcast Container"},
367 { 73, "3G Cell Identity"},
368 { 96, "MS Radio Identity"},
369 { 97, "UNC IP Address"},
370 { 98, "UNC Fully Qualified Domain/Host Name"},
371 { 99, "IP address for GPRS user data transport"},
372 { 100, "UDP Port for GPRS user data transport"},
373 { 103, "UNC TCP port"},
374 { 104, "RTP UDP port"},
375 { 105, "RTCP UDP port"},
376 { 106, "GERAN Received Signal Level List"},
377 { 107, "UTRAN Received Signal Level List"},
381 static const value_string uma_urr_mobile_identity_type_vals[] = {
390 static const value_string uma_urr_oddevenind_vals[] = {
391 { 0, "Even number of identity digits"},
392 { 1, "Odd number of identity digits"},
396 static const value_string radio_type_of_id_vals[] = {
397 { 0, "IEEE MAC-address format"},
401 /* GCI, GSM Coverage Indicator (octet 3) */
402 static const value_string gci_vals[] = {
403 { 0, "Normal Service in the GERAN"},
404 { 1, "Limited Service in the GERAN"},
405 { 2, "MS has not found GSM coverage (LAI information taken from SIM, if available)"},
406 { 3, "MS has found GSM coverage, service state unknown"},
409 /* TURA, Type of Unlicensed Radio (octet 3) */
410 static const value_string tura_vals[] = {
414 { 15, "Unspecified"},
417 /* GC, GERAN Capable (octet 3) */
418 static const value_string gc_vals[] = {
419 { 0, "The MS is not GERAN capable."},
420 { 1, "The MS is GERAN capable."},
423 /* UC, UTRAN Capable (octet 3) */
424 static const value_string uc_vals[] = {
425 { 0, "The MS is not UTRAN capable."},
426 { 1, "The MS is UTRAN capable."},
429 /*RRS, RTP Redundancy Support (octet 4)*/
430 static const value_string rrs_vals[] = {
431 { 0, "RTP Redundancy not supported"},
432 { 1, "RTP Redundancy supported"},
436 /*IP address type number value (octet 3)*/
437 static const value_string IP_address_type_vals[] = {
438 { 0x21, "IPv4 address"},
439 { 0x57, "IPv6 address"},
443 /*Discovery Reject Cause (octet 3) */
444 static const value_string discovery_reject_cause_vals[] = {
445 { 0, "Network Congestion"},
447 { 2, "IMSI not allowed"},
450 /*EC Emergency Call allowed (octet 3)*/
451 static const value_string EC_vals[] _U_ = {
452 { 0, "Emergency call allowed in the cell to all MSs"},
453 { 1, "Emergency call not allowed in the cell except for the MSs that belong to one of the classes between 11 to 15."},
456 /*ECMC, Early Classmark Sending Control (octet 3)*/
457 static const value_string ECMC_vals[] = {
458 { 0, "Early Classmark Sending is allowed"},
459 { 1, "Early Classmark Sending is forbidden"},
462 /*NMO, Network Mode of Operation (octet 3)*/
463 static const value_string NMO_vals[] = {
464 { 0, "Network Mode of Operation I"},
465 { 1, "Network Mode of Operation II"},
466 { 2, "Network Mode of Operation III"},
470 /*GPRS, GPRS Availability (octet 3)*/
471 static const value_string GPRS_avail_vals[] = {
472 { 0, "GPRS available"},
473 { 1, "GPRS not available"},
476 /*DTM, Dual Transfer Mode of Operation by network (octet 3)*/
477 static const value_string DTM_vals[] = {
478 { 0, "Network does not support dual transfer mode"},
479 { 1, "Network supports dual transfer mode"},
482 /*ATT, Attach-detach allowed (octet 3)*/
483 static const value_string ATT_vals[] = {
484 { 0, "MSs in the cell are not allowed to apply IMSI attach and detach procedure."},
485 { 1, "MSs in the cell shall apply IMSI attach and detach procedure."},
488 /*MSCR, MSC Release (octet 3)*/
489 static const value_string MSCR_vals[] = {
490 { 0, "MSC is Release '98 or older"},
491 { 1, "MSC is Release '99 onwards"},
495 /* SGSNR, SGSN Release (octet 6)*/
496 static const value_string SGSNR_vals[] = {
497 { 0, "SGSN is Release '98 or older"},
498 { 1, "SGSN is Release '99 onwards"},
501 /* ECMP, Emergency Call Mode Preference (octet 6)*/
503 static const value_string ECMP_vals[] = {
504 { 0, "GSM GERAN is preferred for Emergency calls"},
505 { 1, "UMAN is preferred for Emergency calls"},
508 /* RE, Call reestablishment allowed (octet 6) */
509 static const value_string RE_vals[] = {
510 { 0, "Call Reestablishment allowed in the cell"},
511 { 1, "Call Reestablishment not allowed in the cell"},
514 /* PFCFM, PFC_FEATURE_MODE (octet 6) */
515 static const value_string PFCFM_vals[] = {
516 { 0, "The network does not support packet flow context procedures"},
517 { 1, "The network supports packet flow context procedures"},
521 /* 3GECS, 3G Early Classmark Sending Restriction (octet 6) */
522 static const value_string Three_GECS_vals[] = {
523 { 0, "UTRAN classmark change message shall be sent with the Early classmark sending"},
524 { 1, "The sending of UTRAN Classmark Sending messages is controlled by the Early Classmark Sending Control parameter"},
528 /*GRS, GSM RR State (octet 3)*/
529 static const value_string GRS_GSM_RR_State_vals[] = {
530 { 0, "GSM RR is in IDLE state"},
531 { 1, "GSM RR is in DEDICATED state"},
532 { 2, "UTRAN RRC is in IDLE STATE"},
533 { 3, "UTRAN RRC is in CELL_DCH STATE"},
534 { 4, "UTRAN RRC is in CELL_FACH STATE"},
538 /* UMA Band (4 bit field) */
539 static const value_string UMA_band_vals[] = {
540 { 0, "E-GSM is supported"},
541 { 1, "P-GSM is supported"},
542 { 2, "GSM 1800 is supported"},
543 { 3, "GSM 450 is supported"},
544 { 4, "GSM 480 is supported"},
545 { 5, "GSM 850 is supported"},
546 { 6, "GSM 1900 is supported"},
547 { 7, "GSM 700 is supported"},
550 /*URS, URR State (octet 3) */
551 static const value_string URR_state_vals[] = {
552 { 0, "URR is in URR-IDLE state"},
553 { 1, "URR is in URR-DEDICATED state"},
554 { 2, "URR is in URR-REGISTERED state"},
558 /* Register Reject Cause (octet 3) */
559 static const value_string register_reject_cause_vals[] = {
560 { 0, "Network Congestion"},
561 { 1, "AP not allowed"},
562 { 2, "Location not allowed"},
564 { 4, "Geo Location not known"},
565 { 5, "IMSI not allowed"},
567 { 7, "UNC-SGW certificate not valid"},
568 { 8, "EAP_SIM authentication failed"},
569 { 9, "TCP establishment failed"},
570 { 10, "Redirection"},
571 { 11, "EAP-AKA authentication failed"},
575 /* L3 Protocol discriminator values according to TS 24 007 (640) */
576 static const value_string protocol_discriminator_vals[] = {
577 {0x0, "Group call control"},
578 {0x1, "Broadcast call control"},
579 {0x2, "Reserved: was allocated in earlier phases of the protocol"},
580 {0x3, "Call Control; call related SS messages"},
581 {0x4, "GPRS Transparent Transport Protocol (GTTP)"},
582 {0x5, "Mobility Management messages"},
583 {0x6, "Radio Resources Management messages"},
585 {0x8, "GPRS mobility management messages"},
586 {0x9, "SMS messages"},
587 {0xa, "GPRS session management messages"},
588 {0xb, "Non call related SS messages"},
589 {0xc, "Location services specified in 3GPP TS 44.071 [8a]"},
591 {0xe, "Reserved for extension of the PD to one octet length "},
592 {0xf, "Reserved for tests procedures described in 3GPP TS 44.014 [5a] and 3GPP TS 34.109 [17a]."},
596 /* algorithm identifier
601 static const value_string algorithm_identifier_vals[] = {
602 { 0, "Cipher with algorithm A5/1"},
603 { 1, "Cipher with algorithm A5/2"},
604 { 2, "Cipher with algorithm A5/3"},
605 { 3, "Cipher with algorithm A5/4"},
606 { 4, "Cipher with algorithm A5/5"},
607 { 5, "Cipher with algorithm A5/6"},
608 { 6, "Cipher with algorithm A5/7"},
612 /* GPRS Resumption */
613 static const value_string GPRS_resumption_vals[] = {
614 { 0, "Resumption of GPRS services not successfully acknowledged"},
615 { 1, "Resumption of GPRS services successfully acknowledged"},
619 static const value_string SC_vals[] = {
620 { 0, "No ciphering"},
621 { 1, "Start ciphering"},
625 /* ULQI, UL Quality Indication (octet 3) */
626 static const value_string ULQI_vals[] = {
628 { 1, "Radio problem"},
629 { 2, "Network problem"},
630 { 4, "Undetermined problem"},
634 static const value_string radio_pri_vals[] = {
635 { 0, "Radio priority 1"},
636 { 1, "Radio priority 2"},
637 { 2, "Radio priority 3"},
638 { 3, "Radio priority 4"},
639 { 3, "Radio Priority Unknown"},
643 static const value_string rlc_mode_vals[] = {
644 { 0, "RLC acknowledged mode"},
645 { 1, "RLC unacknowledged mode"},
649 /*URLC Cause (octet 3) */
650 static const value_string URLC_cause_vals[] = {
652 { 2, "no available resources"},
654 { 4, "not authorized for data service"},
655 { 5, "message type non existent or not implemented"},
656 { 6, "message type not compatible with the protocol state"},
657 { 7, "invalid mandatory information"},
658 { 8, "syntactically incorrect message"},
659 { 9, "GPRS suspended"},
660 { 10, "normal deactivation"},
661 { 12, "conditional IE error"},
662 { 13, "semantically incorrect message"},
666 /* LS, Location Status (octet 3) */
667 static const value_string LS_vals[] = {
668 { 0, "MS location known"},
669 { 1, "MS location unknown"},
673 /* CR Cipher Response (octet 1) */
674 static const value_string CR_vals[] = {
675 { 0, "IMEISV shall not be included"},
676 { 1, "IMEISV shall be included"},
680 /* SAPI ID, SAPI Identifier (octet 3) */
681 static const value_string sapi_id_vals[] = {
682 { 0, "SAPI 0 (all other except SMS)"},
683 { 3, "SAPI 3 (SMS)"},
686 /* Sample Size (octet 3)*/
687 static const value_string sample_size_vals[] = {
688 { 20, "20 ms of CS payload included in each RTP/UDP packet"},
689 { 40, "40 ms of CS payload included in each RTP/UDP packet"},
690 { 60, "60 ms of CS payload included in each RTP/UDP packet"},
691 { 80, "80 ms of CS payload included in each RTP/UDP packet"},
696 /* MPS, Manual PLMN Selection indicator (octet 3) */
697 static const value_string mps_vals[] = {
698 { 0, "The MS is in Automatic PLMN selection mode."},
699 { 1, "The MS is in Manual PLMN selection mode and request the listof PLMN identities that may provide UMAN service in the current location."},
700 { 2, "The MS is in Manual PLMN selection mode and tries to register; no PLMN list is needed."},
704 /* CBS Cell Broadcast Service (octet 3) */
705 static const value_string cbs_vals[] = {
706 { 0, "CBS is not required by the Mobile station"},
707 { 1, "CBS is required by the mobile station"},
711 /* LBLI, Location Black List indicator (octet 3) */
712 static const value_string LBLI_vals[] = {
715 { 2, "MCC, MNC and LAC"},
718 /* AP Service Name type */
719 static const value_string ap_service_name_type_vals[] = {
721 { 1, "PAN Service Name"},
725 /* UMA Service Zone Icon Indicator, octet 3 */
726 static const value_string uma_service_zone_icon_ind_vals[] = {
727 { 1, "Unlimited Calls"},
730 /*Establishment Cause (octet 3)*/
731 static const value_string establishment_cause_vals[] = {
732 { 0xa0, "Emergency"},
733 { 0xc0, "Call re-establishment"},
734 { 0x00, "Location Update"},
735 { 0x10, "Other SDCCH procedures including IMSI Detach, SMS, SS, paging response"},
736 /* note: Paging response for SDCCH needed is using codepoint 0001 0000 */
737 { 0x20, "Paging response (TCH/F needed)"},
738 { 0x30, "Paging response (TCH/F or TCH/H needed)"},
739 { 0x80, "Paging response (any channel needed)"},
740 { 0x40, "Originating speech call from dual-rate mobile station when TCH/H is sufficient"},
741 { 0x50, "Originating data call from dual-rate mobile station when TCH/H is sufficient"},
742 { 0xe0, "Originating speech call and TCH/F is needed"},
743 { 0xf0, "Originating data call and TCH/F is needed"},
746 /*CHANNEL (octet 3) */
747 static const value_string channel_vals[] = {
750 { 2, "TCH/F (Full rate)"},
751 { 3, "TCH/H or TCH/F (Dual rate)"},
755 /*RI, Reset Indicator (octet 3)*/
756 /*CHANNEL (octet 3) */
757 static const value_string RI_vals[] = {
758 { 0, "The flow control condition continues to exist"},
759 { 1, "The flow control condition no longer exists"},
763 /* Window Size (octet 3 to octet n) */
765 static const value_string window_size_vals[] = {
766 { 0, "Window size 1, No redundancy"},
767 { 1, "Window size 2 (single redundancy)"},
768 { 2, "Window size 3 (double redundancy)"},
772 static const value_string UTRAN_cell_id_disc_vals[] = {
773 { 0, "PLMN-ID, LAC and a 28-bit Cell Id are used to identify the target UTRAN cell."},
777 /* SUTI, Serving UNC table indicator indicator (octet 3) */
779 static const value_string suti_vals[] = {
780 { 0, "The MS is not allowed to store information in the stored Serving UNC table."},
781 { 1, "The MS is allowed to store information in the stored Serving UNC table."},
784 /* Code to actually dissect the packets */
787 dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
796 proto_item *urr_ie_item;
797 proto_tree *urr_ie_tree;
800 guint16 GPRS_user_data_transport_UDP_port,UNC_tcp_port,RTP_UDP_port,RTCP_UDP_port, communication_port;
802 conversation_t *conversation;
803 address dst_addr, null_addr;
807 ie_value = tvb_get_guint8(tvb,offset);
808 urr_ie_item = proto_tree_add_text(tree,tvb,offset,-1,"%s",
809 val_to_str(ie_value, uma_urr_IE_type_vals, "Unknown IE (%u)"));
810 urr_ie_tree = proto_item_add_subtree(urr_ie_item, ett_urr_ie);
812 proto_tree_add_item(urr_ie_tree, hf_uma_urr_IE, tvb, offset, 1, FALSE);
814 /* Some IE:s might have a lengt field of 2 octets */
815 ie_len = tvb_get_guint8(tvb,offset);
816 if ( (ie_len & 0x80) == 0x80 ){
818 ie_len = (ie_len & 0x7f) << 8;
819 ie_len = ie_len | (tvb_get_guint8(tvb,offset));
820 proto_item_set_len(urr_ie_item, ie_len + 3);
821 proto_tree_add_uint(urr_ie_tree, hf_uma_urr_IE_len , tvb, offset-1, 2, ie_len );
822 ie_offset = offset +1;
824 proto_item_set_len(urr_ie_item, ie_len + 2);
825 proto_tree_add_item(urr_ie_tree, hf_uma_urr_IE_len, tvb, offset, 1, FALSE);
826 ie_offset = offset +1;
830 /* 11.2.1 Mobile Identity */
833 * The rest of the IE is coded as in [TS 24.008] not including IEI and
834 * length, if present.(10.5.1.4)
836 de_mid(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
840 /* UMA Release Indicator */
841 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uri, tvb, ie_offset, 1, FALSE);
843 case 3: /* Radio Identity */
844 proto_tree_add_item(urr_ie_tree, hf_uma_urr_radio_type_of_id, tvb, ie_offset, 1, FALSE);
845 octet = tvb_get_guint8(tvb,ie_offset);
846 if (( octet & 0xf) == 0){ /* IEEE MAC-address format */
848 haddr = tvb_get_ptr(tvb, ie_offset, ie_len);
849 proto_tree_add_ether(urr_ie_tree, hf_uma_urr_radio_id, tvb, ie_offset, ie_len, haddr);
851 proto_tree_add_text(urr_ie_tree, tvb, ie_offset, ie_len,"Unknown format");
856 * The rest of the IE is coded as in [TS 24.008] not including IEI and length, if present.
858 proto_tree_add_item(urr_ie_tree, hf_uma_urr_cell_id, tvb, ie_offset, 2, FALSE);
861 /* Location Area Identification
862 * The rest of the IE is coded as in [TS 24.008] not including IEI and
863 * length, if present.
865 de_lai(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
868 /* GSM Coverage Indicator */
869 proto_tree_add_item(urr_ie_tree, hf_uma_urr_gci, tvb, ie_offset, 1, FALSE);
873 proto_tree_add_item(urr_ie_tree, hf_uma_urr_tura, tvb, ie_offset, 1, FALSE);
874 proto_tree_add_item(urr_ie_tree, hf_uma_urr_gc, tvb, ie_offset, 1, FALSE);
875 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uc, tvb, ie_offset, 1, FALSE);
876 /* UMA Protocols (Stage 3) R1.0.3 */
879 proto_tree_add_item(urr_ie_tree, hf_uma_urr_rrs, tvb, ie_offset, 1, FALSE);
882 /* Geographical Location
883 * The Location Estimate field is composed of 1 or more octets with an internal structure
884 * according to section 7 in [23.032].
886 new_tvb = tvb_new_subset(tvb, ie_offset,ie_len, ie_len );
887 dissect_geographical_description(new_tvb, pinfo, urr_ie_tree);
890 /* UNC SGW IP Address
893 octet = tvb_get_guint8(tvb,ie_offset);
894 proto_tree_add_item(urr_ie_tree, hf_uma_urr_IP_Address_type, tvb, ie_offset, 1, FALSE);
896 if ( octet == 0x57 ){ /* IPv6 */
898 }else{ /* All other values shall be interpreted as Ipv4 address in this version of the protocol.*/
899 sgw_ipv4_address = tvb_get_ipv4(tvb, ie_offset);
900 proto_tree_add_ipv4(urr_ie_tree, hf_uma_urr_sgw_ipv4, tvb, ie_offset, 4, sgw_ipv4_address);
904 case 10: /* UNC SGW Fully Qualified Domain/Host Name */
906 string = (gchar*)tvb_get_ephemeral_string(tvb, ie_offset, ie_len);
907 proto_tree_add_string(urr_ie_tree, hf_uma_urr_FQDN, tvb, ie_offset, ie_len, string);
909 proto_tree_add_text(urr_ie_tree,tvb,offset,1,"FQDN not present");
912 case 11: /* Redirection Counter */
913 proto_tree_add_item(urr_ie_tree, hf_uma_urr_redirection_counter, tvb, ie_offset, 1, FALSE);
915 case 12: /* Discovery Reject Cause */
916 proto_tree_add_item(urr_ie_tree, hf_uma_urr_dis_rej_cau, tvb, ie_offset, 1, FALSE);
919 /* UMA Cell Description
920 * The rest of the IE is coded as in [TS 44.018], Cell Description IE, not including IEI and length, if present
922 de_rr_cell_dsc(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
925 /* UMA Control Channel Description
927 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ECMC, tvb, ie_offset, 1, FALSE);
928 proto_tree_add_item(urr_ie_tree, hf_uma_urr_NMO, tvb, ie_offset, 1, FALSE);
929 proto_tree_add_item(urr_ie_tree, hf_uma_urr_GPRS, tvb, ie_offset, 1, FALSE);
930 proto_tree_add_item(urr_ie_tree, hf_uma_urr_DTM, tvb, ie_offset, 1, FALSE);
931 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ATT, tvb, ie_offset, 1, FALSE);
932 proto_tree_add_item(urr_ie_tree, hf_uma_urr_MSCR, tvb, ie_offset, 1, FALSE);
933 /* T3212 timeout value */
935 proto_tree_add_item(urr_ie_tree, hf_uma_urr_T3212_timer, tvb, ie_offset, 1, FALSE);
936 /* RAC, Routing Area Code (octet 5) */
938 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RAC, tvb, ie_offset, 1, FALSE);
940 /* SGSNR, SGSN Release (octet 6) */
941 proto_tree_add_item(urr_ie_tree, hf_uma_urr_SGSNR, tvb, ie_offset, 1, FALSE);
942 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ECMP, tvb, ie_offset, 1, FALSE);
943 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RE, tvb, ie_offset, 1, FALSE);
944 proto_tree_add_item(urr_ie_tree, hf_uma_urr_PFCFM, tvb, ie_offset, 1, FALSE);
945 proto_tree_add_item(urr_ie_tree, hf_uma_urr_3GECS, tvb, ie_offset, 1, FALSE);
947 proto_tree_add_text(urr_ie_tree,tvb,ie_offset,2,"Access Control Class N");
948 /* These fields are specified and described in 3GPP TS 44.018 and 3GPP TS 22.011. */
951 /* Cell Identifier List
952 * The rest of the IE is coded as in [TS 48.008], not including IEI and length, if present
954 be_cell_id_list(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
956 case 16: /* TU3907 Timer */
957 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3907_timer, tvb, ie_offset, 2, FALSE);
959 case 17: /* GSM RR State */
960 proto_tree_add_item(urr_ie_tree, hf_uma_urr_GSM_RR_state, tvb, ie_offset, 1, FALSE);
962 case 18: /* Routing Area Identification */
963 /* The rest of the IE is coded as in [TS 24.008] not including IEI and length, if present.*/
964 de_gmm_rai(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
966 case 19: /* UMA Band */
967 proto_tree_add_item(urr_ie_tree, hf_uma_urr_UMA_band, tvb, ie_offset, 1, FALSE);
969 case 20: /* URR State */
970 proto_tree_add_item(urr_ie_tree, hf_uma_urr_URR_state, tvb, ie_offset, 1, FALSE);
972 case 21: /* Register Reject Cause */
973 proto_tree_add_item(urr_ie_tree, hf_uma_urr_register_reject_cause, tvb, ie_offset, 1, FALSE);
975 case 22: /* TU3906 Timer */
976 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3906_timer, tvb, ie_offset, 2, FALSE);
978 case 23: /* TU3910 Timer */
979 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3910_timer, tvb, ie_offset, 2, FALSE);
981 case 24: /* TU3902 Timer */
982 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3902_timer, tvb, ie_offset, 2, FALSE);
985 /* Communication Port Identity */
986 communication_port = tvb_get_ntohs(tvb,ie_offset);
987 proto_tree_add_item(urr_ie_tree, hf_uma_urr_communication_port, tvb, ie_offset, 2, FALSE);
990 case 26: /* L3 Message */
991 proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_protocol_discriminator, tvb, ie_offset, 1, FALSE);
992 proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_Message, tvb, ie_offset, ie_len, FALSE);
993 l3_tvb = tvb_new_subset(tvb, ie_offset,ie_len, ie_len );
994 if (!dissector_try_port(bssap_pdu_type_table,BSSAP_PDU_TYPE_DTAP, l3_tvb, pinfo, urr_ie_tree))
995 call_dissector(data_handle, l3_tvb, pinfo, urr_ie_tree);
999 * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present
1001 de_rr_ch_mode(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1004 /* Mobile Station Classmark 2
1005 * The rest of the IE is coded as in [TS 24.008], not including IEI and length, if present
1007 de_ms_cm_2(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1011 * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present
1013 de_rr_cause(tvb, urr_ie_tree, ie_offset, 1, NULL, 0);
1016 /* Cipher Mode Setting
1017 * Note: The coding of fields SC and algorithm identifier is defined in [44.018]
1018 * as part of the Cipher Mode Setting IE.
1020 de_rr_cip_mode_set(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1024 * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present
1026 proto_tree_add_item(urr_ie_tree, hf_uma_urr_GPRS_resumption, tvb, ie_offset, 1, FALSE);
1029 /* Handover From UMAN Command
1030 * If the target RAT is GERAN, the rest of the IE is coded as HANDOVER COMMAND message in [TS 44.018]
1031 * If the target RAT is UTRAN, the rest of the IE is coded as
1032 * HANDOVER TO UTRAN COMMAND message in [TS 25.331].
1034 proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_protocol_discriminator, tvb, ie_offset, 1, FALSE);
1035 proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_Message, tvb, ie_offset, ie_len, FALSE);
1036 l3_tvb = tvb_new_subset(tvb, ie_offset,ie_len, ie_len );
1037 if (!dissector_try_port(bssap_pdu_type_table,BSSAP_PDU_TYPE_DTAP, l3_tvb, pinfo, urr_ie_tree))
1038 call_dissector(data_handle, l3_tvb, pinfo, urr_ie_tree);
1040 case 33: /* UL Quality Indication */
1041 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ULQI, tvb, ie_offset, 1, FALSE);
1045 * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present.
1046 * [TS 44.018]:10.5.2.41a
1047 * The TLLI is encoded as a binary number with a length of 4 octets. TLLI is defined in 3GPP TS 23.003
1049 de_rr_tlli(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1052 /* Packet Flow Identifier
1053 * The rest of the IE is coded as in [TS 24.008], not including IEI and length, if present.
1055 de_sm_pflow_id(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1059 * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present.
1061 de_rr_sus_cau(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1063 case 37: /* TU3920 Timer */
1064 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3920_timer, tvb, ie_offset, 2, FALSE);
1069 * PEAK_THROUGHPUT_CLASS (octet 3, bits 1-4)
1070 * This field is coded as PEAK_THROUGHPUT_CLASS field in
1071 * the Channel Request Description information
1072 * element specified in [TS 44.060]
1074 proto_tree_add_item(urr_ie_tree, hf_uma_urr_peak_tpt_cls, tvb, ie_offset, 1, FALSE);
1075 /* RADIO_PRIORITY (octet 3, bits 5-6) */
1076 proto_tree_add_item(urr_ie_tree, hf_uma_urr_radio_pri, tvb, ie_offset, 1, FALSE);
1077 /* RLC_MODE (octet 3, bit 7) */
1078 proto_tree_add_item(urr_ie_tree, hf_uma_urr_rlc_mode, tvb, ie_offset, 1, FALSE);
1080 case 39: /* URLC Cause */
1081 proto_tree_add_item(urr_ie_tree, hf_uma_urr_URLCcause, tvb, ie_offset, 1, FALSE);
1083 case 40: /* User Data Rate */
1084 udr = tvb_get_ntoh24(tvb, ie_offset) * 100;
1085 proto_tree_add_uint(urr_ie_tree, hf_uma_urr_udr , tvb, ie_offset, 3, udr );
1088 /* Routing Area Code
1089 * The rest of the IE is coded as in [TS 23.003] not including IEI and length, if present.
1091 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RAC, tvb, ie_offset, 1, FALSE);
1095 * The rest of the IE is coded as in [GEOPRIV], not including IEI and length, if present
1096 * http://www.ietf.org/internet-drafts/draft-ietf-geopriv-dhcp-civil-05.txt
1098 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ap_location, tvb, ie_offset, ie_len, FALSE);
1100 case 43: /* TU4001 Timer */
1101 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU4001_timer, tvb, ie_offset, 2, FALSE);
1103 case 44: /* Location Status */
1104 proto_tree_add_item(urr_ie_tree, hf_uma_urr_LS, tvb, ie_offset, 1, FALSE);
1106 case 45: /* Cipher Response */
1107 proto_tree_add_item(urr_ie_tree, hf_uma_urr_cipher_res, tvb, ie_offset, 1, FALSE);
1109 case 46: /* Ciphering Command RAND */
1110 proto_tree_add_item(urr_ie_tree, hf_uma_urr_rand_val, tvb, ie_offset, ie_len, FALSE);
1112 case 47: /* Ciphering Command MAC (Message Authentication Code)*/
1113 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ciphering_command_mac, tvb, ie_offset, ie_len, FALSE);
1115 case 48: /* Ciphering Key Sequence Number */
1116 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ciphering_key_seq_num, tvb, ie_offset, 1, FALSE);
1118 case 49: /* SAPI ID */
1119 proto_tree_add_item(urr_ie_tree, hf_uma_urr_sapi_id, tvb, ie_offset, 1, FALSE);
1121 case 50: /* Establishment Cause */
1122 proto_tree_add_item(urr_ie_tree, hf_uma_urr_establishment_cause, tvb, ie_offset, 1, FALSE);
1124 case 51: /* Channel Needed */
1125 proto_tree_add_item(urr_ie_tree, hf_uma_urr_channel, tvb, ie_offset, 1, FALSE);
1127 case 52: /* PDU in Error */
1128 proto_tree_add_item(urr_ie_tree, hf_uma_urr_PDU_in_error, tvb, ie_offset, ie_len, FALSE);
1133 proto_tree_add_item(urr_ie_tree, hf_uma_urr_sample_size, tvb, ie_offset, 1, FALSE);
1137 * Payload Type (octet 3) Allowed values are between 96 and 127.
1139 proto_tree_add_item(urr_ie_tree, hf_uma_urr_payload_type, tvb, ie_offset, 1, FALSE);
1141 /* 11.2.55 Multirate Configuration */
1143 /* Multi-rate Configuration
1144 * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present
1146 de_rr_multirate_conf(tvb, urr_ie_tree, ie_offset, ie_len, NULL, 0);
1149 /* Mobile Station Classmark 3
1150 * The rest of the IE is coded as in [TS 24.008], not including IEI and length, if present
1155 * The rest of the IE is coded as in [TS 48.018], not including IEI and length, if present
1157 proto_tree_add_item(urr_ie_tree, hf_uma_urr_LLC_PDU, tvb, ie_offset, ie_len, FALSE);
1158 llc_tvb = tvb_new_subset(tvb, ie_offset,ie_len, ie_len );
1160 if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
1161 col_append_str(pinfo->cinfo, COL_PROTOCOL, "/");
1162 col_set_fence(pinfo->cinfo, COL_PROTOCOL);
1165 call_dissector(llc_handle, llc_tvb, pinfo, urr_ie_tree);
1168 call_dissector(data_handle, llc_tvb, pinfo, urr_ie_tree);
1171 case 58: /* Location Black List indicator */
1172 proto_tree_add_item(urr_ie_tree, hf_uma_urr_LBLI, tvb, ie_offset, 1, FALSE);
1174 case 59: /* Reset Indicator */
1175 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RI, tvb, ie_offset, 1, FALSE);
1177 case 60: /* TU4003 Timer */
1178 proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU4003_timer, tvb, ie_offset, 2, FALSE);
1181 /* AP Service Name */
1182 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ap_service_name_type, tvb, ie_offset, 1, FALSE);
1184 proto_tree_add_item(urr_ie_tree, hf_uma_urr_ap_Service_name_value, tvb, ie_offset, ie_len -1, FALSE);
1187 /* UMA Service Zone Information
1188 * UMA Service Zone Icon Indicator, octet 3
1190 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_service_zone_icon_ind, tvb, ie_offset, 1, FALSE);
1192 /* Length of UMA Service Zone string */
1193 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_service_zone_str_len, tvb, ie_offset, 1, FALSE);
1194 str_len = tvb_get_guint8(tvb,ie_offset);
1196 /* UMA Service Zone string, 1st character */
1197 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_service_zone_str, tvb, ie_offset, str_len, FALSE);
1199 /* 11.2.63 RTP Redundancy Configuration */
1201 /* RTP Redundancy Configuration */
1202 proto_tree_add_item(urr_ie_tree, hf_uma_urr_window_size, tvb, ie_offset, 1, FALSE);
1203 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_codec_mode, tvb, ie_offset, 1, FALSE);
1207 * The rest of the IE is the INTER RAT HANDOVER INFO coded as in
1208 * [TS 25.331], not including IEI and length, if present
1212 /* Classmark Enquiry Mask
1213 * The rest of the IE is the Classmark Enquiry Mask coded as in [TS 44.018], not including IEI and length, if present
1215 de_rr_cm_enq_mask(tvb, urr_ie_tree, offset, ie_len, NULL, 0);
1218 /* UTRAN Cell Identifier List
1219 * UTRAN Cell Identification Discriminator
1221 proto_tree_add_item(urr_ie_tree, hf_uma_urr_UTRAN_cell_id_disc, tvb, ie_offset, 1, FALSE);
1222 octet = tvb_get_guint8(tvb,ie_offset);
1225 ie_offset = dissect_e212_mcc_mnc(tvb, urr_ie_tree, ie_offset);
1226 proto_tree_add_item(urr_ie_tree, hf_uma_urr_lac, tvb, ie_offset, 2, FALSE);
1227 ie_offset = ie_offset + 2;
1228 /* The octets 9-12 are coded as shown in 3GPP TS 25.331, Table 'Cell identity'.
1229 * 10.3.2.2 Cell identity
1230 * This information element identifies a cell unambiguously within a PLMN.
1231 * NOTE: This information element may carry any implementation dependent identity that unambiguously identifies a
1232 * cell within a PLMN.
1233 * Cell identity - bit string(28)
1238 /* Serving UNC table indicator */
1239 proto_tree_add_item(urr_ie_tree, hf_uma_urr_suti, tvb, ie_offset, 1, FALSE);
1242 /* Registration indicators */
1243 proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_mps, tvb, ie_offset, 1, FALSE);
1247 octet = tvb_get_guint8(tvb,ie_offset);
1248 proto_tree_add_uint(urr_ie_tree, hf_uma_urr_num_of_plms , tvb, ie_offset, 1, octet);
1249 /* TODO insert while loop here */
1250 proto_tree_add_item(urr_ie_tree, hf_uma_urr_lac, tvb, ie_offset, 2, FALSE);
1252 /* 11.2.70 Received Signal Level List */
1254 /* Received Signal Level List */
1255 while(ie_offset<=(offset + ie_len)){
1256 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RXLEV_NCELL, tvb, ie_offset, 1, FALSE);
1260 /* 11.2.71 Required UMA Services */
1262 /* CBS Cell Broadcast Service (octet 3) */
1263 proto_tree_add_item(urr_ie_tree, hf_uma_urr_cbs, tvb, ie_offset, 1, FALSE);
1265 /* 11.2.72 Broadcast Container */
1267 octet = tvb_get_guint8(tvb,ie_offset);
1268 proto_tree_add_item(urr_ie_tree, hf_uma_urr_num_of_cbs_frms , tvb, ie_offset, 1, FALSE);
1269 proto_tree_add_text(urr_ie_tree, tvb, ie_offset + 1, ie_len-1,"CBS Frames - Not decoded");
1271 /* 11.2.73 3G Cell Identity */
1273 /* The rest of the IE is coded as in [TS 25.331] not including IEI and length, if present. */
1275 case 96: /* MS Radio Identity */
1276 proto_tree_add_item(urr_ie_tree, hf_uma_urr_radio_type_of_id, tvb, ie_offset, 1, FALSE);
1277 octet = tvb_get_guint8(tvb,ie_offset);
1278 if (( octet & 0xf) == 0){ /* IEEE MAC-address format */
1280 haddr = tvb_get_ptr(tvb, ie_offset, ie_len);
1281 proto_tree_add_ether(urr_ie_tree, hf_uma_urr_ms_radio_id, tvb, ie_offset, ie_len, haddr);
1283 proto_tree_add_text(urr_ie_tree, tvb, ie_offset, ie_len,"Unknown format");
1291 octet = tvb_get_guint8(tvb,ie_offset);
1292 proto_tree_add_item(urr_ie_tree, hf_uma_urr_IP_Address_type, tvb, ie_offset, 1, FALSE);
1295 if ( octet == 0x57 ){ /* IPv6 */
1297 }else{ /* All other values shall be interpreted as Ipv4 address in this version of the protocol.*/
1298 unc_ipv4_address = tvb_get_ipv4(tvb, ie_offset);
1299 proto_tree_add_ipv4(urr_ie_tree, hf_uma_urr_unc_ipv4, tvb, ie_offset, 4, unc_ipv4_address);
1302 case 98: /* UNC Fully Qualified Domain/Host Name */
1304 string = (gchar*)tvb_get_ephemeral_string(tvb, ie_offset, ie_len);
1305 proto_tree_add_string(urr_ie_tree, hf_uma_unc_FQDN, tvb, ie_offset, ie_len, string);
1307 proto_tree_add_text(urr_ie_tree,tvb,offset,1,"UNC FQDN not present");
1311 /* IP address for GPRS user data transport
1314 octet = tvb_get_guint8(tvb,ie_offset);
1315 proto_tree_add_item(urr_ie_tree, hf_uma_urr_IP_Address_type, tvb, ie_offset, 1, FALSE);
1317 if ( octet == 0x57 ){ /* IPv6 */
1319 }else{ /* All other values shall be interpreted as Ipv4 address in this version of the protocol.*/
1320 GPRS_user_data_ipv4_address = tvb_get_ipv4(tvb, ie_offset);
1321 proto_tree_add_ipv4(urr_ie_tree, hf_uma_urr_GPRS_user_data_transport_ipv4, tvb, ie_offset, 4, GPRS_user_data_ipv4_address);
1325 case 100: /* UDP Port for GPRS user data transport */
1326 GPRS_user_data_transport_UDP_port = tvb_get_ntohs(tvb,ie_offset);
1327 proto_tree_add_item(urr_ie_tree, hf_uma_urr_GPRS_port, tvb, ie_offset, 2, FALSE);
1329 * If this isn't the first time this packet has been processed,
1330 * we've already done this work, so we don't need to do it
1333 if (pinfo->fd->flags.visited)
1337 SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
1339 dst_addr.type=AT_IPv4;
1341 dst_addr.data=(guint8 *)&GPRS_user_data_ipv4_address;
1343 conversation = find_conversation(pinfo->fd->num,&dst_addr,
1344 &null_addr, PT_UDP, GPRS_user_data_transport_UDP_port,
1345 0, NO_ADDR_B|NO_PORT_B);
1347 if (conversation == NULL) {
1348 /* It's not part of any conversation - create a new one. */
1349 conversation = conversation_new(pinfo->fd->num, &dst_addr,
1350 &null_addr, PT_UDP,GPRS_user_data_transport_UDP_port ,
1351 0, NO_ADDR2|NO_PORT2);
1354 conversation_set_dissector(conversation, uma_udp_handle);
1358 case 103: /* UNC TCP port */
1359 UNC_tcp_port = tvb_get_ntohs(tvb,ie_offset);
1360 proto_tree_add_uint(urr_ie_tree, hf_uma_urr_UNC_tcp_port , tvb, ie_offset, 2, UNC_tcp_port);
1363 * If this isn't the first time this packet has been processed,
1364 * we've already done this work, so we don't need to do it
1367 if (pinfo->fd->flags.visited)
1371 SET_ADDRESS(&null_addr, AT_NONE, 0, NULL);
1373 dst_addr.type=AT_IPv4;
1375 dst_addr.data=(guint8 *)&unc_ipv4_address;
1377 conversation = find_conversation(pinfo->fd->num,&dst_addr,
1378 &null_addr, PT_TCP, UNC_tcp_port,
1379 0, NO_ADDR_B|NO_PORT_B);
1381 if (conversation == NULL) {
1382 /* It's not part of any conversation - create a new one. */
1383 conversation = conversation_new(pinfo->fd->num, &dst_addr,
1384 &null_addr, PT_TCP,UNC_tcp_port ,
1385 0, NO_ADDR2|NO_PORT2);
1387 conversation_set_dissector(conversation, uma_tcp_handle);
1391 case 104: /* RTP UDP port */
1392 RTP_UDP_port = tvb_get_ntohs(tvb,ie_offset);
1393 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RTP_port, tvb, ie_offset, 2, FALSE);
1394 /* TODO find out exactly which element contains IP addr */
1396 proto_tree_add_text(urr_ie_tree,tvb,ie_offset,ie_len,"IP %u, Port %u Handle %u",
1397 rtp_ipv4_address,RTP_UDP_port,rtp_handle);
1399 if(unc_ipv4_address!=0){
1400 src_addr.type=AT_IPv4;
1402 src_addr.data=(guint8 *)&unc_ipv4_address;
1404 /* Set Source IP = own IP */
1405 src_addr = pinfo->src;
1407 if((!pinfo->fd->flags.visited) && RTP_UDP_port!=0 && rtp_handle){
1409 rtp_add_address(pinfo, &src_addr, RTP_UDP_port, 0, "UMA", pinfo->fd->num, 0);
1410 if ((RTP_UDP_port & 0x1) == 0){ /* Even number RTP port RTCP should follow on odd number */
1411 RTCP_UDP_port = RTP_UDP_port + 1;
1412 rtcp_add_address(pinfo, &src_addr, RTCP_UDP_port, 0, "UMA", pinfo->fd->num);
1416 case 105: /* RTCP UDP port */
1417 RTCP_UDP_port = tvb_get_ntohs(tvb,ie_offset);
1418 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RTCP_port, tvb, ie_offset, 2, FALSE);
1419 /* TODO find out exactly which element contains IP addr */
1420 if((!pinfo->fd->flags.visited) && rtcp_ipv4_address!=0 && RTCP_UDP_port!=0 && rtcp_handle){
1421 src_addr.type=AT_IPv4;
1423 src_addr.data=(guint8 *)&rtcp_ipv4_address;
1425 rtcp_add_address(pinfo, &src_addr, RTCP_UDP_port, 0, "UMA", pinfo->fd->num);
1429 /* 11.2.70 GERAN Received Signal Level List */
1430 while(ie_offset<=(offset + ie_len)){
1431 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RXLEV_NCELL, tvb, ie_offset, 1, FALSE);
1436 /* 11.2.70 UTRAN Received Signal Level List */
1437 while(ie_offset<=(offset + ie_len)){
1438 proto_tree_add_item(urr_ie_tree, hf_uma_urr_RXLEV_NCELL, tvb, ie_offset, 1, FALSE);
1443 proto_tree_add_text(urr_ie_tree,tvb,ie_offset,ie_len,"DATA");
1446 offset = offset + ie_len;
1453 dissect_uma(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1459 /* Set up structures needed to add the protocol subtree and manage it */
1461 proto_tree *uma_tree;
1463 /* Make entries in Protocol column and Info column on summary display */
1464 if (check_col(pinfo->cinfo, COL_PROTOCOL))
1465 col_set_str(pinfo->cinfo, COL_PROTOCOL, "UMA");
1466 if (check_col(pinfo->cinfo, COL_INFO))
1467 col_clear(pinfo->cinfo, COL_INFO);
1469 ti = proto_tree_add_item(tree, proto_uma, tvb, 0, -1, FALSE);
1470 uma_tree = proto_item_add_subtree(ti, ett_uma);
1472 /* add an item to the subtree, see section 1.6 for more information */
1473 msg_len = tvb_get_ntohs(tvb,offset);
1474 proto_tree_add_item(uma_tree, hf_uma_length_indicator, tvb, offset, 2, FALSE);
1475 offset = offset + 2;
1476 octet = tvb_get_guint8(tvb,offset);
1478 proto_tree_add_item(uma_tree, hf_uma_skip_ind, tvb, offset, 1, FALSE);
1479 if ((octet & 0xf0) != 0 ){
1480 proto_tree_add_text(uma_tree, tvb,offset,-1,"Skip this message");
1484 proto_tree_add_item(uma_tree, hf_uma_pd, tvb, offset, 1, FALSE);
1489 octet = tvb_get_guint8(tvb,offset);
1490 proto_tree_add_item(uma_tree, hf_uma_urr_msg_type, tvb, offset, 1, FALSE);
1491 if (check_col(pinfo->cinfo, COL_INFO))
1492 col_add_str(pinfo->cinfo, COL_INFO, val_to_str(octet, uma_urr_msg_type_vals, "Unknown URR (%u)"));
1493 while ((msg_len + 1) > offset ){
1495 offset = dissect_uma_IE(tvb, pinfo, uma_tree, offset);
1500 octet = tvb_get_guint8(tvb,offset);
1501 proto_tree_add_item(uma_tree, hf_uma_urlc_msg_type, tvb, offset, 1, FALSE);
1502 if (check_col(pinfo->cinfo, COL_INFO)){
1503 col_add_str(pinfo->cinfo, COL_INFO, val_to_str(octet, uma_urlc_msg_type_vals, "Unknown URLC (%u)"));
1504 col_set_fence(pinfo->cinfo,COL_INFO);
1507 proto_tree_add_item(uma_tree, hf_uma_urlc_TLLI, tvb, offset, 4, FALSE);
1508 offset = offset + 3;
1509 while ((msg_len + 1) > offset ){
1511 offset = dissect_uma_IE(tvb, pinfo, uma_tree, offset);
1515 proto_tree_add_text(uma_tree, tvb,offset,-1,"Unknown protocol %u",pd);
1521 get_uma_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
1523 /* PDU length = Message length + length of length indicator */
1524 return tvb_get_ntohs(tvb,offset)+2;
1528 dissect_uma_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1530 tcp_dissect_pdus(tvb, pinfo, tree, uma_desegment, UMA_HEADER_SIZE,
1531 get_uma_pdu_len, dissect_uma);
1535 dissect_uma_urlc_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1542 /* Set up structures needed to add the protocol subtree and manage it */
1544 proto_tree *uma_tree;
1546 /* Make entries in Protocol column and Info column on summary display */
1547 if (check_col(pinfo->cinfo, COL_PROTOCOL))
1548 col_set_str(pinfo->cinfo, COL_PROTOCOL, "UMA");
1549 if (check_col(pinfo->cinfo, COL_INFO))
1550 col_clear(pinfo->cinfo, COL_INFO);
1552 ti = proto_tree_add_item(tree, proto_uma, tvb, 0, -1, FALSE);
1553 uma_tree = proto_item_add_subtree(ti, ett_uma);
1555 octet = tvb_get_guint8(tvb,offset);
1556 proto_tree_add_item(uma_tree, hf_uma_urlc_msg_type, tvb, offset, 1, FALSE);
1557 if (check_col(pinfo->cinfo, COL_INFO)){
1558 col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",val_to_str(octet, uma_urlc_msg_type_vals, "Unknown URLC (%u)"));
1559 col_set_fence(pinfo->cinfo,COL_INFO);
1561 msg_len = tvb_length_remaining(tvb,offset) - 1;
1565 case 2: /* RLC UNITDATA */
1566 case 6: /* URLC-UFC-REQ */
1567 case 7: /* URLC-DFC-REQ only allowed message types*/
1569 proto_tree_add_item(uma_tree, hf_uma_urlc_TLLI, tvb, offset, 4, FALSE);
1570 offset = offset + 4;
1571 proto_tree_add_item(uma_tree, hf_uma_urlc_seq_nr, tvb, offset, 2, FALSE);
1573 while (msg_len > offset){
1575 offset = dissect_uma_IE(tvb, pinfo, uma_tree, offset);
1579 proto_tree_add_text(uma_tree, tvb,offset,-1,"Wrong message type %u",octet);
1580 return tvb_length(tvb);
1587 range_delete_callback(guint32 port)
1589 dissector_delete("tcp.port", port, uma_tcp_handle);
1593 range_add_callback(guint32 port)
1595 dissector_add("tcp.port", port, uma_tcp_handle);
1598 /* Register the protocol with Wireshark */
1599 /* If this dissector uses sub-dissector registration add a registration routine.
1600 This format is required because a script is used to find these routines and
1601 create the code that calls these routines.
1604 proto_reg_handoff_uma(void)
1606 static int Initialized=FALSE;
1609 uma_tcp_handle = create_dissector_handle(dissect_uma_tcp, proto_uma);
1610 uma_udp_handle = new_create_dissector_handle(dissect_uma_urlc_udp, proto_uma);
1611 dissector_add("udp.port", 0, uma_udp_handle);
1614 range_foreach(uma_tcp_port_range, range_delete_callback);
1617 g_free(uma_tcp_port_range);
1618 uma_tcp_port_range = range_copy(global_uma_tcp_port_range);
1620 range_foreach(uma_tcp_port_range, range_add_callback);
1622 data_handle = find_dissector("data");
1623 rtp_handle = find_dissector("rtp");
1624 rtcp_handle = find_dissector("rtcp");
1625 llc_handle = find_dissector("llcgprs");
1630 /* this format is require because a script is used to build the C function
1631 that calls all the protocol registration.
1635 proto_register_uma(void)
1638 module_t *uma_module;
1640 /* Setup list of header fields See Section 1.6.1 for details*/
1641 static hf_register_info hf[] = {
1642 { &hf_uma_length_indicator,
1643 { "Length Indicator","uma.li",
1644 FT_UINT16, BASE_DEC, NULL, 0x0,
1645 "Length Indicator", HFILL }
1648 { "Protocol Discriminator","uma.pd",
1649 FT_UINT8, BASE_DEC, VALS(uma_pd_vals), 0x0f,
1650 "Protocol Discriminator", HFILL }
1653 { "Skip Indicator", "uma.skip.ind",
1654 FT_UINT8, BASE_DEC, NULL, 0xf0,
1655 "Skip Indicator", HFILL }
1657 { &hf_uma_urr_msg_type,
1658 { "URR Message Type", "uma.urr.msg.type",
1659 FT_UINT16, BASE_DEC, VALS(uma_urr_msg_type_vals), 0x0,
1660 "URR Message Type", HFILL }
1662 { &hf_uma_urlc_msg_type,
1663 { "URLC Message Type", "uma.urlc.msg.type",
1664 FT_UINT8, BASE_DEC, VALS(uma_urlc_msg_type_vals), 0x0,
1665 "URLC Message Type", HFILL }
1667 { &hf_uma_urlc_TLLI,
1668 { "Temporary Logical Link Identifier","uma.urlc.tlli",
1669 FT_BYTES,BASE_DEC, NULL, 0x0,
1670 "Temporary Logical Link Identifier", HFILL }
1672 { &hf_uma_urlc_seq_nr,
1673 { "Sequence Number","uma.urlc.seq.nr",
1674 FT_BYTES,BASE_DEC, NULL, 0x0,
1675 "Sequence Number", HFILL }
1678 { "URR Information Element","uma.urr.ie.type",
1679 FT_UINT8, BASE_DEC, VALS(uma_urr_IE_type_vals), 0x0,
1680 "URR Information Element", HFILL }
1682 { &hf_uma_urr_IE_len,
1683 { "URR Information Element length","uma.urr.ie.len",
1684 FT_UINT16, BASE_DEC, NULL, 0x0,
1685 "URR Information Element length", HFILL }
1687 { &hf_uma_urr_mobile_identity_type,
1688 { "Mobile Identity Type","uma.urr.ie.mobileid.type",
1689 FT_UINT8, BASE_DEC, VALS(uma_urr_mobile_identity_type_vals), 0x07,
1690 "Mobile Identity Type", HFILL }
1692 { &hf_uma_urr_odde_even_ind,
1693 { "Odd/even indication","uma.urr.oddevenind",
1694 FT_UINT8, BASE_DEC, uma_urr_oddevenind_vals, 0x08,
1695 "Mobile Identity", HFILL }
1698 { "IMSI", "uma_urr.imsi",
1699 FT_STRING, BASE_NONE, NULL, 0,
1703 { "IMEI", "uma_urr.imei",
1704 FT_STRING, BASE_NONE, NULL, 0,
1707 { &hf_uma_urr_imeisv,
1708 { "IMEISV", "uma_urr.imeisv",
1709 FT_STRING, BASE_NONE, NULL, 0,
1712 { &hf_uma_urr_tmsi_p_tmsi,
1713 { "TMSI/P-TMSI", "uma_urr.tmsi_p_tmsi",
1714 FT_STRING, BASE_NONE, NULL, 0,
1715 "TMSI/P-TMSI", HFILL }
1718 { "UMA Release Indicator (URI)","uma.urr.uri",
1719 FT_UINT8, BASE_DEC, NULL, 0x07,
1722 { &hf_uma_urr_radio_type_of_id,
1723 { "Type of identity","uma.urr.radio_type_of_id",
1724 FT_UINT8, BASE_DEC, VALS(radio_type_of_id_vals), 0x0f,
1725 "Type of identity", HFILL }
1727 { &hf_uma_urr_radio_id,
1728 { "Radio Identity","uma.urr.radio_id",
1729 FT_ETHER, BASE_DEC, NULL, 0x00,
1730 "Radio Identity", HFILL }
1733 { &hf_uma_urr_cell_id,
1734 { "Cell Identity","uma.urr.cell_id",
1735 FT_UINT16, BASE_DEC, NULL, 0x00,
1736 "Cell Identity", HFILL }
1740 { "Mobile Country Code","uma.urr.mcc",
1741 FT_UINT16, BASE_DEC, NULL, 0x0,
1742 "Mobile Country Code", HFILL }
1745 { "Mobile network code","uma.urr.mnc",
1746 FT_UINT16, BASE_DEC, NULL, 0x0,
1747 "Mobile network code ", HFILL }
1750 { "Location area code","uma.urr.lac",
1751 FT_UINT16, BASE_DEC, NULL, 0x0,
1752 "Location area code", HFILL }
1755 { "GCI, GSM Coverage Indicator","uma.urr.gci",
1756 FT_UINT8, BASE_DEC, VALS(gci_vals), 0x0,
1757 "GCI, GSM Coverage Indicator", HFILL }
1760 { "TURA, Type of Unlicensed Radio","uma.urr.tura",
1761 FT_UINT8,BASE_DEC, VALS(tura_vals), 0xf,
1762 "TURA, Type of Unlicensed Radio", HFILL }
1765 { "GC, GERAN Capable","uma.urr.gc",
1766 FT_UINT8,BASE_DEC, VALS(gc_vals), 0x10,
1767 "GC, GERAN Capable", HFILL }
1770 { "UC, UTRAN Capable","uma.urr.uc",
1771 FT_UINT8,BASE_DEC, VALS(uc_vals), 0x20,
1772 "GC, GERAN Capable", HFILL }
1775 { "RTP Redundancy Support(RRS)","uma.urr.rrs",
1776 FT_UINT8,BASE_DEC, VALS(rrs_vals), 0x01,
1777 "RTP Redundancy Support(RRS)", HFILL }
1779 { &hf_uma_urr_IP_Address_type,
1780 { "IP address type number value","uma.urr.ip_type",
1781 FT_UINT8,BASE_DEC, VALS(IP_address_type_vals), 0x0,
1782 "IP address type number value", HFILL }
1785 { "Fully Qualified Domain/Host Name (FQDN)", "uma.urr.fqdn",
1786 FT_STRING, BASE_NONE,NULL,0x0,
1787 "Fully Qualified Domain/Host Name (FQDN)", HFILL }
1789 { &hf_uma_urr_sgw_ipv4,
1790 { "SGW IPv4 address","uma.urr.sgwipv4",
1791 FT_IPv4,BASE_NONE, NULL, 0x0,
1792 "SGW IPv4 address", HFILL }
1794 { &hf_uma_urr_redirection_counter,
1795 { "Redirection Counter","uma.urr.redirection_counter",
1796 FT_UINT8,BASE_DEC, NULL, 0x0,
1797 "Redirection Counter", HFILL }
1799 { &hf_uma_urr_dis_rej_cau,
1800 { "Discovery Reject Cause","uma.urr.is_rej_cau",
1801 FT_UINT8,BASE_DEC, VALS(discovery_reject_cause_vals), 0x0,
1802 "Discovery Reject Cause", HFILL }
1805 { "ECMC, Early Classmark Sending Control","uma.urr.is_rej_cau",
1806 FT_UINT8,BASE_DEC, VALS(ECMC_vals), 0x2,
1807 "ECMC, Early Classmark Sending Control", HFILL }
1810 { "NMO, Network Mode of Operation","uma.urr.NMO",
1811 FT_UINT8,BASE_DEC, VALS(NMO_vals), 0xc,
1812 "NMO, Network Mode of Operation", HFILL }
1815 { "GPRS, GPRS Availability","uma.urr.is_rej_cau",
1816 FT_UINT8,BASE_DEC, VALS(GPRS_avail_vals), 0x10,
1817 "GPRS, GPRS Availability", HFILL }
1820 { "DTM, Dual Transfer Mode of Operation by network","uma.urr.dtm",
1821 FT_UINT8,BASE_DEC, VALS(DTM_vals), 0x20,
1822 "DTM, Dual Transfer Mode of Operation by network", HFILL }
1825 { "ATT, Attach-detach allowed","uma.urr.att",
1826 FT_UINT8,BASE_DEC, VALS(ATT_vals), 0x40,
1827 "ATT, Attach-detach allowed", HFILL }
1830 { "MSCR, MSC Release","uma.urr.mscr",
1831 FT_UINT8,BASE_DEC, VALS(MSCR_vals), 0x80,
1832 "MSCR, MSC Release", HFILL }
1834 { &hf_uma_urr_T3212_timer,
1835 { "T3212 Timer value(seconds)","uma.urr.t3212",
1836 FT_UINT8,BASE_DEC, NULL, 0x0,
1837 "T3212 Timer value(seconds)", HFILL }
1840 { "Routing Area Code","uma.urr.rac",
1841 FT_UINT8,BASE_DEC, NULL, 0x0,
1842 "Routing Area Code", HFILL }
1844 { &hf_uma_urr_ap_location,
1845 { "AP Location","uma.urr.ap_location",
1846 FT_BYTES,BASE_HEX, NULL, 0x0,
1847 "AP Location", HFILL }
1849 { &hf_uma_urr_SGSNR,
1850 { "SGSN Release","uma.urr.SGSNR",
1851 FT_UINT8,BASE_DEC, VALS(SGSNR_vals), 0x01,
1852 "SGSN Release", HFILL }
1855 { "ECMP, Emergency Call Mode Preference","uma.urr.ECMP",
1856 FT_UINT8,BASE_DEC, VALS(ECMP_vals), 0x02,
1857 "ECMP, Emergency Call Mode Preference", HFILL }
1860 { "RE, Call reestablishment allowed","uma.urr.RE",
1861 FT_UINT8,BASE_DEC, VALS(RE_vals), 0x04,
1862 "RE, Call reestablishment allowed", HFILL }
1864 { &hf_uma_urr_PFCFM,
1865 { "PFCFM, PFC_FEATURE_MODE","uma.urr.PFCFM",
1866 FT_UINT8,BASE_DEC, VALS(PFCFM_vals), 0x08,
1867 "PFCFM, PFC_FEATURE_MODE", HFILL }
1869 { &hf_uma_urr_3GECS,
1870 { "3GECS, 3G Early Classmark Sending Restriction","uma.urr.3GECS",
1871 FT_UINT8,BASE_DEC, VALS(Three_GECS_vals), 0x10,
1872 "3GECS, 3G Early Classmark Sending Restriction", HFILL }
1875 { "BCC","uma.urr.bcc",
1876 FT_UINT8,BASE_DEC, NULL, 0x07,
1880 { "NCC","uma.urr.ncc",
1881 FT_UINT8,BASE_DEC, NULL, 0x38,
1884 { &hf_uma_urr_TU3907_timer,
1885 { "TU3907 Timer value(seconds)","uma.urr.tu3907",
1886 FT_UINT16,BASE_DEC, NULL, 0x0,
1887 "TU3907 Timer value(seconds)", HFILL }
1889 { &hf_uma_urr_GSM_RR_state,
1890 { "GSM RR State value","uma.urr.gsmrrstate",
1891 FT_UINT8,BASE_DEC, VALS(GRS_GSM_RR_State_vals), 0x7,
1892 "GSM RR State value", HFILL }
1894 { &hf_uma_urr_UMA_band,
1895 { "UMA Band","uma.urr.umaband",
1896 FT_UINT8,BASE_DEC, VALS(UMA_band_vals), 0x0f,
1899 { &hf_uma_urr_URR_state,
1900 { "URR State","uma.urr.state",
1901 FT_UINT8,BASE_DEC, VALS(URR_state_vals), 0x03,
1902 "URR State", HFILL }
1904 { &hf_uma_urr_register_reject_cause,
1905 { "Register Reject Cause","uma.urr.state",
1906 FT_UINT8,BASE_DEC, VALS(register_reject_cause_vals), 0x0,
1907 "Register Reject Cause", HFILL }
1909 { &hf_uma_urr_TU3906_timer,
1910 { "TU3907 Timer value(seconds)","uma.urr.tu3906",
1911 FT_UINT16,BASE_DEC, NULL, 0x0,
1912 "TU3906 Timer value(seconds)", HFILL }
1914 { &hf_uma_urr_TU3910_timer,
1915 { "TU3907 Timer value(seconds)","uma.urr.tu3910",
1916 FT_UINT16,BASE_DEC, NULL, 0x0,
1917 "TU3910 Timer value(seconds)", HFILL }
1919 { &hf_uma_urr_TU3902_timer,
1920 { "TU3902 Timer value(seconds)","uma.urr.tu3902",
1921 FT_UINT16,BASE_DEC, NULL, 0x0,
1922 "TU3902 Timer value(seconds)", HFILL }
1924 { &hf_uma_urr_communication_port,
1925 { "Communication Port","uma.urr.communication_port",
1926 FT_UINT16,BASE_DEC, NULL, 0x0,
1927 "Communication Portt", HFILL }
1929 { &hf_uma_urr_L3_Message,
1930 { "L3 message contents","uma.urr.l3",
1931 FT_BYTES,BASE_HEX, NULL, 0x0,
1932 "L3 message contents", HFILL }
1934 { &hf_uma_urr_L3_protocol_discriminator,
1935 { "Protocol discriminator","uma.urr.L3_protocol_discriminator",
1936 FT_UINT8,BASE_DEC, VALS(protocol_discriminator_vals), 0x0f,
1937 "Protocol discriminator", HFILL }
1940 { "SC","uma.urr.SC",
1941 FT_UINT8,BASE_DEC, VALS(SC_vals), 0x1,
1944 { &hf_uma_urr_algorithm_id,
1945 { "Algorithm identifier","uma.urr.algorithm_identifier",
1946 FT_UINT8,BASE_DEC, VALS(algorithm_identifier_vals), 0xe,
1947 "Algorithm_identifier", HFILL }
1949 { &hf_uma_urr_GPRS_resumption,
1950 { "GPRS resumption ACK","uma.urr.GPRS_resumption",
1951 FT_UINT8,BASE_DEC, VALS(GPRS_resumption_vals), 0x1,
1952 "GPRS resumption ACK", HFILL }
1955 { "ULQI, UL Quality Indication","uma.urr.ULQI",
1956 FT_UINT8,BASE_DEC, VALS(ULQI_vals), 0x0f,
1957 "ULQI, UL Quality Indication", HFILL }
1959 { &hf_uma_urr_TU3920_timer,
1960 { "TU3920 Timer value(seconds)","uma.urr.tu3920",
1961 FT_UINT16,BASE_DEC, NULL, 0x0,
1962 "TU3920 Timer value(hundreds of of ms)", HFILL }
1964 { &hf_uma_urr_peak_tpt_cls,
1965 { "PEAK_THROUGHPUT_CLASS","uma.urr.peak_tpt_cls",
1966 FT_UINT8,BASE_DEC, NULL, 0x0f,
1967 "PEAK_THROUGHPUT_CLASS", HFILL }
1969 { &hf_uma_urr_radio_pri,
1970 { "Radio Priority","uma.urr.radio_pri",
1971 FT_UINT8,BASE_DEC, VALS(radio_pri_vals), 0x30,
1972 "RADIO_PRIORITY", HFILL }
1974 { &hf_uma_urr_rlc_mode,
1975 { "RLC mode","uma.urr.rrlc_mode",
1976 FT_UINT8,BASE_DEC, VALS(rlc_mode_vals), 0x80,
1979 { &hf_uma_urr_URLCcause,
1980 { "URLC Cause","uma.urr.URLCcause",
1981 FT_UINT8,BASE_DEC, VALS(URLC_cause_vals), 0x0,
1982 "URLC Cause", HFILL }
1985 { "User Data Rate value (bits/s)","uma.urr.URLCcause",
1986 FT_UINT32,BASE_DEC, NULL, 0x0,
1987 "User Data Rate value (bits/s)", HFILL }
1989 { &hf_uma_urr_TU4001_timer,
1990 { "TU4001 Timer value(seconds)","uma.urr.tu4001",
1991 FT_UINT16,BASE_DEC, NULL, 0x0,
1992 "TU4001 Timer value(seconds)", HFILL }
1995 { "Location Status(LS)","uma.urr.LS",
1996 FT_UINT8,BASE_DEC, VALS(LS_vals), 0x3,
1997 "Location Status(LS)", HFILL }
1999 { &hf_uma_urr_cipher_res,
2000 { "Cipher Response(CR)","uma.urr.CR",
2001 FT_UINT8,BASE_DEC, VALS(CR_vals), 0x3,
2002 "Cipher Response(CR)", HFILL }
2004 { &hf_uma_urr_rand_val,
2005 { "Ciphering Command RAND value","uma.rand_val",
2006 FT_BYTES,BASE_HEX, NULL, 0x0,
2007 "Ciphering Command RAND value", HFILL }
2009 { &hf_uma_urr_ciphering_command_mac,
2010 { "Ciphering Command MAC (Message Authentication Code)","uma.ciphering_command_mac",
2011 FT_BYTES,BASE_HEX, NULL, 0x0,
2012 "Ciphering Command MAC (Message Authentication Code)", HFILL }
2014 { &hf_uma_urr_ciphering_key_seq_num,
2015 { "Values for the ciphering key","uma.ciphering_key_seq_num",
2016 FT_UINT8,BASE_DEC, NULL, 0x7,
2017 "Values for the ciphering key", HFILL }
2019 { &hf_uma_urr_sapi_id,
2020 { "SAPI ID","uma.sapi_id",
2021 FT_UINT8,BASE_DEC, VALS(sapi_id_vals), 0x7,
2024 { &hf_uma_urr_establishment_cause,
2025 { "Establishment Cause","uma.urr.establishment_cause",
2026 FT_UINT8,BASE_DEC, VALS(establishment_cause_vals), 0x0,
2027 "Establishment Cause", HFILL }
2029 { &hf_uma_urr_channel,
2030 { "Channel","uma.urr.establishment_cause",
2031 FT_UINT8,BASE_DEC, VALS(channel_vals), 0x3,
2034 { &hf_uma_urr_PDU_in_error,
2035 { "PDU in Error,","uma.urr.PDU_in_error",
2036 FT_BYTES,BASE_HEX, NULL, 0x0,
2037 "PDU in Error,", HFILL }
2039 { &hf_uma_urr_sample_size,
2040 { "Sample Size","uma.urr.sample_size",
2041 FT_UINT8,BASE_DEC, VALS(sample_size_vals), 0x0,
2042 "Sample Size", HFILL }
2044 { &hf_uma_urr_payload_type,
2045 { "Payload Type","uma.urr.sample_size",
2046 FT_UINT8,BASE_DEC, NULL, 0x0,
2047 "Payload Type", HFILL }
2049 { &hf_uma_urr_LLC_PDU,
2050 { "LLC-PDU","uma.urr.llc_pdu",
2051 FT_BYTES,BASE_HEX, NULL, 0x0,
2055 { "LBLI, Location Black List indicator","uma.urr.LBLI",
2056 FT_UINT8,BASE_DEC, VALS(LBLI_vals), 0x0,
2057 "LBLI, Location Black List indicator", HFILL }
2060 { "Reset Indicator(RI)","uma.urr.RI",
2061 FT_UINT8,BASE_DEC, VALS(RI_vals), 0x1,
2062 "Reset Indicator(RI)", HFILL }
2064 { &hf_uma_urr_TU4003_timer,
2065 { "TU4003 Timer value(seconds)","uma.urr.tu4003",
2066 FT_UINT16,BASE_DEC, NULL, 0x0,
2067 "TU4003 Timer value(seconds)", HFILL }
2069 { &hf_uma_urr_ap_service_name_type,
2070 { "AP Service Name type","uma.urr.ap_service_name_type",
2071 FT_UINT8,BASE_DEC, VALS(ap_service_name_type_vals), 0x0,
2072 "AP Service Name type", HFILL }
2074 { &hf_uma_urr_ap_Service_name_value,
2075 { "AP Service Name Value","uma.urr.ap_service_name_value",
2076 FT_STRING,BASE_NONE, NULL, 0x0,
2077 "AP Service Name Value", HFILL }
2079 { &hf_uma_urr_uma_service_zone_icon_ind,
2080 { "UMA Service Zone Icon Indicator","uma.urr.uma_service_zone_icon_ind",
2081 FT_UINT8,BASE_DEC, VALS(uma_service_zone_icon_ind_vals), 0x0,
2082 "UMA Service Zone Icon Indicator", HFILL }
2084 { &hf_uma_urr_uma_service_zone_str_len,
2085 { "Length of UMA Service Zone string","uma.urr.service_zone_str_len",
2086 FT_UINT8,BASE_DEC, NULL, 0x0,
2087 "Length of UMA Service Zone string", HFILL }
2089 { &hf_uma_urr_window_size,
2090 { "Window Size","uma.urr.uma_window_size",
2091 FT_UINT8,BASE_DEC, VALS(window_size_vals), 0x03,
2092 "Window Size", HFILL }
2094 { &hf_uma_urr_uma_codec_mode,
2095 { "Codec Mode","uma.urr.uma_codec_mode",
2096 FT_UINT8,BASE_DEC, NULL, 0xc0,
2097 "Codec Mode", HFILL }
2099 { &hf_uma_urr_UTRAN_cell_id_disc,
2100 { "UTRAN Cell Identification Discriminator","uma.urr.uma_UTRAN_cell_id_disc",
2101 FT_UINT8,BASE_DEC, VALS(UTRAN_cell_id_disc_vals), 0x0f,
2102 "UTRAN Cell Identification Discriminator", HFILL }
2105 { "SUTI, Serving UNC table indicator indicator","uma.urr.uma_suti",
2106 FT_UINT8,BASE_DEC, VALS(suti_vals), 0x01,
2107 "SUTI, Serving UNC table indicator indicator", HFILL }
2109 { &hf_uma_urr_uma_mps,
2110 { "UMPS, Manual PLMN Selection indicator","uma.urr.mps",
2111 FT_UINT8,BASE_DEC, VALS(mps_vals), 0x3,
2112 "MPS, Manual PLMN Selection indicator", HFILL }
2114 { &hf_uma_urr_num_of_plms,
2115 { "Number of PLMN:s","uma.urr.num_of_plms",
2116 FT_UINT8,BASE_DEC, NULL, 0x0,
2117 "Number of PLMN:s", HFILL }
2120 { "CBS Cell Broadcast Service","uma.urr.cbs",
2121 FT_UINT8,BASE_DEC, VALS(cbs_vals), 0x01,
2122 "CBS Cell Broadcast Service", HFILL }
2124 { &hf_uma_urr_num_of_cbs_frms,
2125 { "Number of CBS Frames","uma.urr.num_of_cbs_frms",
2126 FT_UINT8,BASE_DEC, NULL, 0x0,
2127 "Number of CBS Frames", HFILL }
2129 { &hf_uma_urr_ms_radio_id,
2130 { "MS Radio Identity","uma.urr.ms_radio_id",
2131 FT_ETHER, BASE_DEC, NULL, 0x00,
2132 "MS Radio Identity", HFILL }
2134 { &hf_uma_urr_uma_service_zone_str,
2135 { "UMA Service Zone string,","uma.urr.uma_service_zone_str",
2136 FT_STRING,BASE_NONE, NULL, 0x0,
2137 "UMA Service Zone string,", HFILL }
2139 { &hf_uma_urr_unc_ipv4,
2140 { "UNC IPv4 address","uma.urr.uncipv4",
2141 FT_IPv4,BASE_NONE, NULL, 0x0,
2142 "UNC IPv4 address", HFILL }
2145 { "UNC Fully Qualified Domain/Host Name (FQDN)", "uma.urr.unc_fqdn",
2146 FT_STRING, BASE_NONE,NULL,0x0,
2147 "UNC Fully Qualified Domain/Host Name (FQDN)", HFILL }
2149 { &hf_uma_urr_GPRS_user_data_transport_ipv4,
2150 { "IP address for GPRS user data transport","uma.urr.gprs_usr_data_ipv4",
2151 FT_IPv4,BASE_NONE, NULL, 0x0,
2152 "IP address for GPRS user data transport", HFILL }
2154 { &hf_uma_urr_GPRS_port,
2155 { "UDP Port for GPRS user data transport","uma.urr.gprs_port",
2156 FT_UINT16,BASE_DEC, NULL, 0x0,
2157 "UDP Port for GPRS user data transport", HFILL }
2159 { &hf_uma_urr_UNC_tcp_port,
2160 { "UNC TCP port","uma.urr.gprs_port",
2161 FT_UINT16,BASE_DEC, NULL, 0x0,
2162 "UDP Port for GPRS user data transport", HFILL }
2164 { &hf_uma_urr_RTP_port,
2165 { "RTP UDP port","uma.urr.rtp_port",
2166 FT_UINT16,BASE_DEC, NULL, 0x0,
2167 "RTP UDP port", HFILL }
2169 { &hf_uma_urr_RTCP_port,
2170 { "RTCP UDP port","uma.urr.rtcp_port",
2171 FT_UINT16,BASE_DEC, NULL, 0x0,
2172 "RTCP UDP port", HFILL }
2174 { &hf_uma_urr_RXLEV_NCELL,
2175 { "RX Level","uma.urr.rxlevel",
2176 FT_UINT8,BASE_DEC, NULL, 0x0,
2181 /* Setup protocol subtree array */
2182 static gint *ett[] = {
2188 /* Register the protocol name and description */
2189 proto_uma = proto_register_protocol("Unlicensed Mobile Access","UMA", "uma");
2190 bssap_pdu_type_table = find_dissector_table("bssap.pdu_type");
2192 /* Required function calls to register the header fields and subtrees used */
2193 proto_register_field_array(proto_uma, hf, array_length(hf));
2194 proto_register_subtree_array(ett, array_length(ett));
2195 /* Register a configuration option for port */
2198 uma_module = prefs_register_protocol(proto_uma, proto_reg_handoff_uma);
2200 /* Set default TCP ports */
2201 range_convert_str(&global_uma_tcp_port_range, DEFAULT_UMA_PORT_RANGE, MAX_UDP_PORT);
2202 uma_tcp_port_range = range_empty();
2204 prefs_register_bool_preference(uma_module, "desegment_ucp_messages",
2205 "Reassemble UMA messages spanning multiple TCP segments",
2206 "Whether the UMA dissector should reassemble messages spanning multiple TCP segments."
2207 " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
2209 prefs_register_obsolete_preference(uma_module, "tcp.port1");
2210 prefs_register_range_preference(uma_module, "udp.ports", "UMA TCP ports",
2211 "TCP ports to be decoded as UMA (default: "
2212 DEFAULT_UMA_PORT_RANGE ")",
2213 &global_uma_tcp_port_range, MAX_UDP_PORT);