summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-uma.c
blob: 1cceff1714be7327e80f9799a36f1beeb3fb9c37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
/* packet-uma.c
 * Routines for Unlicensed Mobile Access(UMA) dissection
 * Copyright 2005-2006,2009, Anders Broman <anders.broman[at]ericsson.com>
 *
 * Wireshark - Network traffic analyzer
 * By Gerald Combs <gerald@wireshark.org>
 * Copyright 1998 Gerald Combs
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 *
 * References:
 * http://www.umatechnology.org/
 * UMA Protocols (Stage 3) R1.0.4 (5/16/2005)
 *
 * 3GPP TS 44.318 version 8.4.0 Release 8
 *
 * https://www.3gpp.org/specifications/specification-numbering
 * 3GPP TS 24.008 V6.2.0 (2003-09)
 * Technical Specification
 * 3rd Generation Partnership Project;
 * Technical Specification Group Core Network;
 * Mobile radio interface Layer 3 specification;
 * Core network protocols; Stage 3
 * (Release 6)
 *
 * 3GPP TS 44.018 V6.11.0 (2005-01)
 * 3rd Generation Partnership Project;
 * Technical Specification Group GSM/EDGE Radio Access Network;
 * Mobile radio interface layer 3 specification;
 * Radio Resource Control (RRC) protocol
 * (Release 6)
 *
 * 3GPP TS 45.009 V6.1.0 (2004-02)
 * 3rd Generation Partnership Project;
 * Technical Specification Group GSM/EDGE
 * Radio Access Network;
 * Link adaptation
 * (Release 6)
 *
 */

#include "config.h"

#include <epan/packet.h>
#include <epan/expert.h>
#include <epan/prefs.h>
#include <epan/asn1.h>
#include "packet-bssap.h"
#include "packet-gsm_a_common.h"
#include "packet-rtp.h"
#include "packet-rtcp.h"
#include "packet-e212.h"
#include "packet-tcp.h"
#include "packet-rrc.h"

void proto_register_uma(void);
void proto_reg_handoff_uma(void);

/* Length field is 2 bytes and comes first */
#define UMA_HEADER_SIZE 2
static gboolean uma_desegment = TRUE;

static dissector_handle_t uma_tcp_handle;
static dissector_handle_t uma_udp_handle;
static dissector_table_t  bssap_pdu_type_table;
static dissector_handle_t rtcp_handle;
static dissector_handle_t llc_handle;

/* Initialize the protocol and registered fields */
static int proto_uma					= -1;
static int hf_uma_length_indicator			= -1;
static int hf_uma_pd					= -1;
static int hf_uma_skip_ind				= -1;
static int hf_uma_urr_msg_type				= -1;
static int hf_uma_urlc_msg_type				= -1;
static int hf_uma_urlc_TLLI				= -1;
static int hf_uma_urlc_seq_nr				= -1;
static int hf_uma_urr_IE				= -1;
static int hf_uma_urr_IE_len				= -1;
static int hf_uma_urr_uri				= -1;
static int hf_uma_urr_radio_type_of_id			= -1;
static int hf_uma_urr_radio_id				= -1;
static int hf_uma_urr_cell_id				= -1;
static int hf_uma_urr_lac				= -1;
static int hf_uma_urr_gci				= -1;
static int hf_uma_urr_tura				= -1;
static int hf_uma_urr_gc				= -1;
static int hf_uma_urr_uc				= -1;
static int hf_uma_urr_rrs				= -1;
static int hf_uma_urr_gmsi				= -1;
static int hf_uma_urr_psho				= -1;
static int hf_uma_urr_IP_Address_type			= -1;
static int hf_uma_urr_FQDN				= -1;
static int hf_uma_urr_sgw_ipv4				= -1;
static int hf_uma_urr_redirection_counter		= -1;
static int hf_uma_urr_dis_rej_cau			= -1;
static int hf_uma_urr_MSCR				= -1;
static int hf_uma_urr_ATT				= -1;
static int hf_uma_urr_DTM				= -1;
static int hf_uma_urr_GPRS				= -1;
static int hf_uma_urr_NMO				= -1;
static int hf_uma_urr_ECMC				= -1;
static int hf_uma_urr_T3212_timer			= -1;
static int hf_uma_urr_RAC				= -1;
static int hf_uma_urr_ap_location			= -1;
static int hf_uma_urr_SGSNR				= -1;
static int hf_uma_urr_ECMP				= -1;
static int hf_uma_urr_RE				= -1;
static int hf_uma_urr_PFCFM				= -1;
static int hf_uma_urr_3GECS				= -1;
static int hf_uma_urr_TU3907_timer			= -1;
static int hf_uma_urr_GSM_RR_state			= -1;
static int hf_uma_urr_gan_band				= -1;
static int hf_uma_urr_URR_state				= -1;
static int hf_uma_urr_register_reject_cause 		= -1;
static int hf_uma_urr_TU3906_timer			= -1;
static int hf_uma_urr_TU3910_timer			= -1;
static int hf_uma_urr_TU3902_timer			= -1;
static int hf_uma_urr_communication_port 		= -1;
static int hf_uma_urr_L3_Message			= -1;
static int hf_uma_urr_L3_protocol_discriminator 	= -1;
static int hf_uma_urr_GPRS_resumption			= -1;
static int hf_uma_urr_ULQI				= -1;
static int hf_uma_urr_TU3920_timer			= -1;
static int hf_uma_urr_peak_tpt_cls			= -1;
static int hf_uma_urr_radio_pri				= -1;
static int hf_uma_urr_rlc_mode				= -1;
static int hf_uma_urr_ga_psr_cause			= -1;
static int hf_uma_urr_udr				= -1;
static int hf_uma_urr_TU4001_timer			= -1;
static int hf_uma_urr_LS				= -1;
static int hf_uma_urr_cipher_res			= -1;
static int hf_uma_urr_rand_val				= -1;
static int hf_uma_urr_ciphering_command_mac 		= -1;
static int hf_uma_urr_ciphering_key_seq_num 		= -1;
static int hf_uma_urr_sapi_id				= -1;
static int hf_uma_urr_establishment_cause 		= -1;
static int hf_uma_urr_channel				= -1;
static int hf_uma_urr_PDU_in_error			= -1;
static int hf_uma_urr_sample_size			= -1;
static int hf_uma_urr_payload_type			= -1;
static int hf_uma_urr_LLC_PDU				= -1;
static int hf_uma_urr_LBLI				= -1;
static int hf_uma_urr_RI				= -1;
static int hf_uma_urr_TU4003_timer			= -1;
static int hf_uma_urr_ap_service_name_type 		= -1;
static int hf_uma_urr_ap_Service_name_value 		= -1;
static int hf_uma_urr_uma_service_zone_icon_ind 	= -1;
static int hf_uma_urr_uma_service_zone_str_len 		= -1;
static int hf_uma_urr_window_size			= -1;
static int hf_uma_urr_uma_codec_mode			= -1;
static int hf_uma_urr_UTRAN_cell_id_disc 		= -1;
static int hf_uma_urr_ms_radio_id			= -1;
static int hf_uma_urr_uma_service_zone_str 		= -1;
static int hf_uma_urr_suti				= -1;
static int hf_uma_urr_uma_mps				= -1;
static int hf_uma_urr_num_of_plms			= -1;
static int hf_uma_urr_cbs				= -1;
static int hf_uma_urr_num_of_cbs_frms			= -1;
static int hf_uma_urr_unc_ipv4				= -1;
static int hf_uma_unc_FQDN				= -1;
static int hf_uma_urr_GPRS_user_data_transport_ipv4 	= -1;
static int hf_uma_urr_GPRS_port				= -1;
static int hf_uma_urr_UNC_tcp_port			= -1;
static int hf_uma_urr_RTP_port				= -1;
static int hf_uma_urr_RTCP_port				= -1;
static int hf_uma_urr_RXLEV_NCELL			= -1;
/* Generated from convert_proto_tree_add_text.pl */
static int hf_uma_access_control_class_n = -1;
static int hf_uma_data = -1;

/* Initialize the subtree pointers */
static int ett_uma     = -1;
static int ett_uma_toc = -1;
static int ett_urr_ie  = -1;

/* Generated from convert_proto_tree_add_text.pl */
static expert_field ei_uma_fqdn_not_present = EI_INIT;
static expert_field ei_uma_wrong_message_type = EI_INIT;
static expert_field ei_uma_unknown_protocol = EI_INIT;
static expert_field ei_uma_skip_this_message = EI_INIT;
static expert_field ei_uma_cbs_frames = EI_INIT;
static expert_field ei_uma_unknown_format = EI_INIT;

/* The dynamic payload type which will be dissected as uma */
#define DEFAULT_UMA_PORT_RANGE "14001" /* Not IANA registered */

/* Global variables */
static	guint32		unc_ipv4_address;
/** static	guint32		rtp_ipv4_address; **/
static	guint32		rtcp_ipv4_address;
static	guint32		GPRS_user_data_ipv4_address;

/*
 * Protocol Discriminator (PD)
 */
static const value_string uma_pd_vals[] = {
	{ 0,		"URR_C"},
	{ 1,		"URR"},
	{ 2,		"URLC"},
	{ 0,	NULL }
};
/*
 * Message types for Unlicensed Radio Resources management
 */
static const value_string uma_urr_msg_type_vals[] = {
	{ 1,		"GA-RC DISCOVERY REQUEST"},
	{ 2,		"GA-RC DISCOVERY ACCEPT"},
	{ 3,		"GA-RC DISCOVERY REJECT"},
	{ 16,		"GA-RC REGISTER REQUEST"},
	{ 17,		"GA-RC REGISTER ACCEPT"},
	{ 18,		"GA-RC REGISTER REDIRECT"},
	{ 19,		"GA-RC REGISTER REJECT"},
	{ 20,		"GA-RC DEREGISTER"},
	{ 21,		"GA-RC REGISTER UPDATE UPLINK"},
	{ 22,		"GA-RC REGISTER UPDATE DOWNLINK"},
	{ 23,		"GA-RC CELL BROADCAST INFO"},
	{ 32,		"GA-CSR CIPHERING MODE COMMAND"},
	{ 33,		"GA-CSR CIPHERING MODE COMPLETE"},
	{ 48,		"GA-CSR ACTIVATE CHANNEL"},
	{ 49,		"GA-CSR ACTIVATE CHANNEL ACK"},
	{ 50,		"GA-CSR ACTIVATE CHANNEL COMPLETE"},
	{ 51,		"GA-CSR ACTIVATE CHANNEL FAILURE"},
	{ 52,		"GA-CSR CHANNEL MODE MODIFY"},
	{ 53,		"GA-CSR CHANNEL MODE MODIFY ACKNOWLEDGE"},
	{ 64,		"GA-CSR RELEASE"},
	{ 65,		"GA-CSR RELEASE COMPLETE"},
	{ 66,		"GA-CSR CLEAR REQUEST"},
	{ 80,		"GA-CSR HANDOVER ACCESS"},
	{ 81,		"GA-CSR HANDOVER COMPLETE"},
	{ 82,		"GA-CSR UPLINK QUALITY INDICATION"},
	{ 83,		"GA-CSR HANDOVER INFORMATION"},
	{ 84,		"GA-CSR HANDOVER COMMAND"},
	{ 85,		"GA-CSR HANDOVER FAILURE"},
	{ 96,		"GA-CSR PAGING REQUEST"},
	{ 97,		"GA-CSR PAGING RESPONSE"},
	{ 112,		"GA-CSR UPLINK DIRECT TRANSFER"},
	{ 113,		"URR INITIAL DIRECT TRANSFER"},
	{ 114,		"GA-CSR DOWNLINK DIRECT TRANSFER"},
	{ 115,		"GA-CSR STATUS"},
	{ 116,		"GA-RC KEEP ALIVE"},
	{ 117,		"GA-CSR CLASSMARK ENQUIRY"},
	{ 118,		"GA-CSR CLASSMARK CHANGE"},
	{ 119,		"GA-CSR GPRS SUSPENSION REQUEST"},
	{ 120,		"GA-RC SYNCHRONIZATION INFORMATION"},
	{ 121,		"GA-CSR UTRAN CLASSMARK CHANGE"},
	{ 128,		"GA-CSR REQUEST"},
	{ 129,		"GA-CSR REQUEST ACCEPT"},
	{ 130,		"GA-CSR REQUEST REJECT"},
	{ 0,	NULL }
};
static value_string_ext uma_urr_msg_type_vals_ext = VALUE_STRING_EXT_INIT(uma_urr_msg_type_vals);
/*
 * Message types for URLC signaling
 */
static const value_string uma_urlc_msg_type_vals[] = {
	{ 1,		"GA-PSR-DATA"},
	{ 2,		"URLC UNITDATA"},
	{ 3,		"GA-PSR-PS-PAGE"},
	{ 4,		"Unknown"},
	{ 5,		"Unknown"},
	{ 6,		"URLC-UFC-REQ"},
	{ 7,		"URLC-DFC-REQ"},
	{ 8,		"GA-PSR-ACTIVATE-UTC-REQ"},
	{ 9,		"GA-PSR-ACTIVATE-UTC-ACK"},
	{ 10,		"GA-PSR-DEACTIVATE-UTC-REQ"},
	{ 11,		"GA-PSR-DEACTIVATE-UTC-ACK"},
	{ 12,		"GA-PSR STATUS"},
	{ 13,		"GA-PSR HANDOVER COMPLETE"},
	{ 14,		"GA-PSR UPLINK QUALITY INDICATION"},
	{ 15,		"GA-PSR HANDOVER INFORMATION"},
	{ 16,		"GA-PSR HANDOVER COMMAND"},
	{ 17,		"GA-PSR HANDOVER CONTINUE"},
	{ 18,		"GA-PSR HANDOVER FAILURE"},
	{ 0,	NULL }
};
static value_string_ext uma_urlc_msg_type_vals_ext = VALUE_STRING_EXT_INIT(uma_urlc_msg_type_vals);

/*
 * IE type and identifiers for Unlicensed Radio Resources management
 */
static const value_string uma_urr_IE_type_vals[] = {
	{ 1,		"Mobile Identity"},
	{ 2,		"GAN Release Indicator"},
	{ 3,		"Radio Identity"},
	{ 4,		"GERAN Cell Identity"},
	{ 5,		"Location Area Identification"},
	{ 6,		"GERAN/UTRAN Coverage Indicator"},
	{ 7,		"GAN Classmark"},
	{ 8,		"Geographical Location"},
	{ 9,		"GANC-SEGW IP Address"},
	{ 10,		"GANC-SEGW Fully Qualified Domain/Host Name"},
	{ 11,		"Redirection Counter"},
	{ 12,		"Discovery Reject Cause"},
	{ 13,		"GAN Cell Description"},
	{ 14,		"GAN Control Channel Description"},
	{ 15,		"Cell Identifier List"},
	{ 16,		"TU3907 Timer"},
	{ 17,		"GSM RR/UTRAN RRC State"},
	{ 18,		"Routing Area Identification"},
	{ 19,		"GAN Band"},
	{ 20,		"GA-RC/GA-CSR/GA-PSR State"},
	{ 21,		"Register Reject Cause"},
	{ 22,		"TU3906 Timer"},
	{ 23,		"TU3910 Timer"},
	{ 24,		"TU3902 Timer"},
	{ 25,		"Communication Port Identity"},
	{ 26,		"L3 Message"},
	{ 27,		"Channel Mode"},
	{ 28,		"Mobile Station Classmark 2"},
	{ 29,		"RR Cause"},
	{ 30,		"Cipher Mode Setting"},
	{ 31,		"GPRS Resumption"},
	{ 32,		"Handover From GAN Command"},
	{ 33,		"UL Quality Indication"},
	{ 34,		"TLLI"},
	{ 35,		"Packet Flow Identifier"},
	{ 36,		"Suspension Cause"},
	{ 37,		"TU3920 Timer"},
	{ 38,		"QoS"},
	{ 39,		"GA-PSR Cause"},
	{ 40,		"User Data Rate"},
	{ 41,		"Routing Area Code"},
	{ 42,		"AP Location"},
	{ 43,		"TU4001 Timer"},
	{ 44,		"Location Status"},
	{ 45,		"Cipher Response"},
	{ 46,		"Ciphering Command RAND"},
	{ 47,		"Ciphering Command MAC"},
	{ 48,		"Ciphering Key Sequence Number"},
	{ 49,		"SAPI ID"},
	{ 50,		"Establishment Cause"},
	{ 51,		"Channel Needed"},
	{ 52,		"PDU in Error"},
	{ 53,		"Sample Size"},
	{ 54,		"Payload Type"},
	{ 55,		"Multi-rate Configuration"},
	{ 56,		"Mobile Station Classmark 3"},
	{ 57,		"LLC-PDU"},
	{ 58,		"Location Black List indicator"},
	{ 59,		"Reset Indicator"},
	{ 60,		"TU4003 Timer"},
	{ 61,		"AP Service Name"},
	{ 62,		"GAN Service Zone Information"},
	{ 63,		"RTP Redundancy Configuration"},
	{ 64,		"UTRAN Classmark"},
	{ 65,		"Classmark Enquiry Mask"},
	{ 66,		"UTRAN Cell Identifier List"},
	{ 67,		"Serving UNC table indicator"},
	{ 68,		"Registration indicators"},
	{ 69,		"GAN PLMN List"},
	{ 70,		"Received Signal Level List"},
	{ 71,		"Required GAN Services"},
	{ 72,		"Broadcast Container"},
	{ 73,		"3G Cell Identity"},
	{ 74,		"3G Security Capability"},			/* 11.2.108 */
	{ 75,		"NAS Synchronisation Indicator"},		/* 11.2.109 */
	{ 76,		"GANC TEID"},					/* 11.2.110 */
	{ 77,		"MS TEID"},					/* 11.2.110 */
	{ 78,		"UTRAN RRC Message"},				/* 11.2.111 */
	{ 79,		"GAN Mode Indicator"},				/* 11.2.79 */
	{ 80,		"CN Domain Identity"},				/* 11.2.80 */
	{ 81,		"GAN Iu Mode Cell Description"},		/* 11.2.81 */
	{ 82,		"3G UARFCN"},					/* 11.2.82 */
	{ 83,		"RAB ID"},					/* 11.2.83 */
	{ 84,		"RAB ID List"},					/* 11.2.84 */
	{ 85,		"GA-RRC Establishment Cause"},			/* 11.2.85 */
	{ 86,		"GA-RRC Cause"},				/* 11.2.86 */
	{ 87,		"GA-RRC Paging Cause"},				/* 11.2.87 */
	{ 88,		"Intra Domain NAS Node Selector"},		/* 11.2.88 */
	{ 89,		"CTC Activation List"},				/* 11.2.89 */
	{ 90,		"CTC Description"},				/* 11.2.90 */
	{ 91,		"CTC Activation Ack List"},			/* 11.2.91 */
	{ 92,		"CTC Activation Ack Description"},		/* 11.2.92 */
	{ 93,		"CTC Modification List"},			/* 11.2.93 */
	{ 94,		"CTC Modification Ack List"},			/* 11.2.94 */
	{ 95,		"CTC Modification Ack Description"},		/* 11.2.95 */
	{ 96,		"MS Radio Identity"},
	{ 97,		"GANC IP Address"},
	{ 98,		"GANC Fully Qualified Domain/Host Name"},
	{ 99,		"IP address for GPRS user data transport"},
	{ 100,		"UDP Port for GPRS user data transport"},
	{ 101,		"Unknown"},
	{ 102,		"Unknown"},
	{ 103,		"GANC TCP port"},
	{ 104,		"RTP UDP port"},
	{ 105,		"RTCP UDP port"},
	{ 106,		"GERAN Received Signal Level List"},
	{ 107,		"UTRAN Received Signal Level List"},
	{ 108,		"PS Handover to GERAN Command"},		/* 11.2.74 */
	{ 109,		"PS Handover to UTRAN Command"},		/* 11.2.75 */
	{ 110,		"PS Handover to GERAN PSI"},			/* 11.2.76 */
	{ 111,		"PS Handover to GERAN SI"},			/* 11.2.77 */
	{ 112,		"TU4004 Timer"},				/* 11.2.78 */
	{ 113,		"Unknown"},
	{ 114,		"Unknown"},
	{ 115,		"PTC Activation List"},				/* 11.2.96 */
	{ 116,		"PTC Description"},				/* 11.2.97 */
	{ 117,		"PTC Activation Ack List"},			/* 11.2.98 */
	{ 118,		"PTC Activation Ack Description"},		/* 11.2.99 */
	{ 119,		"PTC Modification List"},			/* 11.2.100 */
	{ 120,		"PTC Modification Ack List"},			/* 11.2.101 */
	{ 121,		"PTC Modification Ack Description"},		/* 11.2.102 */
	{ 122,		"RAB Configuration"},				/* 11.2.103 */
	{ 123,		"Multi-rate Configuration 2"},			/* 11.2.104 */
	{ 124,		"Selected Integrity Protection Algorithm"},	/* 11.2.105 */
	{ 125,		"Selected Encryption Algorithm"},		/* 11.2.106 */
	{ 126,		"CN Domains to Handover"},			/* 11.2.107 */
	{ 127,		"SRNS Relocation Info"},			/* 11.2.107 */
	{ 128,		"MS Radio Access Capability"},			/* 11.2.107 */
	{ 129,		"Handover Reporting Control"},			/* 11.2.107 */
	{ 0,	NULL }
};
static value_string_ext uma_urr_IE_type_vals_ext = VALUE_STRING_EXT_INIT(uma_urr_IE_type_vals);

static const value_string uma_urr_gan_rel_ind_vals[] = {
	{ 1,		"Release 1 (i.e. 3GPP Release-6)"},
	{ 2,		"Release 2 (i.e. 3GPP Release-7)"},
	{ 3,		"Release 3 (i.e. 3GPP Release-8)"},
	{ 0,	NULL }
};

static const value_string radio_type_of_id_vals[] = {
	{ 0,		"IEEE MAC-address format"},
	{ 0,	NULL }
};

/* GCI, GSM Coverage Indicator (octet 3) */
static const value_string uma_gci_vals[] = {
	{ 0,		"Normal Service in the GERAN"},
	{ 1,		"Limited Service in the GERAN"},
	{ 2,		"MS has not found GSM coverage (LAI information taken from SIM, if available)"},
	{ 3,		"MS has found GSM coverage, service state unknown"},
	{ 0,	NULL }
};
/* TURA, Type of Unlicensed Radio (octet 3) */
static const value_string uma_tura_vals[] = {
	{ 0,		"No radio"},
	{ 1,		"Bluetooth"},
	{ 2,		"WLAN 802.11"},
	{ 15,		"Unspecified"},
	{ 0,	NULL }
};
/* GC, GERAN Capable (octet 3) */
static const value_string uma_gc_vals[] = {
	{ 0,		"The MS is not GERAN capable."},
	{ 1,		"The MS is GERAN capable."},
	{ 0,	NULL }
};
/* UC, UTRAN Capable (octet 3) */
static const value_string uma_uc_vals[] = {
	{ 0,		"The MS is not UTRAN  capable."},
	{ 1,		"The MS is UTRAN  capable."},
	{ 0,	NULL }
};
/*RRS, RTP Redundancy Support (octet 4)*/
static const value_string uma_rrs_vals[] = {
	{ 0,		"RTP Redundancy not supported"},
	{ 1,		"RTP Redundancy supported"},
	{ 0,	NULL }
};
/*
 * PS HO, PS Handover Capable (octet 4) Bit 2
 */
static const value_string uma_ps_ho_vals[] = {
	{ 0,		"The MS does not support PS handover to/from GAN A/Gb mode"},
	{ 1,		"The MS supports PS handover to/from GAN A/Gb mode"},
	{ 0,	NULL }
};
/*
 * GMSI, GAN Mode Support Indicator (octet 4)v Bits 4 3
 */

static const value_string uma_gmsi_vals[] = {
	{ 0,		"Unspecified"},
	{ 1,		"The MS supports GAN A/Gb mode only"},
	{ 2,		"The MS supports GAN Iu mode only"},
	{ 3,		"The MS supports GAN A/Gb mode and GAN Iu mode"},
	{ 0,	NULL }
};

/*IP address type number value (octet 3)*/
static const value_string IP_address_type_vals[] = {
	{ 0x21,		"IPv4 address"},
	{ 0x57,		"IPv6 address"},
	{ 0,	NULL }
};

/*Discovery Reject Cause (octet 3) */
static const value_string uma_discovery_reject_cause_vals[] = {
	{ 0,		"Network Congestion"},
	{ 1,		"Unspecified"},
	{ 2,		"IMSI not allowed"},
	{ 0,	NULL }
};
/*EC Emergency Call allowed (octet 3)*/
static const value_string EC_vals[] _U_ = {
	{ 0,		"Emergency call allowed in the cell to all MSs"},
	{ 1,		"Emergency call not allowed in the cell except for the MSs that belong to one of the classes between 11 to 15."},
	{ 0,	NULL }
};
/*ECMC, Early Classmark Sending Control (octet 3)*/
static const value_string ECMC_vals[] = {
	{ 0,		"Early Classmark Sending is allowed"},
	{ 1,		"Early Classmark Sending is forbidden"},
	{ 0,	NULL }
};
/*NMO, Network Mode of Operation (octet 3)*/
static const value_string NMO_vals[] = {
	{ 0,		"Network Mode of Operation I"},
	{ 1,		"Network Mode of Operation II"},
	{ 2,		"Network Mode of Operation III"},
	{ 3,		"Reserved"},
	{ 0,	NULL }
};
/*GPRS, GPRS Availability (octet 3)*/
static const value_string GPRS_avail_vals[] = {
	{ 0,		"GPRS available"},
	{ 1,		"GPRS not available"},
	{ 0,	NULL }
};
/*DTM, Dual Transfer Mode of Operation by network (octet 3)*/
static const value_string DTM_vals[] = {
	{ 0,		"Network does not support dual transfer mode"},
	{ 1,		"Network supports dual transfer mode"},
	{ 0,	NULL }
};
/*ATT, Attach-detach allowed (octet 3)*/
static const value_string ATT_vals[] = {
	{ 0,		"MSs in the cell are not allowed to apply IMSI attach and detach procedure."},
	{ 1,		"MSs in the cell shall apply IMSI attach and detach procedure."},
	{ 0,	NULL }
};
/*MSCR, MSC Release (octet 3)*/
static const value_string MSCR_vals[] = {
	{ 0,		"MSC is Release '98 or older"},
	{ 1,		"MSC is Release '99 onwards"},
	{ 0,	NULL }
};

/* SGSNR, SGSN Release (octet 6)*/
static const value_string SGSNR_vals[] = {
	{ 0,		"SGSN is Release '98 or older"},
	{ 1,		"SGSN is Release '99 onwards"},
	{ 0,	NULL }
};
/* ECMP, Emergency Call Mode Preference (octet 6)*/

static const value_string ECMP_vals[] = {
	{ 0,		"GSM GERAN is preferred for Emergency calls"},
	{ 1,		"UMAN is preferred for Emergency calls"},
	{ 0,	NULL }
};
/* RE, Call reestablishment allowed (octet 6) */
static const value_string RE_vals[] = {
	{ 0,		"Call Reestablishment allowed in the cell"},
	{ 1,		"Call Reestablishment not allowed in the cell"},
	{ 0,	NULL }
};
/* PFCFM, PFC_FEATURE_MODE (octet 6) */
static const value_string PFCFM_vals[] = {
	{ 0,		"The network does not support packet flow context procedures"},
	{ 1,		"The network supports packet flow context procedures"},
	{ 0,	NULL }
};

/* 3GECS, 3G Early Classmark Sending Restriction (octet 6) */
static const value_string Three_GECS_vals[] = {
	{ 0,		"UTRAN classmark change message shall be sent with the Early classmark sending"},
	{ 1,		"The sending of UTRAN Classmark Sending messages is controlled by the Early Classmark Sending Control parameter"},
	{ 0,	NULL }
};

/*GRS, GSM RR State (octet 3)*/
static const value_string uma_GRS_GSM_RR_State_vals[] = {
	{ 0,		"GSM RR is in IDLE state"},
	{ 1,		"GSM RR is in DEDICATED state"},
	{ 2,		"UTRAN RRC is in IDLE STATE"},
	{ 3,		"UTRAN RRC is in CELL_DCH STATE"},
	{ 4,		"UTRAN RRC is in CELL_FACH STATE"},
	{ 5,		"UTRAN RRC is in CELL_PCH STATE"},
	{ 6,		"UTRAN RRC is in URA_PCH STATE"},
	{ 7,		"Unknown"},
	{ 0,	NULL }
};
static value_string_ext uma_GRS_GSM_RR_State_vals_ext = VALUE_STRING_EXT_INIT(uma_GRS_GSM_RR_State_vals);

/* UMA Band (4 bit field) */
static const value_string uma_gan_band_vals[] = {
	{ 0,		"E-GSM is supported"},
	{ 1,		"P-GSM is supported"},
	{ 2,		"GSM 1800 is supported"},
	{ 3,		"GSM 450 is supported"},
	{ 4,		"GSM 480 is supported"},
	{ 5,		"GSM 850 is supported"},
	{ 6,		"GSM 1900 is supported"},
	{ 7,		"GSM 700 is supported"},
	{ 0,	NULL }
};
static value_string_ext uma_gan_band_vals_ext = VALUE_STRING_EXT_INIT(uma_gan_band_vals);

/*URS, URR State (octet 3) */
static const value_string URR_state_vals[] = {
	{ 0,		"GA-CSR is in GA-CSR-IDLE state"},
	{ 1,		"GA-CSR is in GA-CSR-DEDICATED state"},
	{ 2,		"GA-RC is in GA-RC-REGISTERED state while in GERAN/UTRAN mode"},
	{ 0,	NULL }
};
/*
UPS, GA-PSR State (octet 3)
Bit
3
0 GA-PSR is in GA-PSR-STANDBY state.
1 GA-PSR is in GA-PSR-ACTIVE state.
GA-RRC-CS, GA-RRC (CS) State (octet 3)
Bit
4
0 GA-RRC (CS) is in GA-RRC-IDLE state.
1 GA-RRC (CS) is in GA-RRC-CONNECTED
state.
GA-RRC-PS, GA-RRC (PS) State (octet 3)
Bit
5
0 GA-RRC (PS) is in GA-RRC-IDLE state.
1 GA-RRC (PS) is in GA-RRC-CONNECTED
state.
*/

/* Register Reject Cause (octet 3) */
static const value_string register_reject_cause_vals[] = {
	{ 0,		"Network Congestion"},
	{ 1,		"AP not allowed"},
	{ 2,		"Location not allowed"},
	{ 3,		"Invalid GANC"},
	{ 4,		"Geo Location not known"},
	{ 5,		"IMSI not allowed"},
	{ 6,		"Unspecified"},
	{ 7,		"GANC-SEGW certificate not valid"},
	{ 8,		"EAP_SIM authentication failed"},
	{ 9,		"TCP establishment failed"},
	{ 10,		"Redirection"},
	{ 11,		"EAP-AKA authentication failed"},
	/* 12 to 255 Reserved for future use. */
	{ 0,	NULL }
};
static value_string_ext register_reject_cause_vals_ext = VALUE_STRING_EXT_INIT(register_reject_cause_vals);

/* L3 Protocol discriminator values according to TS 24 007 (640)  */
#if 0  /** See packet-gms_a-dtap.c **/
static const value_string protocol_discriminator_vals[] = {
	{0x0,		"Group call control"},
	{0x1,		"Broadcast call control"},
	{0x2,		"Reserved: was allocated in earlier phases of the protocol"},
	{0x3,		"Call Control; call related SS messages"},
	{0x4,		"GPRS Transparent Transport Protocol (GTTP)"},
	{0x5,		"Mobility Management messages"},
	{0x6,		"Radio Resources Management messages"},
	{0x7,		"Unknown"},
	{0x8,		"GPRS mobility management messages"},
	{0x9,		"SMS messages"},
	{0xa,		"GPRS session management messages"},
	{0xb,		"Non call related SS messages"},
	{0xc,		"Location services specified in 3GPP TS 44.071 [8a]"},
	{0xd,		"Unknown"},
	{0xe,		"Reserved for extension of the PD to one octet length "},
	{0xf,		"Reserved for tests procedures described in 3GPP TS 44.014 [5a] and 3GPP TS 34.109 [17a]."},
	{ 0,	NULL }
};
#endif

/*  GPRS Resumption */
static const value_string GPRS_resumption_vals[] = {
	{ 0,		"Resumption of GPRS services not successfully acknowledged"},
	{ 1,		"Resumption of GPRS services successfully acknowledged"},
	{ 0,	NULL }
};

/* ULQI, UL Quality Indication (octet 3) */
static const value_string uma_ulqi_vals[] = {
	{ 0,		"Quality ok"},
	{ 1,		"Radio problem"},
	{ 2,		"Network problem"},
	{ 4,		"Undetermined problem"},
	{ 0,	NULL }
};

static const value_string radio_pri_vals[] = {
	{ 0,		"Radio priority 1"},
	{ 1,		"Radio priority 2"},
	{ 2,		"Radio priority 3"},
	{ 3,		"Radio priority 4"},
	{ 0,	NULL }
};

static const value_string rlc_mode_vals[] = {
	{ 0,		"RLC acknowledged mode"},
	{ 1,		"RLC unacknowledged mode"},
	{ 0,	NULL }
};

/*URLC Cause (octet 3) */
static const value_string uma_ga_psr_cause_vals[] = {
	{ 0,		"success"},
	{ 1,		"future use"},
	{ 2,		"no available resources"},
	{ 3,		"GANC failure"},
	{ 4,		"not authorized for data service"},
	{ 5,		"message type non existent or not implemented"},
	{ 6,		"message type not compatible with the protocol state"},
	{ 7,		"invalid mandatory information"},
	{ 8,		"syntactically incorrect message"},
	{ 9,		"GPRS suspended"},
	{ 10,		"normal deactivation"},
	{ 11,		"future use"},
	{ 12,		"conditional IE error"},
	{ 13,		"semantically incorrect message"},
	{ 14,		"PS handover failure - incorrect handover command"},
	{ 15,		"PS handover failure - target RAT access failure"},
	{ 16,		"PS handover failure - missing SI/PSI information"},
	{ 17,		"PS handover failure - no uplink TBF allocation"},
	{ 0,	NULL }
};
static value_string_ext uma_ga_psr_cause_vals_ext = VALUE_STRING_EXT_INIT(uma_ga_psr_cause_vals);

/* LS, Location Status (octet 3) */
static const value_string LS_vals[] = {
	{ 0,		"MS location known"},
	{ 1,		"MS location unknown"},
	{ 0,	NULL }
};

/* CR Cipher Response (octet 1) */
static const value_string CR_vals[] = {
	{ 0,		"IMEISV shall not be included"},
	{ 1,		"IMEISV shall be included"},
	{ 0,	NULL }
};

/* SAPI ID, SAPI Identifier (octet 3) */
static const value_string sapi_id_vals[] = {
	{ 0,		"SAPI 0 (all other except SMS)"},
	{ 3,		"SAPI 3 (SMS)"},
	{ 0,	NULL }
};
/*	Sample Size (octet 3)*/
static const value_string sample_size_vals[] = {
	{ 20,		"20 ms of CS payload included in each RTP/UDP packet"},
	{ 40,		"40 ms of CS payload included in each RTP/UDP packet"},
	{ 60,		"60 ms of CS payload included in each RTP/UDP packet"},
	{ 80,		"80 ms of CS payload included in each RTP/UDP packet"},
	{ 0,	NULL }
};


/* MPS, Manual PLMN Selection indicator (octet 3) */
static const value_string mps_vals[] = {
	{ 0,		"The MS is in Automatic PLMN selection mode."},
	{ 1,		"The MS is in Manual PLMN selection mode and request the list of PLMN identities that may provide UMAN service in the current location."},
	{ 2,		"The MS is in Manual PLMN selection mode and tries to register; no PLMN list is needed."},
	{ 0,	NULL }
};

/* CBS Cell Broadcast Service (octet 3) */
static const value_string cbs_vals[] = {
	{ 0,		"CBS is not required by the Mobile station"},
	{ 1,		"CBS is required by the mobile station"},
	{ 0,	NULL }
};

/* LBLI, Location Black List indicator (octet 3) */
static const value_string LBLI_vals[] = {
	{ 0,		"MCC"},
	{ 1,		"MCC and MNC"},
	{ 2,		"MCC, MNC and LAC"},
	{ 0,	NULL }
};
/* AP Service Name type */
static const value_string ap_service_name_type_vals[] = {
	{ 0,		"SSID"},
	{ 1,		"PAN Service Name"},
	{ 0,	NULL }
};

/* UMA Service Zone Icon Indicator, octet 3 */
static const value_string uma_service_zone_icon_ind_vals[] = {
	{ 1,		"Unlimited Calls"},
	{ 0,	NULL }
};
/*Establishment Cause (octet 3)*/
static const value_string uma_establishment_cause_val[] = {
	{ 0x00,		"Location Update"},
	{ 0x10,		"Other SDCCH procedures including IMSI Detach, SMS, SS, paging response"},
/* note: Paging response for SDCCH needed is using codepoint  0001 0000 */
	{ 0x20,		"Paging response (TCH/F needed)"},
	{ 0x30,		"Paging response (TCH/F or TCH/H needed)"},
	{ 0x40,		"Originating speech call from dual-rate mobile station when TCH/H is sufficient"},
	{ 0x50,		"Originating data call from dual-rate mobile station when TCH/H is sufficient"},
	{ 0x80,		"Paging response (any channel needed)"},
	{ 0xa0,		"Emergency"},
	{ 0xc0,		"Call re-establishment"},
	{ 0xe0,		"Originating speech call and TCH/F is needed"},
	{ 0xf0,		"Originating data call and TCH/F is needed"},
	{ 0,	NULL }
};
static value_string_ext uma_establishment_cause_val_ext = VALUE_STRING_EXT_INIT(uma_establishment_cause_val);

/*CHANNEL (octet 3) */
static const value_string channel_vals[] = {
	{ 0,		"Any channel"},
	{ 1,		"SDCCH"},
	{ 2,		"TCH/F (Full rate)"},
	{ 3,		"TCH/H or TCH/F (Dual rate)"},
	{ 0,	NULL }
};

/*RI, Reset Indicator (octet 3)*/
/*CHANNEL (octet 3) */
static const value_string RI_vals[] = {
	{ 0,		"The flow control condition continues to exist"},
	{ 1,		"The flow control condition no longer exists"},
	{ 0,	NULL }
};

/* Window Size (octet 3 to octet n) */

static const value_string window_size_vals[] = {
	{ 0,		"Window size 1, No redundancy"},
	{ 1,		"Window size 2 (single redundancy)"},
	{ 2,		"Window size 3 (double redundancy)"},
	{ 0,	NULL }
};

static const value_string UTRAN_cell_id_disc_vals[] = {
	{ 0,		"PLMN-ID, LAC and a 28-bit Cell Id are used to identify the target UTRAN cell."},
	{ 0,	NULL }
};

/* SUTI, Serving UNC table indicator indicator (octet 3) */

static const value_string suti_vals[] = {
	{ 0,		"The MS is not allowed to store information in the stored Serving UNC table."},
	{ 1,		"The MS is allowed to store information in the stored Serving UNC table."},
	{ 0,	NULL }
};
	/* Code to actually dissect the packets */

static int
dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
	tvbuff_t	*l3_tvb;
	tvbuff_t	*llc_tvb;
	tvbuff_t	*new_tvb;
	int		ie_offset;
	guint8		ie_value;
	guint16		ie_len = 0;
	guint8		octet;
	proto_item	*urr_ie_item;
	proto_tree	*urr_ie_tree;
	const guint8	*string;
	guint16		GPRS_user_data_transport_UDP_port,UNC_tcp_port,RTP_UDP_port,RTCP_UDP_port;
	guint32		udr;
	conversation_t *conversation;
	address 	dst_addr, null_addr;
	guint8		str_len;
	address		src_addr;

	ie_value = tvb_get_guint8(tvb,offset);
	urr_ie_tree = proto_tree_add_subtree(tree,tvb,offset,-1, ett_urr_ie, &urr_ie_item,
		val_to_str_ext(ie_value, &uma_urr_IE_type_vals_ext, "Unknown IE (%u)"));

	proto_tree_add_item(urr_ie_tree, hf_uma_urr_IE, tvb, offset, 1, ENC_BIG_ENDIAN);
	offset++;
	/* Some IE:s might have a length field of 2 octets */
	ie_len = tvb_get_guint8(tvb,offset);
	if ( (ie_len & 0x80) == 0x80 ){
		offset++;
		ie_len = (ie_len & 0x7f) << 8;
		ie_len = ie_len | (tvb_get_guint8(tvb,offset));
		proto_item_set_len(urr_ie_item, ie_len + 3);
		proto_tree_add_uint(urr_ie_tree, hf_uma_urr_IE_len , tvb, offset-1, 2, ie_len );
		ie_offset = offset +1;
	}else{
		proto_item_set_len(urr_ie_item, ie_len + 2);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_IE_len, tvb, offset, 1, ENC_BIG_ENDIAN);
		ie_offset = offset +1;
	}

	switch(ie_value){
	/* 11.2.1 Mobile Identity */
	case 1:
	/* Mobile Identity
	 * The rest of the IE is coded as in [TS 24.008] not including IEI and
	 * length, if present.(10.5.1.4)
	 */
		de_mid(tvb, urr_ie_tree, pinfo, ie_offset, ie_len, NULL, 0);
		break;

	case 2:
		/* UMA Release Indicator */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_uri, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 3:			/* Radio Identity */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_radio_type_of_id, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		octet = tvb_get_guint8(tvb,ie_offset);
		if (( octet & 0xf) == 0){ /* IEEE MAC-address format */
			ie_offset++;
			proto_tree_add_item(urr_ie_tree, hf_uma_urr_radio_id, tvb, ie_offset, ie_len-1, ENC_NA);
		}else{
			proto_tree_add_expert(urr_ie_tree, pinfo, &ei_uma_unknown_format, tvb, ie_offset, ie_len);
		}
		break;
	case 4:
		/* Cell Identity
		 * The rest of the IE is coded as in [TS 24.008] not including IEI and length, if present.
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_cell_id, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
		break;
	case 5:
		/* Location Area Identification
		 * The rest of the IE is coded as in [TS 24.008] not including IEI and
		 * length, if present.
		 */
		de_lai(tvb, urr_ie_tree, pinfo, ie_offset, ie_len, NULL, 0);
		break;
	case 6:
		/* GSM Coverage Indicator */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_gci, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 7:
		/* 11.2.7 GAN Classmark */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_tura, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_gc, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_uc, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		/* UMA Protocols (Stage 3) R1.0.3 */
		if(ie_len>1){
			ie_offset++;
			proto_tree_add_item(urr_ie_tree, hf_uma_urr_gmsi, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
			proto_tree_add_item(urr_ie_tree, hf_uma_urr_psho, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
			proto_tree_add_item(urr_ie_tree, hf_uma_urr_rrs, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		}
		break;
	case 8:
		/* Geographical Location
		 * The Location Estimate field is composed of 1 or more octets with an internal structure
		 * according to section 7 in [23.032].
		 */
		new_tvb = tvb_new_subset_length(tvb, ie_offset, ie_len );
		dissect_geographical_description(new_tvb, pinfo, urr_ie_tree);
		break;
	case 9:
		/* UNC SGW IP Address
		 * IP Address type
		 */
		octet = tvb_get_guint8(tvb,ie_offset);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_IP_Address_type, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		ie_offset++;
		if ( octet == 0x57 ){ /* IPv6 */

		}else{ /* All other values shall be interpreted as Ipv4 address in this version of the protocol.*/
			proto_tree_add_item(urr_ie_tree, hf_uma_urr_sgw_ipv4, tvb, ie_offset, 4, ENC_BIG_ENDIAN);

		}
		break;
	case 10:		/* UNC SGW Fully Qualified Domain/Host Name */
		if ( ie_len > 0){
			proto_tree_add_item(urr_ie_tree, hf_uma_urr_FQDN, tvb, ie_offset, ie_len, ENC_ASCII);
		}else{
			proto_tree_add_expert(urr_ie_tree, pinfo, &ei_uma_fqdn_not_present, tvb, offset, 1);
		}
		break;
	case 11:		/* Redirection Counter */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_redirection_counter, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 12:		/* 11.2.12 Discovery Reject Cause */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_dis_rej_cau, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 13:
		/* 11.2.13 GAN Cell Description
		 * The rest of the IE is coded as in [TS 44.018], Cell Description IE, not including IEI and length, if present
		 */
		de_rr_cell_dsc(tvb, urr_ie_tree, pinfo, ie_offset, ie_len, NULL, 0);
		break;
	case 14:
		/*
		 * 11.2.14 GAN Control Channel Description
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_ECMC, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_NMO, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_GPRS, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_DTM, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_ATT, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_MSCR, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		/* T3212 timeout value */
		ie_offset++;
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_T3212_timer, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		/* RAC, Routing Area Code (octet 5) */
		ie_offset++;
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_RAC, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		ie_offset++;
		/* SGSNR, SGSN Release (octet 6) B1*/
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_SGSNR, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_ECMP, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_RE, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_PFCFM, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_3GECS, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		/* PS HO, PS Handover indicator (octet 6) Bit 6 */

		ie_offset++;
		proto_tree_add_item(urr_ie_tree, hf_uma_access_control_class_n, tvb, ie_offset, 2, ENC_NA);
		/* These fields are specified and described in 3GPP TS 44.018 and 3GPP TS 22.011. */
		break;
	case 15:
		/* 11.2.15 Cell Identifier List
		 * The rest of the IE is coded as in [TS 48.008], not including IEI and length, if present
		 */
		be_cell_id_list(tvb, urr_ie_tree, pinfo, ie_offset, ie_len, NULL, 0);
		break;
	case 16:		/* TU3907 Timer */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3907_timer, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
		break;
	case 17:		/* 11.2.17 GSM RR/UTRAN RRC State */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_GSM_RR_state, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 18:		/* 11.2.18 Routing Area Identification */
		/* The rest of the IE is coded as in [TS 24.008] not including IEI and length, if present.*/
		de_gmm_rai(tvb, urr_ie_tree, pinfo, ie_offset, ie_len, NULL, 0);
		break;
	case 19:		/* 11.2.19 GAN Band */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_gan_band, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 20:		/* 11.2.20 GAN State */
		/* URS, GA-RC/GA-CSR State (octet 3) Bits 2-1 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_URR_state, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		/* UPS, GA-PSR State (octet 3) Bit 3 */
		/* GA-RRC-CS, GA-RRC (CS) State (octet 3) Bit 4 */
		/* GA-RRC-PS, GA-RRC (PS) State (octet 3) Bit 5 */
		break;
	case 21:		/* 11.2.21 Register Reject Cause */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_register_reject_cause, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 22:		/* 11.2.22 TU3906 Timer */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3906_timer, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
		break;
	case 23:		/* 11.2.23 TU3910 Timer */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3910_timer, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
		break;
	case 24:		/* 11.2.24 TU3902 Timer */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3902_timer, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
		break;
	case 25:
		/* 11.2.25 Communication Port Identity */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_communication_port, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
		break;

	case 26:
		/* 11.2.26 L3 Message
		 * The L3 Message information element contains the upper layer message to be transported
		 * using the GA-CSR protocol or the GA-RRC protocol between the MS and the core network.
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_protocol_discriminator, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_Message, tvb, ie_offset, ie_len, ENC_NA);
		l3_tvb = tvb_new_subset_length(tvb, ie_offset, ie_len );
		if (!dissector_try_uint(bssap_pdu_type_table,BSSAP_PDU_TYPE_DTAP, l3_tvb, pinfo, urr_ie_tree))
			call_data_dissector(l3_tvb, pinfo, urr_ie_tree);
		break;
	case 27:
		/* 11.2.27 Channel Mode
		 * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present
		 */
		de_rr_ch_mode(tvb, urr_ie_tree, pinfo, ie_offset, ie_len, NULL, 0);
		break;
	case 28:
		/* 11.2.28 Mobile Station Classmark 2
		 * The rest of the IE is coded as in [TS 24.008], not including IEI and length, if present
		 */
		de_ms_cm_2(tvb, urr_ie_tree, pinfo, ie_offset, ie_len, NULL, 0);
		break;
	case 29:
		/* 11.2.29 RR Cause
		 * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present
		 */
		de_rr_cause(tvb, urr_ie_tree, pinfo, ie_offset, 1, NULL, 0);
		break;
	case 30:
		/* 11.2.30 Cipher Mode Setting
		 * Note: The coding of fields SC and algorithm identifier is defined in [44.018]
		 * as part of the Cipher Mode Setting IE.
		 */
		de_rr_cip_mode_set(tvb, urr_ie_tree, pinfo, ie_offset, ie_len, NULL, 0);
		break;
	case 31:
		/* 11.2.31 GPRS Resumption
		 * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_GPRS_resumption, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 32:
		/* 11.2.32 Handover From GAN Command
		 * If the target RAT is GERAN, the rest of the IE is coded as HANDOVER COMMAND message in [TS 44.018]
		 * If the target RAT is UTRAN, the rest of the IE is coded as
		 * HANDOVER TO UTRAN COMMAND message in [TS 25.331].
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_protocol_discriminator, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_Message, tvb, ie_offset, ie_len, ENC_NA);
		/* XXX the dissector to call should depend on the RAT type ??? */
		l3_tvb = tvb_new_subset_length(tvb, ie_offset, ie_len );
		if (!dissector_try_uint(bssap_pdu_type_table,BSSAP_PDU_TYPE_DTAP, l3_tvb, pinfo, urr_ie_tree))
			call_data_dissector(l3_tvb, pinfo, urr_ie_tree);
		break;
	case 33:
		/* 11.2.33 UL Quality Indication */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_ULQI, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 34:
		/* 11.2.34 TLLI
		 * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present.
		 * [TS 44.018]:10.5.2.41a
		 * The TLLI is encoded as a binary number with a length of 4 octets. TLLI is defined in 3GPP TS 23.003
		 */
		de_rr_tlli(tvb, urr_ie_tree, pinfo, ie_offset, ie_len, NULL, 0);
		break;
	case 35:
		/* 11.2.35 Packet Flow Identifier
		 * The rest of the IE is coded as in [TS 24.008], not including IEI and length, if present.
		 */
		de_sm_pflow_id(tvb, urr_ie_tree, pinfo, ie_offset, ie_len, NULL, 0);
		break;
	case 36:
		/* 11.2.36 Suspension Cause
		 * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present.
		 */
		de_rr_sus_cau(tvb, urr_ie_tree, pinfo, ie_offset, ie_len, NULL, 0);
		break;
	case 37:		/* 11.2.37 TU3920 Timer */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU3920_timer, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
		break;
		/* 11.2.38 QoS */
	case 38:
		/* QoS
		 * PEAK_THROUGHPUT_CLASS (octet 3, bits 1-4)
		 * This field is coded as PEAK_THROUGHPUT_CLASS field in
		 * the Channel Request Description information
		 * element specified in [TS 44.060]
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_peak_tpt_cls, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		/* RADIO_PRIORITY (octet 3, bits 5-6) */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_radio_pri, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		/* RLC_MODE (octet 3, bit 7) */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_rlc_mode, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		/* PEAK_THROUGHPUT_CLASS (octet 3, bits 1-4)*/
		break;
	case 39:		/* 11.2.39 GA-PSR Cause */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_ga_psr_cause, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 40:		/* 11.2.40 User Data Rate */
		/* The R field is the binary encoding of the rate information expressed in 100 bits/sec
		 * increments, starting from 0 x 100 bits/sec until 16777215 x 100 bits/sec (1.6 Gbps).
		 */
		udr = tvb_get_ntoh24(tvb, ie_offset) * 100;
		proto_tree_add_uint(urr_ie_tree, hf_uma_urr_udr , tvb, ie_offset, 3, udr );
		break;
	case 41:
		/* 11.2.41 Routing Area Code
		 * The rest of the IE is coded as in [TS 23.003] not including IEI and length, if present.
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_RAC, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 42:
		/* 11.2.42 AP Location
		 * The rest of the IE is coded as in [GEOPRIV], not including IEI and length, if present
		 * https://tools.ietf.org/html/draft-ietf-geopriv-dhcp-civil-05
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_ap_location, tvb, ie_offset, ie_len, ENC_NA);
		break;
	case 43:		/* 11.2.43 TU4001 Timer */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU4001_timer, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
		break;
	case 44:		/* 11.2.44 Location Status */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_LS, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 45:		/* Cipher Response */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_cipher_res, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 46:		/* Ciphering Command RAND */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_rand_val, tvb, ie_offset, ie_len, ENC_NA);
		break;
	case 47:		/* Ciphering Command MAC (Message Authentication Code)*/
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_ciphering_command_mac, tvb, ie_offset, ie_len, ENC_NA);
		break;
	case 48:		/* Ciphering Key Sequence Number */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_ciphering_key_seq_num, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 49:		/* SAPI ID */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_sapi_id, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 50:		/* 11.2.50 Establishment Cause */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_establishment_cause, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 51:		/* Channel Needed */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_channel, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 52:		/* PDU in Error */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_PDU_in_error, tvb, ie_offset, ie_len, ENC_NA);
		break;
	case 53:
		/* Sample Size
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_sample_size, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 54:
		/* 11.2.54 Payload Type
		 * Payload Type (octet 3) Allowed values are between 96 and 127.
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_payload_type, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	/* 11.2.55 Multirate Configuration */
	case 55:
		/* Multi-rate Configuration
		 * The rest of the IE is coded as in [TS 44.018], not including IEI and length, if present
		 */
		de_rr_multirate_conf(tvb, urr_ie_tree, pinfo, ie_offset, ie_len, NULL, 0);
		break;
	case 56:
		/* 11.2.56 Mobile Station Classmark 3
		 * The rest of the IE is coded as in [TS 24.008], not including IEI and length, if present
		 */
		de_ms_cm_3(tvb, urr_ie_tree, pinfo, offset, ie_len, NULL, 0);
		break;
	case 57:
		/* 11.2.57 LLC-PDU
		 * The rest of the IE is coded as in [TS 48.018], not including IEI and length, if present
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_LLC_PDU, tvb, ie_offset, ie_len, ENC_NA);
		llc_tvb = tvb_new_subset_length(tvb, ie_offset, ie_len );
		if (llc_handle) {
			col_append_str(pinfo->cinfo, COL_PROTOCOL, "/");
			col_set_fence(pinfo->cinfo, COL_PROTOCOL);
			call_dissector(llc_handle, llc_tvb, pinfo, urr_ie_tree);
		}else{
			call_data_dissector(llc_tvb, pinfo, urr_ie_tree);
		}
		break;
	case 58:		/* 11.2.58 Location Black List indicator */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_LBLI, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 59:		/* 11.2.59 Reset Indicator */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_RI, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 60:		/* TU4003 Timer */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_TU4003_timer, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
		break;
	case 61:
		/* AP Service Name */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_ap_service_name_type, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		ie_offset++;
		/* AP Service Name value (octet 4 to octet n)
		 * The AP Service Name is coded as a string according to UTF-8 format defined in RFC
		 * 3629 [50]. This means that the 1st octet of the UTF-8 string is coded in octet 4 and the
		 * last octet of the UTF-8 string is coded in the last octet of this IE (octet n).
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_ap_Service_name_value, tvb, ie_offset, ie_len -1, ENC_ASCII);
		break;
	case 62:
		/* 11.2.62 GAN Service Zone Information
		 * UMA Service Zone Icon Indicator, octet 3
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_service_zone_icon_ind, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		ie_offset++;
		/* Length of UMA Service Zone string */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_service_zone_str_len, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		str_len = tvb_get_guint8(tvb,ie_offset);
		ie_offset++;
		/* UMA Service Zone string, 1st character */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_service_zone_str, tvb, ie_offset, str_len, ENC_ASCII);
		break;
	/* 11.2.63 RTP Redundancy Configuration */
	case 63:
		/* RTP Redundancy Configuration */
		/* For each mode of the AMR Active Mode Set, as signaled in the Multi-rate Configuration IE, the window size for
		 * including redundant frames is indicated. So if e.g. the Active Mode Set contains four active modes, then the
		 * Redundancy Configuration IE consists of six octets, of which four indicate the Codec Mode to Window Size mapping.
		 */
		/* XXX TODO: loop ower the octets */
		/* Window Size (octet 3 to octet n) Bits 2 1 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_window_size, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		/* GAN A/Gb Mode Codec Mode (octet 3 to octet n) Bits 8 7
		 * The GAN A/Gb Mode Codec Mode is coded as in [47] sub-clause 3.4.1
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_codec_mode, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		/* GAN Iu Mode Codec Mode (octet 3 to octet n) Bits 6 5 4 3 */
		break;
	case 64:
		/* 11.2.64 UTRAN Classmark
		 * The rest of the IE is the INTER RAT HANDOVER INFO coded as in
		 * [TS 25.331], not including IEI and length, if present
		 */
		new_tvb = tvb_new_subset_length(tvb, ie_offset, ie_len );
		dissect_rrc_InterRATHandoverInfo_PDU(new_tvb, pinfo, urr_ie_tree, NULL);
		break;
	case 65:
		/* 11.2.65 Classmark Enquiry Mask
		 * The rest of the IE is the Classmark Enquiry Mask coded as in [TS 44.018], not including IEI and length, if present
		 */
		de_rr_cm_enq_mask(tvb, urr_ie_tree, pinfo, offset, ie_len, NULL, 0);
		break;
	case 66:
		/* 11.2.66 UTRAN Cell Identifier List
		 * UTRAN Cell Identification Discriminator
		 */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_UTRAN_cell_id_disc, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		octet = tvb_get_guint8(tvb,ie_offset);
		ie_offset++;
		if ( octet == 0 ){
			ie_offset = dissect_e212_mcc_mnc(tvb, pinfo, urr_ie_tree, ie_offset, E212_NONE, TRUE);
			proto_tree_add_item(urr_ie_tree, hf_uma_urr_lac, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
			/*ie_offset = ie_offset + 2;*/
			/* The octets 9-12 are coded as shown in 3GPP TS 25.331, Table 'Cell identity'.
			 * 10.3.2.2 Cell identity
			 * This information element identifies a cell unambiguously within a PLMN.
			 * NOTE: This information element may carry any implementation dependent identity that unambiguously identifies a
			 * cell within a PLMN.
			 * Cell identity - bit string(28)
			 */
		}
		break;
	case 67:
		/* 11.2.67 Serving GANC table indicator */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_suti, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 68:
		/* 11.2.68 Registration indicators */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_uma_mps, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 69:
		/* 11.2.69 GAN PLMN List */
		octet = tvb_get_guint8(tvb,ie_offset);
		proto_tree_add_uint(urr_ie_tree, hf_uma_urr_num_of_plms , tvb, ie_offset, 1, octet);
		/* TODO insert while loop here */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_lac, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
		break;
	case 70:
		/* 11.2.70 GERAN Received Signal Level List */
		while(ie_offset<=(offset + ie_len)){
			proto_tree_add_item(urr_ie_tree, hf_uma_urr_RXLEV_NCELL, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
			ie_offset++;
		}
		break;
	case 71:
		/* 11.2.71 Required GAN Services */
		/* CBS Cell Broadcast Service (octet 3) */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_cbs, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		break;
	case 72:
		/* 11.2.72 Broadcast Container */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_num_of_cbs_frms , tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		/* The coding of the page of the CBS message is defined in sub-clause 9.4.1 in TS 23.041. */
		proto_tree_add_expert(urr_ie_tree, pinfo, &ei_uma_cbs_frames, tvb, ie_offset + 1, ie_len-1);
		break;
	case 73:
		/* 11.2.73 3G Cell Identity */
		/* The rest of the IE is coded as in [TS 25.331] not including IEI and length, if present.
		 * See Annex F for coding
		 */
		break;
	case 79:
		/* 11.2.79 GAN Mode Indicator */
	case 80:
		/* 11.2.80 CN Domain Identity */
	case 81:
		/* 11.2.81 GAN Iu Mode Cell Description */
	case 82:
		/* 11.2.82 3G UARFCN */
	case 83:
		/* 11.2.83 RAB ID */
	case 84:
		/* 11.2.84 RAB ID List */
	case 85:
		/* 11.2.85 GA-RRC Establishment Cause */
	case 86:
		/* 11.2.86 GA-RRC Cause */
	case 87:
		/* 11.2.87 GA-RRC Paging Cause */
	case 88:
		/* 11.2.88 Intra Domain NAS Node Selector */
	case 89:
		/* 11.2.89 CTC Activation List */
	case 90:
		/* 11.2.90 CTC Description */
	case 91:
		/* 11.2.91 CTC Activation Ack List */
	case 92:
		/* 11.2.92 CTC Activation Ack Description */
	case 93:
		/* 11.2.93 CTC Modification List */
	case 94:
		/* 11.2.94 CTC Modification Ack List */
	case 95:
		/* 11.2.95 CTC Modification Ack Description */
		proto_tree_add_item(urr_ie_tree, hf_uma_data, tvb, ie_offset, ie_len, ENC_NA);
		break;
	case 96:		/* MS Radio Identity */
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_radio_type_of_id, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		octet = tvb_get_guint8(tvb,ie_offset);
		if (( octet & 0xf) == 0){ /* IEEE MAC-address format */
			ie_offset++;
			proto_tree_add_item(urr_ie_tree, hf_uma_urr_ms_radio_id, tvb, ie_offset, ie_len-1, ENC_NA);
		}else{
			proto_tree_add_expert(urr_ie_tree, pinfo, &ei_uma_unknown_format, tvb, ie_offset, ie_len);
		}
		break;

	case 97:
		/* UNC IP Address
		 * IP Address type
		 */
		octet = tvb_get_guint8(tvb,ie_offset);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_IP_Address_type, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		if (ie_len > 4 )
		ie_offset++;
		if ( octet == 0x57 ){ /* IPv6 */

		}else{ /* All other values shall be interpreted as Ipv4 address in this version of the protocol.*/
			unc_ipv4_address = tvb_get_ipv4(tvb, ie_offset);
			proto_tree_add_ipv4(urr_ie_tree, hf_uma_urr_unc_ipv4, tvb, ie_offset, 4, unc_ipv4_address);
		}
		break;
	case 98:
		/* UNC Fully Qualified Domain/Host Name */
		if ( ie_len > 0){
			proto_tree_add_item_ret_string(urr_ie_tree, hf_uma_unc_FQDN, tvb, ie_offset, ie_len, ENC_ASCII|ENC_NA, pinfo->pool, &string);
		}else{
			proto_tree_add_expert(urr_ie_tree, pinfo, &ei_uma_fqdn_not_present, tvb, offset, 1);
		}
		break;
	case 99:
		/* IP address for GPRS user data transport
		 * IP Address type
		 */
		octet = tvb_get_guint8(tvb,ie_offset);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_IP_Address_type, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
		ie_offset++;
		if ( octet == 0x57 ){ /* IPv6 */

		}else{ /* All other values shall be interpreted as Ipv4 address in this version of the protocol.*/
			GPRS_user_data_ipv4_address = tvb_get_ipv4(tvb, ie_offset);
			proto_tree_add_ipv4(urr_ie_tree, hf_uma_urr_GPRS_user_data_transport_ipv4, tvb, ie_offset, 4, GPRS_user_data_ipv4_address);

		}
		break;
	case 100:		/* UDP Port for GPRS user data transport */
		GPRS_user_data_transport_UDP_port = tvb_get_ntohs(tvb,ie_offset);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_GPRS_port, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
		/*
		 * If this isn't the first time this packet has been processed,
		 * we've already done this work, so we don't need to do it
		 * again.
		 */
		if (pinfo->fd->visited)
		{
			break;
		}
		clear_address(&null_addr);

		set_address(&dst_addr, AT_IPv4, 4, &GPRS_user_data_ipv4_address);

		conversation = find_conversation(pinfo->num, &dst_addr,
			&null_addr, CONVERSATION_UDP, GPRS_user_data_transport_UDP_port,
			0, NO_ADDR_B|NO_PORT_B);

		if (conversation == NULL) {
			/* It's not part of any conversation - create a new one. */
			conversation = conversation_new(pinfo->num, &dst_addr,
			    &null_addr, CONVERSATION_UDP, GPRS_user_data_transport_UDP_port ,
			    0, NO_ADDR2|NO_PORT2);

		/* Set dissector */
		conversation_set_dissector(conversation, uma_udp_handle);
		}

		break;
	case 103:		/* UNC TCP port */
		UNC_tcp_port = tvb_get_ntohs(tvb,ie_offset);
		proto_tree_add_uint(urr_ie_tree, hf_uma_urr_UNC_tcp_port , tvb, ie_offset, 2, UNC_tcp_port);

		/*
		 * If this isn't the first time this packet has been processed,
		 * we've already done this work, so we don't need to do it
		 * again.
		 */
		if (pinfo->fd->visited)
		{
			break;
		}
		clear_address(&null_addr);

		set_address(&dst_addr, AT_IPv4, 4, &unc_ipv4_address);

		conversation = find_conversation(pinfo->num, &dst_addr,
			&null_addr, CONVERSATION_TCP, UNC_tcp_port,
			0, NO_ADDR_B|NO_PORT_B);

		if (conversation == NULL) {
			/* It's not part of any conversation - create a new one. */
			conversation = conversation_new(pinfo->num, &dst_addr,
			    &null_addr, CONVERSATION_TCP, UNC_tcp_port,
			    0, NO_ADDR2|NO_PORT2);
			/* Set dissector */
			conversation_set_dissector(conversation, uma_tcp_handle);
		}

		break;
	case 104:		/* RTP UDP port */
		RTP_UDP_port = tvb_get_ntohs(tvb,ie_offset);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_RTP_port, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
		/* TODO find out exactly which element contains IP addr */
		/* Debug
		proto_tree_add_debug_text(urr_ie_tree,tvb,ie_offset,ie_len,"IP %u, Port %u,
			rtp_ipv4_address,RTP_UDP_port);
			*/
		if(unc_ipv4_address!=0){
			set_address(&src_addr, AT_IPv4, 4, &unc_ipv4_address);
		}else{
			/* Set Source IP = own IP */
			copy_address_shallow(&src_addr, &pinfo->src);
		}
		if((!pinfo->fd->visited) && RTP_UDP_port!=0){

			rtp_add_address(pinfo, PT_UDP, &src_addr, RTP_UDP_port, 0, "UMA", pinfo->num, FALSE, 0);
			if ((RTP_UDP_port & 0x1) == 0){ /* Even number RTP port RTCP should follow on odd number */
				RTCP_UDP_port = RTP_UDP_port + 1;
				rtcp_add_address(pinfo, &src_addr, RTCP_UDP_port, 0, "UMA", pinfo->num);
			}
		}
		break;
	case 105:		/* RTCP UDP port */
		RTCP_UDP_port = tvb_get_ntohs(tvb,ie_offset);
		proto_tree_add_item(urr_ie_tree, hf_uma_urr_RTCP_port, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
		/* TODO find out exactly which element contains IP addr */
		if((!pinfo->fd->visited) && rtcp_ipv4_address!=0 && RTCP_UDP_port!=0 && rtcp_handle){
			set_address(&src_addr, AT_IPv4, 4, &rtcp_ipv4_address);

			rtcp_add_address(pinfo, &src_addr, RTCP_UDP_port, 0, "UMA", pinfo->num);
		}
		break;
	case 106:
		/* 11.2.70 GERAN Received Signal Level List */
		while(ie_offset<=(offset + ie_len)){
			proto_tree_add_item(urr_ie_tree, hf_uma_urr_RXLEV_NCELL, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
			ie_offset++;
		}
		break;
	case 107:
		/* 11.2.70 UTRAN Received Signal Level List */
		while(ie_offset<=(offset + ie_len)){
			proto_tree_add_item(urr_ie_tree, hf_uma_urr_RXLEV_NCELL, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
			ie_offset++;
		}
		break;
	case 108:
		/* 11.2.74 PS Handover to GERAN Command */
	case 109:
		/* 11.2.75 PS Handover to UTRAN Command */
	case 110:
		/* 11.2.76 PS Handover to GERAN PSI */
	case 111:
		/* 11.2.77 PS Handover to GERAN SI */
	case 112:
		/* 11.2.78 TU4004 Timer */
	case 115:
		/* 11.2.96 PTC Activation List */
	case 116:
		/* 11.2.97 PTC Description */
	case 117:
		/* 11.2.98 PTC Activation Ack List */
	case 118:
		/* 11.2.99 PTC Activation Ack Description */
	case 119:
		/* 11.2.100 PTC Modification List */
	case 120:
		/* 11.2.101 PTC Modification Ack List */
	case 121:
		/* 11.2.102 PTC Modification Ack Description */
	case 122:
		/* 11.2.103 RAB Configuration */
	case 123:
		/* 11.2.104 Multi-rate Configuration 2 */
	case 124:
		/* 11.2.105 Selected Integrity Protection Algorithm */
	case 125:
		/* 11.2.106 Selected Encryption Algorithm */
	case 126:
		/* 11.2.107 CN Domains to Handover */
	default:
		proto_tree_add_item(urr_ie_tree, hf_uma_data, tvb, ie_offset, ie_len, ENC_NA);
		break;
	}
	offset = offset + ie_len;
	return offset;
}



static int
dissect_uma(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
	int		offset = 0;
	guint8	octet, pd;
	guint16 msg_len;
	proto_item* pd_item;

/* Set up structures needed to add the protocol subtree and manage it */
	proto_item *ti;
	proto_tree *uma_tree;

/* Make entries in Protocol column and Info column on summary display */
	col_set_str(pinfo->cinfo, COL_PROTOCOL, "UMA");
	col_clear(pinfo->cinfo, COL_INFO);

	ti = proto_tree_add_item(tree, proto_uma, tvb, 0, -1, ENC_NA);
	uma_tree = proto_item_add_subtree(ti, ett_uma);

/* add an item to the subtree, see section 1.6 for more information */
	msg_len = tvb_get_ntohs(tvb,offset);
	proto_tree_add_item(uma_tree, hf_uma_length_indicator, tvb, offset, 2, ENC_BIG_ENDIAN);
	offset = offset + 2;
	octet = tvb_get_guint8(tvb,offset);
	pd = octet & 0x0f;
	proto_tree_add_item(uma_tree, hf_uma_skip_ind, tvb, offset, 1, ENC_BIG_ENDIAN);
	if ((octet & 0xf0) != 0 ){
		proto_tree_add_expert(uma_tree, pinfo, &ei_uma_skip_this_message, tvb, offset, -1);
		return tvb_reported_length(tvb);
	}

	pd_item = proto_tree_add_item(uma_tree, hf_uma_pd, tvb, offset, 1, ENC_BIG_ENDIAN);
	switch  ( pd ){
	case 0: /* URR_C */
	case 1: /* URR */
		offset++;
		octet = tvb_get_guint8(tvb,offset);
		proto_tree_add_item(uma_tree, hf_uma_urr_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
		col_add_str(pinfo->cinfo, COL_INFO, val_to_str_ext(octet, &uma_urr_msg_type_vals_ext, "Unknown URR (%u)"));
		while ((msg_len + 1) > offset ){
			offset++;
			offset = dissect_uma_IE(tvb, pinfo, uma_tree, offset);
		}
		break;
	case 2:	/* URLC */
		offset++;
		octet = tvb_get_guint8(tvb,offset);
		proto_tree_add_item(uma_tree, hf_uma_urlc_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
		col_add_str(pinfo->cinfo, COL_INFO, val_to_str_ext(octet, &uma_urlc_msg_type_vals_ext, "Unknown URLC (%u)"));
		col_set_fence(pinfo->cinfo,COL_INFO);
		offset++;
		proto_tree_add_item(uma_tree, hf_uma_urlc_TLLI, tvb, offset, 4, ENC_NA);
		offset = offset + 3;
		while ((msg_len + 1) > offset ){
			offset++;
			offset = dissect_uma_IE(tvb, pinfo, uma_tree, offset);
		}
		break;
	default:
		expert_add_info(pinfo, pd_item, &ei_uma_unknown_protocol);
		break;
	}

	return tvb_reported_length(tvb);
}

static guint
get_uma_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
{
	/* PDU length = Message length + length of length indicator */
	return tvb_get_ntohs(tvb,offset)+2;
}

static int
dissect_uma_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
	tcp_dissect_pdus(tvb, pinfo, tree, uma_desegment, UMA_HEADER_SIZE,
	    get_uma_pdu_len, dissect_uma, data);
	return tvb_reported_length(tvb);
}

static int
dissect_uma_urlc_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{

	int		offset = 0;
	guint8	octet;
	guint16 msg_len;
	proto_item* msg_item;

/* Set up structures needed to add the protocol subtree and manage it */
	proto_item *ti;
	proto_tree *uma_tree;

/* Make entries in Protocol column and Info column on summary display */
	col_set_str(pinfo->cinfo, COL_PROTOCOL, "UMA");
	col_clear(pinfo->cinfo, COL_INFO);

	ti = proto_tree_add_item(tree, proto_uma, tvb, 0, -1, ENC_NA);
	uma_tree = proto_item_add_subtree(ti, ett_uma);

	octet = tvb_get_guint8(tvb,offset);
	msg_item = proto_tree_add_item(uma_tree, hf_uma_urlc_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
	col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",val_to_str_ext(octet, &uma_urlc_msg_type_vals_ext, "Unknown URLC (%u)"));
	col_set_fence(pinfo->cinfo,COL_INFO);
	msg_len = tvb_reported_length_remaining(tvb,offset) - 1;

	switch  ( octet ){

	case 2:	/* RLC UNITDATA */
	case 6: /* URLC-UFC-REQ */
	case 7: /* URLC-DFC-REQ only allowed message types*/
		offset++;
		proto_tree_add_item(uma_tree, hf_uma_urlc_TLLI, tvb, offset, 4, ENC_NA);
		offset = offset + 4;
		proto_tree_add_item(uma_tree, hf_uma_urlc_seq_nr, tvb, offset, 2, ENC_NA);
		offset++;
		while (msg_len > offset){
			offset++;
			offset = dissect_uma_IE(tvb, pinfo, uma_tree, offset);
		}
		return offset;
	default:
		expert_add_info(pinfo, msg_item, &ei_uma_wrong_message_type);
		return tvb_reported_length(tvb);

	}

}

/* Register the protocol with Wireshark */
/* If this dissector uses sub-dissector registration add a registration routine.
   This format is required because a script is used to find these routines and
   create the code that calls these routines.
*/
void
proto_reg_handoff_uma(void)
{
	dissector_add_for_decode_as_with_preference("udp.port", uma_udp_handle);
	rtcp_handle = find_dissector_add_dependency("rtcp", proto_uma);
	llc_handle = find_dissector_add_dependency("llcgprs", proto_uma);
	bssap_pdu_type_table = find_dissector_table("bssap.pdu_type");

	dissector_add_uint_range_with_preference("tcp.port", DEFAULT_UMA_PORT_RANGE, uma_tcp_handle);
}

/* this format is require because a script is used to build the C function
   that calls all the protocol registration.
*/

void
proto_register_uma(void)
{

	module_t *uma_module;

/* Setup list of header fields  See Section 1.6.1 for details*/
	static hf_register_info hf[] = {
		{ &hf_uma_length_indicator,
			{ "Length Indicator","uma.li",
			FT_UINT16, BASE_DEC, NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_pd,
			{ "Protocol Discriminator","uma.pd",
			FT_UINT8, BASE_DEC, VALS(uma_pd_vals), 0x0f,
			NULL, HFILL }
		},
		{ &hf_uma_skip_ind,
			{ "Skip Indicator",           "uma.skip.ind",
			FT_UINT8, BASE_DEC, NULL, 0xf0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_msg_type,
			{ "URR Message Type", "uma.urr.msg.type",
			FT_UINT16, BASE_DEC|BASE_EXT_STRING, &uma_urr_msg_type_vals_ext, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urlc_msg_type,
			{ "URLC Message Type", "uma.urlc.msg.type",
			FT_UINT8, BASE_DEC|BASE_EXT_STRING, &uma_urlc_msg_type_vals_ext, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urlc_TLLI,
			{ "Temporary Logical Link Identifier","uma.urlc.tlli",
			FT_BYTES,BASE_NONE,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urlc_seq_nr,
			{ "Sequence Number","uma.urlc.seq.nr",
			FT_BYTES,BASE_NONE,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_IE,
			{ "URR Information Element","uma.urr.ie.type",
			FT_UINT8, BASE_DEC|BASE_EXT_STRING, &uma_urr_IE_type_vals_ext, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_IE_len,
			{ "URR Information Element length","uma.urr.ie.len",
			FT_UINT16, BASE_DEC, NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_uri,
			{ "GAN Release Indicator","uma.urr.uri",
			FT_UINT8, BASE_DEC, VALS(uma_urr_gan_rel_ind_vals), 0x07,
			"URI", HFILL }
		},
		{ &hf_uma_urr_radio_type_of_id,
			{ "Type of identity","uma.urr.radio_type_of_id",
			FT_UINT8, BASE_DEC, VALS(radio_type_of_id_vals), 0x0f,
			NULL, HFILL }
		},
		{ &hf_uma_urr_radio_id,
			{ "Radio Identity","uma.urr.radio_id",
			FT_ETHER, BASE_NONE, NULL, 0x00,
			NULL, HFILL }
		},

		{ &hf_uma_urr_cell_id,
			{ "Cell Identity","uma.urr.cell_id",
			FT_UINT16, BASE_DEC, NULL, 0x00,
			NULL, HFILL }
		},

		{ &hf_uma_urr_lac,
			{ "Location area code","uma.urr.lac",
			FT_UINT16, BASE_DEC, NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_gci,
			{ "GCI, GSM Coverage Indicator","uma.urr.gci",
			FT_UINT8, BASE_DEC,  VALS(uma_gci_vals), 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_tura,
			{ "TURA, Type of Unlicensed Radio","uma.urr.tura",
			FT_UINT8,BASE_DEC,  VALS(uma_tura_vals), 0xf,
			NULL, HFILL }
		},
		{ &hf_uma_urr_gc,
			{ "GC, GERAN Capable","uma.urr.gc",
			FT_UINT8,BASE_DEC,  VALS(uma_gc_vals), 0x10,
			NULL, HFILL }
		},
		{ &hf_uma_urr_uc,
			{ "UC, UTRAN Capable","uma.urr.uc",
			FT_UINT8,BASE_DEC,  VALS(uma_uc_vals), 0x20,
			"GC, GERAN Capable", HFILL }
		},
		{ &hf_uma_urr_rrs,
			{ "RTP Redundancy Support(RRS)","uma.urr.rrs",
			FT_UINT8,BASE_DEC, VALS(uma_rrs_vals), 0x01,
			NULL, HFILL }
		},
		{ &hf_uma_urr_gmsi,
			{ "GMSI, GAN Mode Support Indicator","uma.urr.gmsi",
			FT_UINT8,BASE_DEC, VALS(uma_gmsi_vals), 0x06,
			"GMSI, GAN Mode Support Indicator", HFILL }
		},
		{ &hf_uma_urr_psho,
			{ "PS HO, PS Handover Capable","uma.urr.psho",
			FT_UINT8,BASE_DEC, VALS(uma_ps_ho_vals), 0x02,
			NULL, HFILL }
		},
		{ &hf_uma_urr_IP_Address_type,
			{ "IP address type number value","uma.urr.ip_type",
			FT_UINT8,BASE_DEC,  VALS(IP_address_type_vals), 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_FQDN,
		       { "Fully Qualified Domain/Host Name (FQDN)", "uma.urr.fqdn",
		       FT_STRING, BASE_NONE,NULL,0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_sgw_ipv4,
			{ "SGW IPv4 address","uma.urr.sgwipv4",
			FT_IPv4,BASE_NONE,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_redirection_counter,
			{ "Redirection Counter","uma.urr.redirection_counter",
			FT_UINT8,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_dis_rej_cau,
			{ "Discovery Reject Cause","uma.urr.dis_rej_cau",
			FT_UINT8,BASE_DEC,  VALS(uma_discovery_reject_cause_vals), 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_ECMC,
			{ "ECMC, Early Classmark Sending Control","uma.urr.ECMC",
			FT_UINT8,BASE_DEC,  VALS(ECMC_vals), 0x2,
			NULL, HFILL }
		},
		{ &hf_uma_urr_NMO,
			{ "NMO, Network Mode of Operation","uma.urr.NMO",
			FT_UINT8,BASE_DEC,  VALS(NMO_vals), 0xc,
			NULL, HFILL }
		},
		{ &hf_uma_urr_GPRS,
			{ "GPRS, GPRS Availability","uma.urr.GPRS",
			FT_UINT8,BASE_DEC,  VALS(GPRS_avail_vals), 0x10,
			NULL, HFILL }
		},
		{ &hf_uma_urr_DTM,
			{ "DTM, Dual Transfer Mode of Operation by network","uma.urr.dtm",
			FT_UINT8,BASE_DEC,  VALS(DTM_vals), 0x20,
			NULL, HFILL }
		},
		{ &hf_uma_urr_ATT,
			{ "ATT, Attach-detach allowed","uma.urr.att",
			FT_UINT8,BASE_DEC,  VALS(ATT_vals), 0x40,
			NULL, HFILL }
		},
		{ &hf_uma_urr_MSCR,
			{ "MSCR, MSC Release","uma.urr.mscr",
			FT_UINT8,BASE_DEC,  VALS(MSCR_vals), 0x80,
			NULL, HFILL }
		},
		{ &hf_uma_urr_T3212_timer,
			{ "T3212 Timer value(seconds)","uma.urr.t3212",
			FT_UINT8,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_RAC,
			{ "Routing Area Code","uma.urr.rac",
			FT_UINT8,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_ap_location,
			{ "AP Location","uma.urr.ap_location",
			FT_BYTES,BASE_NONE,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_SGSNR,
			{ "SGSN Release","uma.urr.SGSNR",
			FT_UINT8,BASE_DEC,  VALS(SGSNR_vals), 0x01,
			NULL, HFILL }
		},
		{ &hf_uma_urr_ECMP,
			{ "ECMP, Emergency Call Mode Preference","uma.urr.ECMP",
			FT_UINT8,BASE_DEC,  VALS(ECMP_vals), 0x02,
			NULL, HFILL }
		},
		{ &hf_uma_urr_RE,
			{ "RE, Call reestablishment allowed","uma.urr.RE",
			FT_UINT8,BASE_DEC,  VALS(RE_vals), 0x04,
			NULL, HFILL }
		},
		{ &hf_uma_urr_PFCFM,
			{ "PFCFM, PFC_FEATURE_MODE","uma.urr.PFCFM",
			FT_UINT8,BASE_DEC,  VALS(PFCFM_vals), 0x08,
			NULL, HFILL }
		},
		{ &hf_uma_urr_3GECS,
			{ "3GECS, 3G Early Classmark Sending Restriction","uma.urr.3GECS",
			FT_UINT8,BASE_DEC,  VALS(Three_GECS_vals), 0x10,
			NULL, HFILL }
		},
		{ &hf_uma_urr_TU3907_timer,
			{ "TU3907 Timer value(seconds)","uma.urr.tu3907",
			FT_UINT16,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_GSM_RR_state,
			{ "GSM RR State value","uma.urr.gsmrrstate",
			FT_UINT8,BASE_DEC|BASE_EXT_STRING,  &uma_GRS_GSM_RR_State_vals_ext, 0x7,
			NULL, HFILL }
		},
		{ &hf_uma_urr_gan_band,
			{ "UMA Band","uma.urr.umaband",
			FT_UINT8,BASE_DEC|BASE_EXT_STRING,  &uma_gan_band_vals_ext, 0x0f,
			NULL, HFILL }
		},
		{ &hf_uma_urr_URR_state,
			{ "URR State","uma.urr.state",
			FT_UINT8,BASE_DEC,  VALS(URR_state_vals), 0x03,
			NULL, HFILL }
		},
		{ &hf_uma_urr_register_reject_cause,
			{ "Register Reject Cause","uma.urr.reg_rej_cau",
			FT_UINT8,BASE_DEC|BASE_EXT_STRING,  &register_reject_cause_vals_ext, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_TU3906_timer,
			{ "TU3906 Timer value(seconds)","uma.urr.tu3906",
			FT_UINT16,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_TU3910_timer,
			{ "TU3910 Timer value(seconds)","uma.urr.tu3910",
			FT_UINT16,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_TU3902_timer,
			{ "TU3902 Timer value(seconds)","uma.urr.tu3902",
			FT_UINT16,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_communication_port,
			{ "Communication Port","uma.urr.communication_port",
			FT_UINT16,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_L3_Message,
			{ "L3 message contents","uma.urr.l3",
			FT_BYTES,BASE_NONE,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_L3_protocol_discriminator,
			{ "Protocol discriminator","uma.urr.L3_protocol_discriminator",
			FT_UINT8,BASE_DEC,  VALS(protocol_discriminator_vals), 0x0f,
			NULL, HFILL }
		},
		{ &hf_uma_urr_GPRS_resumption,
			{ "GPRS resumption ACK","uma.urr.GPRS_resumption",
			FT_UINT8,BASE_DEC,  VALS(GPRS_resumption_vals), 0x1,
			NULL, HFILL }
		},
		{ &hf_uma_urr_ULQI,
			{ "ULQI, UL Quality Indication","uma.urr.ULQI",
			FT_UINT8,BASE_DEC,  VALS(uma_ulqi_vals), 0x0f,
			NULL, HFILL }
		},
		{ &hf_uma_urr_TU3920_timer,
			{ "TU3920 Timer value(seconds)","uma.urr.tu3920",
			FT_UINT16,BASE_DEC,  NULL, 0x0,
			"TU3920 Timer value(hundreds of of ms)", HFILL }
		},
		{ &hf_uma_urr_peak_tpt_cls,
			{ "PEAK_THROUGHPUT_CLASS","uma.urr.peak_tpt_cls",
			FT_UINT8,BASE_DEC,  NULL, 0x0f,
			NULL, HFILL }
		},
		{ &hf_uma_urr_radio_pri,
			{ "Radio Priority","uma.urr.radio_pri",
			FT_UINT8,BASE_DEC,  VALS(radio_pri_vals), 0x30,
			"RADIO_PRIORITY", HFILL }
		},
		{ &hf_uma_urr_rlc_mode,
			{ "RLC mode","uma.urr.rrlc_mode",
			FT_UINT8,BASE_DEC,  VALS(rlc_mode_vals), 0x80,
			NULL, HFILL }
		},
		{ &hf_uma_urr_ga_psr_cause,
			{ "GA-PSR Cause","uma.urr.ga_psr_cause",
			FT_UINT8,BASE_DEC|BASE_EXT_STRING,  &uma_ga_psr_cause_vals_ext, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_udr,
			{ "User Data Rate value (bits/s)","uma.urr.URLCcause",
			FT_UINT32,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_TU4001_timer,
			{ "TU4001 Timer value(seconds)","uma.urr.tu4001",
			FT_UINT16,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_LS,
			{ "Location Status(LS)","uma.urr.LS",
			FT_UINT8,BASE_DEC,  VALS(LS_vals), 0x3,
			NULL, HFILL }
		},
		{ &hf_uma_urr_cipher_res,
			{ "Cipher Response(CR)","uma.urr.CR",
			FT_UINT8,BASE_DEC,  VALS(CR_vals), 0x3,
			NULL, HFILL }
		},
		{ &hf_uma_urr_rand_val,
			{ "Ciphering Command RAND value","uma.rand_val",
			FT_BYTES,BASE_NONE,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_ciphering_command_mac,
			{ "Ciphering Command MAC (Message Authentication Code)","uma.ciphering_command_mac",
			FT_BYTES,BASE_NONE,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_ciphering_key_seq_num,
			{ "Values for the ciphering key","uma.ciphering_key_seq_num",
			FT_UINT8,BASE_DEC,  NULL, 0x7,
			NULL, HFILL }
		},
		{ &hf_uma_urr_sapi_id,
			{ "SAPI ID","uma.sapi_id",
			FT_UINT8,BASE_DEC,  VALS(sapi_id_vals), 0x7,
			NULL, HFILL }
		},
		{ &hf_uma_urr_establishment_cause,
			{ "Establishment Cause","uma.urr.establishment_cause",
			FT_UINT8,BASE_DEC|BASE_EXT_STRING,  &uma_establishment_cause_val_ext, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_channel,
			{ "Channel","uma.urr.channel",
			FT_UINT8,BASE_DEC,  VALS(channel_vals), 0x3,
			NULL, HFILL }
		},
		{ &hf_uma_urr_PDU_in_error,
			{ "PDU in Error,","uma.urr.PDU_in_error",
			FT_BYTES,BASE_NONE,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_sample_size,
			{ "Sample Size","uma.urr.sample_size",
			FT_UINT8,BASE_DEC,  VALS(sample_size_vals), 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_payload_type,
			{ "Payload Type","uma.urr.payload_type",
			FT_UINT8,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_LLC_PDU,
			{ "LLC-PDU","uma.urr.llc_pdu",
			FT_BYTES,BASE_NONE,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_LBLI,
			{ "LBLI, Location Black List indicator","uma.urr.LBLI",
			FT_UINT8,BASE_DEC,  VALS(LBLI_vals), 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_RI,
			{ "Reset Indicator(RI)","uma.urr.RI",
			FT_UINT8,BASE_DEC,  VALS(RI_vals), 0x1,
			NULL, HFILL }
		},
		{ &hf_uma_urr_TU4003_timer,
			{ "TU4003 Timer value(seconds)","uma.urr.tu4003",
			FT_UINT16,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_ap_service_name_type,
			{ "AP Service Name type","uma.urr.ap_service_name_type",
			FT_UINT8,BASE_DEC,  VALS(ap_service_name_type_vals), 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_ap_Service_name_value,
			{ "AP Service Name Value","uma.urr.ap_service_name_value",
			FT_STRING,BASE_NONE,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_uma_service_zone_icon_ind,
			{ "UMA Service Zone Icon Indicator","uma.urr.uma_service_zone_icon_ind",
			FT_UINT8,BASE_DEC,  VALS(uma_service_zone_icon_ind_vals), 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_uma_service_zone_str_len,
			{ "Length of UMA Service Zone string","uma.urr.service_zone_str_len",
			FT_UINT8,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_window_size,
			{ "Window Size","uma.urr.uma_window_size",
			FT_UINT8,BASE_DEC,  VALS(window_size_vals), 0x03,
			NULL, HFILL }
		},
		{ &hf_uma_urr_uma_codec_mode,
			{ "GAN A/Gb Mode Codec Mode","uma.urr.uma_codec_mode",
			FT_UINT8,BASE_DEC,  NULL, 0xc0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_UTRAN_cell_id_disc,
			{ "UTRAN Cell Identification Discriminator","uma.urr.uma_UTRAN_cell_id_disc",
			FT_UINT8,BASE_DEC,  VALS(UTRAN_cell_id_disc_vals), 0x0f,
			NULL, HFILL }
		},
		{ &hf_uma_urr_suti,
			{ "SUTI, Serving GANC table indicator","uma.urr.uma_suti",
			FT_UINT8,BASE_DEC,  VALS(suti_vals), 0x01,
			NULL, HFILL }
		},
		{ &hf_uma_urr_uma_mps,
			{ "UMPS, Manual PLMN Selection indicator","uma.urr.mps",
			FT_UINT8,BASE_DEC,  VALS(mps_vals), 0x3,
			"MPS, Manual PLMN Selection indicator", HFILL }
		},
		{ &hf_uma_urr_num_of_plms,
			{ "Number of PLMN:s","uma.urr.num_of_plms",
			FT_UINT8,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_cbs,
			{ "CBS Cell Broadcast Service","uma.urr.cbs",
			FT_UINT8,BASE_DEC,  VALS(cbs_vals), 0x01,
			NULL, HFILL }
		},
		{ &hf_uma_urr_num_of_cbs_frms,
			{ "Number of CBS Frames","uma.urr.num_of_cbs_frms",
			FT_UINT8,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_ms_radio_id,
			{ "MS Radio Identity","uma.urr.ms_radio_id",
			FT_ETHER, BASE_NONE, NULL, 0x00,
			NULL, HFILL }
		},
		{ &hf_uma_urr_uma_service_zone_str,
			{ "UMA Service Zone string,","uma.urr.uma_service_zone_str",
			FT_STRING,BASE_NONE,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_unc_ipv4,
			{ "UNC IPv4 address","uma.urr.uncipv4",
			FT_IPv4,BASE_NONE,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_unc_FQDN,
		       { "UNC Fully Qualified Domain/Host Name (FQDN)", "uma.urr.unc_fqdn",
		       FT_STRING, BASE_NONE,NULL,0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_GPRS_user_data_transport_ipv4,
			{ "IP address for GPRS user data transport","uma.urr.gprs_usr_data_ipv4",
			FT_IPv4,BASE_NONE,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_GPRS_port,
			{ "UDP Port for GPRS user data transport","uma.urr.gprs_port",
			FT_UINT16,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_UNC_tcp_port,
			{ "UNC TCP port","uma.urr.tcp_port",
			FT_UINT16,BASE_DEC,  NULL, 0x0,
			"UDP Port for GPRS user data transport", HFILL }
		},
		{ &hf_uma_urr_RTP_port,
			{ "RTP UDP port","uma.urr.rtp_port",
			FT_UINT16,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_RTCP_port,
			{ "RTCP UDP port","uma.urr.rtcp_port",
			FT_UINT16,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_uma_urr_RXLEV_NCELL,
			{ "RX Level","uma.urr.rxlevel",
			FT_UINT8,BASE_DEC,  NULL, 0x0,
			NULL, HFILL }
		},
		/* Generated from convert_proto_tree_add_text.pl */
		{ &hf_uma_access_control_class_n, { "Access Control Class N", "uma.access_control_class_n", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
		{ &hf_uma_data, { "DATA", "uma.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
	};

/* Setup protocol subtree array */
	static gint *ett[] = {
		&ett_uma,
		&ett_uma_toc,
		&ett_urr_ie,
	};

	static ei_register_info ei[] = {
		/* Generated from convert_proto_tree_add_text.pl */
		{ &ei_uma_unknown_format, { "uma.unknown_format", PI_PROTOCOL, PI_WARN, "Unknown format", EXPFILL }},
		{ &ei_uma_fqdn_not_present, { "uma.fqdn_not_present", PI_PROTOCOL, PI_NOTE, "FQDN not present", EXPFILL }},
		{ &ei_uma_cbs_frames, { "uma.cbs_frames", PI_UNDECODED, PI_WARN, "CBS Frames - Not decoded", EXPFILL }},
		{ &ei_uma_skip_this_message, { "uma.skip_this_message", PI_PROTOCOL, PI_NOTE, "Skip this message", EXPFILL }},
		{ &ei_uma_unknown_protocol, { "uma.unknown_protocol", PI_PROTOCOL, PI_WARN, "Unknown protocol", EXPFILL }},
		{ &ei_uma_wrong_message_type, { "uma.wrong_message_type", PI_PROTOCOL, PI_WARN, "Wrong message type", EXPFILL }},
	};

	expert_module_t *expert_uma;

/* Register the protocol name and description */
	proto_uma = proto_register_protocol("Unlicensed Mobile Access","UMA", "uma");
	/* subdissector code */
	uma_tcp_handle = register_dissector("umatcp", dissect_uma_tcp, proto_uma);
	uma_udp_handle = register_dissector("umaudp", dissect_uma_urlc_udp, proto_uma);


/* Required function calls to register the header fields and subtrees used */
	proto_register_field_array(proto_uma, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	expert_uma = expert_register_protocol(proto_uma);
	expert_register_field_array(expert_uma, ei, array_length(ei));

	/* Register a configuration option for port */
	uma_module = prefs_register_protocol(proto_uma, NULL);

	prefs_register_bool_preference(uma_module, "desegment_ucp_messages",
		"Reassemble UMA messages spanning multiple TCP segments",
		"Whether the UMA dissector should reassemble messages spanning multiple TCP segments."
		" To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
		&uma_desegment);
	prefs_register_obsolete_preference(uma_module, "tcp.port1");
	prefs_register_obsolete_preference(uma_module, "udp.ports");
}

/*
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
 *
 * Local variables:
 * c-basic-offset: 8
 * tab-width: 8
 * indent-tabs-mode: t
 * End:
 *
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
 * :indentSize=8:tabSize=8:noTabs=false:
 */