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
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
|
/* packet-nas_eps.c
* Routines for Non-Access-Stratum (NAS) protocol for Evolved Packet System (EPS) dissection
*
* Copyright 2008 - 2020, Anders Broman <anders.broman@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: 3GPP TS 24.301 V17.9.0 (2022-12)
*/
#include "config.h"
#include <epan/packet.h>
#include <epan/asn1.h>
#include <epan/prefs.h>
#include <epan/expert.h>
#include <epan/exceptions.h>
#include <epan/show_exception.h>
#include <epan/to_str.h>
#include <epan/proto_data.h>
#include <wsutil/pow2.h>
#include <wsutil/pint.h>
#include "packet-gsm_map.h"
#include "packet-gsm_a_common.h"
#include "packet-lcsap.h"
void proto_register_nas_eps(void);
void proto_reg_handoff_nas_eps(void);
#define PNAME "Non-Access-Stratum (NAS)PDU"
#define PSNAME "NAS-EPS"
#define PFNAME "nas-eps"
/* Initialize the protocol and registered fields */
static int proto_nas_eps = -1;
/* Dissector handles */
static dissector_handle_t gsm_a_dtap_handle;
static dissector_handle_t lpp_handle;
static dissector_handle_t nbifom_handle;
static dissector_handle_t ipv4_handle;
static dissector_handle_t ipv6_handle;
static dissector_handle_t non_ip_data_handle;
static dissector_handle_t ethernet_handle;
/* Forward declaration */
static void dissect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset);
static void dissect_nas_eps_emm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean second_header);
static int hf_nas_eps_msg_emm_type = -1;
int hf_nas_eps_common_elem_id = -1;
int hf_nas_eps_emm_elem_id = -1;
static int hf_nas_eps_bearer_id = -1;
static int hf_nas_eps_spare_bits = -1;
static int hf_nas_eps_spare_b7 = -1;
static int hf_nas_eps_security_header_type = -1;
static int hf_nas_eps_msg_auth_code = -1;
static int hf_nas_eps_seq_no = -1;
static int hf_nas_eps_ciphered_msg = -1;
static int hf_nas_eps_msg_elems = -1;
static int hf_nas_eps_seq_no_short = -1;
static int hf_nas_eps_emm_ebi0 = -1;
static int hf_nas_eps_emm_ebi1 = -1;
static int hf_nas_eps_emm_ebi2 = -1;
static int hf_nas_eps_emm_ebi3 = -1;
static int hf_nas_eps_emm_ebi4 = -1;
static int hf_nas_eps_emm_ebi5 = -1;
static int hf_nas_eps_emm_ebi6 = -1;
static int hf_nas_eps_emm_ebi7 = -1;
static int hf_nas_eps_emm_ebi8 = -1;
static int hf_nas_eps_emm_ebi9 = -1;
static int hf_nas_eps_emm_ebi10 = -1;
static int hf_nas_eps_emm_ebi11 = -1;
static int hf_nas_eps_emm_ebi12 = -1;
static int hf_nas_eps_emm_ebi13 = -1;
static int hf_nas_eps_emm_ebi14 = -1;
static int hf_nas_eps_emm_ebi15 = -1;
static int hf_nas_eps_emm_dl_nas_cnt = -1;
static int hf_nas_eps_emm_nonce_mme = -1;
static int hf_nas_eps_emm_nonce = -1;
static int hf_nas_eps_emm_paging_id = -1;
static int hf_nas_eps_emm_nbiot_allowed_value = -1;
static int hf_nas_eps_emm_eps_optim_info = -1;
static int hf_nas_eps_emm_eutran_allowed_value = -1;
static int hf_nas_eps_emm_eps_att_type = -1;
static int hf_nas_eps_emm_cp_ciot = -1;
static int hf_nas_eps_emm_er_wo_pdn = -1;
static int hf_nas_eps_emm_esr_ps = -1;
static int hf_nas_eps_emm_cs_lcs = -1;
static int hf_nas_eps_emm_epc_lcs = -1;
static int hf_nas_eps_emm_emc_bs = -1;
static int hf_nas_eps_emm_ims_vops = -1;
static int hf_nas_eps_emm_15_bearers = -1;
static int hf_nas_eps_emm_iwkn26 = -1;
static int hf_nas_eps_emm_restrict_dcnr = -1;
static int hf_nas_eps_emm_restrict_ec = -1;
static int hf_nas_eps_emm_epco = -1;
static int hf_nas_eps_emm_hc_cp_ciot = -1;
static int hf_nas_eps_emm_s1_u_data = -1;
static int hf_nas_eps_emm_up_ciot = -1;
static int hf_nas_eps_emm_ptcc = -1;
static int hf_nas_eps_emm_pr = -1;
static int hf_nas_eps_emm_rpr = -1;
static int hf_nas_eps_emm_piv = -1;
static int hf_nas_eps_emm_ncr = -1;
static int hf_nas_eps_emm_nas_key_set_id = -1;
static int hf_nas_eps_tsc = -1;
static int hf_nas_eps_emm_odd_even = -1;
static int hf_nas_eps_emm_type_of_id = -1;
static int hf_nas_eps_emm_mme_grp_id = -1;
static int hf_nas_eps_emm_imei = -1;
static int hf_nas_eps_emm_mme_code = -1;
static int hf_nas_eps_emm_m_tmsi = -1;
static int hf_nas_eps_esm_msg_cont = -1;
static int hf_nas_eps_esm_imeisv_req = -1;
static int hf_nas_eps_emm_toi = -1;
static int hf_nas_eps_emm_toc = -1;
static int hf_nas_eps_emm_EPS_attach_result = -1;
static int hf_nas_eps_emm_spare_half_octet = -1;
static int hf_nas_eps_emm_add_upd_res = -1;
static int hf_nas_eps_emm_pnb_ciot = -1;
static int hf_nas_eps_emm_saf = -1;
static int hf_nas_eps_emm_add_upd_type = -1;
static int hf_nas_eps_emm_res = -1;
static int hf_nas_eps_emm_sms_services_status = -1;
static int hf_nas_eps_emm_csfb_resp = -1;
static int hf_nas_eps_emm_cause = -1;
static int hf_nas_eps_emm_id_type2 = -1;
static int hf_nas_eps_emm_short_mac = -1;
static int hf_nas_eps_emm_tai_tol = -1;
static int hf_nas_eps_emm_tai_n_elem = -1;
static int hf_nas_eps_emm_tai_tac = -1;
static int hf_nas_eps_emm_eea0 = -1;
static int hf_nas_eps_emm_128eea1 = -1;
static int hf_nas_eps_emm_128eea2 = -1;
static int hf_nas_eps_emm_eea3 = -1;
static int hf_nas_eps_emm_eea4 = -1;
static int hf_nas_eps_emm_eea5 = -1;
static int hf_nas_eps_emm_eea6 = -1;
static int hf_nas_eps_emm_eea7 = -1;
static int hf_nas_eps_emm_eia0 = -1;
static int hf_nas_eps_emm_128eia1 = -1;
static int hf_nas_eps_emm_128eia2 = -1;
static int hf_nas_eps_emm_eia3 = -1;
static int hf_nas_eps_emm_eia4 = -1;
static int hf_nas_eps_emm_eia5 = -1;
static int hf_nas_eps_emm_eia6 = -1;
static int hf_nas_eps_emm_eps_upip = -1;
static int hf_nas_eps_emm_uea0 = -1;
static int hf_nas_eps_emm_uea1 = -1;
static int hf_nas_eps_emm_uea2 = -1;
static int hf_nas_eps_emm_uea3 = -1;
static int hf_nas_eps_emm_uea4 = -1;
static int hf_nas_eps_emm_uea5 = -1;
static int hf_nas_eps_emm_uea6 = -1;
static int hf_nas_eps_emm_uea7 = -1;
static int hf_nas_eps_emm_ucs2_supp = -1;
static int hf_nas_eps_emm_uia1 = -1;
static int hf_nas_eps_emm_uia2 = -1;
static int hf_nas_eps_emm_uia3 = -1;
static int hf_nas_eps_emm_uia4 = -1;
static int hf_nas_eps_emm_uia5 = -1;
static int hf_nas_eps_emm_uia6 = -1;
static int hf_nas_eps_emm_uia7 = -1;
static int hf_nas_eps_emm_gea1 = -1;
static int hf_nas_eps_emm_gea2 = -1;
static int hf_nas_eps_emm_gea3 = -1;
static int hf_nas_eps_emm_gea4 = -1;
static int hf_nas_eps_emm_gea5 = -1;
static int hf_nas_eps_emm_gea6 = -1;
static int hf_nas_eps_emm_gea7 = -1;
static int hf_eps_emm_ext_emerg_num_list_eenlv = -1;
static int hf_eps_emm_ext_emerg_num_list_emerg_num_len = -1;
static int hf_eps_emm_ext_emerg_num_list_emerg_num = -1;
static int hf_eps_emm_ext_emerg_num_list_sub_serv_field_len = -1;
static int hf_eps_emm_ext_emerg_num_list_sub_serv_field = -1;
static int hf_nas_eps_emm_prose_dd_cap = -1;
static int hf_nas_eps_emm_prose_cap = -1;
static int hf_nas_eps_emm_h245_ash_cap = -1;
static int hf_nas_eps_emm_acc_csfb_cap = -1;
static int hf_nas_eps_emm_lpp_cap = -1;
static int hf_nas_eps_emm_lcs_cap = -1;
static int hf_nas_eps_emm_1xsrvcc_cap = -1;
static int hf_nas_eps_emm_nf_cap = -1;
static int hf_nas_eps_emm_epco_cap = -1;
static int hf_nas_eps_emm_hc_cp_ciot_cap = -1;
static int hf_nas_eps_emm_er_wo_pdn_cap = -1;
static int hf_nas_eps_emm_s1u_data_cap = -1;
static int hf_nas_eps_emm_up_ciot_cap = -1;
static int hf_nas_eps_emm_cp_ciot_cap = -1;
static int hf_nas_eps_emm_prose_relay_cap = -1;
static int hf_nas_eps_emm_prose_dc_cap = -1;
static int hf_nas_eps_15_bearers_cap = -1;
static int hf_nas_eps_sgc_cap = -1;
static int hf_nas_eps_n1mode_cap = -1;
static int hf_nas_eps_dcnr_cap = -1;
static int hf_nas_eps_cp_backoff_cap = -1;
static int hf_nas_eps_restrict_ec_cap = -1;
static int hf_nas_eps_v2x_pc5_cap = -1;
static int hf_nas_eps_multiple_drb_cap = -1;
static int hf_nas_eps_rpr_cap = -1;
static int hf_nas_eps_piv_cap = -1;
static int hf_nas_eps_ncr_cap = -1;
static int hf_nas_eps_v2x_nr_pc5_cap = -1;
static int hf_nas_eps_up_mt_edt_cap = -1;
static int hf_nas_eps_cp_mt_edt_cap = -1;
static int hf_nas_eps_wsua_cap = -1;
static int hf_nas_eps_racs_cap = -1;
static int hf_nas_eps_ptcc_cap = -1;
static int hf_nas_eps_pr_cap = -1;
static int hf_nas_eps_emm_ue_ra_cap_inf_upd_need_flg = -1;
static int hf_nas_eps_emm_ss_code = -1;
static int hf_nas_eps_emm_lcs_ind = -1;
static int hf_nas_eps_emm_gen_msg_cont_type = -1;
static int hf_nas_eps_esm_apn_ambr_ul = -1;
static int hf_nas_eps_esm_apn_ambr_dl = -1;
static int hf_nas_eps_esm_apn_ambr_ul_ext = -1;
static int hf_nas_eps_esm_apn_ambr_dl_ext = -1;
static int hf_nas_eps_esm_apn_ambr_ul_ext2 = -1;
static int hf_nas_eps_esm_apn_ambr_dl_ext2 = -1;
static int hf_nas_eps_esm_apn_ambr_ul_total = -1;
static int hf_nas_eps_esm_apn_ambr_dl_total = -1;
static int hf_nas_eps_emm_guti_type = -1;
static int hf_nas_eps_hash_mme = -1;
static int hf_nas_eps_replayed_nas_msg_cont = -1;
static int hf_nas_eps_redir_policy = -1;
static int hf_nas_eps_emm_5g_ea0 = -1;
static int hf_nas_eps_emm_128_5g_ea1 = -1;
static int hf_nas_eps_emm_128_5g_ea2 = -1;
static int hf_nas_eps_emm_128_5g_ea3 = -1;
static int hf_nas_eps_emm_5g_ea4 = -1;
static int hf_nas_eps_emm_5g_ea5 = -1;
static int hf_nas_eps_emm_5g_ea6 = -1;
static int hf_nas_eps_emm_5g_ea7 = -1;
static int hf_nas_eps_emm_5g_ea8 = -1;
static int hf_nas_eps_emm_5g_ea9 = -1;
static int hf_nas_eps_emm_5g_ea10 = -1;
static int hf_nas_eps_emm_5g_ea11 = -1;
static int hf_nas_eps_emm_5g_ea12 = -1;
static int hf_nas_eps_emm_5g_ea13 = -1;
static int hf_nas_eps_emm_5g_ea14 = -1;
static int hf_nas_eps_emm_5g_ea15 = -1;
static int hf_nas_eps_emm_5g_ia0 = -1;
static int hf_nas_eps_emm_128_5g_ia1 = -1;
static int hf_nas_eps_emm_128_5g_ia2 = -1;
static int hf_nas_eps_emm_128_5g_ia3 = -1;
static int hf_nas_eps_emm_5g_ia4 = -1;
static int hf_nas_eps_emm_5g_ia5 = -1;
static int hf_nas_eps_emm_5g_ia6 = -1;
static int hf_nas_eps_emm_5g_ia7 = -1;
static int hf_nas_eps_emm_5g_ia8 = -1;
static int hf_nas_eps_emm_5g_ia9 = -1;
static int hf_nas_eps_emm_5g_ia10 = -1;
static int hf_nas_eps_emm_5g_ia11 = -1;
static int hf_nas_eps_emm_5g_ia12 = -1;
static int hf_nas_eps_emm_5g_ia13 = -1;
static int hf_nas_eps_emm_5g_ia14 = -1;
static int hf_nas_eps_emm_5g_ia15 = -1;
static int hf_nas_eps_emm_cipher_key = -1;
static int hf_nas_eps_emm_ciph_key_data_ciphering_set_id = -1;
static int hf_nas_eps_emm_ciph_key_data_ciphering_key = -1;
static int hf_nas_eps_emm_ciph_key_data_c0_len = -1;
static int hf_nas_eps_emm_ciph_key_data_c0 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_1 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_2 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_3 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_4 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_5 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_6 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_7 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_1 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_2 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_3 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_4 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_5 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_6 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_7 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_8 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_9 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_10 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_11 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_12 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_13 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_14 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_15 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_16 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_17 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_18 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_19 = -1;
static int hf_nas_eps_emm_ciph_key_data_pos_sib_type_3_1 = -1;
static int hf_nas_eps_emm_ciph_key_data_validity_start_time = -1;
static int hf_nas_eps_emm_ciph_key_data_validity_duration = -1;
static int hf_nas_eps_emm_ciph_key_data_tais_list_len = -1;
static int hf_nas_eps_emm_detach_req_UL = -1;
static int hf_nas_eps_emm_detach_req_DL = -1;
static int hf_nas_eps_emm_switch_off = -1;
static int hf_nas_eps_emm_detach_type_UL = -1;
static int hf_nas_eps_emm_detach_type_DL = -1;
static int hf_nas_eps_emm_5g_ehc_cp_ciot = -1;
static int hf_nas_eps_emm_5gs_pnb_ciot = -1;
static int hf_nas_eps_emm_5g_up_ciot = -1;
static int hf_nas_eps_emm_5g_hc_cp_ciot = -1;
static int hf_nas_eps_emm_n3_data = -1;
static int hf_nas_eps_emm_5g_cp_ciot = -1;
static int hf_nas_eps_emm_ue_radio_cap_id_available = -1;
static int hf_nas_eps_emm_ue_radio_cap_id_request = -1;
static int hf_nas_eps_emm_wus_assist_info_type = -1;
static int hf_nas_eps_emm_wus_assist_info_ue_paging_prob = -1;
static int hf_nas_eps_emm_nb_s1_drx_param = -1;
static int hf_nas_eps_emm_imsi_offset = -1;
static int hf_nas_eps_emm_ue_request_type = -1;
static int hf_nas_eps_emm_paging_restriction_type = -1;
static int hf_nas_eps_emm_paging_restriction_ebi7 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi6 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi5 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi4 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi3 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi2 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi1 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi0 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi15 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi14 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi13 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi12 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi11 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi10 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi9 = -1;
static int hf_nas_eps_emm_paging_restriction_ebi8 = -1;
static int hf_nas_eps_emm_paging_restriction_decision = -1;
static int hf_nas_eps_esm_qci = -1;
static int hf_nas_eps_esm_mbr_ul = -1;
static int hf_nas_eps_esm_mbr_dl = -1;
static int hf_nas_eps_esm_gbr_ul = -1;
static int hf_nas_eps_esm_gbr_dl = -1;
static int hf_nas_eps_esm_embr_ul = -1;
static int hf_nas_eps_esm_embr_dl = -1;
static int hf_nas_eps_esm_egbr_ul = -1;
static int hf_nas_eps_esm_egbr_dl = -1;
static int hf_nas_eps_esm_cause = -1;
static int hf_nas_eps_esm_eit = -1;
static int hf_nas_eps_esm_notif_ind = -1;
static int hf_nas_eps_esm_pdn_type = -1;
static int hf_nas_eps_esm_pdn_ipv4 = -1;
static int hf_nas_eps_esm_pdn_ipv6_if_id = -1;
static int hf_nas_eps_esm_eplmnc = -1;
static int hf_nas_eps_esm_ratc = -1;
static int hf_nas_eps_esm_linked_bearer_id = -1;
static int hf_nas_eps_esm_nbifom_cont = -1;
static int hf_nas_eps_esm_remote_ue_context_list_nb_ue_contexts = -1;
static int hf_nas_eps_esm_remote_ue_context_list_ue_context_len = -1;
static int hf_nas_eps_esm_remote_ue_context_list_ue_context_nb_user_id = -1;
static int hf_nas_eps_esm_remote_ue_context_list_ue_context_user_id_len = -1;
static int hf_nas_eps_esm_remote_ue_context_list_ue_context_odd_even_indic = -1;
static int hf_nas_eps_esm_remote_ue_context_list_ue_context_user_id_type = -1;
static int hf_nas_eps_esm_remote_ue_context_list_ue_context_encr_imsi = -1;
static int hf_nas_eps_esm_remote_ue_context_list_ue_context_msisdn = -1;
static int hf_nas_eps_esm_remote_ue_context_list_ue_context_imei = -1;
static int hf_nas_eps_esm_remote_ue_context_list_ue_context_imeisv = -1;
static int hf_nas_eps_esm_remote_ue_context_list_ue_context_address_type = -1;
static int hf_nas_eps_esm_remote_ue_context_list_ue_context_ipv4 = -1;
static int hf_nas_eps_esm_remote_ue_context_list_ue_context_port_number = -1;
static int hf_nas_eps_esm_remote_ue_context_list_ue_context_ipv6_prefix = -1;
static int hf_nas_eps_esm_pkmf_address_type = -1;
static int hf_nas_eps_esm_pkmf_ipv4 = -1;
static int hf_nas_eps_esm_pkmf_ipv6 = -1;
static int hf_nas_eps_esm_hdr_comp_config_prof_0104 = -1;
static int hf_nas_eps_esm_hdr_comp_config_prof_0103 = -1;
static int hf_nas_eps_esm_hdr_comp_config_prof_0102 = -1;
static int hf_nas_eps_esm_hdr_comp_config_prof_0006 = -1;
static int hf_nas_eps_esm_hdr_comp_config_prof_0004 = -1;
static int hf_nas_eps_esm_hdr_comp_config_prof_0003 = -1;
static int hf_nas_eps_esm_hdr_comp_config_prof_0002 = -1;
static int hf_nas_eps_esm_hdr_compr_config_max_cid = -1;
static int hf_nas_eps_esm_hdr_compr_config_add_hdr_compr_cxt_setup_params_type = -1;
static int hf_nas_eps_esm_hdr_compr_config_add_hdr_compr_cxt_setup_params_cont = -1;
static int hf_nas_eps_esm_ctrl_plane_only_ind_cpoi = -1;
static int hf_nas_eps_esm_user_data_cont = -1;
static int hf_nas_eps_esm_rel_assist_ind_ddx = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi7 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi6 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi5 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi4 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi3 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi2 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi1 = -1;
static int hf_nas_eps_esm_spare_bits0x0100 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi15 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi14 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi13 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi12 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi11 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi10 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi9 = -1;
static int hf_nas_eps_esm_hdr_compr_config_status_ebi8 = -1;
static int hf_nas_eps_esm_serv_plmn_rate_ctrl_val = -1;
static int hf_nas_eps_esm_ext_apn_ambr_dl_unit = -1;
static int hf_nas_eps_esm_ext_apn_ambr_dl = -1;
static int hf_nas_eps_esm_ext_apn_ambr_ul_unit = -1;
static int hf_nas_eps_esm_ext_apn_ambr_ul = -1;
static int hf_nas_eps_esm_ext_mbr_unit = -1;
static int hf_nas_eps_esm_ext_mbr_ul = -1;
static int hf_nas_eps_esm_ext_mbr_dl = -1;
static int hf_nas_eps_esm_ext_gbr_unit = -1;
static int hf_nas_eps_esm_ext_gbr_ul = -1;
static int hf_nas_eps_esm_ext_gbr_dl = -1;
static int hf_nas_eps_active_flg = -1;
static int hf_nas_eps_ctrl_plane_serv_type = -1;
static int hf_nas_eps_eps_update_result_value = -1;
static int hf_nas_eps_eps_update_type_value = -1;
static int hf_nas_eps_service_type = -1;
static int hf_nas_eps_nas_msg_cont = -1;
static int hf_nas_eps_gen_msg_cont = -1;
static int hf_nas_eps_cmn_add_info = -1;
static int hf_nas_eps_esm_request_type = -1;
/* ESM */
static int hf_nas_eps_msg_esm_type = -1;
int hf_nas_eps_esm_elem_id = -1;
static int hf_nas_eps_esm_proc_trans_id = -1;
/* Initialize the subtree pointers */
static int ett_nas_eps = -1;
static int ett_nas_eps_esm_msg_cont = -1;
static int ett_nas_eps_nas_msg_cont = -1;
static int ett_nas_eps_gen_msg_cont = -1;
static int ett_nas_eps_cmn_add_info = -1;
static int ett_nas_eps_remote_ue_context = -1;
static int ett_nas_eps_esm_user_data_cont = -1;
static int ett_nas_eps_replayed_nas_msg_cont = -1;
static int ett_nas_eps_ext_emerg_num = -1;
static int ett_nas_eps_ciph_data_set = -1;
static int ett_nas_eps_wus_assist_info_type = -1;
static expert_field ei_nas_eps_extraneous_data = EI_INIT;
static expert_field ei_nas_eps_unknown_identity = EI_INIT;
static expert_field ei_nas_eps_unknown_type_of_list = EI_INIT;
static expert_field ei_nas_eps_wrong_nb_of_elems = EI_INIT;
static expert_field ei_nas_eps_unknown_msg_type = EI_INIT;
static expert_field ei_nas_eps_unknown_pd = EI_INIT;
static expert_field ei_nas_eps_esm_tp_not_integ_prot = EI_INIT;
static expert_field ei_nas_eps_sec_hdr_wrong_pd = EI_INIT;
static expert_field ei_nas_eps_missing_mandatory_elemen = EI_INIT;
/* Global variables */
static gboolean g_nas_eps_dissect_plain = FALSE;
static gboolean g_nas_eps_null_decipher = TRUE;
enum {
DECODE_USER_DATA_AS_NONE,
DECODE_USER_DATA_AS_IP,
DECODE_USER_DATA_AS_NON_IP,
DECODE_USER_DATA_AS_ETHERNET
};
static const enum_val_t nas_eps_user_data_container_as_vals[] = {
{"none", "None", DECODE_USER_DATA_AS_NONE},
{"ip", "IP", DECODE_USER_DATA_AS_IP},
{"non_ip","Non IP", DECODE_USER_DATA_AS_NON_IP},
{"ethernet","Ethernet", DECODE_USER_DATA_AS_ETHERNET},
{NULL, NULL, -1}
};
static gint g_nas_eps_decode_user_data_container_as = DECODE_USER_DATA_AS_NONE;
static const gchar *g_nas_eps_non_ip_data_dissector = "";
/* Table 9.8.1: Message types for EPS mobility management
* 0 1 - - - - - - EPS mobility management messages
*/
static const value_string nas_msg_emm_strings[] = {
{ 0x41, "Attach request"},
{ 0x42, "Attach accept"},
{ 0x43, "Attach complete"},
{ 0x44, "Attach reject"},
{ 0x45, "Detach request"},
{ 0x46, "Detach accept"},
{ 0x48, "Tracking area update request"},
{ 0x49, "Tracking area update accept"},
{ 0x4a, "Tracking area update complete"},
{ 0x4b, "Tracking area update reject"},
{ 0x4c, "Extended service request"},
{ 0x4d, "Control plane service request"},
{ 0x4e, "Service reject"},
{ 0x4f, "Service accept"},
{ 0x50, "GUTI reallocation command"},
{ 0x51, "GUTI reallocation complete"},
{ 0x52, "Authentication request"},
{ 0x53, "Authentication response"},
{ 0x54, "Authentication reject"},
{ 0x55, "Identity request"},
{ 0x56, "Identity response"},
{ 0x5c, "Authentication failure"},
{ 0x5d, "Security mode command"},
{ 0x5e, "Security mode complete"},
{ 0x5f, "Security mode reject"},
{ 0x60, "EMM status"},
{ 0x61, "EMM information"},
{ 0x62, "Downlink NAS transport"},
{ 0x63, "Uplink NAS transport"},
{ 0x64, "CS service notification"},
{ 0x68, "Downlink generic NAS transport"},
{ 0x69, "Uplink generic NAS transport"},
{ 0, NULL }
};
static value_string_ext nas_msg_emm_strings_ext = VALUE_STRING_EXT_INIT(nas_msg_emm_strings);
/* Table 9.8.2: Message types for EPS session management */
static const value_string nas_msg_esm_strings[] = {
{ 0xc1, "Activate default EPS bearer context request"},
{ 0xc2, "Activate default EPS bearer context accept"},
{ 0xc3, "Activate default EPS bearer context reject"},
{ 0xc5, "Activate dedicated EPS bearer context request"},
{ 0xc6, "Activate dedicated EPS bearer context accept"},
{ 0xc7, "Activate dedicated EPS bearer context reject"},
{ 0xc9, "Modify EPS bearer context request"},
{ 0xca, "Modify EPS bearer context accept"},
{ 0xcb, "Modify EPS bearer context reject"},
{ 0xcd, "Deactivate EPS bearer context request"},
{ 0xce, "Deactivate EPS bearer context accept"},
{ 0xd0, "PDN connectivity request"},
{ 0xd1, "PDN connectivity reject"},
{ 0xd2, "PDN disconnect request"},
{ 0xd3, "PDN disconnect reject"},
{ 0xd4, "Bearer resource allocation request"},
{ 0xd5, "Bearer resource allocation reject"},
{ 0xd6, "Bearer resource modification request"},
{ 0xd7, "Bearer resource modification reject"},
{ 0xd9, "ESM information request"},
{ 0xda, "ESM information response"},
{ 0xdb, "Notification"},
{ 0xdc, "ESM dummy message"},
{ 0xe8, "ESM status"},
{ 0xe9, "Remote UE report"},
{ 0xea, "Remote UE report response"},
{ 0xeb, "ESM data transport"},
{ 0, NULL }
};
static value_string_ext nas_msg_esm_strings_ext = VALUE_STRING_EXT_INIT(nas_msg_esm_strings);
static const value_string security_header_type_vals[] = {
{ 0, "Plain NAS message, not security protected"},
{ 1, "Integrity protected"},
{ 2, "Integrity protected and ciphered"},
{ 3, "Integrity protected with new EPS security context"},
{ 4, "Integrity protected and ciphered with new EPS security context"},
{ 5, "Integrity protected and partially ciphered NAS message"},
{ 6, "Reserved"},
{ 7, "Reserved"},
{ 8, "Reserved"},
{ 9, "Reserved"},
{ 10, "Reserved"},
{ 11, "Reserved"},
{ 12, "Security header for the SERVICE REQUEST message"},
{ 13, "These values are not used in this version of the protocol."
" If received they shall be interpreted as security header for the SERVICE REQUEST message"},
{ 14, "These values are not used in this version of the protocol."
" If received they shall be interpreted as Security header for the SERVICE REQUEST message"},
{ 15, "These values are not used in this version of the protocol."
" If received they shall be interpreted as Security header for the SERVICE REQUEST message"},
{ 0, NULL }
};
static value_string_ext security_header_type_vals_ext = VALUE_STRING_EXT_INIT(security_header_type_vals);
/*
typedef enum
{
DE_EPS_CMN_ADD_INFO, 9.9.2.0 Additional information
DE_EPS_CMN_DEVICE_PROPERTIES, 9.9.2.0A Device properties
DE_EPS_CMN_EPS_BE_CTX_STATUS, 9.9.2.1 EPS bearer context status
DE_EPS_CMN_LOC_AREA_ID, 9.9.2.2 Location area identification
DE_EPS_CMN_MOB_ID, 9.9.2.3 Mobile identity
DE_EPS_MS_CM_2, 9.9.2.4 Mobile station classmark 2
DE_EPS_MS_CM_3, 9.9.2.5 Mobile station classmark 3
DE_EPS_NAS_SEC_PAR_FROM_EUTRA, 9.9.2.6 NAS security parameters from E-UTRA
DE_EPS_NAS_SEC_PAR_TO_EUTRA, 9.9.2.7 NAS security parameters to E-UTRA
DE_EPS_CMN_PLM_LST, 9.9.2.8 PLMN list
DE_EPS_CMN_SUP_CODEC_LST, 9.9.2.6 9.9.2.10 Supported codec list
DE_EPS_COMMON_NONE NONE
}
nas_eps_common_elem_idx_t;
*/
static const value_string nas_eps_common_elem_strings[] = {
{ DE_EPS_CMN_ADD_INFO, "Additional information" }, /* 9.9.2.0 Additional information */
{ DE_EPS_CMN_DEVICE_PROPERTIES, "Device properties" }, /* 9.9.2.0A Device properties */
{ DE_EPS_CMN_EPS_BE_CTX_STATUS, "EPS bearer context status" }, /* 9.9.2.1 EPS bearer context status */
{ DE_EPS_CMN_LOC_AREA_ID, "Location area identification" }, /* 9.9.2.2 Location area identification */
{ DE_EPS_CMN_MOB_ID, "Mobile identity" }, /* 9.9.2.3 Mobile identity */
{ DE_EPS_MS_CM_2, "Mobile station classmark 2" }, /* 9.9.2.4 Mobile station classmark 2 */
{ DE_EPS_MS_CM_3, "Mobile station classmark 3" }, /* 9.9.2.5 Mobile station classmark 3 */
{ DE_EPS_NAS_SEC_PAR_FROM_EUTRA, "NAS security parameters from E-UTRA" },/* 9.9.2.6 NAS security parameters from E-UTRA */
{ DE_EPS_NAS_SEC_PAR_TO_EUTRA, "NAS security parameters to E-UTRA" }, /* 9.9.2.7 NAS security parameters to E-UTRA */
{ DE_EPS_CMN_PLM_LST, "PLMN list" }, /* 9.9.2.8 PLMN list */
/* 9.9.2.9 Spare half octet */
{ DE_EPS_CMN_SUP_CODEC_LST, "Supported codec list" }, /* 9.9.2.10 Supported codec list */
{ 0, NULL }
};
value_string_ext nas_eps_common_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_eps_common_elem_strings);
/* Utility functions */
static guint16
calc_bitrate(guint8 value) {
guint16 return_value = value;
if ((value > 63) && (value <= 127)) {
return_value = 64 + (value - 64) * 8;
}
else if ((value > 127) && (value <= 254)) {
return_value = 576 + (value - 128) * 64;
}
else if (value == 0xff) {
return_value = 0;
}
return return_value;
}
static guint32
calc_bitrate_ext(guint8 value) {
guint32 return_value = 0;
if ((value > 0) && (value <= 0x4a)) {
return_value = 8600 + value * 100;
}
else if ((value > 0x4a) && (value <= 0xba)) {
return_value = 16 + (value-0x4a);
}
else if ((value > 0xba) && (value <= 0xfa)) {
return_value = 128 + (value-0xba)*2;
}
else {
return_value = 256;
}
return return_value;
}
static guint32
calc_bitrate_ext2(guint8 value) {
guint32 return_value = 0;
if ((value > 0) && (value <= 0x3d)) {
return_value = 256 + value * 4;
}
else if ((value > 0x3d) && (value <= 0xa1)) {
return_value = 500 + (value-0x3d) * 10;
}
else if ((value > 0xa1) && (value <= 0xf6)) {
return_value = 1500 + (value-0xa1) * 100;
}
else {
return_value = 10000;
}
return return_value;
}
#define NUM_NAS_EPS_COMMON_ELEM (sizeof(nas_eps_common_elem_strings)/sizeof(value_string))
gint ett_nas_eps_common_elem[NUM_NAS_EPS_COMMON_ELEM];
/*
* 9.9.2 Common information elements
*/
/* 9.9.2.0 Additional information */
static guint16
de_eps_cmn_add_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len,
gchar *add_string _U_, int string_len _U_)
{
proto_item *item;
proto_tree *sub_tree;
tvbuff_t *new_tvb;
item = proto_tree_add_item(tree, hf_nas_eps_cmn_add_info, tvb, offset, len, ENC_NA);
sub_tree = proto_item_add_subtree(item, ett_nas_eps_cmn_add_info);
new_tvb = tvb_new_subset_length(tvb, offset, len);
switch (GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_nas_eps, 0))) {
case 1:
/* LPP */
dissect_lcsap_Correlation_ID_PDU(new_tvb, pinfo, sub_tree, NULL);
break;
default:
break;
}
return(len);
}
/*
* 9.9.2.1 EPS bearer context status
*/
static const true_false_string nas_eps_emm_ebi_vals = {
"BEARER CONTEXT-ACTIVE",
"BEARER CONTEXT-INACTIVE"
};
static guint16
de_eps_cmn_eps_be_ctx_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
/* EBI(7) EBI(6) EBI(5) EBI(4) EBI(3) EBI(2) EBI(1) EBI(0) octet 3 */
proto_tree_add_item(tree, hf_nas_eps_emm_ebi7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* EBI(0): Bit 1 of octet 3 is spare and shall be coded as zero. */
proto_tree_add_item(tree, hf_nas_eps_emm_ebi0, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
/* EBI(15) EBI(14) EBI(13) EBI(12) EBI(11) EBI(10) EBI(9) EBI(8) octet 4 */
proto_tree_add_item(tree, hf_nas_eps_emm_ebi15, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi14, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi13, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi12, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi11, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi10, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi9, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ebi8, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
return len;
}
/*
* 9.9.2.2 Location area identification
* See subclause 10.5.1.3 in 3GPP TS 24.008 [6].
*/
/*
* 9.9.2.3 Mobile identity
* See subclause 10.5.1.4 in 3GPP TS 24.008 [6].
* exported from gsm_a_common
*/
/*
* 9.9.2.4 Mobile station classmark 2
* See subclause 10.5.1.6 in 3GPP TS 24.008 [13].
*/
/*
* 9.9.2.5 Mobile station classmark 3
* See subclause 10.5.1.7 in 3GPP TS 24.008 [13].
*/
/*
* 9.9.2.6 NAS security parameters from E-UTRA
*/
guint16
de_emm_sec_par_from_eutra(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
/* DL NAS COUNT value (short) (octet 2, bit 1 to 4)
* This field contains the 4 least significant bits of the binary representation of the downlink
* NAS COUNT value applicable when this information element is sent.
*/
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_dl_nas_cnt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
return len;
}
/*
* 9.9.2.7 NAS security parameters to E-UTRA
*/
guint16
de_emm_sec_par_to_eutra(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
/* NonceMME value (octet 1 to 5)
* This field is coded as the nonce value in the Nonce information element (see subclause 9.9.3.25).
*/
proto_tree_add_item(tree, hf_nas_eps_emm_nonce_mme, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
curr_offset+=4;
/* type of ciphering algorithm (octet 6, bit 5 to 7)
* These fields are coded as the type of integrity protection algorithm and type of ciphering algorithm
* in the NAS security algorithms information element (see subclause 9.9.3.23).
* Bit 4 and 8 of octet 6 are spare and shall be coded as zero.
*/
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_toc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* Type of integrity protection algorithm (octet 6, bit 1 to 3)*/
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3)+4, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_toi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
/*
* NAS key set identifier (octet 7, bit 1 to 3) and
* type of security context flag (TSC) (octet 7, bit 4)
* These fields are coded as the NAS key set identifier and type of security context flag in the
* NAS key set identifier information element (see subclause 9.9.3.21).
* Bit 5 to 8 of octet 7 are spare and shall be coded as zero.
*/
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
/* Type of security context flag (TSC) V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_tsc, tvb, (curr_offset<<3)+4, 1, ENC_BIG_ENDIAN);
/* NAS key set identifier */
proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, (curr_offset<<3)+5, 3, ENC_BIG_ENDIAN);
curr_offset++;
return len;
}
/*
* 9.9.2.8 PLMN list
* See subclause 10.5.1.13 in 3GPP TS 24.008 [6].
*/
/*
* 9.9.2.9 Spare half octet
* This element is used in the description of EMM and ESM messages when an odd number of
* half octet type 1 information elements are used. This element is filled with spare bits
* set to zero and is placed in bits 5 to 8 of the octet unless otherwise specified.
* Coded Inline
*/
/*
* 9.9.2.10 Supported codec list
* See subclause 10.5.4.32 in 3GPP TS 24.008 [13].
* Dissected in packet-gsm_a_dtap.c
*/
guint16 (*nas_eps_common_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len,
gchar *add_string, int string_len) = {
/* 9.9.2 Common information elements */
de_eps_cmn_add_info, /* 9.9.2.0 Additional information */
NULL, /* 9.9.2.0A Device properties */
de_eps_cmn_eps_be_ctx_status, /* 9.9.2.1 EPS bearer context status */
de_lai, /* 9.9.2.2 Location area identification */
de_mid, /* 9.9.2.3 Mobile identity See subclause 10.5.1.4 in 3GPP TS 24.008*/
de_ms_cm_2, /* 9.9.2.4 Mobile station classmark 2 */
de_ms_cm_3, /* 9.9.2.5 Mobile station classmark 3 */
de_emm_sec_par_from_eutra, /* 9.9.2.6 NAS security parameters from E-UTRA */
de_emm_sec_par_to_eutra, /* 9.9.2.7 NAS security parameters to E-UTRA */
de_plmn_list, /* 9.9.2.8 PLMN list */
NULL, /* 9.9.2.10 Supported codec list (packet-gsm_a_dtap.c) */
NULL, /* NONE */
};
static const value_string nas_emm_elem_strings[] = {
/* 9.9.3 EPS Mobility Management (EMM) information elements */
{ DE_EMM_ADD_UPD_RES, "Additional update result" }, /* 9.9.3.0A Additional update result */
{ DE_EMM_ADD_UPD_TYPE, "Additional update type" }, /* 9.9.3.0B Additional update type */
{ DE_EMM_AUTH_FAIL_PAR, "Authentication failure parameter" }, /* 9.9.3.1 Authentication failure parameter */
{ DE_EMM_AUTN, "Authentication parameter AUTN" }, /* 9.9.3.2 Authentication parameter AUTN */
{ DE_EMM_AUTH_PAR_RAND, "Authentication parameter RAND" }, /* 9.9.3.3 Authentication parameter RAND */
{ DE_EMM_AUTH_RESP_PAR, "Authentication response parameter" }, /* 9.9.3.4 Authentication response parameter */
{ DE_EMM_SMS_SERVICES_STATUS, "SMS services status" }, /* 9.9.3.4B SMS services status */
{ DE_EMM_CSFB_RESP, "CSFB response" }, /* 9.9.3.5 CSFB response */
{ DE_EMM_DAYL_SAV_T, "Daylight saving time" }, /* 9.9.3.6 Daylight saving time */
{ DE_EMM_DET_TYPE, "Detach type" }, /* 9.9.3.7 Detach type */
{ DE_EMM_DRX_PAR, "DRX parameter" }, /* 9.9.3.8 DRX parameter */
{ DE_EMM_CAUSE, "EMM cause" }, /* 9.9.3.9 EMM cause */
{ DE_EMM_ATT_RES, "EPS attach result" }, /* 9.9.3.10 EPS attach result */
{ DE_EMM_ATT_TYPE, "EPS attach type" }, /* 9.9.3.11 EPS attach type */
{ DE_EMM_EPS_MID, "EPS mobile identity" }, /* 9.9.3.12 EPS mobile identity */
{ DE_EMM_EPS_NET_FEATURE_SUP, "EPS network feature support" }, /* 9.9.3.12A EPS network feature support */
{ DE_EMM_EPS_UPD_RES, "EPS update result" }, /* 9.9.3.13 EPS update result */
{ DE_EMM_EPS_UPD_TYPE, "EPS update type" }, /* 9.9.3.14 EPS update type */
{ DE_EMM_ESM_MSG_CONT, "ESM message container" }, /* 9.9.3.15 ESM message conta */
{ DE_EMM_GPRS_TIMER, "GPRS timer" }, /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. */
{ DE_EMM_GPRS_TIMER_2, "GPRS timer 2" }, /* 9.9.3.16A GPRS timer 2, See subclause 10.5.7.4 in 3GPP TS 24.008. */
{ DE_EMM_GPRS_TIMER_3, "GPRS timer 3" }, /* 9.9.3.16B GPRS timer 3, See subclause 10.5.7.4a in 3GPP TS 24.008. */
{ DE_EMM_ID_TYPE_2, "Identity type 2" }, /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
{ DE_EMM_IMEISV_REQ, "IMEISV request" }, /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
{ DE_EMM_KSI_AND_SEQ_NO, "KSI and sequence number" }, /* 9.9.3.19 KSI and sequence number */
{ DE_EMM_MS_NET_CAP, "MS network capability" }, /* 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. */
{ DE_EMM_MS_NET_FEAT_SUP, "MS network feature support" }, /* 9.9.3.20A MS network feature support, See subclause 10.5.1.15 in 3GPP TS 24.008. */
{ DE_EMM_NAS_KEY_SET_ID, "NAS key set identifier" }, /* 9.9.3.21 NAS key set identifier */
{ DE_EMM_NAS_MSG_CONT, "NAS message container" }, /* 9.9.3.22 NAS message container */
{ DE_EMM_NAS_SEC_ALGS, "NAS security algorithms" }, /* 9.9.3.23 NAS security algorithms */
{ DE_EMM_NET_NAME, "Network name" }, /* 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. */
{ DE_EMM_NONCE, "Nonce" }, /* 9.9.3.25 Nonce */
{ DE_EMM_PAGING_ID, "Paging identity" }, /* 9.9.3.25A Paging identity */
{ DE_EMM_P_TMSI_SIGN, "P-TMSI signature" }, /* 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. */
{ DE_EMM_EXT_CAUSE, " Extended EMM cause" }, /* 9.9.3.26A Extended EMM cause */
{ DE_EMM_SERV_TYPE, "Service type" }, /* 9.9.3.27 Service type ,See subclause 10.5.5.15 in 3GPP TS 24.008 [6]. */
{ DE_EMM_SHORT_MAC, "Short MAC" }, /* 9.9.3.28 Short MAC */
{ DE_EMM_TZ, "Time zone" }, /* 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. */
{ DE_EMM_TZ_AND_T, "Time zone and time" }, /* 9.9.3.30 Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. */
{ DE_EMM_TMSI_STAT, "TMSI status" }, /* 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. */
{ DE_EMM_TRAC_AREA_ID, "Tracking area identity" }, /* 9.9.3.32 Tracking area identity */
{ DE_EMM_TRAC_AREA_ID_LST, "Tracking area identity list" }, /* 9.9.3.33 Tracking area identity list */
{ DE_EMM_UE_NET_CAP, "UE network capability" }, /* 9.9.3.34 UE network capability */
{ DE_EMM_UE_RA_CAP_INF_UPD_NEED, "UE radio capability information update needed" },/* 9.9.3.35 UE radio capability information update needed */
{ DE_EMM_UE_SEC_CAP, "UE security capability" }, /* 9.9.3.36 UE security capability */
{ DE_EMM_EMERG_NUM_LIST, "Emergency Number List" }, /* 9.9.3.37 Emergency Number List */
{ DE_EMM_EXT_EMERG_NUM_LIST, "Extended Emergency Number List" }, /* 9.9.3.37a Extended Emergency Number List */
{ DE_EMM_CLI, "CLI" }, /* 9.9.3.38 CLI */
{ DE_EMM_SS_CODE, "SS Code" }, /* 9.9.3.39 SS Code */
{ DE_EMM_LCS_IND, "LCS indicator" }, /* 9.9.3.40 LCS indicator */
{ DE_EMM_LCS_CLIENT_ID, "LCS client identity" }, /* 9.9.3.41 LCS client identity */
{ DE_EMM_GEN_MSG_CONT_TYPE, "Generic message container type" }, /* 9.9.3.42 Generic message container type */
{ DE_EMM_GEN_MSG_CONT, "Generic message container" }, /* 9.9.3.43 Generic message container */
{ DE_EMM_VOICE_DMN_PREF, "Voice domain preference and UEs usage setting" },/* 9.9.3.44 Voice domain preference and UEs usage setting */
{ DE_EMM_GUTI_TYPE, "GUTI type" }, /* 9.9.3.45 GUTI type */
{ DE_EMM_EXT_DRX_PARAMS, "Extended DRX parameters" }, /* 9.9.3.46 Extended DRX parameters */
{ DE_EMM_DATA_SERV_TYPE, "Data service type" }, /* 9.9.3.47 Data service type */
{ DE_EMM_DCN_ID, "DCN-ID" }, /* 9.9.3.48 DCN-ID */
{ DE_EMM_NON_3GPP_NW_PROV_POL, "Non-3GPP NW provided policies" }, /* 9.9.3.49 Non-3GPP NW provided policies */
{ DE_EMM_HASH_MME, "HashMME" }, /* 9.9.3.50 HashMME */
{ DE_EMM_REPLAYED_NAS_MSG_CONT, "Replayed NAS message container" }, /* 9.9.3.51 Replayed NAS message container */
{ DE_EMM_NETWORK_POLICY, "Network policy" }, /* 9.9.3.52 Network policy */
{ DE_EMM_UE_ADD_SEC_CAP, "UE additional security capability" }, /* 9.9.3.53 UE additional security capability */
{ DE_EMM_UE_STATUS, "UE status" }, /* 9.9.3.54 UE status */
{ DE_EMM_ADD_INFO_REQ, "Additional information requested" }, /* 9.9.3.55 Additional information requested */
{ DE_EMM_CIPH_KEY_DATA, "Ciphering key data" }, /* 9.9.3.56 Ciphering key data */
{ DE_EMM_N1_UE_NETWORK_CAP, "N1 UE network capability" }, /* 9.9.3.57 N1 UE network capability */
{ DE_EMM_UE_RADIO_CAP_ID_AVAIL, "UE radio capability ID availability" }, /* 9.9.3.58 UE radio capability ID availability */
{ DE_EMM_UE_RADIO_CAP_ID_REQ, "UE radio capability ID request" }, /* 9.9.3.59 UE radio capability ID request */
{ DE_EMM_UE_RADIO_CAP_ID, "UE radio capability ID" }, /* 9.9.3.60 UE radio capability ID */
{ DE_EMM_UE_RADIO_CAP_ID_DEL_IND, "UE radio capability ID deletion indication" }, /* 9.9.3.61 UE radio capability ID deletion indication */
{ DE_EMM_WUS_ASSIST_INFO, "WUS assistance information" }, /* 9.9.3.62 WUS assistance information */
{ DE_EMM_NB_S1_DRX_PARAM, "NB-S1 DRX parameter" }, /* 9.9.3.63 NB-S1 DRX parameter */
{ DE_EMM_IMSI_OFFSET, "IMSI offset" }, /* 9.9.3.64 IMSI offset */
{ DE_EMM_UE_REQUEST_TYPE, "UE request type" }, /* 9.9.3.65 UE request type */
{ DE_EMM_PAGING_RESTRICTION, "Paging restriction" }, /* 9.9.3.66 Paging restriction */
{ DE_EMM_EPS_ADD_REQ_RESULT, "EPS additional request result" }, /* 9.9.3.67 EPS additional request result */
{ 0, NULL }
};
value_string_ext nas_emm_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_emm_elem_strings);
#define NUM_NAS_EMM_ELEM (sizeof(nas_emm_elem_strings)/sizeof(value_string))
gint ett_nas_eps_emm_elem[NUM_NAS_EMM_ELEM];
#if 0
/* This enum has been moved to packet-gsm_a_common to
make it possible to use element dissection from this dissector
in other dissectors.
It is left here as a comment for easier reference.
*/
/*
Note this enum must be of the same size as the element decoding list
*/
typedef enum
{
/* 9.9.3 EPS Mobility Management (EMM) information elements */
DE_EMM_ADD_UPD_RES, /* 9.9.3.0A Additional update result */
DE_EMM_ADD_UPD_TYPE, /* 9.9.3.0B Additional update type */
DE_EMM_AUTH_FAIL_PAR, /* 9.9.3.1 Authentication failure parameter (dissected in packet-gsm_a_dtap.c)*/
DE_EMM_AUTN, /* 9.9.3.2 Authentication parameter AUTN */
DE_EMM_AUTH_PAR_RAND, /* 9.9.3.3 Authentication parameter RAND */
DE_EMM_AUTH_RESP_PAR, /* 9.9.3.4 Authentication response parameter */
DE_EMM_SMS_SERVICES_STATUS, /* 9.9.3.4B SMS services status */
DE_EMM_CSFB_RESP, /* 9.9.3.5 CSFB response */
DE_EMM_DAYL_SAV_T, /* 9.9.3.6 Daylight saving time */
DE_EMM_DET_TYPE, /* 9.9.3.7 Detach type */
DE_EMM_DRX_PAR, /* 9.9.3.8 DRX parameter (dissected in packet-gsm_a_gm.c)*/
DE_EMM_CAUSE, /* 9.9.3.9 EMM cause */
DE_EMM_ATT_RES, /* 9.9.3.10 EPS attach result (Coded inline */
DE_EMM_ATT_TYPE, /* 9.9.3.11 EPS attach type (Coded Inline)*/
DE_EMM_EPS_MID, /* 9.9.3.12 EPS mobile identity */
DE_EMM_EPS_NET_FEATURE_SUP, /* 9.9.3.12A EPS network feature support */
DE_EMM_EPS_UPD_RES, /* 9.9.3.13 EPS update result ( Coded inline)*/
DE_EMM_EPS_UPD_TYPE, /* 9.9.3.14 EPS update type */
DE_EMM_ESM_MSG_CONT, /* 9.9.3.15 ESM message conta */
DE_EMM_GPRS_TIMER, /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. */
DE_EMM_GPRS_TIMER_2, /* 9.9.3.16A GPRS timer 2, See subclause 10.5.7.4 in 3GPP TS 24.008. */
DE_EMM_GPRS_TIMER_3, /* 9.9.3.16B GPRS timer 3, See subclause 10.5.7.4a in 3GPP TS 24.008. */
DE_EMM_ID_TYPE_2, /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
DE_EMM_IMEISV_REQ, /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
DE_EMM_KSI_AND_SEQ_NO, /* 9.9.3.19 KSI and sequence number */
DE_EMM_MS_NET_CAP, /* 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. */
DE_EMM_MS_NET_FEAT_SUP, /* 9.9.3.20A MS network feature support, See subclause 10.5.1.15 in 3GPP TS 24.008. */
DE_EMM_NAS_KEY_SET_ID, /* 9.9.3.21 NAS key set identifier (coded inline)*/
DE_EMM_NAS_MSG_CONT, /* 9.9.3.22 NAS message container */
DE_EMM_NAS_SEC_ALGS, /* 9.9.3.23 NAS security algorithms */
DE_EMM_NET_NAME, /* 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. */
DE_EMM_NONCE, /* 9.9.3.25 Nonce */
DE_EMM_PAGING_ID, /* 9.9.3.25A Paging identity */
DE_EMM_P_TMSI_SIGN, /* 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. */
DE_EMM_EXT_CAUSE, /* 9.9.3.26A Extended EMM cause */
DE_EMM_SERV_TYPE, /* 9.9.3.27 Service type */
DE_EMM_SHORT_MAC, /* 9.9.3.28 Short MAC */
DE_EMM_TZ, /* 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. */
DE_EMM_TZ_AND_T, /* 9.9.3.30 Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. */
DE_EMM_TMSI_STAT, /* 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. */
DE_EMM_TRAC_AREA_ID, /* 9.9.3.32 Tracking area identity */
DE_EMM_TRAC_AREA_ID_LST, /* 9.9.3.33 Tracking area identity list */
DE_EMM_UE_NET_CAP, /* 9.9.3.34 UE network capability */
DE_EMM_UE_RA_CAP_INF_UPD_NEED, /* 9.9.3.35 UE radio capability information update needed */
DE_EMM_UE_SEC_CAP, /* 9.9.3.36 UE security capability */
DE_EMM_EMERG_NUM_LIST, /* 9.9.3.37 Emergency Number List */
DE_EMM_EXT_EMERG_NUM_LIST, /* 9.9.3.37a Extended Emergency Number List */
DE_EMM_CLI, /* 9.9.3.38 CLI */
DE_EMM_SS_CODE, /* 9.9.3.39 SS Code */
DE_EMM_LCS_IND, /* 9.9.3.40 LCS indicator */
DE_EMM_LCS_CLIENT_ID, /* 9.9.3.41 LCS client identity */
DE_EMM_GEN_MSG_CONT_TYPE, /* 9.9.3.42 Generic message container type */
DE_EMM_GEN_MSG_CONT, /* 9.9.3.43 Generic message container */
DE_EMM_VOICE_DMN_PREF, /* 9.9.3.44 Voice domain preference and UEs usage setting */
DE_EMM_GUTI_TYPE, /* 9.9.3.45 GUTI type */
DE_EMM_EXT_DRX_PARAMS, /* 9.9.3.46 Extended DRX parameters */
DE_EMM_DATA_SERV_TYPE, /* 9.9.3.47 Data service type */
DE_EMM_DCN_ID, /* 9.9.3.48 DCN-ID */
DE_EMM_NON_3GPP_NW_PROV_POL /* 9.9.3.49 Non-3GPP NW provided policies */
DE_EMM_HASH_MME, /* 9.9.3.50 HashMME */
DE_EMM_REPLAYED_NAS_MSG_CONT, /* 9.9.3.51 Replayed NAS message container */
DE_EMM_NETWORK_POLICY, /* 9.9.3.52 Network policy */
DE_EMM_UE_ADD_SEC_CAP, /* 9.9.3.53 UE additional security capability */
DE_EMM_UE_STATUS, /* 9.9.3.54 UE status */
DE_EMM_ADD_INFO_REQ /* 9.9.3.55 Additional information requested */
DE_EMM_CIPH_KEY_DATA, /* 9.9.3.56 Ciphering key data */
DE_EMM_N1_UE_NETWORK_CAP, /* 9.9.3.57 N1 UE network capability */
DE_EMM_UE_RADIO_CAP_ID_AVAIL, /* 9.9.3.58 UE radio capability ID availability */
DE_EMM_UE_RADIO_CAP_ID_REQ, /* 9.9.3.59 UE radio capability ID request */
DE_EMM_UE_RADIO_CAP_ID, /* 9.9.3.60 UE radio capability ID */
DE_EMM_UE_RADIO_CAP_ID_DEL_IND, /* 9.9.3.61 UE radio capability ID deletion indication */
DE_EMM_WUS_ASSIST_INFO, /* 9.9.3.62 WUS assistance information */
DE_EMM_NB_S1_DRX_PARAM, /* 9.9.3.63 NB-S1 DRX parameter */
DE_EMM_IMSI_OFFSET, /* 9.9.3.64 IMSI offset */
DE_EMM_UE_REQUEST_TYPE, /* 9.9.3.65 UE request type */
DE_EMM_PAGING_RESTRICTION, /* 9.9.3.66 Paging restriction */
DE_EMM_EPS_ADD_REQ_RESULT, /* 9.9.3.67 EPS additional request result */
DE_EMM_NONE /* NONE */
}
nas_emm_elem_idx_t;
#endif
/* TODO: Update to latest spec */
/* 9.9.3 EPS Mobility Management (EMM) information elements
*/
/*
* 9.9.3.0A Additional update result
*/
static const value_string nas_eps_emm_add_upd_res_vals[] = {
{ 0x0, "No additional information"},
{ 0x1, "CS Fallback not preferred"},
{ 0x2, "SMS only"},
{ 0x3, "Reserved"},
{ 0, NULL }
};
static guint16
de_emm_add_upd_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, bit_offset;
curr_offset = offset;
bit_offset = (curr_offset<<3)+4;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
bit_offset += 2;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_add_upd_res, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
curr_offset++;
return (curr_offset - offset);
}
/*
* 9.9.3.0B Additional update type
*/
static const value_string nas_eps_emm_pnb_ciot_vals[] = {
{ 0x0, "No additional information"},
{ 0x1, "Control plane CIoT EPS optimization"},
{ 0x2, "User plane CIoT EPS optimization"},
{ 0x3, "Reserved"},
{ 0, NULL }
};
static const true_false_string nas_eps_emm_saf_value = {
"Keeping the NAS signalling connection is required after the completion of the"
" tracking area updating procedure",
"Keeping the NAS signalling connection is not required after the completion of the"
" tracking area updating procedure"
};
static const true_false_string nas_eps_emm_add_upd_type_value = {
"SMS only",
"No additional information (shall be interpreted as request for"
" combined attach or combined tracking area updating)"
};
static guint16
de_emm_add_upd_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, bit_offset;
curr_offset = offset;
bit_offset = (curr_offset<<3)+4;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_pnb_ciot, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
bit_offset += 2;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_saf, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset += 1;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_add_upd_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
return (curr_offset - offset);
}
/*
* 9.9.3.1 Authentication failure parameter
* See subclause 10.5.3.2.2 in 3GPP TS 24.008 [6].
* (dissected in packet-gsm_a_dtap.c)
*/
/*
* 9.9.3.2 Authentication parameter AUTN
* See subclause 10.5.3.1.1 in 3GPP TS 24.008 [6].
*/
/*
* 9.9.3.3 Authentication parameter RAND
* See subclause 10.5.3.1 in 3GPP TS 24.008 [6].
*/
/*
* 9.9.3.4 Authentication response parameter
*/
static guint16
de_emm_auth_resp_par(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
proto_tree_add_item(tree, hf_nas_eps_emm_res, tvb, curr_offset, len, ENC_NA);
return len;
}
/*
* 9.9.3.4A Ciphering key sequence number
* See subclause 9.9.3.19 in 3GPP TS 24.008 [13].
*/
/*
* 9.9.3.4B SMS services status
*/
static const value_string nas_eps_emm_sms_services_status_vals[] = {
{ 0x0, "SMS services not available"},
{ 0x1, "SMS services not available in this PLMN"},
{ 0x2, "Network failure"},
{ 0x3, "Congestion"},
{ 0, NULL}
};
static guint16
de_emm_sms_services_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, bit_offset;
curr_offset = offset;
bit_offset = (curr_offset<<3)+4;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_sms_services_status, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
curr_offset++;
return (curr_offset - offset);
}
/*
* 9.9.3.5 CSFB response
*/
/*
* CSFB response value (octet 1)
*/
static const value_string nas_eps_emm_csfb_resp_vals[] = {
{ 0x0, "CS fallback rejected by the UE"},
{ 0x1, "CS fallback accepted by the UE"},
{ 0, NULL }
};
static guint16
de_emm_csfb_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, bit_offset;
curr_offset = offset;
/* bit 4 Spare */
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset+4, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_csfb_resp, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
return(curr_offset-offset);
}
/*
* 9.9.3.6 Daylight saving time
* See subclause 10.5.3.12 in 3GPP TS 24.008 [6].
*/
/*
* 9.9.3.7 Detach type
* Coded inline
*/
static const value_string nas_eps_emm_switch_off_vals[] = {
{ 0x0, "Normal detach"},
{ 0x1, "Switch off"},
{ 0x2, "Reserved"},
{ 0x3, "Reserved"},
{ 0x4, "Reserved"},
{ 0x5, "Reserved"},
{ 0x6, "Reserved"},
{ 0x7, "Reserved"},
{ 0, NULL }
};
/* Type of detach (octet 1)
* In the UE to network direction:
*/
static const value_string nas_eps_emm_type_of_detach_UL_vals[] = {
{ 0x1, "EPS detach"},
{ 0x2, "IMSI detach"},
{ 0x3, "Combined EPS/IMSI detach"},
{ 0x4, "Combined EPS/IMSI detach"}, /* All other values are interpreted as
"combined EPS/IMSI detach" in this version of the protocol.*/
{ 0x5, "Combined EPS/IMSI detach"}, /* -"- */
{ 0x6, "Reserved"},
{ 0x7, "Reserved"},
{ 0, NULL }
};
/*
* In the network to UE direction:
*/
static const value_string nas_eps_emm_type_of_detach_DL_vals[] = {
{ 0x1, "Re-attach required"},
{ 0x2, "Re-attach not required"},
{ 0x3, "IMSI detach"},
{ 0x4, "Re-attach not required"}, /* All other values are interpreted as
"re-attach not required" in this version of the protocol.*/
{ 0x5, "Re-attach not required"}, /* -"- */
{ 0x6, "Reserved"},
{ 0x7, "Reserved"},
{ 0, NULL }
};
/*
* 9.9.3.8 DRX parameter
* See subclause 10.5.5.6 in 3GPP TS 24.008 [13].
*/
/*
* 9.9.3.9 EMM cause
*/
const value_string nas_eps_emm_cause_values[] = {
{ 0x2, "IMSI unknown in HSS"},
{ 0x3, "Illegal UE"},
{ 0x5, "IMEI not accepted"},
{ 0x6, "Illegal ME"},
{ 0x7, "EPS services not allowed"},
{ 0x8, "EPS services and non-EPS services not allowed"},
{ 0x9, "UE identity cannot be derived by the network"},
{ 0xa, "Implicitly detached"},
{ 0xb, "PLMN not allowed"},
{ 0xc, "Tracking Area not allowed"},
{ 0xd, "Roaming not allowed in this tracking area"},
{ 0xe, "EPS services not allowed in this PLMN"},
{ 0xf, "No Suitable Cells In tracking area"},
{ 0x10, "MSC temporarily not reachable"},
{ 0x11, "Network failure"},
{ 0x12, "CS domain not available"},
{ 0x13, "ESM failure"},
{ 0x14, "MAC failure"},
{ 0x15, "Synch failure"},
{ 0x16, "Congestion"},
{ 0x17, "UE security capabilities mismatch"},
{ 0x18, "Security mode rejected, unspecified"},
{ 0x19, "Not authorized for this CSG"},
{ 0x1a, "Non-EPS authentication unacceptable"},
{ 0x1f, "Redirection to 5GCN required"},
{ 0x23, "Requested service option not authorized in this PLMN"},
{ 0x27, "CS service temporarily not available"},
{ 0x28, "No EPS bearer context activated"},
{ 0x2a, "Severe network failure"},
{ 0x4e, "PLMN not allowed to operate at the present UE location"},
{ 0x5f, "Semantically incorrect message"},
{ 0x60, "Invalid mandatory information"},
{ 0x61, "Message type non-existent or not implemented"},
{ 0x62, "Message type not compatible with the protocol state"},
{ 0x63, "Information element non-existent or not implemented"},
{ 0x64, "Conditional IE error"},
{ 0x65, "Message not compatible with the protocol state"},
{ 0x6f, "Protocol error, unspecified"},
{ 0, NULL }
};
value_string_ext nas_eps_emm_cause_values_ext = VALUE_STRING_EXT_INIT(nas_eps_emm_cause_values);
static guint16
de_emm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guint8 cause;
curr_offset = offset;
cause = tvb_get_guint8(tvb, curr_offset);
proto_tree_add_item(tree, hf_nas_eps_emm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
val_to_str_ext_const(cause, &nas_eps_emm_cause_values_ext, "Unknown"));
curr_offset++;
return curr_offset-offset;
}
/*
* 9.9.3.10 EPS attach result
*/
static const value_string nas_eps_emm_EPS_attach_result_values[] = {
{ 0, "reserved"},
{ 1, "EPS only"},
{ 2, "Combined EPS/IMSI attach"},
{ 3, "reserved"},
{ 4, "reserved"},
{ 5, "reserved"},
{ 6, "reserved"},
{ 7, "reserved"},
{ 0, NULL }
};
/* Coded inline */
/*
* 9.9.3.11 EPS attach type
*/
static const value_string nas_eps_emm_eps_att_type_vals[] = {
{ 0, "EPS attach(unused)"},
{ 1, "EPS attach"},
{ 2, "Combined EPS/IMSI attach"},
{ 3, "EPS RLOS attach"},
{ 4, "EPS attach(unused)"},
{ 5, "EPS attach(unused)"},
{ 6, "EPS emergency attach"},
{ 7, "Reserved"},
{ 0, NULL }
};
/* Coded inline */
/*
* 9.9.3.12 EPS mobile identity
*/
static true_false_string nas_eps_odd_even_value = {
"Odd number of identity digits",
"Even number of identity digits"
};
static const value_string nas_eps_emm_type_of_id_vals[] = {
{ 0, "reserved"},
{ 1, "IMSI"},
{ 2, "reserved"},
{ 3, "IMEI"},
{ 4, "reserved"},
{ 5, "reserved"},
{ 6, "GUTI"},
{ 7, "reserved"},
{ 0, NULL }
};
static guint16
de_emm_eps_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guint8 octet;
proto_item* ti;
curr_offset = offset;
octet = tvb_get_guint8(tvb,offset);
/* Type of identity (octet 3) */
proto_tree_add_item(tree, hf_nas_eps_emm_odd_even, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_type_of_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
switch (octet&0x7) {
case 1:
/* IMSI */
dissect_e212_imsi(tvb, pinfo, tree, curr_offset, len, TRUE);
break;
case 3:
/* IMEI */
proto_tree_add_item(tree, hf_nas_eps_emm_imei, tvb, curr_offset, len, ENC_BCD_DIGITS_0_9 | ENC_BCD_SKIP_FIRST);
break;
case 6:
/* GUTI */
curr_offset++;
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_GUMMEI, TRUE);
/* MME Group ID octet 7 - 8 */
proto_tree_add_item(tree, hf_nas_eps_emm_mme_grp_id, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset+=2;
/* MME Code Octet 9 */
proto_tree_add_item(tree, hf_nas_eps_emm_mme_code, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
/* M-TMSI Octet 10 - 13 */
proto_tree_add_item(tree, hf_nas_eps_emm_m_tmsi, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
ti = proto_tree_add_item(tree, hf_3gpp_tmsi, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
proto_item_set_hidden(ti);
/*curr_offset+=4;*/
break;
default:
proto_tree_add_expert(tree, pinfo, &ei_nas_eps_unknown_identity, tvb, curr_offset, len - 1);
break;
}
return(len);
}
/*
* 9.9.3.12A EPS network feature support
*/
static const value_string nas_eps_emm_cs_lcs_vals[] = {
{ 0, "no information about support of location services via CS domain is available"},
{ 1, "location services via CS domain supported"},
{ 2, "location services via CS domain not supported"},
{ 3, "reserved"},
{ 0, NULL }
};
static guint16
de_emm_eps_net_feature_sup(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
guint32 offset, guint len _U_,
gchar* add_string _U_, int string_len _U_)
{
guint32 curr_offset;
static int* const oct3_flags[] = {
&hf_nas_eps_emm_cp_ciot,
&hf_nas_eps_emm_er_wo_pdn,
&hf_nas_eps_emm_esr_ps,
&hf_nas_eps_emm_cs_lcs,
&hf_nas_eps_emm_epc_lcs,
&hf_nas_eps_emm_emc_bs,
&hf_nas_eps_emm_ims_vops,
NULL
};
static int* const oct4_flags[] = {
&hf_nas_eps_emm_15_bearers,
&hf_nas_eps_emm_iwkn26,
&hf_nas_eps_emm_restrict_dcnr,
&hf_nas_eps_emm_restrict_ec,
&hf_nas_eps_emm_epco,
&hf_nas_eps_emm_hc_cp_ciot,
&hf_nas_eps_emm_s1_u_data,
&hf_nas_eps_emm_up_ciot,
NULL
};
static int* const oct5_flags[] = {
&hf_nas_eps_emm_ptcc,
&hf_nas_eps_emm_pr,
&hf_nas_eps_emm_rpr,
&hf_nas_eps_emm_piv,
&hf_nas_eps_emm_ncr,
NULL
};
curr_offset = offset;
/* CP CIoT ERw/oPDN ESR PS CS-LCS EPC-LCS EMC BS IMS VoPS */
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct3_flags, ENC_NA);
curr_offset++;
/* Following octets are optional */
if ((curr_offset - offset) >= len)
return (len);
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct4_flags, ENC_NA);
curr_offset++;
if ((curr_offset - offset) >= len)
return (len);
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 3, ENC_BIG_ENDIAN);
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct5_flags, ENC_NA);
curr_offset++;
return len;
}
/*
* 9.9.3.13 EPS update result
*/
static const value_string nas_eps_emm_eps_update_result_vals[] = {
{ 0, "TA updated"},
{ 1, "Combined TA/LA updated"},
{ 2, "Reserved"},
{ 3, "Reserved"},
{ 4, "TA updated and ISR activated"},
{ 5, "Combined TA/LA updated and ISR activated"},
{ 6, "Reserved"},
{ 7, "Reserved"},
{ 0, NULL }
};
/*
* 9.9.3.14 EPS update type
*/
static const true_false_string nas_eps_emm_active_flg_value = {
"Bearer establishment requested",
"No bearer establishment requested"
};
static const value_string nas_eps_emm_eps_update_type_vals[] = {
{ 0, "TA updating"},
{ 1, "Combined TA/LA updating"},
{ 2, "Combined TA/LA updating with IMSI attach"},
{ 3, "Periodic updating"},
{ 4, "Unused; shall be interpreted as 'TA updating', if received by the network"},
{ 5, "Unused; shall be interpreted as 'TA updating', if received by the network"},
{ 6, "Reserved"},
{ 7, "Reserved"},
{ 0, NULL }
};
/*
* 9.9.3.15 ESM message container
*/
static guint16
de_emm_esm_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len,
gchar *add_string _U_, int string_len _U_)
{
proto_item *item;
proto_tree *sub_tree;
tvbuff_t *new_tvb;
guint32 curr_offset;
guint8 init_sec_hdr_type = tvb_get_bits8(tvb, 0, 4);
curr_offset = offset;
item = proto_tree_add_item(tree, hf_nas_eps_esm_msg_cont, tvb, curr_offset, len, ENC_NA);
sub_tree = proto_item_add_subtree(item, ett_nas_eps_esm_msg_cont);
/* This IE can contain any ESM PDU as defined in subclause 8.3. */
new_tvb = tvb_new_subset_length(tvb, curr_offset, len);
if (init_sec_hdr_type == 5) {
/* Integrity protected and partially ciphered NAS message */
guint8 pd = tvb_get_guint8(new_tvb, 0);
/* If pd is in plaintext this message probably isn't ciphered */
if (((pd&0x0f) != 2) || (((pd&0x0f) == 2) && ((pd&0xf0) > 0) && ((pd&0xf0) < 0x50))) {
proto_tree_add_item(sub_tree, hf_nas_eps_ciphered_msg, new_tvb, 0, len, ENC_NA);
} else {
TRY {
/* Potential plain NAS message: let's try to decode it and catch exceptions */
dissect_nas_eps_esm_msg(new_tvb, pinfo, sub_tree, 0/* offset */);
} CATCH_BOUNDS_ERRORS {
/* Dissection exception: message was probably ciphered and heuristic was too weak */
show_exception(new_tvb, pinfo, sub_tree, EXCEPT_CODE, GET_MESSAGE);
} ENDTRY
}
} else {
/* Plain NAS message */
dissect_nas_eps_esm_msg(new_tvb, pinfo, sub_tree, 0/* offset */);
}
return(len);
}
/*
* 9.9.3.16 GPRS timer
* See subclause 10.5.7.3 in 3GPP TS 24.008 [6].
* packet-gsm_a_gm.c
*/
/*
* 9.9.3.16A GPRS timer 2
* See subclause 10.5.7.4 in 3GPP TS 24.008.
* packet-gsm_a_gm.c
*/
/*
* 9.9.3.16B GPRS timer 3
* See subclause 10.5.7.4a in 3GPP TS 24.008.
* packet-gsm_a_gm.c
*/
/*
* 9.9.3.17 Identity type 2
* See subclause 10.5.5.9 in 3GPP TS 24.008 [6].
*/
static const value_string nas_eps_emm_id_type2_vals[] = {
{ 1, "IMSI"},
{ 2, "IMEI"},
{ 3, "IMEISV"},
{ 4, "TMSI"},
{ 0, NULL }
};
/*
* 9.9.3.18 IMEISV request
* See subclause 10.5.5.10 in 3GPP TS 24.008 [6].
*/
/* IMEISV request value (octet 1) */
static const value_string nas_eps_emm_imeisv_req_vals[] = {
{ 0, "IMEISV not requested"},
{ 1, "IMEISV requested"},
{ 2, "IMEISV not requested"},
{ 3, "IMEISV not requested"},
{ 4, "IMEISV not requested"},
{ 5, "IMEISV not requested"},
{ 6, "IMEISV not requested"},
{ 7, "IMEISV not requested"},
{ 0, NULL }
};
static guint16
de_emm_nas_imeisv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
int bit_offset;
curr_offset = offset;
bit_offset = curr_offset<<3;
bit_offset+=4;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_esm_imeisv_req, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
return(curr_offset - offset);
}
/*
* 9.9.3.19 KSI and sequence number
*/
static guint16
de_emm_nas_ksi_and_seq_no(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
int bit_offset;
curr_offset = offset;
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
bit_offset += 3;
proto_tree_add_bits_item(tree, hf_nas_eps_seq_no_short, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
curr_offset++;
return(curr_offset - offset);
}
/*
* 9.9.3.20 MS network capability
* See subclause 10.5.5.12 in 3GPP TS 24.008 [6].
* packet-gsm_a_gm.c
*/
/*
* 9.9.3.20A MS network feature support
* See subclause 10.5.1.15 in 3GPP TS 24.008.
* packet-gsm_a_gm.c
*/
/*
* 9.9.3.21 NAS key set identifier
*/
/*
* Type of security context flag (TSC) (octet 1)
*/
static const true_false_string nas_eps_tsc_value = {
"Mapped security context (for KSIsgsn or KSIamf)",
"Native security context (for KSIasme or KSIamf)"
};
/* NAS key set identifier (octet 1) Bits 3 2 1 */
static const value_string nas_eps_emm_NAS_key_set_identifier_vals[] = {
{ 0, ""},
{ 1, ""},
{ 2, ""},
{ 3, ""},
{ 4, ""},
{ 5, ""},
{ 6, ""},
{ 7, "No key is available"},
{ 0, NULL }
};
/* Takes bit offset as input and consumes 4 bits */
static void
de_emm_nas_key_set_id_bits(tvbuff_t *tvb, proto_tree *tree, guint32 bit_offset, const gchar *add_string)
{
proto_item *item;
/* Type of security context flag (TSC) (octet 1) V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_tsc, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
/* NAS key set identifier (octet 1) */
item = proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
if (add_string) {
proto_item_append_text(item, "%s", add_string);
}
/*bit_offset+=3;*/
}
/*
* Note used for TV Short
*/
static guint16
de_emm_nas_key_set_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, bit_offset;
curr_offset = offset;
/* Get the bit offset of the lover half of the octet bits 4 - 1 */
bit_offset = curr_offset<<3;
bit_offset+=4;
/* Type of security context flag (TSC) (octet 1) V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_tsc, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
/* NAS key set identifier (octet 1) */
proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
/*bit_offset+=3;*/
curr_offset++;
return(curr_offset - offset);
}
/*
* 9.9.3.22 NAS message container
*/
static guint16
de_emm_nas_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
proto_item *item;
proto_tree *sub_tree;
tvbuff_t *new_tvb;
guint32 curr_offset;
curr_offset = offset;
/* NAS message container contents (octet 3 to octet n)
* This IE can contain an SMS message (i.e. CP-DATA, CP-ACK or CP-ERROR)
* as defined in subclause 7.2 in 3GPP TS 24.011 [13A].
*/
item = proto_tree_add_item(tree, hf_nas_eps_nas_msg_cont, tvb, curr_offset, len, ENC_NA);
sub_tree = proto_item_add_subtree(item, ett_nas_eps_nas_msg_cont);
new_tvb = tvb_new_subset_length(tvb, curr_offset, len);
if (gsm_a_dtap_handle) {
if (tvb_get_bits8(tvb, 0, 4) == 5) {
/* Integrity protected and partially ciphered NAS message */
/* If pd is in plaintext this message probably isn't ciphered */
if (tvb_get_bits8(new_tvb, 4, 4) != 9) {
proto_tree_add_item(sub_tree, hf_nas_eps_ciphered_msg, new_tvb, 0, len, ENC_NA);
} else {
TRY {
/* Potential plain NAS message: let's try to decode it and catch exceptions */
call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, sub_tree);
} CATCH_BOUNDS_ERRORS {
/* Dissection exception: message was probably ciphered and heuristic was too weak */
show_exception(new_tvb, pinfo, sub_tree, EXCEPT_CODE, GET_MESSAGE);
} ENDTRY
}
} else {
/* Plain NAS message */
call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, sub_tree);
}
}
return(len);
}
/*
* 9.9.3.23 NAS security algorithms
*/
/* Type of integrity protection algorithm (octet 2, bit 1 to 3) */
static const value_string nas_eps_emm_toi_vals[] = {
{ 0, "EPS integrity algorithm EIA0 (null integrity protection algorithm)"},
{ 1, "EPS integrity algorithm 128-EIA1"},
{ 2, "EPS integrity algorithm 128-EIA2"},
{ 3, "EPS integrity algorithm 128-EIA3"},
{ 4, "EPS integrity algorithm EIA4"},
{ 5, "EPS integrity algorithm EIA5"},
{ 6, "EPS integrity algorithm EIA6"},
{ 7, "EPS integrity algorithm EIA7"},
{ 0, NULL }
};
/* Type of ciphering algorithm (octet 2, bit 5 to 7) */
static const value_string nas_eps_emm_toc_vals[] = {
{ 0, "EPS encryption algorithm EEA0 (null ciphering algorithm)"},
{ 1, "EPS encryption algorithm 128-EEA1"},
{ 2, "EPS encryption algorithm 128-EEA2"},
{ 3, "EPS encryption algorithm 128-EEA3"},
{ 4, "EPS encryption algorithm EEA4"},
{ 5, "EPS encryption algorithm EEA5"},
{ 6, "EPS encryption algorithm EEA6"},
{ 7, "EPS encryption algorithm EEA7"},
{ 0, NULL }
};
static guint16
de_emm_nas_sec_alsgs(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
int bit_offset;
guint32 curr_offset;
curr_offset = offset;
bit_offset = offset<<3;
/* Bit 4 and 8 of octet 2 are spare and shall be coded as zero. */
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
/* Type of ciphering algorithm (octet 2, bit 5 to 7) */
proto_tree_add_item(tree, hf_nas_eps_emm_toc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
bit_offset+=4;
/* Bit 4 and 8 of octet 2 are spare and shall be coded as zero. */
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
/* Type of integrity protection algorithm (octet 2, bit 1 to 3) */
proto_tree_add_item(tree, hf_nas_eps_emm_toi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
return(curr_offset-offset);
}
/*
* 9.9.3.24 Network name
* See subclause 10.5.3.5a in 3GPP TS 24.008 [6].
*/
/*
* 9.9.3.25 Nonce
*/
static guint16
de_emm_nonce(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
proto_tree_add_item(tree, hf_nas_eps_emm_nonce, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
curr_offset+=4;
return(curr_offset-offset);
}
/*
* 9.9.3.25A Paging identity
*/
static const true_false_string nas_eps_emm_paging_id_vals = {
"TMSI",
"IMSI"
};
static guint16
de_emm_paging_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
proto_tree_add_bits_item(tree, hf_nas_eps_emm_paging_id, tvb, (curr_offset<<3)+7, 1, ENC_BIG_ENDIAN);
/*curr_offset+=1;*/
return(1);
}
/*
* 9.9.3.26 P-TMSI signature
* See subclause 10.5.5.8 in 3GPP TS 24.008 [6].
*/
/*
* 9.9.3.26A Extended EMM cause
*/
static const true_false_string nas_eps_emm_eps_optim_info = {
"Requested EPS optimization not supported",
"No EPS optimization information"
};
static guint16
de_emm_ext_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, bit_offset;
curr_offset = offset;
bit_offset = (curr_offset<<3)+4;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_nbiot_allowed_value, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_eps_optim_info, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_eutran_allowed_value, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
return (curr_offset - offset);
}
/*
* 9.9.3.27 Service type
*/
static const range_string nas_eps_service_type_vals[] = {
{ 0, 0, "Mobile originating CS fallback or 1xCS fallback"},
{ 1, 1, "Mobile terminating CS fallback or 1xCS fallback"},
{ 2, 2, "Mobile originating CS fallback emergency call or 1xCS fallback emergency call"},
{ 3, 4, "Mobile originating CS fallback or 1xCS fallback"},
{ 8, 11, "Packet services via S1"},
{ 0, 0, NULL }
};
/*
* 9.9.3.28 Short MAC
*/
static guint16
de_emm_nas_short_mac(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
proto_tree_add_item(tree, hf_nas_eps_emm_short_mac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset+=2;
return(curr_offset-offset);
}
/*
* 9.9.3.29 Time zone
* See subclause 10.5.3.8 in 3GPP TS 24.008 [6].
*/
/*
* 9.9.3.30 Time zone and time
* See subclause 10.5.3.9 in 3GPP TS 24.008 [6].
*/
/*
* 9.9.3.31 TMSI status
* See subclause 10.5.5.4 in 3GPP TS 24.008 [6].
*/
/*
* 9.9.3.32 Tracking area identity
*/
guint16
de_emm_trac_area_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_TAI, TRUE);
proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset+=2;
return(curr_offset-offset);
}
/*
* 9.9.3.33 Tracking area identity list
*/
/* Type of list (octet 1)
* Bits 7 6
*/
static const value_string nas_eps_emm_tai_tol_vals[] = {
{ 0, "list of TACs belonging to one PLMN, with non-consecutive TAC values"},
{ 1, "list of TACs belonging to one PLMN, with consecutive TAC values"},
{ 2, "list of TAIs belonging to different PLMNs"},
{ 0, NULL }
};
static guint16
de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len,
gchar *add_string _U_, int string_len _U_)
{
proto_item *item;
guint32 curr_offset, tac;
guint8 octet, tol, n_elem;
int i;
proto_item *it;
curr_offset = offset;
while ((curr_offset - offset) < len) {
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 1, ENC_BIG_ENDIAN);
/* Type of list (octet 1) Bits 7 6 */
proto_tree_add_item(tree, hf_nas_eps_emm_tai_tol, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* Number of elements (octet 1) Bits 5 4 3 2 1 */
octet = tvb_get_guint8(tvb,curr_offset)& 0x7f;
tol = octet >> 5;
n_elem = (octet & 0x1f)+1;
item = proto_tree_add_item(tree, hf_nas_eps_emm_tai_n_elem, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
if (n_elem<16) {
proto_item_append_text(item, " [+1 = %u element(s)]", n_elem);
} else {
n_elem = 16;
}
curr_offset++;
if (tol>2) {
proto_tree_add_expert(tree, pinfo, &ei_nas_eps_unknown_type_of_list, tvb, curr_offset, len-(curr_offset-offset));
return len;
}
switch (tol) {
case 0:
/* MCC digit 2 MCC digit 1 octet 2
* MNC digit 3 MCC digit 3 octet 3
* MNC digit 2 MNC digit 1 octet 4
*/
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_TAI, TRUE);
/* type of list = "000" */
/* TAC 1 octet 5
* TAC 1 (continued) octet 6
* ...
* ...
* TAC k octet 2k+3*
* TAC k (continued) octet 2k+4*
*/
if (len < (guint)(4+(n_elem*2))) {
proto_tree_add_expert(tree, pinfo, &ei_nas_eps_wrong_nb_of_elems, tvb, curr_offset, len-(curr_offset-offset));
return len;
}
for (i=0; i < n_elem; i++, curr_offset+=2)
proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
break;
case 1:
/* type of list = "001" */
/* MCC digit 2 MCC digit 1 octet 2
* MNC digit 3 MCC digit 3 octet 3
* MNC digit 2 MNC digit 1 octet 4
*/
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_TAI, TRUE);
proto_tree_add_item_ret_uint(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &tac);
curr_offset+=2;
for (i = 1; i < n_elem; i++) {
it = proto_tree_add_uint(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 0, tac+i);
proto_item_set_generated(it);
}
break;
case 2:
if (len< (guint)(1+(n_elem*5))) {
proto_tree_add_expert(tree, pinfo, &ei_nas_eps_wrong_nb_of_elems, tvb, curr_offset, len-(curr_offset-offset));
return len;
}
for (i=0; i < n_elem; i++) {
/* type of list = "010" */
/* MCC digit 2 MCC digit 1 octet 2
* MNC digit 3 MCC digit 3 octet 3
* MNC digit 2 MNC digit 1 octet 4
*/
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_TAI, TRUE);
proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset+=2;
}
break;
default:
/* Unknown ( Not in 3GPP TS 24.301 version 8.1.0 Release 8 ) */
EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_eps_extraneous_data);
curr_offset = offset + len;
break;
}
}
return(curr_offset-offset);
}
/*
* 9.9.3.34 UE network capability
*/
static const true_false_string nas_eps_emm_ucs2_supp_flg_value = {
"The UE has no preference between the use of the default alphabet and the use of UCS2",
"The UE has a preference for the default alphabet"
};
guint16
de_emm_ue_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
static int * const oct3_flags[] = {
&hf_nas_eps_emm_eea0,
&hf_nas_eps_emm_128eea1,
&hf_nas_eps_emm_128eea2,
&hf_nas_eps_emm_eea3,
&hf_nas_eps_emm_eea4,
&hf_nas_eps_emm_eea5,
&hf_nas_eps_emm_eea6,
&hf_nas_eps_emm_eea7,
NULL
};
static int * const oct4_flags[] = {
&hf_nas_eps_emm_eia0,
&hf_nas_eps_emm_128eia1,
&hf_nas_eps_emm_128eia2,
&hf_nas_eps_emm_eia3,
&hf_nas_eps_emm_eia4,
&hf_nas_eps_emm_eia5,
&hf_nas_eps_emm_eia6,
&hf_nas_eps_emm_eps_upip,
NULL
};
static int * const oct5_flags[] = {
&hf_nas_eps_emm_uea0,
&hf_nas_eps_emm_uea1,
&hf_nas_eps_emm_uea2,
&hf_nas_eps_emm_uea3,
&hf_nas_eps_emm_uea4,
&hf_nas_eps_emm_uea5,
&hf_nas_eps_emm_uea6,
&hf_nas_eps_emm_uea7,
NULL
};
static int * const oct6_flags[] = {
&hf_nas_eps_emm_ucs2_supp,
&hf_nas_eps_emm_uia1,
&hf_nas_eps_emm_uia2,
&hf_nas_eps_emm_uia3,
&hf_nas_eps_emm_uia4,
&hf_nas_eps_emm_uia5,
&hf_nas_eps_emm_uia6,
&hf_nas_eps_emm_uia7,
NULL
};
static int * const oct7_flags[] = {
&hf_nas_eps_emm_prose_dd_cap,
&hf_nas_eps_emm_prose_cap,
&hf_nas_eps_emm_h245_ash_cap,
&hf_nas_eps_emm_acc_csfb_cap,
&hf_nas_eps_emm_lpp_cap,
&hf_nas_eps_emm_lcs_cap,
&hf_nas_eps_emm_1xsrvcc_cap,
&hf_nas_eps_emm_nf_cap,
NULL
};
static int * const oct8_flags[] = {
&hf_nas_eps_emm_epco_cap,
&hf_nas_eps_emm_hc_cp_ciot_cap,
&hf_nas_eps_emm_er_wo_pdn_cap,
&hf_nas_eps_emm_s1u_data_cap,
&hf_nas_eps_emm_up_ciot_cap,
&hf_nas_eps_emm_cp_ciot_cap,
&hf_nas_eps_emm_prose_relay_cap,
&hf_nas_eps_emm_prose_dc_cap,
NULL
};
static int * const oct9_flags[] = {
&hf_nas_eps_15_bearers_cap,
&hf_nas_eps_sgc_cap,
&hf_nas_eps_n1mode_cap,
&hf_nas_eps_dcnr_cap,
&hf_nas_eps_cp_backoff_cap,
&hf_nas_eps_restrict_ec_cap,
&hf_nas_eps_v2x_pc5_cap,
&hf_nas_eps_multiple_drb_cap,
NULL
};
static int * const oct10_flags[] = {
&hf_nas_eps_rpr_cap,
&hf_nas_eps_piv_cap,
&hf_nas_eps_ncr_cap,
&hf_nas_eps_v2x_nr_pc5_cap,
&hf_nas_eps_up_mt_edt_cap,
&hf_nas_eps_cp_mt_edt_cap,
&hf_nas_eps_wsua_cap,
&hf_nas_eps_racs_cap,
NULL
};
static int * const oct11_flags[] = {
&hf_nas_eps_ptcc_cap,
&hf_nas_eps_pr_cap,
NULL
};
curr_offset = offset;
/* EPS encryption algorithms supported (octet 3) */
/* EEA0 128-EEA1 128-EEA2 128-EEA3 EEA4 EEA5 EEA6 EEA7 */
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct3_flags, ENC_NA);
curr_offset++;
/* EPS integrity algorithms supported (octet 4) */
/* EIA0 128-EIA1 128-EIA2 128-EIA3 EIA4 EIA5 EIA6 EPS-UPIP */
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct4_flags, ENC_NA);
curr_offset++;
/* Following octets are optional */
if ((curr_offset - offset) >= len)
return (len);
/* UMTS encryption algorithms supported (octet 5)
* UEA0 UEA1 UEA2 UEA3 UEA4 UEA5 UEA6 UEA7 */
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct5_flags, ENC_NA);
curr_offset++;
if ((curr_offset - offset) >= len)
return (len);
/* Octet 6 */
/* UCS2 UIA1 UIA2 UIA3 UIA4 UIA5 UIA6 UIA7 */
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct6_flags, ENC_NA);
curr_offset++;
if ((curr_offset - offset) >= len)
return (len);
/* Octet 7
* ProSe-dd ProSe H.245-ASH ACC-CSFB LPP LCS 1xSR VCC NF
*/
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct7_flags, ENC_NA);
curr_offset++;
if ((curr_offset - offset) >= len)
return (len);
/* Octet 8
* ePCO HC-CP CIoT ERw/oPDN S1-U data UP CIoT CP CIoT Prose-relay ProSe-dc
*/
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct8_flags, ENC_NA);
curr_offset++;
if ((curr_offset - offset) >= len)
return (len);
/* Octet 9
* 15 bearers SGC N1mode DCNR CP backoff RestrictEC V2X PC5 multipleDRB
*/
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct9_flags, ENC_NA);
curr_offset++;
if ((curr_offset - offset) >= len)
return (len);
/* Octet 10
* RPR PIV NCR V2X NR-PC5 UP-MT-EDT CP-MT-EDT WSUA RACS
*/
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct10_flags, ENC_NA);
curr_offset++;
if ((curr_offset - offset) >= len)
return (len);
/* Octet 11
* 0 0 0 0 0 0 PTCC PR
*/
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 6, ENC_BIG_ENDIAN);
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct11_flags, ENC_NA);
curr_offset++;
while ((curr_offset - offset) < len) {
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3), 8, ENC_BIG_ENDIAN);
curr_offset++;
}
return(len);
}
/* UE radio capability information update needed flag (URC upd) (octet 1) */
static const true_false_string nas_eps_emm_ue_ra_cap_inf_upd_need_flg = {
"UE radio capability information update needed",
"UE radio capability information update not needed"
};
/*
* 9.9.3.35 UE radio capability information update needed
*/
static guint16
de_emm_ue_ra_cap_inf_upd_need(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3)+4, 3, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ue_ra_cap_inf_upd_need_flg, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
return(len);
}
/*
* 9.9.3.36 UE security capability
*/
static guint16
de_emm_ue_sec_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
static int * const oct3_flags[] = {
&hf_nas_eps_emm_eea0,
&hf_nas_eps_emm_128eea1,
&hf_nas_eps_emm_128eea2,
&hf_nas_eps_emm_eea3,
&hf_nas_eps_emm_eea4,
&hf_nas_eps_emm_eea5,
&hf_nas_eps_emm_eea6,
&hf_nas_eps_emm_eea7,
NULL
};
static int * const oct4_flags[] = {
&hf_nas_eps_emm_eia0,
&hf_nas_eps_emm_128eia1,
&hf_nas_eps_emm_128eia2,
&hf_nas_eps_emm_eia3,
&hf_nas_eps_emm_eia4,
&hf_nas_eps_emm_eia5,
&hf_nas_eps_emm_eia6,
&hf_nas_eps_emm_eps_upip,
NULL
};
static int * const oct5_flags[] = {
&hf_nas_eps_emm_uea0,
&hf_nas_eps_emm_uea1,
&hf_nas_eps_emm_uea2,
&hf_nas_eps_emm_uea3,
&hf_nas_eps_emm_uea4,
&hf_nas_eps_emm_uea5,
&hf_nas_eps_emm_uea6,
&hf_nas_eps_emm_uea7,
NULL
};
static int * const oct6_flags[] = {
&hf_nas_eps_spare_b7,
&hf_nas_eps_emm_uia1,
&hf_nas_eps_emm_uia2,
&hf_nas_eps_emm_uia3,
&hf_nas_eps_emm_uia4,
&hf_nas_eps_emm_uia5,
&hf_nas_eps_emm_uia6,
&hf_nas_eps_emm_uia7,
NULL
};
static int * const oct7_flags[] = {
&hf_nas_eps_spare_b7,
&hf_nas_eps_emm_gea1,
&hf_nas_eps_emm_gea2,
&hf_nas_eps_emm_gea3,
&hf_nas_eps_emm_gea4,
&hf_nas_eps_emm_gea5,
&hf_nas_eps_emm_gea6,
&hf_nas_eps_emm_gea7,
NULL
};
curr_offset = offset;
/* EPS encryption algorithms supported (octet 3) */
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct3_flags, ENC_NA);
curr_offset++;
/* EPS integrity algorithms supported (octet 4) */
/* EIA0 128-EIA1 128-EIA2 128-EIA3 EIA4 EIA5 EIA6 EPS-UPIP */
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct4_flags, ENC_NA);
curr_offset++;
/* Octets 5, 6, and 7 are optional. If octet 5 is included,
* then also octet 6 shall be included and octet 7 may be included.
*/
if (len == 2)
return(len);
/* UMTS encryption algorithms supported (octet 5)
* UEA0 UEA1 UEA2 UEA3 UEA4 UEA5 UEA6 UEA7
*/
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct5_flags, ENC_NA);
curr_offset++;
/* UMTS integrity algorithms supported (octet 6) */
/* Spare UIA1 UIA2 UIA3 UIA4 UIA5 UIA6 UIA7 */
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct6_flags, ENC_NA);
curr_offset++;
if (len == 4)
return(len);
/* GPRS encryption algorithms supported (octet 7) */
/* 0 spare GEA1 GEA2 GEA3 GEA4 GEA5 GEA6 GEA7*/
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct7_flags, ENC_NA);
curr_offset++;
return(len);
}
/*
* 9.9.3.37 Emergency Number List
* See subclause 10.5.3.13 in 3GPP TS 24.008 [13].
* packet-gsm_a_dtap.c
*/
/*
* 9.9.3.37a Extended Emergency Number List
*/
static true_false_string tfs_eenlv_value = {
"Valid only in the PLMN from which this IE is received",
"Valid in the country of the PLMN from which this IE is received"
};
static guint16
de_emm_ext_emerg_num_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 saved_offset, curr_offset = offset;
guint32 length, i = 1;
proto_item *pi;
proto_tree *sub_tree;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_eps_emm_ext_emerg_num_list_eenlv, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
while ((curr_offset - offset) < len) {
saved_offset = curr_offset;
sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_eps_ext_emerg_num,
&pi, "Extended emergency number #%u", i++);
proto_tree_add_item_ret_uint(sub_tree, hf_eps_emm_ext_emerg_num_list_emerg_num_len,
tvb, curr_offset, 1, ENC_NA, &length);
curr_offset++;
if (length > 0) {
proto_tree_add_item(sub_tree, hf_eps_emm_ext_emerg_num_list_emerg_num, tvb, curr_offset, length, ENC_BCD_DIGITS_0_9);
curr_offset += length;
}
proto_tree_add_item_ret_uint(sub_tree, hf_eps_emm_ext_emerg_num_list_sub_serv_field_len,
tvb, curr_offset, 1, ENC_NA, &length);
curr_offset++;
if (length > 0) {
proto_tree_add_ts_23_038_7bits_packed_item(sub_tree, hf_eps_emm_ext_emerg_num_list_sub_serv_field,
tvb, curr_offset<<3, (length<<3)/7);
curr_offset += length;
}
proto_item_set_len(pi, curr_offset - saved_offset);
}
return len;
}
/*
* 9.9.3.38 CLI
*/
/*
* The coding of the CLI value part is the same as for octets 3 to 14
* of the Calling party BCD number information element defined in
* subclause 10.5.4.9 of 3GPP TS 24.008
*/
/*
* 9.9.3.39 SS Code
*/
static guint16
de_emm_ss_code(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
/*
* SS Code value
* The coding of the SS Code value is given in subclause 17.7.5 of 3GPP TS 29.002 [15B].
* value string imported from gsm map
*/
proto_tree_add_item(tree, hf_nas_eps_emm_ss_code, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
return(len);
}
/*
* 9.9.3.40 LCS indicator
*/
/* LCS indicator value */
static const value_string nas_eps_emm_lcs_ind_vals[] = {
{ 0, "Normal, unspecified"},
{ 1, "MT-LR"},
{ 0, NULL }
};
static guint16
de_emm_lcs_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
proto_tree_add_item(tree, hf_nas_eps_emm_lcs_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
return(len);
}
/*
* 9.9.3.41 LCS client identity
*/
static guint16
de_emm_lcs_client_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
tvbuff_t *new_tvb;
curr_offset = offset;
/* LCS client identity (value part)
* The coding of the value part of the LCS client identity is given
* in subclause 17.7.13 of 3GPP TS 29.002 [15B](GSM MAP).
*/
new_tvb = tvb_new_subset_length(tvb, curr_offset, len);
dissect_gsm_map_lcs_LCS_ClientID_PDU( new_tvb, pinfo, tree, NULL );
return(len);
}
/*
* 9.9.3.42 Generic message container type
*/
static const range_string nas_eps_emm_gen_msg_cont_type_vals[] = {
{ 0, 0, "Reserved"},
{ 1, 1, "LTE Positioning Protocol (LPP) message container"},
{ 2, 2, "Location services message container"},
{ 3, 127, "Unused"},
{ 128, 255, "Reserved"},
{ 0, 0, NULL }
};
static guint16
de_emm_gen_msg_cont_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, msg_cont_type;
curr_offset = offset;
proto_tree_add_item_ret_uint(tree, hf_nas_eps_emm_gen_msg_cont_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &msg_cont_type);
p_add_proto_data(pinfo->pool, pinfo, proto_nas_eps, 0, GUINT_TO_POINTER(msg_cont_type));
curr_offset++;
return(curr_offset - offset);
}
/*
* 9.9.3.43 Generic message container
*/
static guint16
de_emm_gen_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len,
gchar *add_string _U_, int string_len _U_)
{
proto_item *item;
proto_tree *sub_tree;
tvbuff_t *new_tvb;
item = proto_tree_add_item(tree, hf_nas_eps_gen_msg_cont, tvb, offset, len, ENC_NA);
sub_tree = proto_item_add_subtree(item, ett_nas_eps_gen_msg_cont);
new_tvb = tvb_new_subset_length(tvb, offset, len);
switch (GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_nas_eps, 0))) {
case 1:
/* LPP */
if (lpp_handle) {
call_dissector(lpp_handle, new_tvb, pinfo, sub_tree);
}
break;
case 2:
/* Location services */
if (gsm_a_dtap_handle) {
call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, sub_tree);
}
break;
default:
break;
}
return(len);
}
/*
* 9.9.3.44 Voice domain preference and UE's usage setting
* See subclause 10.5.5.28 in 3GPP TS 24.008 [13].
* packet-gsm_a_dtap.c
*/
/*
* 9.9.3.45 GUTI type
*/
static const true_false_string nas_eps_emm_guti_type_value = {
"Mapped GUTI",
"Native GUTI"
};
static guint16
de_emm_guti_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, bit_offset;
curr_offset = offset;
bit_offset = (curr_offset<<3)+4;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
bit_offset += 3;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_guti_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
return (curr_offset - offset);
}
/*
* 9.9.3.46 Extended DRX parameters
* See subclause 10.5.5.32 in 3GPP TS 24.008
*/
/*
* 9.9.3.47 Data service type
* Coded inline 1/2 octet
*/
/*
* 9.9.3.48 DCN-ID
* See subclause 10.5.5.35 in 3GPP TS 24.008
*/
/*
* 9.9.3.49 Non-3GPP NW provided policies
* See subclause 10.5.5.37 in 3GPP TS 24.008
*/
/*
* 9.9.3.50 HashMME
*/
static guint16
de_emm_hash_mme(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
proto_tree_add_item(tree, hf_nas_eps_hash_mme, tvb, offset, 8, ENC_NA);
return len;
}
/*
* 9.9.3.51 Replayed NAS message container
*/
static guint16
de_emm_replayed_nas_msg_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
proto_item *item;
proto_tree *sub_tree;
item = proto_tree_add_item(tree, hf_nas_eps_replayed_nas_msg_cont, tvb, offset, len, ENC_NA);
sub_tree = proto_item_add_subtree(item, ett_nas_eps_replayed_nas_msg_cont);
tvbuff_t *replayed_tvb = tvb_new_subset_length(tvb, offset, len);
TRY {
dissect_nas_eps_emm_msg(replayed_tvb, pinfo, sub_tree, 0, TRUE);
} CATCH_BOUNDS_ERRORS {
show_exception(replayed_tvb, pinfo, sub_tree, EXCEPT_CODE, GET_MESSAGE);
} ENDTRY
return len;
}
/*
* 9.9.3.52 Network policy
*/
static const true_false_string nas_eps_redir_policy_vals = {
"Unsecured redirection to GERAN not allowed",
"Unsecured redirection to GERAN allowed"
};
static guint16
de_emm_network_policy(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (offset<<3)+4, 3, ENC_NA);
proto_tree_add_item(tree, hf_nas_eps_redir_policy, tvb, offset, 1, ENC_NA);
return 1;
}
/*
* 9.9.3.53 UE additional security capability
*/
guint16
de_emm_ue_add_sec_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
static int * const oct3_flags[] = {
&hf_nas_eps_emm_5g_ea0,
&hf_nas_eps_emm_128_5g_ea1,
&hf_nas_eps_emm_128_5g_ea2,
&hf_nas_eps_emm_128_5g_ea3,
&hf_nas_eps_emm_5g_ea4,
&hf_nas_eps_emm_5g_ea5,
&hf_nas_eps_emm_5g_ea6,
&hf_nas_eps_emm_5g_ea7,
NULL
};
static int * const oct4_flags[] = {
&hf_nas_eps_emm_5g_ea8,
&hf_nas_eps_emm_5g_ea9,
&hf_nas_eps_emm_5g_ea10,
&hf_nas_eps_emm_5g_ea11,
&hf_nas_eps_emm_5g_ea12,
&hf_nas_eps_emm_5g_ea13,
&hf_nas_eps_emm_5g_ea14,
&hf_nas_eps_emm_5g_ea15,
NULL
};
static int * const oct5_flags[] = {
&hf_nas_eps_emm_5g_ia0,
&hf_nas_eps_emm_128_5g_ia1,
&hf_nas_eps_emm_128_5g_ia2,
&hf_nas_eps_emm_128_5g_ia3,
&hf_nas_eps_emm_5g_ia4,
&hf_nas_eps_emm_5g_ia5,
&hf_nas_eps_emm_5g_ia6,
&hf_nas_eps_emm_5g_ia7,
NULL
};
static int * const oct6_flags[] = {
&hf_nas_eps_emm_5g_ia8,
&hf_nas_eps_emm_5g_ia9,
&hf_nas_eps_emm_5g_ia10,
&hf_nas_eps_emm_5g_ia11,
&hf_nas_eps_emm_5g_ia12,
&hf_nas_eps_emm_5g_ia13,
&hf_nas_eps_emm_5g_ia14,
&hf_nas_eps_emm_5g_ia15,
NULL
};
curr_offset = offset;
/* 5GS encryption algorithms supported (octet 3) */
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct3_flags, ENC_NA);
curr_offset++;
/* 5GS encryption algorithms supported (octet 4) */
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct4_flags, ENC_NA);
curr_offset++;
/* 5GS integrity algorithms supported (octet 5) */
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct5_flags, ENC_NA);
curr_offset++;
/* 5GS integrity algorithms supported (octet 6) */
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, oct6_flags, ENC_NA);
curr_offset++;
return 4;
}
/*
* 9.9.3.54 UE status
* see packet-nas_5gs.c
*/
/*
* 9.9.3.55 Additional information requested
*/
static guint16
de_emm_add_info_req(tvbuff_t *tvb , proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, offset<<3, 7, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_cipher_key, tvb, offset, 1, ENC_BIG_ENDIAN);
return 1;
}
/*
* 9.9.3.56 Ciphering key data
*/
static guint16
de_emm_ciph_key_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset,
guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 saved_offset, curr_offset = offset, c0_len, tai_len, i = 1;
guint8 oct;
struct tm tm;
nstime_t tv;
proto_item *pi;
proto_tree *sub_tree;
while ((curr_offset - offset) < len) {
static int * const flags1[] = {
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_1,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_2,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_3,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_4,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_5,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_6,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_7,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_1,
NULL
};
static int * const flags2[] = {
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_2,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_3,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_4,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_5,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_6,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_7,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_8,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_9,
NULL
};
static int * const flags3[] = {
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_10,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_11,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_12,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_13,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_14,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_15,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_16,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_17,
NULL
};
static int * const flags4[] = {
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_18,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_19,
&hf_nas_eps_emm_ciph_key_data_pos_sib_type_3_1,
NULL
};
saved_offset = curr_offset;
sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, ett_nas_eps_ciph_data_set,
&pi, "Ciphering data set #%u", i++);
proto_tree_add_item(sub_tree, hf_nas_eps_emm_ciph_key_data_ciphering_set_id, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset += 2;
proto_tree_add_item(sub_tree, hf_nas_eps_emm_ciph_key_data_ciphering_key, tvb, curr_offset, 16, ENC_NA);
curr_offset += 16;
proto_tree_add_bits_item(sub_tree, hf_nas_eps_spare_bits, tvb, offset<<3, 3, ENC_BIG_ENDIAN);
proto_tree_add_item_ret_uint(sub_tree, hf_nas_eps_emm_ciph_key_data_c0_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &c0_len);
curr_offset++;
if (c0_len) {
proto_tree_add_item(sub_tree, hf_nas_eps_emm_ciph_key_data_c0, tvb, curr_offset, c0_len, ENC_NA);
curr_offset += c0_len;
}
proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset, 1, flags1, ENC_NA);
curr_offset++;
proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset, 1, flags2, ENC_NA);
curr_offset++;
proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset, 1, flags3, ENC_NA);
curr_offset++;
proto_tree_add_bitmask_list(sub_tree, tvb, curr_offset, 1, flags4, ENC_NA);
curr_offset++;
tm.tm_wday = 0;
tm.tm_yday = 0;
tm.tm_isdst = -1;
oct = tvb_get_guint8(tvb, curr_offset);
tm.tm_year = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4) + 100;
oct = tvb_get_guint8(tvb, curr_offset+1);
tm.tm_mon = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4) - 1;
oct = tvb_get_guint8(tvb, curr_offset+2);
tm.tm_mday = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4);
oct = tvb_get_guint8(tvb, curr_offset+3);
tm.tm_hour = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4);
oct = tvb_get_guint8(tvb, curr_offset+4);
tm.tm_min = (oct & 0x0f)*10 + ((oct & 0xf0) >> 4);
tm.tm_sec = 0;
tv.secs = mktime(&tm);
tv.nsecs = 0;
proto_tree_add_time_format_value(sub_tree, hf_nas_eps_emm_ciph_key_data_validity_start_time, tvb, curr_offset, 5, &tv,
"%s", abs_time_to_str(pinfo->pool, &tv, ABSOLUTE_TIME_LOCAL, FALSE));
curr_offset += 5;
proto_tree_add_item(sub_tree, hf_nas_eps_emm_ciph_key_data_validity_duration, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset += 2;
proto_tree_add_item_ret_uint(sub_tree, hf_nas_eps_emm_ciph_key_data_tais_list_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &tai_len);
curr_offset++;
if (tai_len) {
de_emm_trac_area_id_lst(tvb, sub_tree, pinfo, curr_offset, tai_len, NULL, 0);
curr_offset += tai_len;
}
proto_item_set_len(pi, curr_offset - saved_offset);
}
return len;
}
/*
* 9.9.3.57 N1 UE network capability
*/
static const value_string nas_eps_emm_5gs_pnb_ciot_vals[] = {
{ 0x0, "No additional information"},
{ 0x1, "Control plane CIoT 5GS optimization"},
{ 0x2, "User plane CIoT 5GS optimization"},
{ 0x3, "Reserved"},
{ 0, NULL }
};
static guint16
de_emm_n1_ue_network_cap(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
guint32 offset, guint len _U_, gchar* add_string _U_, int string_len _U_)
{
static int* const flags_oct1[] = {
&hf_nas_eps_emm_5g_ehc_cp_ciot,
&hf_nas_eps_emm_5gs_pnb_ciot,
&hf_nas_eps_emm_5g_up_ciot,
&hf_nas_eps_emm_5g_hc_cp_ciot,
&hf_nas_eps_emm_n3_data,
&hf_nas_eps_emm_5g_cp_ciot,
NULL
};
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (offset<<3), 1, ENC_BIG_ENDIAN);
proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags_oct1, ENC_NA);
return 1;
}
/*
* 9.9.3.58 UE radio capability ID availability
*/
static const value_string nas_eps_emm_ue_radio_cap_id_avail_vals[] = {
{ 0x0, "Not available"},
{ 0x1, "Available"},
{ 0, NULL }
};
static guint16
de_emm_ue_radio_cap_id_avail(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
guint32 offset, guint len, gchar* add_string _U_, int string_len _U_)
{
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (offset<<3), 5, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ue_radio_cap_id_available, tvb, offset, 1, ENC_BIG_ENDIAN);
return len;
}
/*
* 9.9.3.59 UE radio capability ID request
*/
static guint16
de_emm_ue_radio_cap_id_req(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
guint32 offset, guint len, gchar* add_string _U_, int string_len _U_)
{
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (offset<<3), 7, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_ue_radio_cap_id_request, tvb, offset, 1, ENC_BIG_ENDIAN);
return len;
}
/* 9.9.3.60 UE radio capability ID
* See subclause 9.11.3.68 in 3GPP TS 24.501
*/
/* 9.9.3.61 UE radio capability ID deletion indication
* See subclause 9.11.3.69 in 3GPP TS 24.501
*/
/*
* 9.9.3.62 WUS assistance information
*/
static const value_string nas_eps_emm_wus_assist_info_type_vals[] = {
{ 0x0, "UE paging probability information"},
{ 0, NULL }
};
static void
de_emm_wus_assist_info_ue_paging_prob_fmt(gchar *s, guint32 val)
{
if (val < 20) {
snprintf(s, ITEM_LABEL_LENGTH, "p%u (%u)", val*5, val);
} else {
snprintf(s, ITEM_LABEL_LENGTH, "p100 (%u)", val);
}
}
static guint16
de_emm_wus_assist_info(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
guint32 offset, guint len, gchar* add_string _U_, int string_len _U_)
{
guint32 curr_offset = offset;
guint count = 1;
while ((curr_offset - offset) < len) {
guint32 type;
proto_tree *subtree;
subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 1, ett_nas_eps_wus_assist_info_type,
NULL, "WUS assistance information type %u", count);
proto_tree_add_item_ret_uint(subtree, hf_nas_eps_emm_wus_assist_info_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &type);
if (type == 0) {
proto_tree_add_item(subtree, hf_nas_eps_emm_wus_assist_info_ue_paging_prob, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
}
curr_offset++;
count++;
}
return len;
}
/*
* 9.9.3.63 NB-S1 DRX parameter
*/
static const value_string nas_eps_emm_nb_s1_drx_params_vals[] = {
{ 0x0, "DRX value not specified and use cell specific DRX value"},
{ 0x1, "DRX cycle parameter T = 32"},
{ 0x2, "DRX cycle parameter T = 64"},
{ 0x3, "DRX cycle parameter T = 128"},
{ 0x4, "DRX cycle parameter T = 256"},
{ 0x5, "DRX cycle parameter T = 512"},
{ 0x6, "DRX cycle parameter T = 1024"},
{ 0, NULL }
};
static guint16
de_emm_nb_s1_drx_param(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
guint32 offset, guint len, gchar* add_string _U_, int string_len _U_)
{
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (offset<<3), 4, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_emm_nb_s1_drx_param, tvb, offset, 1, ENC_BIG_ENDIAN);
return len;
}
/*
* 9.9.3.64 IMSI offset
*/
static guint16
de_emm_imsi_offset(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
guint32 offset, guint len, gchar* add_string _U_, int string_len _U_)
{
proto_tree_add_item(tree, hf_nas_eps_emm_imsi_offset, tvb, offset, 2, ENC_BIG_ENDIAN);
return len;
}
/*
* 9.9.3.65 UE request type
*/
static const value_string nas_eps_emm_ue_request_type_vals[] = {
{ 0x1, "NAS signalling connection release"},
{ 0x2, "Rejection of paging"},
{ 0, NULL }
};
static guint16
de_emm_ue_request_type(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
guint32 offset, guint len, gchar* add_string _U_, int string_len _U_)
{
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, offset<<3, 4, ENC_BIG_ENDIAN);
proto_tree_add_bits_item(tree, hf_nas_eps_emm_ue_request_type, tvb, (offset<<3) + 4, 4, ENC_BIG_ENDIAN);
return len;
}
/*
* 9.9.3.66 Paging restriction
*/
static const value_string nas_eps_emm_paging_restriction_type_vals[] = {
{ 0x1, "All paging is restricted"},
{ 0x2, "All paging is restricted except for voice service"},
{ 0x3, "All paging is restricted except for specified PDN connection(s)"},
{ 0x4, "All paging is restricted except for voice service and specified PDN connection(s)"},
{ 0, NULL }
};
static guint16
de_emm_paging_restriction(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
guint32 offset, guint len _U_, gchar* add_string _U_, int string_len _U_)
{
guint64 type;
guint32 curr_offset = offset;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
proto_tree_add_bits_ret_val(tree, hf_nas_eps_emm_paging_restriction_type,
tvb, (curr_offset<<3)+4, 4, &type, ENC_BIG_ENDIAN);
curr_offset++;
if (type == 3 || type == 4) {
static int* const flags[] = {
&hf_nas_eps_emm_paging_restriction_ebi7,
&hf_nas_eps_emm_paging_restriction_ebi6,
&hf_nas_eps_emm_paging_restriction_ebi5,
&hf_nas_eps_emm_paging_restriction_ebi4,
&hf_nas_eps_emm_paging_restriction_ebi3,
&hf_nas_eps_emm_paging_restriction_ebi2,
&hf_nas_eps_emm_paging_restriction_ebi1,
&hf_nas_eps_emm_paging_restriction_ebi0,
&hf_nas_eps_emm_paging_restriction_ebi15,
&hf_nas_eps_emm_paging_restriction_ebi14,
&hf_nas_eps_emm_paging_restriction_ebi13,
&hf_nas_eps_emm_paging_restriction_ebi12,
&hf_nas_eps_emm_paging_restriction_ebi11,
&hf_nas_eps_emm_paging_restriction_ebi10,
&hf_nas_eps_emm_paging_restriction_ebi9,
&hf_nas_eps_emm_paging_restriction_ebi8,
NULL
};
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 2, flags, ENC_BIG_ENDIAN);
curr_offset += 2;
}
return (curr_offset - offset);
}
/*
* 9.9.3.67 EPS additional request result
*/
static const value_string nas_eps_emm_eps_add_req_result_vals[] = {
{ 0x0, "no additional information"},
{ 0x1, "paging restriction is accepted"},
{ 0x2, "paging restriction is rejected"},
{ 0, NULL }
};
static guint16
de_emm_eps_add_req_result(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_,
guint32 offset, guint len, gchar* add_string _U_, int string_len _U_)
{
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, offset<<3, 6, ENC_BIG_ENDIAN);
proto_tree_add_bits_item(tree, hf_nas_eps_emm_paging_restriction_decision, tvb, (offset<<3) + 6, 2, ENC_BIG_ENDIAN);
return len;
}
/*
* 9.9.4 EPS Session Management (ESM) information elements
*/
/*
* 9.9.4.1 Access point name
* See subclause 10.5.6.1 in 3GPP TS 24.008 [6].
*/
/*
* 9.9.4.2 APN aggregate maximum bit rate
*/
guint16
de_esm_apn_aggr_max_br(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guint8 octet;
guint32 dl_total = 0;
guint32 ul_total = 0;
guint32 bitrate = 0;
curr_offset = offset;
/* APN-AMBR for downlink octet 3 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_apn_ambr_dl, tvb, curr_offset, 1, octet,
"Reserved");
} else {
bitrate = calc_bitrate(octet);
dl_total = bitrate;
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_apn_ambr_dl, tvb, curr_offset, 1, octet,
"%u kbps", bitrate);
}
curr_offset++;
/* APN-AMBR for uplink octet 4 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_apn_ambr_ul, tvb, curr_offset, 1, octet,
"Reserved");
} else {
bitrate = calc_bitrate(octet);
ul_total = bitrate;
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_apn_ambr_ul, tvb, curr_offset, 1, octet,
"%u kbps", bitrate);
}
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* APN-AMBR for downlink (extended) octet 5 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_apn_ambr_dl_ext, tvb, curr_offset, 1, octet,
"Use the value indicated by the APN-AMBR for downlink");
} else {
bitrate = calc_bitrate_ext(octet);
dl_total = (octet > 0x4a) ? bitrate*1000 : bitrate;
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_apn_ambr_dl_ext, tvb, curr_offset, 1, octet,
"%u %s", bitrate, (octet > 0x4a) ? "Mbps" : "kbps");
}
if (len < 5) {
/* APN-AMBR for downlink (extended-2) is not present; display total now */
if (dl_total >= 1000) {
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_apn_ambr_dl_total, tvb, curr_offset, 1, dl_total, "%.3f Mbps", (gfloat)dl_total / 1000);
} else {
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_apn_ambr_dl_total, tvb, curr_offset, 1, dl_total, "%u kbps", dl_total);
}
}
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* APN-AMBR for uplink (extended) octet 6 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_apn_ambr_ul_ext, tvb, curr_offset, 1, octet,
"Use the value indicated by the APN-AMBR for uplink");
} else {
bitrate = calc_bitrate_ext(octet);
ul_total = (octet > 0x4a) ? bitrate*1000 : bitrate;
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_apn_ambr_ul_ext, tvb, curr_offset, 1, octet,
"%u %s", bitrate, (octet > 0x4a) ? "Mbps" : "kbps");
}
if (len < 6) {
/* APN-AMBR for uplink (extended-2) is not present; display total now */
if (ul_total >= 1000) {
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_apn_ambr_ul_total, tvb, curr_offset, 1, ul_total, "%.3f Mbps", (gfloat)ul_total / 1000);
} else {
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_apn_ambr_ul_total, tvb, curr_offset, 1, ul_total, "%u kbps", ul_total);
}
}
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* APN-AMBR for downlink (extended-2) octet 7 */
octet = tvb_get_guint8(tvb,curr_offset);
if ((octet == 0)||(octet == 0xff)) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_apn_ambr_dl_ext2, tvb, curr_offset, 1, octet,
"Use the value indicated by the APN-AMBR for downlink and APN-AMBR for downlink (extended)");
} else {
dl_total += octet*256*1000;
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_apn_ambr_dl_ext2, tvb, curr_offset, 1, octet,
"%u Mbps", (octet* 256));
}
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_apn_ambr_dl_total, tvb, curr_offset, 1, dl_total, "%.3f Mbps", (gfloat)dl_total / 1000);
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* APN-AMBR for uplink (extended-2) octet 8 */
octet = tvb_get_guint8(tvb,curr_offset);
if ((octet == 0)||(octet == 0xff)) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_apn_ambr_ul_ext2, tvb, curr_offset, 1, octet,
"Use the value indicated by the APN-AMBR for uplink and APN-AMBR for uplink (extended)");
} else {
ul_total += octet*256*1000;
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_apn_ambr_ul_ext2, tvb, curr_offset, 1, octet,
"%u Mbps", (octet* 256));
}
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_apn_ambr_ul_total, tvb, curr_offset, 1, ul_total, "%.3f Mbps", (gfloat)ul_total / 1000);
curr_offset++;
return(len);
}
/*
* 9.9.4.2A Connectivity type
* See subclause 10.5.6.19 in 3GPP TS 24.008.
* packet-gsm_a_gm.c
*/
/*
* 9.9.4.3 EPS quality of service
*/
/* Quality of Service Class Identifier (QCI), octet 3 (see 3GPP TS 23.203 [7]) */
static const range_string nas_eps_qci_vals[] = {
{ 0x00, 0x00, "Reserved"},
{ 0x01, 0x01, "QCI 1"},
{ 0x02, 0x02, "QCI 2"},
{ 0x03, 0x03, "QCI 3"},
{ 0x04, 0x04, "QCI 4"},
{ 0x05, 0x05, "QCI 5"},
{ 0x06, 0x06, "QCI 6"},
{ 0x07, 0x07, "QCI 7"},
{ 0x08, 0x08, "QCI 8"},
{ 0x09, 0x09, "QCI 9"},
{ 0x0A, 0x40, "Spare"},
{ 0x41, 0x41, "QCI 65"},
{ 0x42, 0x42, "QCI 66"},
{ 0x43, 0x43, "QCI 67"},
{ 0x44, 0x44, "Spare"},
{ 0x45, 0x45, "QCI 69"},
{ 0x46, 0x46, "QCI 70"},
{ 0x47, 0x4A, "Spare"},
{ 0x4B, 0x4B, "QCI 75"},
{ 0x4C, 0x4E, "Spare"},
{ 0x4F, 0x4F, "QCI 79"},
{ 0x50, 0x50, "QCI 80"},
{ 0x51, 0x51, "Spare"},
{ 0x52, 0x52, "QCI 82"},
{ 0x53, 0x53, "QCI 83"},
{ 0x54, 0x54, "QCI 84"},
{ 0x55, 0x55, "QCI 85"},
{ 0x56, 0x7F, "Spare"},
{ 0x80, 0xFE, "Operator-specific QCI"},
{ 0xFF, 0xFF, "Reserved"},
{ 0, 0, NULL }
};
guint16
de_esm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guint8 octet;
curr_offset = offset;
/* QCI octet 3 */
proto_tree_add_item(tree, hf_nas_eps_esm_qci, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Maximum bit rate for uplink octet 4 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_mbr_ul, tvb, curr_offset, 1, octet,
"UE->NW Subscribed maximum bit rate for uplink/ NW->UE Reserved");
} else {
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_mbr_ul, tvb, curr_offset, 1, octet,
"%u kbps", calc_bitrate(octet));
}
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Maximum bit rate for downlink octet 5 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_mbr_dl, tvb, curr_offset, 1, octet,
"UE->NW Subscribed maximum bit rate for downlink/ NW->UE Reserved");
} else {
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_mbr_dl, tvb, curr_offset, 1, octet,
"%u kbps", calc_bitrate(octet));
}
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Guaranteed bit rate for uplink octet 6 */
octet = tvb_get_guint8(tvb,curr_offset);
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_gbr_ul, tvb, curr_offset, 1, octet,
"%u kbps", calc_bitrate(octet));
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Guaranteed bit rate for downlink octet 7 */
octet = tvb_get_guint8(tvb,curr_offset);
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_gbr_dl, tvb, curr_offset, 1, octet,
"%u kbps", calc_bitrate(octet));
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Maximum bit rate for uplink (extended) octet 8 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_embr_ul, tvb, curr_offset, 1, octet,
"Use the value indicated by the maximum bit rate for uplink in octet 4");
} else {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_embr_ul, tvb, curr_offset, 1, octet,
"Maximum bit rate for uplink (extended) : %u %s",
calc_bitrate_ext(octet),
(octet > 0x4a) ? "Mbps" : "kbps");
}
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Maximum bit rate for downlink (extended) octet 9 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_embr_dl, tvb, curr_offset, 1, octet,
"Use the value indicated by the maximum bit rate for downlink in octet 5");
} else {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_embr_dl, tvb, curr_offset, 1, octet,
"Maximum bit rate for downlink (extended) : %u %s",
calc_bitrate_ext(octet),
(octet > 0x4a) ? "Mbps" : "kbps");
}
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Guaranteed bit rate for uplink (extended) octet 10 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_egbr_ul, tvb, curr_offset, 1, octet,
"Use the value indicated by the guaranteed bit rate for uplink in octet 6");
} else {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_egbr_ul, tvb, curr_offset, 1, octet,
"Guaranteed bit rate for uplink (extended) : %u %s",
calc_bitrate_ext(octet),
(octet > 0x4a) ? "Mbps" : "kbps");
}
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Guaranteed bit rate for downlink (extended) octet 11 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_egbr_dl, tvb, curr_offset, 1, octet,
"Use the value indicated by the guaranteed bit rate for downlink in octet 7");
} else {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_egbr_dl, tvb, curr_offset, 1, octet,
"Guaranteed bit rate for downlink (extended) : %u %s",
calc_bitrate_ext(octet),
(octet > 0x4a) ? "Mbps" : "kbps");
}
curr_offset++;
if ((curr_offset - offset) >= len)
return(len);
/* Maximum bit rate for uplink (extended-2) octet 12 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_embr_ul, tvb, curr_offset, 1, octet,
"Use the value indicated by the maximum bit rate for uplink in octet 4 and octet 8");
} else {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_embr_ul, tvb, curr_offset, 1, octet,
"Maximum bit rate for uplink (extended-2) : %u Mbps",
calc_bitrate_ext2(octet));
}
curr_offset++;
/* Maximum bit rate for downlink (extended-2) octet 13 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_embr_dl, tvb, curr_offset, 1, octet,
"Use the value indicated by the maximum bit rate for downlink in octet 5 and octet 9");
} else {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_embr_dl, tvb, curr_offset, 1, octet,
"Maximum bit rate for downlink (extended-2) : %u Mbps",
calc_bitrate_ext2(octet));
}
curr_offset++;
/* Guaranteed bit rate for uplink (extended-2) octet 14 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_egbr_ul, tvb, curr_offset, 1, octet,
"Use the value indicated by the guaranteed bit rate for uplink in octet 6 and octet 10");
} else {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_egbr_ul, tvb, curr_offset, 1, octet,
"Guaranteed bit rate for uplink (extended-2) : %u Mbps",
calc_bitrate_ext2(octet));
}
curr_offset++;
/* Guaranteed bit rate for downlink (extended-2) octet 15 */
octet = tvb_get_guint8(tvb,curr_offset);
if (octet == 0) {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_egbr_dl, tvb, curr_offset, 1, octet,
"Use the value indicated by the guaranteed bit rate for downlink in octet 7 and octet 11");
} else {
proto_tree_add_uint_format(tree, hf_nas_eps_esm_egbr_dl, tvb, curr_offset, 1, octet,
"Guaranteed bit rate for downlink (extended-2) : %u Mbps",
calc_bitrate_ext2(octet));
}
return(len);
}
/*
* 9.9.4.4 ESM cause
*/
const value_string nas_eps_esm_cause_vals[] = {
{ 0x08, "Operator Determined Barring"},
{ 0x1a, "Insufficient resources"},
{ 0x1b, "Missing or unknown APN"},
{ 0x1c, "Unknown PDN type"},
{ 0x1d, "User authentication failed"},
{ 0x1e, "Request rejected by Serving GW or PDN GW"},
{ 0x1f, "Request rejected, unspecified"},
{ 0x20, "Service option not supported"},
{ 0x21, "Requested service option not subscribed"},
{ 0x22, "Service option temporarily out of order"},
{ 0x23, "PTI already in use"},
{ 0x24, "Regular deactivation"},
{ 0x25, "EPS QoS not accepted"},
{ 0x26, "Network failure"},
{ 0x27, "Reactivation requested"},
{ 0x29, "Semantic error in the TFT operation"},
{ 0x2a, "Syntactical error in the TFT operation"},
{ 0x2b, "Invalid EPS bearer identity"},
{ 0x2c, "Semantic errors in packet filter(s)"},
{ 0x2d, "Syntactical errors in packet filter(s)"},
{ 0x2e, "Unused"},
{ 0x2f, "PTI mismatch"},
{ 0x31, "Last PDN disconnection not allowed"},
{ 0x32, "PDN type IPv4 only allowed"},
{ 0x33, "PDN type IPv6 only allowed"},
{ 0x34, "Single address bearers only allowed"},
{ 0x35, "ESM information not received"},
{ 0x36, "PDN connection does not exist"},
{ 0x37, "Multiple PDN connections for a given APN not allowed"},
{ 0x38, "Collision with network initiated request"},
{ 0x39, "PDN type IPv4v6 only allowed"},
{ 0x3a, "PDN type non IP only allowed"},
{ 0x3b, "Unsupported QCI value"},
{ 0x3c, "Bearer handling not supported"},
{ 0x3d, "PDN type Ethernet only allowed"},
{ 0x41, "Maximum number of EPS bearers reached"},
{ 0x42, "Requested APN not supported in current RAT and PLMN combination"},
{ 0x51, "Invalid PTI value"},
{ 0x5f, "Semantically incorrect message"},
{ 0x60, "Invalid mandatory information"},
{ 0x61, "Message type non-existent or not implemented"},
{ 0x62, "Message type not compatible with the protocol state"},
{ 0x63, "Information element non-existent or not implemented"},
{ 0x64, "Conditional IE error"},
{ 0x65, "Message not compatible with the protocol state"},
{ 0x6f, "Protocol error, unspecified"},
{ 0x70, "APN restriction value incompatible with active EPS bearer context"},
{ 0x71, "Multiple accesses to a PDN connection not allowed"},
{ 0, NULL }
};
static value_string_ext nas_eps_esm_cause_vals_ext = VALUE_STRING_EXT_INIT(nas_eps_esm_cause_vals);
static guint16
de_esm_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guint8 cause;
curr_offset = offset;
cause = tvb_get_guint8(tvb, curr_offset);
proto_tree_add_item(tree, hf_nas_eps_esm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
val_to_str_ext_const(cause, &nas_eps_esm_cause_vals_ext, "Unknown"));
curr_offset++;
return(curr_offset - offset);
}
/*
* 9.9.4.5 ESM information transfer flag
*/
/* EIT (ESM information transfer) */
static const true_false_string nas_eps_emm_eit_vals = {
"Security protected ESM information transfer required",
"Security protected ESM information transfer not required"
};
static guint16
de_esm_inf_trf_flg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (curr_offset<<3)+4, 3, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_esm_eit, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
return(curr_offset-offset);
}
/*
* 9.9.4.6 Linked EPS bearer identity
*/
/*
* Linked EPS bearer identity (bits 1-4)
*/
static const value_string nas_eps_esm_linked_bearer_id_vals[] = {
{ 0x0, "Reserved"},
{ 0x1, "EPS bearer identity value 1"},
{ 0x2, "EPS bearer identity value 2"},
{ 0x3, "EPS bearer identity value 3"},
{ 0x4, "EPS bearer identity value 4"},
{ 0x5, "EPS bearer identity value 5"},
{ 0x6, "EPS bearer identity value 6"},
{ 0x7, "EPS bearer identity value 7"},
{ 0x8, "EPS bearer identity value 8"},
{ 0x9, "EPS bearer identity value 9"},
{ 0xa, "EPS bearer identity value 10"},
{ 0xb, "EPS bearer identity value 11"},
{ 0xc, "EPS bearer identity value 12"},
{ 0xd, "EPS bearer identity value 13"},
{ 0xe, "EPS bearer identity value 14"},
{ 0xf, "EPS bearer identity value 15"},
{ 0, NULL }
};
/*
* 9.9.4.7 LLC service access point identifier
* See subclause 10.5.6.9 in 3GPP TS 24.008
*/
/*
* 9.9.4.7a Notification indicator
*/
static const value_string nas_eps_esm_notif_ind_vals[] = {
{ 0x0, "Reserved"},
{ 0x1, "SRVCC handover cancelled, IMS session re-establishment required"},
{ 0, NULL }
};
static guint16
de_esm_notif_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
proto_tree_add_item(tree, hf_nas_eps_esm_notif_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
return(len);
}
/*
* 9.9.4.8 Packet flow identifier
* See subclause 10.5.6.11 in 3GPP TS 24.008
*/
/*
* 9.9.4.9 PDN address
*/
static guint16
de_esm_pdn_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_,
gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guint8 pdn_type;
guint8 interface_id[8];
curr_offset = offset;
pdn_type = tvb_get_guint8(tvb, offset) & 0x7;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 5, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_esm_pdn_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
switch (pdn_type) {
case 1:
/* IPv4 */
proto_tree_add_item(tree, hf_nas_eps_esm_pdn_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
curr_offset+=4;
break;
case 2:
/* IPv6 3GPP TS 24.301 version 9.4.0 Release 9
* If PDN type value indicates IPv6, the PDN address information in octet 4 to octet 11
* contains an IPv6 interface identifier. Bit 8 of octet 4 represents the most significant bit
* of the IPv6 interface identifier and bit 1 of octet 11 the least significant bit.
*/
tvb_memcpy(tvb, interface_id, curr_offset, 8);
proto_tree_add_bytes_format_value(tree, hf_nas_eps_esm_pdn_ipv6_if_id, tvb, curr_offset, 8, NULL,
"::%x:%x:%x:%x", pntoh16(&interface_id[0]), pntoh16(&interface_id[2]),
pntoh16(&interface_id[4]), pntoh16(&interface_id[6]));
curr_offset+=8;
break;
case 3:
/* IPv4/IPv6 3GPP TS 24.301 version 9.4.0 Release 9
* If PDN type value indicates IPv4v6, the PDN address information in octet 4 to octet 15
* contains an IPv6 interface identifier and an IPv4 address. Bit 8 of octet 4 represents
* the most significant bit of the IPv6 interface identifier and bit 1 of octet 11 the least
* significant bit. Bit 8 of octet 12 represents the most significant bit of the IPv4 address
* and bit 1 of octet 15 the least significant bit.
*/
tvb_memcpy(tvb, interface_id, curr_offset, 8);
proto_tree_add_bytes_format_value(tree, hf_nas_eps_esm_pdn_ipv6_if_id, tvb, curr_offset, 8, NULL,
"::%x:%x:%x:%x", pntoh16(&interface_id[0]), pntoh16(&interface_id[2]),
pntoh16(&interface_id[4]), pntoh16(&interface_id[6]));
curr_offset+=8;
proto_tree_add_item(tree, hf_nas_eps_esm_pdn_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
curr_offset+=4;
break;
case 5:
case 6:
curr_offset+=4;
break;
default:
break;
}
return(curr_offset-offset);
}
/*
* 9.9.4.10 PDN type
* Coded inline 1/2 octet
*/
static const value_string nas_eps_esm_pdn_type_values[] = {
{ 0x1, "IPv4" },
{ 0x2, "IPv6" },
{ 0x3, "IPv4v6" },
{ 0x4, "Unused; shall be interpreted as IPv6 if received by the network" },
{ 0x5, "Non IP" },
{ 0x6, "Ethernet" },
{ 0, NULL }
};
/*
* 9.9.4.11 Protocol configuration options
* See subclause 10.5.6.3 in 3GPP TS 24.008
*/
/*
* 9.9.4.12 Quality of service
* See subclause 10.5.6.5 in 3GPP TS 24.008
* Coded inline 1/2 octet
*/
/*
* 9.9.4.13 Radio priority
* See subclause 10.5.7.2 in 3GPP TS 24.008
*/
/*
* 9.9.4.13a Re-attempt indicator
*/
static const true_false_string nas_eps_esm_eplmnc_value = {
"UE is not allowed to re-attempt the procedure in an equivalent PLMN",
"UE is allowed to re-attempt the procedure in an equivalent PLMN"
};
static const true_false_string nas_eps_esm_ratc_value = {
"UE is not allowed to re-attempt the procedure in A/Gb mode or Iu mode or N1 mode",
"UE is allowed to re-attempt the procedure in A/Gb mode or Iu mode or N1 mode"
};
static guint16
de_esm_re_attempt_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset,
guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
curr_offset = offset;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, offset << 3, 6, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_esm_eplmnc, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_nas_eps_esm_ratc, tvb, offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_eps_extraneous_data);
return len;
}
/*
* 9.9.4.14 Request type
* See subclause 10.5.6.17 in 3GPP TS 24.008
*/
static const value_string nas_eps_esm_request_type_values[] = {
{ 0x1, "Initial request" },
{ 0x2, "Handover" },
{ 0x3, "Unused. If received, the network shall interpret this as 'initial request'" },
{ 0x4, "Emergency" },
{ 0x6, "Handover of emergency bearer services" },
{ 0, NULL }
};
/*
* 9.9.4.15 Traffic flow aggregate description
* The Traffic flow aggregate description information element is encoded using the same format as the Traffic flow
* template information element (see subclause 10.5.6.12 in 3GPP TS 24.008 [13]). When sending this IE, the UE shall
* assign the packet filter identifier values so that they are unique across all packet filters for the PDN connection.
*/
/*
* 9.9.4.16 Traffic flow template
* See subclause 10.5.6.12 in 3GPP TS 24.008
* packet-gsm_a_gm.c
*/
/*
* 9.9.4.17 Transaction identifier
* The Transaction identifier information element is coded as the Linked TI information element in 3GPP TS 24.008 [13],
* subclause 10.5.6.7.
* The coding of the TI flag, the TI value and the EXT bit is defined in 3GPP TS 24.007[20].
*/
/*
* 9.9.4.18 WLAN offload acceptability
* See subclause 10.5.6.20 in 3GPP TS 24.008
* packet-gsm_a_gm.c
*/
/*
* 9.9.4.19 NBIFOM container
*/
static guint16
de_esm_nbifom_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
if (nbifom_handle) {
tvbuff_t *nbifom_tvb = tvb_new_subset_length(tvb, offset, len);
call_dissector(nbifom_handle, nbifom_tvb, pinfo, tree);
} else {
proto_tree_add_item(tree, hf_nas_eps_esm_nbifom_cont, tvb, offset, len, ENC_NA);
}
return len;
}
/*
* 9.9.4.20 Remote UE context list
*/
static const value_string nas_eps_esm_user_info_type_values[] = {
{ 0x1, "Encrypted IMSI" },
{ 0x2, "IMSI" },
{ 0x3, "MSISDN" },
{ 0x4, "IMEI" },
{ 0x5, "IMEISV" },
{ 0, NULL }
};
static const value_string nas_eps_esm_address_type_values[] = {
{ 0x0, "No IP Info" },
{ 0x1, "IPv4" },
{ 0x2, "IPv6" },
{ 0, NULL }
};
static guint16
de_esm_remote_ue_context_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset = offset;
guint32 nb_ue_contexts, ue_context_len, nb_user_id, user_id_len, user_id_type, remote_address_type, i, j;
proto_tree *subtree;
proto_item *subtree_item;
proto_tree_add_item_ret_uint(tree, hf_nas_eps_esm_remote_ue_context_list_nb_ue_contexts, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &nb_ue_contexts);
curr_offset ++;
for (i = 1; i <= nb_ue_contexts; i++) {
subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, len - (curr_offset - offset), ett_nas_eps_remote_ue_context,
&subtree_item, "Remote UE context %u", i);
proto_tree_add_item_ret_uint(subtree, hf_nas_eps_esm_remote_ue_context_list_ue_context_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &ue_context_len);
proto_item_set_len(subtree_item, ue_context_len+1);
curr_offset ++;
proto_tree_add_item_ret_uint(subtree, hf_nas_eps_esm_remote_ue_context_list_ue_context_nb_user_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &nb_user_id);
curr_offset ++;
for (j = 0; j < nb_user_id; j++) {
proto_tree_add_item_ret_uint(subtree, hf_nas_eps_esm_remote_ue_context_list_ue_context_user_id_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &user_id_len);
curr_offset ++;
proto_tree_add_item(subtree, hf_nas_eps_esm_remote_ue_context_list_ue_context_odd_even_indic, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item_ret_uint(subtree, hf_nas_eps_esm_remote_ue_context_list_ue_context_user_id_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &user_id_type);
switch (user_id_type) {
case 1:
proto_tree_add_bits_item(subtree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
curr_offset++;
proto_tree_add_item(subtree, hf_nas_eps_esm_remote_ue_context_list_ue_context_encr_imsi, tvb, curr_offset, 16, ENC_NA);
curr_offset += 16;
break;
case 2:
dissect_e212_imsi(tvb, pinfo, subtree, curr_offset, user_id_len, TRUE);
curr_offset += user_id_len;
break;
case 3:
{
proto_tree_add_item(subtree, hf_nas_eps_esm_remote_ue_context_list_ue_context_msisdn, tvb, curr_offset, user_id_len, ENC_BCD_DIGITS_0_9 | ENC_BCD_SKIP_FIRST);
curr_offset += user_id_len;
}
break;
case 4:
{
proto_tree_add_item(subtree, hf_nas_eps_esm_remote_ue_context_list_ue_context_imei, tvb, curr_offset, user_id_len, ENC_BCD_DIGITS_0_9 | ENC_BCD_SKIP_FIRST);
curr_offset += user_id_len;
}
break;
case 5:
{
proto_tree_add_item(subtree, hf_nas_eps_esm_remote_ue_context_list_ue_context_imeisv, tvb, curr_offset, user_id_len, ENC_BCD_DIGITS_0_9 | ENC_BCD_SKIP_FIRST);
curr_offset += user_id_len;
}
break;
default:
curr_offset += user_id_len;
break;
}
}
proto_tree_add_bits_item(subtree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 5, ENC_BIG_ENDIAN);
proto_tree_add_item_ret_uint(subtree, hf_nas_eps_esm_remote_ue_context_list_ue_context_address_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &remote_address_type);
curr_offset++;
switch (remote_address_type) {
case 1:
proto_tree_add_item(subtree, hf_nas_eps_esm_remote_ue_context_list_ue_context_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
curr_offset += 4;
proto_tree_add_item(subtree, hf_nas_eps_esm_remote_ue_context_list_ue_context_port_number, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset += 2;
break;
case 2:
{
ws_in6_addr prefix;
memset(&prefix, 0, sizeof(prefix));
tvb_memcpy(tvb, (guint8*)&prefix.bytes[0], curr_offset, 8);
proto_tree_add_ipv6(subtree, hf_nas_eps_esm_remote_ue_context_list_ue_context_ipv6_prefix, tvb, curr_offset, 8, &prefix);
curr_offset += 8;
}
break;
case 0:
default:
break;
}
}
return len;
}
/*
* 9.9.4.21 PKMF address
*/
static const value_string nas_eps_esm_pkmf_address_type_values[] = {
{ 0x1, "IPv4" },
{ 0x2, "IPv6" },
{ 0, NULL }
};
static guint16
de_esm_pkmf_address(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset = offset;
guint32 pkmf_address_type;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, curr_offset<<3, 5, ENC_BIG_ENDIAN);
proto_tree_add_item_ret_uint(tree, hf_nas_eps_esm_pkmf_address_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &pkmf_address_type);
curr_offset++;
switch (pkmf_address_type) {
case 1:
proto_tree_add_item(tree, hf_nas_eps_esm_pkmf_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
break;
case 2:
proto_tree_add_item(tree, hf_nas_eps_esm_pkmf_ipv6, tvb, curr_offset, 16, ENC_NA);
break;
default:
break;
}
return len;
}
/*
* 9.9.4.22 Header compression configuration
*/
static const value_string nas_eps_esm_add_hdr_compr_cxt_setup_params_type_vals[] = {
{ 0x00, "0x0000 (No Compression)" },
{ 0x01, "0x0002 (UDP/IP)" },
{ 0x02, "0x0003 (ESP/IP)" },
{ 0x03, "0x0004 (IP)" },
{ 0x04, "0x0006 (TCP/IP)" },
{ 0x05, "0x0102 (UDP/IP)" },
{ 0x06, "0x0103 (ESP/IP)" },
{ 0x07, "0x0104 (IP)" },
{ 0x08, "Other" },
{ 0x0, NULL }
};
static guint16
de_esm_hdr_compr_config(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset = offset;
static int * const flags[] = {
&hf_nas_eps_spare_b7,
&hf_nas_eps_esm_hdr_comp_config_prof_0104,
&hf_nas_eps_esm_hdr_comp_config_prof_0103,
&hf_nas_eps_esm_hdr_comp_config_prof_0102,
&hf_nas_eps_esm_hdr_comp_config_prof_0006,
&hf_nas_eps_esm_hdr_comp_config_prof_0004,
&hf_nas_eps_esm_hdr_comp_config_prof_0003,
&hf_nas_eps_esm_hdr_comp_config_prof_0002,
NULL
};
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags, ENC_NA);
curr_offset++;
proto_tree_add_item(tree, hf_nas_eps_esm_hdr_compr_config_max_cid, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset += 2;
if ((curr_offset - offset) >= len) {
return len;
}
proto_tree_add_item(tree, hf_nas_eps_esm_hdr_compr_config_add_hdr_compr_cxt_setup_params_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
proto_tree_add_item(tree, hf_nas_eps_esm_hdr_compr_config_add_hdr_compr_cxt_setup_params_cont, tvb, curr_offset, len - (curr_offset - offset), ENC_NA);
return len;
}
/*
* 9.9.4.23 Control plane only indication
*/
static true_false_string nas_eps_ctrl_plane_only_ind_cpoi_value = {
"PDN connection can be used for control plane CIoT EPS optimization only",
"Reserved"
};
static guint16
de_esm_ctrl_plane_only_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (offset<<3)+4, 3, ENC_BIG_ENDIAN);
proto_tree_add_bits_item(tree, hf_nas_eps_esm_ctrl_plane_only_ind_cpoi, tvb, (offset<<3)+7, 1, ENC_BIG_ENDIAN);
return 1;
}
/*
* 9.9.4.24 User data container
*/
static guint16
de_esm_user_data_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
proto_item *it;
it = proto_tree_add_item(tree, hf_nas_eps_esm_user_data_cont, tvb, offset, len, ENC_NA);
if (g_nas_eps_decode_user_data_container_as != DECODE_USER_DATA_AS_NONE) {
tvbuff_t *user_data_cont_tvb;
volatile dissector_handle_t handle;
user_data_cont_tvb = tvb_new_subset_length_caplen(tvb, offset, len, len);
if (g_nas_eps_decode_user_data_container_as == DECODE_USER_DATA_AS_IP) {
guint8 first_byte = tvb_get_guint8(user_data_cont_tvb, 0);
if (first_byte >= 0x45 && first_byte <= 0x4f && len > 20)
handle = ipv4_handle;
else if ((first_byte & 0xf0) == 0x60 && len > 40)
handle = ipv6_handle;
else
handle = NULL;
} else if (g_nas_eps_decode_user_data_container_as == DECODE_USER_DATA_AS_NON_IP) {
handle = non_ip_data_handle;
} else {
handle = ethernet_handle;
}
if (handle) {
col_append_str(pinfo->cinfo, COL_PROTOCOL, "/");
col_set_fence(pinfo->cinfo, COL_PROTOCOL);
col_append_str(pinfo->cinfo, COL_INFO, ", ");
col_set_fence(pinfo->cinfo, COL_INFO);
TRY {
proto_tree *toptree = proto_tree_get_root(tree);
call_dissector_only(handle, user_data_cont_tvb, pinfo, toptree, NULL);
} CATCH_BOUNDS_ERRORS {
/* Dissection exception: message was probably non IP and heuristic was too weak */
proto_tree *subtree = proto_item_add_subtree(it, ett_nas_eps_esm_user_data_cont);
show_exception(user_data_cont_tvb, pinfo, subtree, EXCEPT_CODE, GET_MESSAGE);
} ENDTRY
}
}
return len;
}
/*
* 9.9.4.25 Release assistance indication
*/
static const value_string nas_eps_esm_rel_assist_ind_ddx_vals[] = {
{ 0x00, "No information available" },
{ 0x01, "No further uplink and no further downlink data transmission subsequent to the uplink data transmission is expected" },
{ 0x02, "Only a single downlink data transmission and no further uplink data transmission subsequent to the uplink data transmission is expected" },
{ 0x03, "Reserved" },
{ 0, NULL}
};
guint16
de_esm_rel_assist_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, (offset<<3)+4, 2, ENC_BIG_ENDIAN);
proto_tree_add_bits_item(tree, hf_nas_eps_esm_rel_assist_ind_ddx, tvb, (offset<<3)+6, 2, ENC_BIG_ENDIAN);
return 1;
}
/*
* 9.9.4.26 Extended protocol configuration options
*/
static guint16
de_esm_ext_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint32 offset, guint len, gchar *add_string, int string_len)
{
return de_sm_pco(tvb, tree, pinfo, offset, len, add_string, string_len);
}
/*
* 9.9.4.27 Header compression configuration status
*/
static true_false_string nas_eps_esm_hdr_compr_config_status_ebi_value = {
"Header compression configuration is not used",
"Header compression configuration is used"
};
static guint16
de_esm_hdr_compr_config_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
static int * const flags[] = {
&hf_nas_eps_esm_hdr_compr_config_status_ebi7,
&hf_nas_eps_esm_hdr_compr_config_status_ebi6,
&hf_nas_eps_esm_hdr_compr_config_status_ebi5,
&hf_nas_eps_esm_hdr_compr_config_status_ebi4,
&hf_nas_eps_esm_hdr_compr_config_status_ebi3,
&hf_nas_eps_esm_hdr_compr_config_status_ebi2,
&hf_nas_eps_esm_hdr_compr_config_status_ebi1,
&hf_nas_eps_esm_spare_bits0x0100,
&hf_nas_eps_esm_hdr_compr_config_status_ebi15,
&hf_nas_eps_esm_hdr_compr_config_status_ebi14,
&hf_nas_eps_esm_hdr_compr_config_status_ebi13,
&hf_nas_eps_esm_hdr_compr_config_status_ebi12,
&hf_nas_eps_esm_hdr_compr_config_status_ebi11,
&hf_nas_eps_esm_hdr_compr_config_status_ebi10,
&hf_nas_eps_esm_hdr_compr_config_status_ebi9,
&hf_nas_eps_esm_hdr_compr_config_status_ebi8,
NULL
};
proto_tree_add_bitmask_list(tree, tvb, offset, 2, flags, ENC_BIG_ENDIAN);
return len;
}
/*
* 9.9.4.28 Serving PLMN rate control
*/
static guint16
de_esm_serv_plmn_rate_ctrl(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
proto_item *pi;
pi = proto_tree_add_item(tree, hf_nas_eps_esm_serv_plmn_rate_ctrl_val, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_item_append_text(pi, " message(s)");
return len;
}
/*
* 9.9.4.29 Extended APN aggregate maximum bit rate
*/
static const range_string nas_eps_ext_apn_ambr_unit_vals[] = {
{ 0x00, 0x02, "Not used" },
{ 0x03, 0x03, "Multiple of 4 Mbps" },
{ 0x04, 0x04, "Multiple of 16 Mbps" },
{ 0x05, 0x05, "Multiple of 64 Mbps" },
{ 0x06, 0x06, "Multiple of 256 Mbps" },
{ 0x07, 0x07, "Multiple of 1 Gbps" },
{ 0x08, 0x08, "Multiple of 4 Gbps" },
{ 0x09, 0x09, "Multiple of 16 Gbps" },
{ 0x0a, 0x0a, "Multiple of 64 Gbps" },
{ 0x0b, 0x0b, "Multiple of 256 Gbps" },
{ 0x0c, 0x0c, "Multiple of 1 Tbps" },
{ 0x0d, 0x0d, "Multiple of 4 Tbps" },
{ 0x0e, 0x0e, "Multiple of 16 Tbps" },
{ 0x0f, 0x0f, "Multiple of 64 Tbps" },
{ 0x10, 0x10, "Multiple of 256 Tbps" },
{ 0x11, 0x11, "Multiple of 1 Pbps" },
{ 0x12, 0x12, "Multiple of 4 Pbps" },
{ 0x13, 0x13, "Multiple of 16 Pbps" },
{ 0x14, 0x14, "Multiple of 64 Pbps" },
{ 0x15, 0xff, "Multiple of 256 Pbps" },
{ 0, 0, NULL }
};
static guint32
get_ext_ambr_unit(guint32 byte, const char **unit_str)
{
guint32 mult;
if (byte <= 0x02) {
mult = 0;
*unit_str = "";
} else if (byte <= 0x06) {
mult = pow4(guint32, byte-0x02);
*unit_str = "Mbps";
} else if (byte <= 0x0b) {
mult = pow4(guint32, byte-0x07);
*unit_str = "Gbps";
} else if (byte <= 0x10) {
mult = pow4(guint32, byte-0x0c);
*unit_str = "Tbps";
} else if (byte <= 0x15) {
mult = pow4(guint32, byte-0x11);
*unit_str = "Pbps";
} else {
mult = 256;
*unit_str = "Pbps";
}
return mult;
}
guint16
de_esm_ext_apn_agr_max_br(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, byte, mult, ambr_val;
const char *unit_str;
curr_offset = offset;
proto_tree_add_item_ret_uint(tree, hf_nas_eps_esm_ext_apn_ambr_dl_unit, tvb, curr_offset, 1, ENC_NA, &byte);
curr_offset++;
mult = get_ext_ambr_unit(byte, &unit_str);
ambr_val = tvb_get_ntohs(tvb, curr_offset);
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_ext_apn_ambr_dl, tvb, curr_offset, 2,
ambr_val, "%u %s (%u)", ambr_val * mult, unit_str, ambr_val);
curr_offset += 2;
proto_tree_add_item_ret_uint(tree, hf_nas_eps_esm_ext_apn_ambr_ul_unit, tvb, curr_offset, 1, ENC_NA, &byte);
curr_offset++;
mult = get_ext_ambr_unit(byte, &unit_str);
ambr_val = tvb_get_ntohs(tvb, curr_offset);
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_ext_apn_ambr_ul, tvb, curr_offset, 2,
ambr_val, "%u %s (%u)", ambr_val * mult, unit_str, ambr_val);
return len;
}
/*
* 9.9.4.30 Extended EPS quality of service
*/
static const range_string nas_eps_ext_eps_qos_unit_vals[] = {
{ 0x00, 0x00, "Not used" },
{ 0x01, 0x01, "Multiple of 200 kbps" },
{ 0x02, 0x02, "Multiple of 1 Mbps" },
{ 0x03, 0x03, "Multiple of 4 Mbps" },
{ 0x04, 0x04, "Multiple of 16 Mbps" },
{ 0x05, 0x05, "Multiple of 64 Mbps" },
{ 0x06, 0x06, "Multiple of 256 Mbps" },
{ 0x07, 0x07, "Multiple of 1 Gbps" },
{ 0x08, 0x08, "Multiple of 4 Gbps" },
{ 0x09, 0x09, "Multiple of 16 Gbps" },
{ 0x0a, 0x0a, "Multiple of 64 Gbps" },
{ 0x0b, 0x0b, "Multiple of 256 Gbps" },
{ 0x0c, 0x0c, "Multiple of 1 Tbps" },
{ 0x0d, 0x0d, "Multiple of 4 Tbps" },
{ 0x0e, 0x0e, "Multiple of 16 Tbps" },
{ 0x0f, 0x0f, "Multiple of 64 Tbps" },
{ 0x10, 0x10, "Multiple of 256 Tbps" },
{ 0x11, 0x11, "Multiple of 1 Pbps" },
{ 0x12, 0x12, "Multiple of 4 Pbps" },
{ 0x13, 0x13, "Multiple of 16 Pbps" },
{ 0x14, 0x14, "Multiple of 64 Pbps" },
{ 0x15, 0xff, "Multiple of 256 Pbps" },
{ 0, 0, NULL }
};
static guint32
get_ext_eps_qos_unit(guint32 byte, const char **unit_str)
{
guint32 mult;
if (byte == 0x00) {
mult = 0;
*unit_str = "";
} else if (byte == 0x01) {
mult = 200;
*unit_str = "kbps";
} else if (byte <= 0x06) {
mult = pow4(guint32, byte-0x02);
*unit_str = "Mbps";
} else if (byte <= 0x0b) {
mult = pow4(guint32, byte-0x07);
*unit_str = "Gbps";
} else if (byte <= 0x10) {
mult = pow4(guint32, byte-0x0c);
*unit_str = "Tbps";
} else if (byte <= 0x15) {
mult = pow4(guint32, byte-0x11);
*unit_str = "Pbps";
} else {
mult = 256;
*unit_str = "Pbps";
}
return mult;
}
guint16
de_esm_ext_eps_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset, byte, mult, val;
const char *unit_str;
curr_offset = offset;
proto_tree_add_item_ret_uint(tree, hf_nas_eps_esm_ext_mbr_unit, tvb, curr_offset, 1, ENC_NA, &byte);
curr_offset++;
mult = get_ext_eps_qos_unit(byte, &unit_str);
val = tvb_get_ntohs(tvb, curr_offset);
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_ext_mbr_ul, tvb, curr_offset,
2, val, "%u %s (%u)", val * mult, unit_str, val);
curr_offset += 2;
val = tvb_get_ntohs(tvb, curr_offset);
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_ext_mbr_dl, tvb, curr_offset,
2,val, "%u %s (%u)", val * mult, unit_str, val);
curr_offset += 2;
proto_tree_add_item_ret_uint(tree, hf_nas_eps_esm_ext_gbr_unit, tvb, curr_offset, 1, ENC_NA, &byte);
curr_offset++;
mult = get_ext_eps_qos_unit(byte, &unit_str);
val = tvb_get_ntohs(tvb, curr_offset);
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_ext_gbr_ul, tvb, curr_offset,
2, val, "%u %s (%u)", val * mult, unit_str, val);
curr_offset += 2;
val = tvb_get_ntohs(tvb, curr_offset);
proto_tree_add_uint_format_value(tree, hf_nas_eps_esm_ext_gbr_dl, tvb, curr_offset,
2, val, "%u %s (%u)", val * mult, unit_str, val);
return len;
}
guint16 (*emm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len) = {
/* 9.9.3 EPS Mobility Management (EMM) information elements */
de_emm_add_upd_res, /* 9.9.3.0A Additional update result */
de_emm_add_upd_type, /* 9.9.3.0B Additional update type */
NULL, /* 9.9.3.1 Authentication failure parameter(dissected in packet-gsm_a_dtap.c) */
NULL, /* 9.9.3.2 Authentication parameter AUTN(packet-gsm_a_dtap.c) */
NULL, /* 9.9.3.3 Authentication parameter RAND */
de_emm_auth_resp_par, /* 9.9.3.4 Authentication response parameter */
de_emm_sms_services_status, /* 9.9.3.4B SMS services status */
de_emm_csfb_resp, /* 9.9.3.5 CSFB response */
NULL, /* 9.9.3.6 Daylight saving time (packet-gsm_a_dtap.c)*/
NULL, /* 9.9.3.7 Detach type */
NULL, /* 9.9.3.8 DRX parameter */
de_emm_cause, /* 9.9.3.9 EMM cause */
NULL, /* 9.9.3.10 EPS attach result (coded inline) */
NULL, /* 9.9.3.11 EPS attach type(Coded Inline) */
de_emm_eps_mid, /* 9.9.3.12 EPS mobile identity */
de_emm_eps_net_feature_sup, /* 9.9.3.12A EPS network feature support */
NULL, /* 9.9.3.13 EPS update result (Coded Inline)*/
NULL, /* 9.9.3.14 EPS update type (Inline)*/
de_emm_esm_msg_cont, /* 9.9.3.15 ESM message conta */
NULL, /* 9.9.3.16 GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. (packet-gsm_a_gm.c)*/
NULL, /* 9.9.3.16A GPRS timer 2, See subclause 10.5.7.4 in 3GPP TS 24.008. (packet-gsm_a_gm.c)*/
NULL, /* 9.9.3.16B GPRS timer 3, See subclause 10.5.7.4a in 3GPP TS 24.008. (packet-gsm_a_gm.c)*/
NULL, /* 9.9.3.17 Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
de_emm_nas_imeisv_req, /* 9.9.3.18 IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
de_emm_nas_ksi_and_seq_no, /* 9.9.3.19 KSI and sequence number */
NULL, /* 9.9.3.20 MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6].(packet-gsm_a_gm.c) */
NULL, /* 9.9.3.20A MS network feature support, See subclause 10.5.1.15 in 3GPP TS 24.008.(packet-gsm_a_gm.c) */
de_emm_nas_key_set_id, /* 9.9.3.21 NAS key set identifier (Coded Inline) */
de_emm_nas_msg_cont, /* 9.9.3.22 NAS message container */
de_emm_nas_sec_alsgs, /* 9.9.3.23 NAS security algorithms */
NULL, /* 9.9.3.24 Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. (packet-gsm_a_dtap.c)*/
de_emm_nonce, /* 9.9.3.25 Nonce */
de_emm_paging_id, /* 9.9.3.25A Paging identity */
NULL, /* 9.9.3.26 P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. (packet-gsm_a_gm.c)*/
de_emm_ext_cause, /* 9.9.3.26A Extended EMM cause */
NULL, /* 9.9.3.27 Service type */
de_emm_nas_short_mac, /* 9.9.3.28 Short MAC */
NULL, /* 9.9.3.29 Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. (packet-gsm_a_dtap.c)*/
NULL, /* 9.9.3.30 Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. (packet-gsm_a_dtap.c)*/
NULL, /* 9.9.3.31 TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. (packet-gsm_a_gm.c)*/
de_emm_trac_area_id, /* 9.9.3.32 Tracking area identity */
de_emm_trac_area_id_lst, /* 9.9.3.33 Tracking area identity list */
de_emm_ue_net_cap, /* 9.9.3.34 UE network capability */
de_emm_ue_ra_cap_inf_upd_need, /* 9.9.3.35 UE radio capability information update needed */
de_emm_ue_sec_cap, /* 9.9.3.36 UE security capability */
NULL, /* 9.9.3.37 Emergency Number List (packet-gsm_a_dtap.c) */
de_emm_ext_emerg_num_list, /* 9.9.3.37a Extended Emergency Number List */
NULL, /* 9.9.3.38 CLI */
de_emm_ss_code, /* 9.9.3.39 SS Code */
de_emm_lcs_ind, /* 9.9.3.40 LCS indicator */
de_emm_lcs_client_id, /* 9.9.3.41 LCS client identity */
de_emm_gen_msg_cont_type, /* 9.9.3.42 Generic message container type */
de_emm_gen_msg_cont, /* 9.9.3.43 Generic message container */
NULL, /* 9.9.3.44 Voice domain preference and UE's usage setting */
de_emm_guti_type, /* 9.9.3.45 GUTI type */
NULL, /* 9.9.3.46 Extended DRX parameters */
NULL, /* 9.9.3.47 Data service type */
NULL, /* 9.9.3.48 DCN-ID */
NULL, /* 9.9.3.49 Non-3GPP NW provided policies */
de_emm_hash_mme, /* 9.9.3.50 HashMME */
de_emm_replayed_nas_msg_cont, /* 9.9.3.51 Replayed NAS message container */
de_emm_network_policy, /* 9.9.3.52 Network policy */
de_emm_ue_add_sec_cap, /* 9.9.3.53 UE additional security capability */
NULL, /* 9.9.3.54 UE status */
de_emm_add_info_req, /* 9.9.3.55 Additional information requested */
de_emm_ciph_key_data, /* 9.9.3.56 Ciphering key data */
de_emm_n1_ue_network_cap, /* 9.9.3.57 N1 UE network capability */
de_emm_ue_radio_cap_id_avail, /* 9.9.3.58 UE radio capability ID availability */
de_emm_ue_radio_cap_id_req, /* 9.9.3.59 UE radio capability ID request */
NULL, /* 9.9.3.60 UE radio capability ID */
NULL, /* 9.9.3.61 UE radio capability ID deletion indication */
de_emm_wus_assist_info, /* 9.9.3.62 WUS assistance information */
de_emm_nb_s1_drx_param, /* 9.9.3.63 NB-S1 DRX parameter */
de_emm_imsi_offset, /* 9.9.3.64 IMSI offset */
de_emm_ue_request_type, /* 9.9.3.65 UE request type */
de_emm_paging_restriction, /* 9.9.3.66 Paging restriction */
de_emm_eps_add_req_result, /* 9.9.3.67 EPS additional request result */
NULL, /* NONE */
};
#if 0
defined in packet-gsm_a_common.h
/* 9.9.4 EPS Session Management (ESM) information elements */
typedef enum
{
DE_ESM_APN, /* 9.9.4.1 Access point name */
DE_ESM_APN_AGR_MAX_BR, /* 9.9.4.2 APN aggregate maximum bit rate */
DE_ESM_CONNECTIVITY_TYPE, /* 9.9.4.2A Connectivity type */
DE_ESM_EPS_QOS, /* 9.9.4.3 EPS quality of service */
DE_ESM_CAUSE, /* 9.9.4.4 ESM cause */
DE_ESM_INF_TRF_FLG, /* 9.9.4.5 ESM information transfer flag */
DE_ESM_LNKED_EPS_B_ID, /* 9.9.4.6 Linked EPS bearer identity */
DE_ESM_LLC_SAPI, /* 9.9.4.7 LLC service access point identifier */
DE_ESM_NOTIF_IND, /* 9.9.4.7a Notification indicator */
DE_ESM_P_FLW_ID, /* 9.9.4.8 Packet flow identifier */
DE_ESM_PDN_ADDR, /* 9.9.4.9 PDN address */
DE_ESM_PDN_TYPE, /* 9.9.4.10 PDN type */
DE_ESM_PROT_CONF_OPT, /* 9.9.4.11 Protocol configuration options */
DE_ESM_QOS, /* 9.9.4.12 Quality of service */
DE_ESM_RA_PRI, /* 9.9.4.13 Radio priority */
DE_ESM_RE_ATTEMPT_IND, /* 9.9.4.13a Re-attempt indicator */
DE_ESM_REQ_TYPE, /* 9.9.4.14 Request type */
DE_ESM_TRAF_FLOW_AGR_DESC, /* 9.9.4.15 Traffic flow aggregate description */
DE_ESM_TRAF_FLOW_TEMPL, /* 9.9.4.16 Traffic flow template */
DE_ESM_TID, /* 9.9.4.17 Transaction identifier */
DE_ESM_WLAN_OFFLOAD_ACCEPT, /* 9.9.4.18 WLAN offload acceptability */
DE_ESM_NBIFOM_CONT, /* 9.9.4.19 NBIFOM container */
DE_ESM_REMOTE_UE_CONTEXT_LIST, /* 9.9.4.20 Remote UE context list */
DE_ESM_PKMF_ADDRESS, /* 9.9.4.21 PKMF address */
DE_ESM_HDR_COMPR_CONFIG, /* 9.9.4.22 Header compression configuration */
DE_ESM_CTRL_PLANE_ONLY_IND, /* 9.9.4.23 Control plane only indication */
DE_ESM_USER_DATA_CONT, /* 9.9.4.24 User data container */
DE_ESM_REL_ASSIST_IND, /* 9.9.4.25 Release assistance indication */
DE_ESM_EXT_PCO, /* 9.9.4.26 Extended protocol configuration options */
DE_ESM_HDR_COMPR_CONFIG_STATUS, /* 9.9.4.27 Header compression configuration status */
DE_ESM_SERV_PLMN_RATE_CTRL, /* 9.9.4.28 Serving PLMN rate control */
DE_ESM_EXT_APN_AGR_MAX_BR, /* 9.9.4.29 Extended APN aggregate maximum bit rate */
DE_ESM_EXT_EPS_QOS, /* 9.9.4.30 Extended EPS quality of service */
DE_ESM_NONE /* NONE */
}
nas_esm_elem_idx_t;
#endif
static const value_string nas_esm_elem_strings[] = {
{ DE_ESM_APN, "Access point name" }, /* 9.9.4.1 Access point name */
{ DE_ESM_APN_AGR_MAX_BR, "APN aggregate maximum bit rate" }, /* 9.9.4.2 APN aggregate maximum bit rate */
{ DE_ESM_CONNECTIVITY_TYPE, "Connectivity type" }, /* 9.9.4.2A Connectivity type */
{ DE_ESM_EPS_QOS, "EPS quality of service" }, /* 9.9.4.3 EPS quality of service */
{ DE_ESM_CAUSE, "ESM cause" }, /* 9.9.4.4 ESM cause */
{ DE_ESM_INF_TRF_FLG, "ESM information transfer flag" }, /* 9.9.4.5 ESM information transfer flag */
{ DE_ESM_LNKED_EPS_B_ID, "Linked EPS bearer identity" }, /* 9.9.4.6 Linked EPS bearer identity */
{ DE_ESM_LLC_SAPI, "LLC service access point identifier" }, /* 9.9.4.7 LLC service access point identifier */
{ DE_ESM_NOTIF_IND, "Notification indicator" }, /* 9.9.4.7a Notification indicator */
{ DE_ESM_P_FLW_ID, "Packet flow identifier" }, /* 9.9.4.8 Packet flow identifier */
{ DE_ESM_PDN_ADDR, "PDN address" }, /* 9.9.4.9 PDN address */
{ DE_ESM_PDN_TYPE, "PDN type" }, /* 9.9.4.10 PDN type */
{ DE_ESM_PROT_CONF_OPT, "Protocol configuration options" }, /* 9.9.4.11 Protocol configuration options */
{ DE_ESM_QOS, "Quality of service" }, /* 9.9.4.12 Quality of service */
{ DE_ESM_RA_PRI, "Radio priority" }, /* 9.9.4.13 Radio priority */
{ DE_ESM_RE_ATTEMPT_IND, "Re-attempt indicator" }, /* 9.9.4.13a Re-attempt indicator */
{ DE_ESM_REQ_TYPE, "Request type" }, /* 9.9.4.14 Request type */
{ DE_ESM_TRAF_FLOW_AGR_DESC, "Traffic flow aggregate description" }, /* 9.9.4.15 Traffic flow aggregate description */
{ DE_ESM_TRAF_FLOW_TEMPL, "Traffic flow template" }, /* 9.9.4.16 Traffic flow template */
{ DE_ESM_TID, "Transaction identifier" }, /* 9.9.4.17 Transaction identifier */
{ DE_ESM_WLAN_OFFLOAD_ACCEPT, "WLAN offload acceptability" }, /* 9.9.4.18 WLAN offload acceptability */
{ DE_ESM_NBIFOM_CONT, "NBIFOM container" }, /* 9.9.4.19 NBIFOM container */
{ DE_ESM_REMOTE_UE_CONTEXT_LIST, "Remote UE context list" }, /* 9.9.4.20 Remote UE context list */
{ DE_ESM_PKMF_ADDRESS, "PKMF address" }, /* 9.9.4.21 PKMF address */
{ DE_ESM_HDR_COMPR_CONFIG, "Header compression configuration" }, /* 9.9.4.22 Header compression configuration */
{ DE_ESM_CTRL_PLANE_ONLY_IND, "Control plane only indication" }, /* 9.9.4.23 Control plane only indication */
{ DE_ESM_USER_DATA_CONT, "User data container" }, /* 9.9.4.24 User data container */
{ DE_ESM_REL_ASSIST_IND, "Release assistance indication" }, /* 9.9.4.25 Release assistance indication */
{ DE_ESM_EXT_PCO, "Extended protocol configuration options" }, /* 9.9.4.26 Extended protocol configuration options */
{ DE_ESM_HDR_COMPR_CONFIG_STATUS, "Header compression configuration status" },/* 9.9.4.27 Header compression configuration status */
{ DE_ESM_SERV_PLMN_RATE_CTRL, "Serving PLMN rate control" }, /* 9.9.4.28 Serving PLMN rate control */
{ DE_ESM_EXT_APN_AGR_MAX_BR, "Extended APN aggregate maximum bit rate" }, /* 9.9.4.29 Extended APN aggregate maximum bit rate */
{ DE_ESM_EXT_EPS_QOS, "Extended EPS quality of service" }, /* 9.9.4.30 Extended EPS quality of service */
{ 0, NULL }
};
value_string_ext nas_esm_elem_strings_ext = VALUE_STRING_EXT_INIT(nas_esm_elem_strings);
#define NUM_NAS_ESM_ELEM (sizeof(nas_esm_elem_strings)/sizeof(value_string))
gint ett_nas_eps_esm_elem[NUM_NAS_ESM_ELEM];
guint16 (*esm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len) = {
NULL, /* 9.9.4.1 Access point name */
de_esm_apn_aggr_max_br, /* 9.9.4.2 APN aggregate maximum bit rate */
NULL, /* 9.9.4.2A Connectivity type */
de_esm_qos, /* 9.9.4.3 EPS quality of service */
de_esm_cause, /* 9.9.4.4 ESM cause */
de_esm_inf_trf_flg, /* 9.9.4.5 ESM information transfer flag */
NULL, /* 9.9.4.6 Linked EPS bearer identity */
NULL, /* 9.9.4.7 LLC service access point identifier */
de_esm_notif_ind, /* 9.9.4.7a Notification indicator */
NULL, /* 9.9.4.8 Packet flow identifier */
de_esm_pdn_addr, /* 9.9.4.9 PDN address */
NULL, /* 9.9.4.10 PDN type */
NULL, /* 9.9.4.11 Protocol configuration options */
NULL, /* 9.9.4.12 Quality of service */
NULL, /* 9.9.4.13 Radio priority */
de_esm_re_attempt_ind, /* 9.9.4.13a Re-attempt indicator */
NULL, /* 9.9.4.14 Request type */
NULL, /* 9.9.4.15 Traffic flow aggregate description */
NULL, /* 9.9.4.16 Traffic flow template */
NULL, /* 9.9.4.17 Transaction identifier */
NULL, /* 9.9.4.18 WLAN offload acceptability */
de_esm_nbifom_cont, /* 9.9.4.19 NBIFOM container */
de_esm_remote_ue_context_list, /* 9.9.4.20 Remote UE context list */
de_esm_pkmf_address, /* 9.9.4.21 PKMF address */
de_esm_hdr_compr_config, /* 9.9.4.22 Header compression configuration */
de_esm_ctrl_plane_only_ind, /* 9.9.4.23 Control plane only indication */
de_esm_user_data_cont, /* 9.9.4.24 User data container */
de_esm_rel_assist_ind, /* 9.9.4.25 Release assistance indication */
de_esm_ext_pco, /* 9.9.4.26 Extended protocol configuration options */
de_esm_hdr_compr_config_status, /* 9.9.4.27 Header compression configuration status */
de_esm_serv_plmn_rate_ctrl, /* 9.9.4.28 Serving PLMN rate control */
de_esm_ext_apn_agr_max_br, /* 9.9.4.29 Extended APN aggregate maximum bit rate */
de_esm_ext_eps_qos, /* 9.9.4.30 Extended EPS quality of service */
NULL, /* NONE */
};
/* MESSAGE FUNCTIONS */
/*
* 8.2.1 Attach accept
*/
static void
nas_emm_attach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
bit_offset+=4;
/* EPS attach result EPS attach result 9.9.3.10 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_EPS_attach_result, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
/*bit_offset+=3;*/
/* Fix up the lengths */
curr_len--;
curr_offset++;
/* T3412 value GPRS timer 9.9.3.16 M V 1 */
ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3412 value", ei_nas_eps_missing_mandatory_elemen);
/* Tracking area identity list 9.9.3.33 M LV 7-97 */
ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - TAI list", ei_nas_eps_missing_mandatory_elemen);
/* ESM message container 9.9.3.15 M LV-E 2-n */
ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 50 GUTI EPS mobile identity 9.9.3.12 O TLV 13 */
ELEM_OPT_TLV(0x50, NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI");
/* 13 Location area identification Location area identification 9.9.2.2 O TV 6 */
ELEM_OPT_TV(0x13, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_LOC_AREA_ID, NULL);
/* 23 MS identity Mobile identity 9.9.2.3 O TLV 7-10 */
ELEM_OPT_TLV(0x23, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, " - MS identity");
/* 53 EMM cause EMM cause 9.9.3.9 O TV 2 */
ELEM_OPT_TV(0x53, NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
/* 17 T3402 value GPRS timer 9.9.3.16 O TV 2 */
ELEM_OPT_TV(0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3402 value");
/* 59 T3423 value GPRS timer 9.9.3.16 O TV 2 */
ELEM_OPT_TV(0x59, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3423 value");
/* 4A Equivalent PLMNs PLMN list 9.9.2.8 O TLV 5-47 */
ELEM_OPT_TLV(0x4a, GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST, " - Equivalent PLMNs");
/* 34 Emergency Number List 9.9.3.37 O TLV 5-50 */
ELEM_OPT_TLV(0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL);
/* 64 EPS network feature support EPS network feature support 9.9.3.12A O TLV 3 */
ELEM_OPT_TLV(0x64, NAS_PDU_TYPE_EMM, DE_EMM_EPS_NET_FEATURE_SUP, NULL);
/* F- Additional update result Additional update result 9.9.3.0A O TV 1 */
ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_RES, NULL );
/* 5E T3412 extended value GPRS timer 3 9.9.3.16B O TLV 3 */
ELEM_OPT_TLV(0x5E, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3412 extended value");
/* 6A T3324 value GPRS timer 2 9.9.3.16A O TLV 3 */
ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value");
/* 6E Extended DRX parameters Extended DRX parameters 9.9.3.46 O TLV 3-4 */
ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
/* 65 DCN-ID DCN-ID 9.9.3.48 O TLV 4 */
ELEM_OPT_TLV(0x65, GSM_A_PDU_TYPE_GM, DE_DCN_ID, NULL);
/* E- SMS services status SMS services status 9.9.3.4B O TV 1 */
ELEM_OPT_TV_SHORT(0xE0, NAS_PDU_TYPE_EMM, DE_EMM_SMS_SERVICES_STATUS, NULL);
/* D- Non-3GPP NW provided policies Non-3GPP NW provided policies O TV 1 */
ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_NON_3GPP_NW_PROV_POL, NULL);
/* 6B T3448 value GPRS timer 2 9.9.3.16A O TLV 3 */
ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3448 value");
/* C- Network policy Network policy 9.9.3.52 O TV 1 */
ELEM_OPT_TV_SHORT(0xC0, NAS_PDU_TYPE_EMM, DE_EMM_NETWORK_POLICY, NULL);
/* 6C T3447 value GPRS timer 3 9.9.3.16B O TLV 3 */
ELEM_OPT_TLV(0x6C, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3447 value");
/* 7A Extended emergency number list Extended emergency number list 9.9.3.37A O TLV-E 7-65538 */
ELEM_OPT_TLV_E(0x7A, NAS_PDU_TYPE_EMM, DE_EMM_EXT_EMERG_NUM_LIST, NULL);
/* 7C Ciphering key data Ciphering key data 9.9.3.56 O TLV-E 35-2291 */
ELEM_OPT_TLV_E(0x7C, NAS_PDU_TYPE_EMM, DE_EMM_CIPH_KEY_DATA, NULL);
/* 66 UE radio capability ID UE radio capability ID 9.9.3.60 O TLV 3-n */
ELEM_OPT_TLV(0x66, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID, NULL);
/* B- UE radio capability ID deletion indication UE radio capability ID deletion indication O TV 1 */
ELEM_OPT_TV_SHORT(0xB0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID_DEL_IND, NULL);
/* 35 Negotiated WUS assistance information WUS assistance information 9.9.3.62 O TLV 3-n */
ELEM_OPT_TLV(0x35, NAS_PDU_TYPE_EMM, DE_EMM_WUS_ASSIST_INFO, " - Negotiated");
/* 36 Negotiated DRX parameter in NB-S1 mode NB-S1 DRX parameter 9.9.3.63 O TLV 3 */
ELEM_OPT_TLV(0x36, NAS_PDU_TYPE_EMM, DE_EMM_NB_S1_DRX_PARAM, " - Negotiated");
/* 38 Negotiated IMSI offset IMSI offset 9.9.3.64 O TLV 4 */
ELEM_OPT_TLV(0x38, NAS_PDU_TYPE_EMM, DE_EMM_IMSI_OFFSET, " - Negotiated");
/* 1D Forbidden TAI(s) for the list of "forbidden tracking areas for roaming" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1D, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for roaming\"");
/* 1E Forbidden TAI(s) for the list of "forbidden tracking areas for regional provision of service" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1E, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for regional provision of service\"");
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.2 Attach complete
*/
static void
nas_emm_attach_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_UL;
/* ESM message container ESM message container 9.9.3.15 M LV-E 2-n */
ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL, ei_nas_eps_missing_mandatory_elemen);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.3 Attach reject
*/
static void
nas_emm_attach_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
/* * EMM cause EMM cause 9.9.3.9 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 78 ESM message container ESM message container 9.9.3.15 O TLV-E 4-n */
ELEM_OPT_TLV_E(0x78, NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL);
/* 5F T3346 value GPRS timer 2 9.9.3.16A O TLV 3 */
ELEM_OPT_TLV(0x5F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
/* 16 T3402 value GPRS timer 2 9.9.3.16A O TLV 3 */
ELEM_OPT_TLV(0x16, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3402 value");
/* A- Extended EMM cause Extended EMM cause 9.9.3.26A O TV 1 */
ELEM_OPT_TV_SHORT( 0xA0, NAS_PDU_TYPE_EMM, DE_EMM_EXT_CAUSE, NULL );
/* 1C Lower bound timer value GPRS timer 3 9.9.3.16B O TLV 3 */
ELEM_OPT_TLV(0x1C, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Lower bound timer value");
/* 1D Forbidden TAI(s) for the list of "forbidden tracking areas for roaming" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1D, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for roaming\"");
/* 1E Forbidden TAI(s) for the list of "forbidden tracking areas for regional provision of service" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1E, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for regional provision of service\"");
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.4 Attach request
*/
static void
nas_emm_attach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
bit_offset = curr_offset<<3;
pinfo->link_dir = P2P_DIR_UL;
/* NAS key set identifier NAS key set identifier 9.9.3.21 M V 1/2 */
de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL);
bit_offset+=4;
/* EPS attach type EPS attach type 9.9.3.11 M V 1/2
* Inline:
*/
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_eps_att_type, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
/*bit_offset+=3;*/
/* Fix the lengths */
curr_len--;
curr_offset++;
/* Old GUTI or IMSI EPS mobile identity 9.9.3.12 M LV 5-12 */
ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, NULL, ei_nas_eps_missing_mandatory_elemen);
/* UE network capability UE network capability 9.9.3.34 M LV 3-14 */
ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL, ei_nas_eps_missing_mandatory_elemen);
/* ESM message container ESM message container 9.9.3.15 M LV-E 2-n */
ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 19 Old P-TMSI signature P-TMSI signature 10.5.5.8 O TV 4 */
ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature");
/* 50 Additional GUTI EPS mobile identity 9.9.3.12 O TLV 13 */
ELEM_OPT_TLV( 0x50 , NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - Additional GUTI");
/* 52 Last visited registered TAI Tracking area identity 9.9.3.32 O TV 6 */
ELEM_OPT_TV(0x52, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID, " - Last visited registered TAI");
/* 5c DRX parameter DRX parameter 9.9.3.8 O TV 3 */
ELEM_OPT_TV(0x5c, GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL );
/* 31 MS network capability MS network capability 9.9.3.20 M LV 3-9 */
ELEM_OPT_TLV( 0x31, GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP , NULL );
/* 13 Old location area identification Location area identification 9.9.2.2 O TV 6 */
ELEM_OPT_TV(0x13, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_LOC_AREA_ID, " - Old location area identification");
/* 9- TMSI status TMSI status 9.9.3.31 O TV 1 */
ELEM_OPT_TV_SHORT( 0x90 , GSM_A_PDU_TYPE_GM, DE_TMSI_STAT , NULL );
/* 11 Mobile station classmark 2 Mobile station classmark 2 9.9.2.5 O TLV 5 */
ELEM_OPT_TLV( 0x11, NAS_PDU_TYPE_COMMON, DE_EPS_MS_CM_2 , NULL );
/* 20 Mobile station classmark 3 Mobile station classmark 3 9.9.2.5 O TLV 2-34 */
ELEM_OPT_TLV( 0x20, NAS_PDU_TYPE_COMMON, DE_EPS_MS_CM_3 , NULL );
/* 40 Supported Codecs Supported Codec List 9.9.2.10 O TLV 5-n */
ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, " - Supported Codecs");
/* F- Additional update type Additional update type 9.9.3.0B O TV 1 */
ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_TYPE, NULL );
/* 5D Voice domain preference and UE's usage setting Voice domain preference and UE's usage setting 9.9.3.44 O TLV 3 */
ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
/* D- Device properties Device properties 9.9.2.0A O TV 1 */
ELEM_OPT_TV_SHORT(0xD0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
/* E- Old GUTI type GUTI type 9.9.3.45 O TV 1 */
ELEM_OPT_TV_SHORT(0xE0 , NAS_PDU_TYPE_EMM, DE_EMM_GUTI_TYPE, " - Old GUTI type");
/* C- MS network feature support MS network feature support 9.9.3.20A O TV 1 */
ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_COMMON, DE_MS_NET_FEAT_SUP, NULL);
/* 10 TMSI based NRI container Network resource identifier container 9.9.3.24A O TLV 4 */
ELEM_OPT_TLV(0x10, GSM_A_PDU_TYPE_GM, DE_NET_RES_ID_CONT, " - TMSI based NRI container");
/* 6A T3324 value GPRS timer 2 9.9.3.16A O TLV 3 */
ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value");
/* 5E T3412 extended value GPRS timer 3 9.9.3.16B O TLV 3 */
ELEM_OPT_TLV(0x5E, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3412 extended value");
/* 6E Extended DRX parameters Extended DRX parameters 9.9.3.46 O TLV 3-4 */
ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
/* 6F UE additional security capability UE additional security capability 9.9.3.53 O TLV 6 */
ELEM_OPT_TLV(0x6F, NAS_PDU_TYPE_EMM, DE_EMM_UE_ADD_SEC_CAP, NULL);
/* 6D UE status UE status 9.9.3.54 O TLV 3 */
ELEM_OPT_TLV(0x6D, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_STATUS, NULL);
/* 17 Additional information requested Additional information requested 9.9.3.55 O TV 2 */
ELEM_OPT_TV(0x17, NAS_PDU_TYPE_EMM, DE_EMM_ADD_INFO_REQ, NULL);
/* 32 N1 UE network capability N1 UE network capability 9.9.3.57 O TLV 3-15 */
ELEM_OPT_TLV(0x32, NAS_PDU_TYPE_EMM, DE_EMM_N1_UE_NETWORK_CAP, NULL);
/* 34 UE radio capability ID availability UE radio capability ID availability O TLV 3 */
ELEM_OPT_TLV(0x34, NAS_PDU_TYPE_EMM, DE_EMM_UE_RADIO_CAP_ID_AVAIL, NULL);
/* 35 Requested WUS assistance WUS assistance information O TLV 3-n */
ELEM_OPT_TLV(0x35, NAS_PDU_TYPE_EMM, DE_EMM_WUS_ASSIST_INFO, " - Requested");
/* 36 DRX parameter in NB-S1 mode NB-S1 DRX parameter 9.9.3.63 O TLV 3 */
ELEM_OPT_TLV(0x36, NAS_PDU_TYPE_EMM, DE_EMM_NB_S1_DRX_PARAM, NULL);
/* 38 Requested IMSI offset IMSI offset 9.9.3.64 O TLV 4 */
ELEM_OPT_TLV(0x38, NAS_PDU_TYPE_EMM, DE_EMM_IMSI_OFFSET, " - Requested");
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.5 Authentication failure
*/
static void
nas_emm_auth_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_UL;
/* EMM cause EMM cause 9.9.3.9 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 30 Authentication failure parameter Authentication failure parameter 9.9.3.1 O TLV 1 */
ELEM_OPT_TLV(0x30, GSM_A_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.6 Authentication reject
* No IE:s
*/
/*
* 8.2.7 Authentication request
*/
static void
nas_emm_auth_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
bit_offset = curr_offset<<3;
/* H1 */
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
bit_offset+=4;
/* H0 */
/*
* NAS key set identifierASME NAS key set identifier 9.9.3.21 M V 1/2
*/
de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, " ASME");
/*bit_offset+=4;*/
/* Fix the lengths */
curr_len--;
curr_offset++;
/*
* Authentication parameter RAND (EPS challenge) 9.9.3.3 M V 16
*/
ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND, " - EPS challenge", ei_nas_eps_missing_mandatory_elemen);
/*
* Authentication parameter AUTN (EPS challenge) 9.9.3.2 M LV 17
*/
ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN, " - EPS challenge", ei_nas_eps_missing_mandatory_elemen);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.8 Authentication response
*/
static void
nas_emm_auth_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_UL;
/*
* Authentication response parameter 9.9.3.4 M LV 5-17
*/
ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_AUTH_RESP_PAR, NULL, ei_nas_eps_missing_mandatory_elemen);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.9 CS service notification
*/
static void
nas_emm_cs_serv_not(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
/* Paging identity Paging identity 9.9.3.25A M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_PAGING_ID, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 60 CLI CLI 9.9.3.38 O TLV 3-12 */
ELEM_OPT_TLV(0x60, GSM_A_PDU_TYPE_DTAP, DE_CLG_PARTY_BCD_NUM, " - CLI");
/* 61 SS Code SS Code 9.9.3.39 O TV 2 */
ELEM_OPT_TV(0x61, NAS_PDU_TYPE_EMM, DE_EMM_SS_CODE, NULL);
/* 62 LCS indicator LCS indicator 9.9.3.40 O TV 2 */
ELEM_OPT_TV(0x62, NAS_PDU_TYPE_EMM, DE_EMM_LCS_IND, NULL);
/* 63 LCS client identity LCS client identity 9.9.3.41 O TLV 3-257 */
ELEM_OPT_TLV(0x63, NAS_PDU_TYPE_EMM, DE_EMM_LCS_CLIENT_ID, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.10 Detach accept
* 8.2.10.1 Detach accept (UE originating detach)
* No further IE's
* 8.2.10.2 Detach accept (UE terminated detach)
* No further IE's
*/
/*
* 8.2.11 Detach request
* 8.2.11.1 Detach request (UE originating detach)
*/
static void
nas_emm_detach_req_UL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset,bit_offset;
guint32 consumed;
guint curr_len;
guint64 switch_off;
guint64 detach_type;
curr_offset = offset;
curr_len = len;
proto_tree_add_item(tree, hf_nas_eps_emm_detach_req_UL, tvb, curr_offset, len, ENC_NA);
/* NAS key set identifier NAS key set identifier 9.9.3.21 M V 1/2 */
bit_offset = curr_offset<<3;
de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL);
bit_offset+=4;
/* Detach type Detach type 9.9.3.6 M V 1/2 */
proto_tree_add_bits_ret_val(tree, hf_nas_eps_emm_switch_off, tvb, bit_offset, 1, &switch_off, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_ret_val(tree, hf_nas_eps_emm_detach_type_UL, tvb, bit_offset, 3, &detach_type, ENC_BIG_ENDIAN);
/* bit_offset+=3;*/
/* Show detach reason in Info column. TODO: expert info ? */
col_append_fstr(pinfo->cinfo, COL_INFO, " (%s%s)",
val_to_str_const((guint32)detach_type, nas_eps_emm_type_of_detach_UL_vals, "Unknown"),
(switch_off==0) ? "" : " / switch-off");
/* Fix the lengths */
curr_len--;
curr_offset++;
/* GUTI or IMSI EPS mobile identity 9.9.3.12 M LV 5-12 */
ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, NULL, ei_nas_eps_missing_mandatory_elemen);
}
/*
* 8.2.11.2 Detach request (UE terminated detach)
*/
static void
nas_emm_detach_req_DL(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
guint64 detach_type;
curr_offset = offset;
curr_len = len;
proto_tree_add_item(tree, hf_nas_eps_emm_detach_req_DL, tvb, curr_offset, len, ENC_NA);
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
bit_offset+=4;
/* Detach type Detach type 9.9.3.6 M V 1/2 */
/* In the network to UE direction bit 4 is spare. The network shall set this bit to zero. */
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_ret_val(tree, hf_nas_eps_emm_detach_type_DL, tvb, bit_offset, 3, &detach_type, ENC_BIG_ENDIAN);
/*bit_offset+=3;*/
/* Show detach reason in Info column. TODO: expert info ? */
col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
val_to_str_const((guint32)detach_type, nas_eps_emm_type_of_detach_DL_vals, "Unknown"));
/* Fix the lengths */
curr_len--;
curr_offset++;
/* EMM cause EMM cause 9.9.3.9 O TV 2 */
ELEM_OPT_TV(0x53, NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
/* Lower bound timer value GPRS timer 3 9.9.3.16B O TLV 3 */
ELEM_OPT_TLV(0x1C, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Lower bound timer value");
/* Forbidden TAI(s) for the list of "forbidden tracking areas for roaming" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1D, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for roaming\"");
/* Forbidden TAI(s) for the list of "forbidden tracking areas for regional provision of service" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1E, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for regional provision of service\"");
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
static void
nas_emm_detach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
if (pinfo->link_dir == P2P_DIR_UL) {
nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
return;
}else if (pinfo->link_dir == P2P_DIR_DL) {
nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
return;
}
if (len >= 8) {
nas_emm_detach_req_UL(tvb, tree, pinfo, offset, len);
} else {
nas_emm_detach_req_DL(tvb, tree, pinfo, offset, len);
}
}
/*
* 8.2.12 Downlink NAS Transport
*/
static void
nas_emm_dl_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
/* NAS message container NAS message container 9.9.3.22 M LV 3-252 */
ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_NAS_MSG_CONT, NULL, ei_nas_eps_missing_mandatory_elemen);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.13 EMM information
*/
static void
nas_emm_emm_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
/* 43 Full name for network Network name 9.9.3.24 O TLV 3-? */
ELEM_OPT_TLV(0x43, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full name for network");
/* 45 Short name for network Network name 9.9.3.24 O TLV 3-? */
ELEM_OPT_TLV(0x45, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Short Name");
/* 46 Local time zone Time zone 9.9.3.29 O TV 2 */
ELEM_OPT_TV(0x46, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE, " - Local");
/* 47 Universal time and local time zone Time zone and time 9.9.3.30 O TV 8 */
ELEM_OPT_TV(0x47, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME, " - Universal Time and Local Time Zone");
/* 49 Network daylight saving time Daylight saving time 9.9.3.6 O TLV 3 */
ELEM_OPT_TLV(0x49, GSM_A_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.14 EMM status
*/
static void
nas_emm_emm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* EMM cause EMM cause 9.9.3.9 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.15 Extended service request
*/
static void
nas_emm_ext_serv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset,bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
bit_offset = curr_offset<<3;
pinfo->link_dir = P2P_DIR_UL;
/* NAS key set identifier NAS key set identifier 9.9.3.21 M V 1/2 */
de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL);
bit_offset+=4;
/* Service type Service type 9.9.3.27 M V 1/2 Service type*/
proto_tree_add_bits_item(tree, hf_nas_eps_service_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
/*bit_offset+=4;*/
/* Fix up the lengths */
curr_len--;
curr_offset++;
/* M-TMSI Mobile identity 9.9.2.3 M LV 6 */
ELEM_MAND_LV(NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, " - M-TMSI", ei_nas_eps_missing_mandatory_elemen);
/* B- CSFB response CSFB response 9.9.3.5 C TV 1 */
ELEM_OPT_TV_SHORT(0xb0, NAS_PDU_TYPE_EMM, DE_EMM_CSFB_RESP, NULL);
/* 57 EPS bearer context status EPS bearer context status 9.9.2.1 O TLV 4 */
ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
/* D- Device properties Device properties 9.9.2.0A O TV 1 */
ELEM_OPT_TV_SHORT(0xD0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
/* 29 UE request type UE request type 9.9.3.65 O TLV 3 */
ELEM_OPT_TLV(0x29, NAS_PDU_TYPE_EMM, DE_EMM_UE_REQUEST_TYPE, NULL);
/* 28 Paging restriction Paging restriction 9.9.3.66 O TLV 3-5 */
ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_EMM, DE_EMM_PAGING_RESTRICTION, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.16 GUTI reallocation command
*/
static void
nas_emm_guti_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
/* GUTI EPS mobile identity 9.9.3.12 M LV 12 */
ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI", ei_nas_eps_missing_mandatory_elemen);
/* 54 TAI list Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x54, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, NULL);
/* 65 DCN-ID DCN-ID 9.9.3.48 O TLV 4 */
ELEM_OPT_TLV(0x65, GSM_A_PDU_TYPE_GM, DE_DCN_ID, NULL);
/* 66 UE radio capability ID UE radio capability ID 9.9.3.60 O TLV 3-n */
ELEM_OPT_TLV(0x66, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID, NULL);
/* B- UE radio capability ID deletion indication UE radio capability ID deletion indication O TV 1 */
ELEM_OPT_TV_SHORT(0xB0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID_DEL_IND, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.17 GUTI reallocation complete
* No more IE's
*/
/*
* 8.2.18 Identity request
*/
static void
nas_emm_id_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
/*guint32 consumed;*/
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
bit_offset=curr_offset<<3;
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
bit_offset+=4;
/* Identity type Identity type 2 9.9.3.17 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_emm_id_type2, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
/*bit_offset+=4;*/
/*consumed = 1;*/
/* Fix up the lengths */
curr_len--;
curr_offset++;
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.19 Identity response
*/
static void
nas_emm_id_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_UL;
/* Mobile identity Mobile identity 9.9.2.3 M LV 4-10 */
ELEM_MAND_LV(NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, NULL, ei_nas_eps_missing_mandatory_elemen);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.20 Security mode command
*/
static void
nas_emm_sec_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
/* Selected NAS security algorithms NAS security algorithms 9.9.3.23 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_NAS_SEC_ALGS, " - Selected NAS security algorithms", ei_nas_eps_missing_mandatory_elemen);
bit_offset = curr_offset<<3;
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
bit_offset+=4;
/* NAS key set identifierASME NAS key set identifier 9.9.3.21 M V 1/2 */
de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, " ASME");
/*bit_offset+=4;*/
/* Fix up the lengths */
curr_len--;
curr_offset++;
/* Replayed UE security capabilities UE security capability 9.9.3.36 M LV 3-6 */
ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_UE_SEC_CAP, " - Replayed UE security capabilities", ei_nas_eps_missing_mandatory_elemen);
/* C- IMEISV request IMEISV request 9.9.3.18 O TV 1 */
ELEM_OPT_TV_SHORT(0xC0, NAS_PDU_TYPE_EMM, DE_EMM_IMEISV_REQ , NULL );
/* 55 Replayed NonceUE Nonce 9.9.3.25 O TV 5 */
ELEM_OPT_TV(0x55, NAS_PDU_TYPE_EMM, DE_EMM_NONCE, " - Replayed NonceUE");
/* 56 NonceMME Nonce 9.9.3.25 O TV 5 */
ELEM_OPT_TV(0x56, NAS_PDU_TYPE_EMM, DE_EMM_NONCE, " - NonceMME");
/* 4F HashMME HashMME 9.9.3.50 O TLV 10 */
ELEM_OPT_TLV(0x4F, NAS_PDU_TYPE_EMM, DE_EMM_HASH_MME, NULL);
/* 6F Replayed UE additional security capability UE additional security capability 9.9.3.53 O TLV 6 */
ELEM_OPT_TLV(0x6F, NAS_PDU_TYPE_EMM, DE_EMM_UE_ADD_SEC_CAP, " - Replayed UE additional security capability");
/* 37 UE radio capability ID request UE radio capability ID request 9.9.3.59 O TLV 3 */
ELEM_OPT_TLV(0x37, NAS_PDU_TYPE_EMM, DE_EMM_UE_RADIO_CAP_ID_REQ, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.21 Security mode complete
*/
static void
nas_emm_sec_mode_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_UL;
/* 23 IMEISV Mobile identity 9.9.2.3 O TLV 11 */
ELEM_OPT_TLV(0x23, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, " - IMEISV");
/* 79 Replayed NAS message container Replayed NAS message container 9.9.3.51 O TLV-E 3-n */
ELEM_OPT_TLV_E(0x79, NAS_PDU_TYPE_EMM, DE_EMM_REPLAYED_NAS_MSG_CONT, NULL);
/* 66 UE radio capability ID UE radio capability ID 9.9.3.60 O TLV 3-n */
ELEM_OPT_TLV(0x66, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.22 Security mode reject
*/
static void
nas_emm_sec_mode_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_UL;
/* EMM cause EMM cause 9.9.3.9 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.24 Service reject
*/
static void
nas_emm_serv_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
/* EMM cause EMM cause 9.9.3.9 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 5B T3442 value GPRS timer 9.9.3.16 C TV 2 */
ELEM_OPT_TV(0x5b, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3442 value");
/* 5F T3346 value GPRS timer 2 9.9.3.16A O TLV 3 */
ELEM_OPT_TLV(0x5F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
/* 6B T3448 value GPRS timer 2 9.9.3.16A O TLV 3 */
ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3448 value");
/* 1D Forbidden TAI(s) for the list of "forbidden tracking areas for roaming" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1D, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for roaming\"");
/* 1E Forbidden TAI(s) for the list of "forbidden tracking areas for regional provision of service" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1E, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for regional provision of service\"");
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.25 Service request
* This message is sent by the UE to the network to request the establishment
* of a NAS signalling connection and of the radio and S1 bearers.
* Its structure does not follow the structure of a standard layer 3 message. See table 8.2.25.1.
*/
/* Table 8.2.25.1
* Protocol discriminator Protocol discriminator 9.2 M V 1/2
* Security header type Security header type 9.3.1 M V 1/2
* KSI and sequence number KSI and sequence number 9.9.3.19 M V 1
* Message authentication code (short) Short MAC 9.9.3.28 M V 2
*/
static void
nas_emm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_UL;
/* KSI and sequence number 9.9.3.19 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_KSI_AND_SEQ_NO, NULL, ei_nas_eps_missing_mandatory_elemen);
/* Short MAC 9.9.3.28 M V 2 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_SHORT_MAC, " - Message authentication code (short)", ei_nas_eps_missing_mandatory_elemen);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.26 Tracking area update accept
*/
static void
nas_emm_trac_area_upd_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
bit_offset+=4;
/* EPS update result EPS update result 9.9.3.13 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_item(tree, hf_nas_eps_eps_update_result_value, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
/*bit_offset+=3;*/
/* Fix up the lengths */
curr_len--;
curr_offset++;
/* 5A T3412 value GPRS timer 9.9.3.16 O TV 2 */
ELEM_OPT_TV(0x5a, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3412 value");
/* 50 GUTI EPS mobile identity 9.9.3.12 O TLV 13 */
ELEM_OPT_TLV(0x50, NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - GUTI");
/* 54 TAI list Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x54, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, NULL);
/* 57 EPS bearer context status EPS bearer context status 9.9.2.1 O TLV 4 */
ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
/* 13 Location area identification Location area identification 9.9.2.2 O TV 6 */
ELEM_OPT_TV(0x13, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_LOC_AREA_ID, NULL);
/* 23 MS identity Mobile identity 9.9.2.3 O TLV 7-10 */
ELEM_OPT_TLV(0x23, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_MOB_ID, " - MS identity");
/* 53 EMM cause EMM cause 9.9.3.9 O TV 2 */
ELEM_OPT_TV(0x53, NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL);
/* 17 T3402 value GPRS timer 9.9.3.16 O TV 2 */
ELEM_OPT_TV(0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3402 value");
/* 59 T3423 value GPRS timer 9.9.3.16 O TV 2 */
ELEM_OPT_TV(0x59, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - T3423 value");
/* 4A Equivalent PLMNs PLMN list 9.9.2.8 O TLV 5-47 */
ELEM_OPT_TLV(0x4a, GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST, " - PLMN list");
/* 34 Emergency Number List Emergency Number List 9.9.3.37 O TLV 5-50 */
ELEM_OPT_TLV(0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL);
/* 64 EPS network feature support EPS network feature support 9.9.3.12A O TLV 3 */
ELEM_OPT_TLV(0x64, NAS_PDU_TYPE_EMM, DE_EMM_EPS_NET_FEATURE_SUP, NULL);
/* F- Additional update result Additional update result 9.9.3.0A O TV 1 */
ELEM_OPT_TV_SHORT( 0xF0 , NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_RES, NULL );
/* 5E T3412 extended value GPRS timer 3 9.9.3.16B O TLV 3 */
ELEM_OPT_TLV(0x5E, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3412 extended value");
/* 6A T3324 value GPRS timer 2 9.9.3.16A O TLV 3 */
ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value");
/* 6E Extended DRX parameters Extended DRX parameters 9.9.3.46 O TLV 3-4 */
ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
/* 68 Header compression configuration status Header compression configuration status 9.9.4.27 O TLV 5-257 */
ELEM_OPT_TLV(0x68, NAS_PDU_TYPE_ESM, DE_ESM_HDR_COMPR_CONFIG_STATUS, NULL);
/* 65 DCN-ID DCN-ID 9.9.3.48 O TLV 4 */
ELEM_OPT_TLV(0x65, GSM_A_PDU_TYPE_GM, DE_DCN_ID, NULL);
/* E- SMS services status SMS services status 9.9.3.4B O TV 1 */
ELEM_OPT_TV_SHORT(0xE0, NAS_PDU_TYPE_EMM, DE_EMM_SMS_SERVICES_STATUS, NULL);
/* D- Non-3GPP NW provided policies Non-3GPP NW provided policies O TV 1 */
ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_NON_3GPP_NW_PROV_POL, NULL);
/* 6B T3448 value GPRS timer 2 9.9.3.16A O TLV 3 */
ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3448 value");
/* C- Network policy Network policy 9.9.3.52 O TV 1 */
ELEM_OPT_TV_SHORT(0xC0, NAS_PDU_TYPE_EMM, DE_EMM_NETWORK_POLICY, NULL);
/* 6C T3447 value GPRS timer 3 9.9.3.16B O TLV 3 */
ELEM_OPT_TLV(0x6C, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3447 value");
/* 7A Extended emergency number list Extended emergency number list 9.9.3.37A O TLV-E 7-65538 */
ELEM_OPT_TLV_E(0x7A, NAS_PDU_TYPE_EMM, DE_EMM_EXT_EMERG_NUM_LIST, NULL);
/* 7C Ciphering key data Ciphering key data 9.9.3.56 O TLV-E 35-2291 */
ELEM_OPT_TLV_E(0x7C, NAS_PDU_TYPE_EMM, DE_EMM_CIPH_KEY_DATA, NULL);
/* 66 UE radio capability ID UE radio capability ID 9.9.3.60 O TLV 3-n */
ELEM_OPT_TLV(0x66, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID, NULL);
/* B- UE radio capability ID deletion indication UE radio capability ID deletion indication O TV 1 */
ELEM_OPT_TV_SHORT(0xB0, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_RADIO_CAP_ID_DEL_IND, NULL);
/* 35 Negotiated WUS assistance information WUS assistance information 9.9.3.62 O TLV 3-n */
ELEM_OPT_TLV(0x35, NAS_PDU_TYPE_EMM, DE_EMM_WUS_ASSIST_INFO, " - Negotiated");
/* 36 Negotiated DRX parameter in NB-S1 mode NB-S1 DRX parameter 9.9.3.63 O TLV 3 */
ELEM_OPT_TLV(0x36, NAS_PDU_TYPE_EMM, DE_EMM_NB_S1_DRX_PARAM, " - Negotiated");
/* 38 Negotiated IMSI offset IMSI offset 9.9.3.64 O TLV 4 */
ELEM_OPT_TLV(0x38, NAS_PDU_TYPE_EMM, DE_EMM_IMSI_OFFSET, " - Negotiated");
/* 37 EPS additional request result EPS additional request result 9.9.3.67 O TLV 3 */
ELEM_OPT_TLV(0x37, NAS_PDU_TYPE_EMM, DE_EMM_EPS_ADD_REQ_RESULT, NULL);
/* 1D Forbidden TAI(s) for the list of "forbidden tracking areas for roaming" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1D, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for roaming\"");
/* 1E Forbidden TAI(s) for the list of "forbidden tracking areas for regional provision of service" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1E, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for regional provision of service\"");
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.27 Tracking area update complete
* No more IE's
*/
/*
* 8.2.28 Tracking area update reject
*/
static void
nas_emm_trac_area_upd_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
/* EMM cause EMM cause 9.9.3.9 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 5F T3346 value GPRS timer 2 9.9.3.16A O TLV 3 */
ELEM_OPT_TLV(0x5F, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
/* A- Extended EMM cause Extended EMM cause 9.9.3.26A O TV 1 */
ELEM_OPT_TV_SHORT( 0xA0, NAS_PDU_TYPE_EMM, DE_EMM_EXT_CAUSE, NULL );
/* 1C Lower bound timer value GPRS timer 3 9.9.3.16B O TLV 3 */
ELEM_OPT_TLV(0x1C, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Lower bound timer value");
/* 1D Forbidden TAI(s) for the list of "forbidden tracking areas for roaming" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1D, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for roaming\"");
/* 1E Forbidden TAI(s) for the list of "forbidden tracking areas for regional provision of service" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1E, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for regional provision of service\"");
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.29 Tracking area update request
*/
static void
nas_emm_trac_area_upd_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
bit_offset = curr_offset<<3;
pinfo->link_dir = P2P_DIR_UL;
/* NAS key set identifierASME NAS key set identifier 9.9.3.21 M V 1/2 */
de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, " ASME");
bit_offset+=4;
/* EPS update type EPS update type 9.9.3.14 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_active_flg, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset++;
proto_tree_add_bits_item(tree, hf_nas_eps_eps_update_type_value, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
/*bit_offset+=3;*/
/* Fix the lengths */
curr_len--;
curr_offset++;
/* Old GUTI EPS mobile identity 9.9.3.12 M LV 12 */
ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - Old GUTI", ei_nas_eps_missing_mandatory_elemen);
/* No more Mandatory elements */
/* B- NAS key set identifier Non-current native NAS key set identifier 9.9.3.21 O TV 1 */
ELEM_OPT_TV_SHORT( 0xb0 , NAS_PDU_TYPE_EMM, DE_EMM_NAS_KEY_SET_ID , " - Non-current native NAS key set identifier" );
/* 8- GPRS ciphering key sequence number Ciphering key sequence number 9.9.3.4a O TV 1 */
ELEM_OPT_TV_SHORT(0x80, GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, " - GPRS ciphering key sequence number");
/* 19 Old P-TMSI signature P-TMSI signature 9.9.3.26 O TV 4 */
ELEM_OPT_TV( 0x19 , GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature");
/* 50 Additional GUTI EPS mobile identity 9.9.3.12 O TLV 13 */
ELEM_OPT_TLV(0x50, NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - Additional GUTI");
/* 55 NonceUE Nonce 9.9.3.25 O TV 5 */
ELEM_OPT_TV(0x55, NAS_PDU_TYPE_EMM, DE_EMM_NONCE, " - NonceUE");
/* 58 UE network capability UE network capability 9.9.3.34 O TLV 4-15 */
ELEM_OPT_TLV(0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
/* 52 Last visited registered TAI Tracking area identity 9.9.3.32 O TV 6 */
ELEM_OPT_TV(0x52, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID, " - Last visited registered TAI");
/* 5C DRX parameter DRX parameter 9.9.3.8 O TV 3 */
ELEM_OPT_TV(0x5c, GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL );
/* A- UE radio capability information update needed UE radio capability information update needed 9.9.3.35 O TV 1 */
ELEM_OPT_TV_SHORT( 0xA0, NAS_PDU_TYPE_EMM, DE_EMM_UE_RA_CAP_INF_UPD_NEED, NULL );
/* 57 EPS bearer context status EPS bearer context status 9.9.2.1 O TLV 4 */
ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
/* 31 MS network capability MS network capability 9.9.3.20 O TLV 4-10 */
ELEM_OPT_TLV( 0x31, GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, NULL );
/* 13 Old location area identification Location area identification 9.9.2.2 O TV 6 */
ELEM_OPT_TV(0x13, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_LOC_AREA_ID, " - Old location area identification");
/* 9- TMSI status TMSI status 9.9.3.31 O TV 1 */
ELEM_OPT_TV_SHORT( 0x90, GSM_A_PDU_TYPE_GM, DE_TMSI_STAT, NULL );
/* 11 Mobile station classmark 2 Mobile station classmark 2 9.9.2.5 O TLV 5 */
ELEM_OPT_TLV( 0x11, NAS_PDU_TYPE_COMMON, DE_EPS_MS_CM_2 , NULL );
/* 20 Mobile station classmark 3 Mobile station classmark 3 9.9.2.5 O TLV 2-34 */
ELEM_OPT_TLV( 0x20, NAS_PDU_TYPE_COMMON, DE_EPS_MS_CM_3 , NULL );
/* 40 Supported Codecs Supported Codec List 9.9.2.10 O TLV 5-n */
ELEM_OPT_TLV(0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, " - Supported Codecs");
/* F- Additional update type Additional update type 9.9.3.0B O TV 1 */
ELEM_OPT_TV_SHORT( 0xF0, NAS_PDU_TYPE_EMM, DE_EMM_ADD_UPD_TYPE, NULL );
/* 5D Voice domain preference and UE's usage setting Voice domain preference and UE's usage setting 9.9.3.44 O TLV 3 */
ELEM_OPT_TLV(0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
/* E- Old GUTI type GUTI type 9.9.3.45 O TV 1 */
ELEM_OPT_TV_SHORT(0xE0, NAS_PDU_TYPE_EMM, DE_EMM_GUTI_TYPE, " - Old GUTI type");
/* D- Device properties Device properties 9.9.2.0A O TV 1 */
ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
/* C- MS network feature support MS network feature support 9.9.3.20A 0 TV 1 */
ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_COMMON, DE_MS_NET_FEAT_SUP, NULL);
/* 10 TMSI based NRI container Network resource identifier container 9.9.3.24A 0 TLV 4 */
ELEM_OPT_TLV(0x10, GSM_A_PDU_TYPE_GM, DE_NET_RES_ID_CONT, " - TMSI based NRI container");
/* 6A T3324 value GPRS timer 2 9.9.3.16A O TLV 3 */
ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value");
/* 5E T3412 extended value GPRS timer 3 9.9.3.16B O TLV 3 */
ELEM_OPT_TLV(0x5E, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3412 extended value");
/* 6E Extended DRX parameters Extended DRX parameters 9.9.3.46 O TLV 3-4 */
ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
/* 6F UE additional security capability UE additional security capability 9.9.3.53 O TLV 6 */
ELEM_OPT_TLV(0x6F, NAS_PDU_TYPE_EMM, DE_EMM_UE_ADD_SEC_CAP, NULL);
/* 6D UE status UE status 9.9.3.54 O TLV 3 */
ELEM_OPT_TLV(0x6D, NAS_5GS_PDU_TYPE_MM, DE_NAS_5GS_MM_UE_STATUS, NULL);
/* 17 Additional information requested Additional information requested 9.9.3.55 O TV 2 */
ELEM_OPT_TV(0x17, NAS_PDU_TYPE_EMM, DE_EMM_ADD_INFO_REQ, NULL);
/* 32 N1 UE network capability N1 UE network capability 9.9.3.57 O TLV 3-15 */
ELEM_OPT_TLV(0x32, NAS_PDU_TYPE_EMM, DE_EMM_N1_UE_NETWORK_CAP, NULL);
/* 34 UE radio capability ID availability UE radio capability ID availability O TLV 3 */
ELEM_OPT_TLV(0x34, NAS_PDU_TYPE_EMM, DE_EMM_UE_RADIO_CAP_ID_AVAIL, NULL);
/* 35 Requested WUS assistance WUS assistance information O TLV 3-n */
ELEM_OPT_TLV(0x35, NAS_PDU_TYPE_EMM, DE_EMM_WUS_ASSIST_INFO, " - Requested");
/* 36 DRX parameter in NB-S1 mode NB-S1 DRX parameter 9.9.3.63 O TLV 3 */
ELEM_OPT_TLV(0x36, NAS_PDU_TYPE_EMM, DE_EMM_NB_S1_DRX_PARAM, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.30 Uplink NAS Transport
*/
static void
nas_emm_ul_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_UL;
/* NAS message container NAS message container 9.9.3.22 M LV 3-252*/
ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_NAS_MSG_CONT, NULL, ei_nas_eps_missing_mandatory_elemen);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.31 Downlink generic NAS transport
*/
static void
nas_emm_dl_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
/* Generic message container type Generic message container type 9.9.3.42 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_GEN_MSG_CONT_TYPE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* Generic message container Generic message container 9.9.3.43 M LV-E 3-n */
ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_GEN_MSG_CONT, NULL, ei_nas_eps_missing_mandatory_elemen)
/* 65 Additional information Additional information 9.9.2.0 O TLV 3-n */
ELEM_OPT_TLV(0x65, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_ADD_INFO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.32 Uplink generic NAS transport
*/
static void
nas_emm_ul_gen_nas_trans(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_UL;
/* Generic message container type Generic message container type 9.9.3.42 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_GEN_MSG_CONT_TYPE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* Generic message container Generic message container 9.9.3.43 M LV-E 3-n */
ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_GEN_MSG_CONT, NULL, ei_nas_eps_missing_mandatory_elemen)
/* 65 Additional information Additional information 9.9.2.0 O TLV 3-n */
ELEM_OPT_TLV(0x65, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_ADD_INFO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.33 Control plane service request
*/
static const value_string nas_eps_emm_data_serv_type_vals[] = {
{ 0x0, "Mobile originating request" },
{ 0x1, "Mobile terminating request" },
{ 0, NULL }
};
static void
nas_emm_ctrl_plane_serv_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
bit_offset = curr_offset<<3;
pinfo->link_dir = P2P_DIR_UL;
/* NAS key set identifier NAS key set identifier 9.9.3.21 M V 1/2 */
de_emm_nas_key_set_id_bits(tvb, tree, bit_offset, NULL);
bit_offset+=4;
/* Control Plane service type Control Plane service type 9.9.3.47 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_active_flg, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
bit_offset += 1;
proto_tree_add_bits_item(tree, hf_nas_eps_ctrl_plane_serv_type, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
/* Fix the lengths */
curr_len--;
curr_offset++;
/* 78 ESM message container ESM message container 9.9.3.15 O TLV-E 3-n */
ELEM_OPT_TLV_E(0x78, NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, NULL);
/* 67 NAS message container NAS message container 9.9.3.22 O TLV 4-253 */
ELEM_OPT_TLV(0x67, NAS_PDU_TYPE_EMM, DE_EMM_NAS_MSG_CONT, NULL);
/* 57 EPS bearer context status EPS bearer context status 9.9.2.1 O TLV 4 */
ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
/* D- Device properties Device properties 9.9.2.0A O TV 1 */
ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.2.34 Service accept
*/
static void
nas_emm_serv_accept(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
/* 57 EPS bearer context status EPS bearer context status 9.9.2.1 O TLV 4 */
ELEM_OPT_TLV(0x57, NAS_PDU_TYPE_COMMON, DE_EPS_CMN_EPS_BE_CTX_STATUS, NULL);
/* 6B T3448 value GPRS timer 2 9.9.3.16A O TLV 3 */
ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3448 value");
/* 37 EPS additional request result EPS additional request result 9.9.3.67 O TLV 3 */
ELEM_OPT_TLV(0x37, NAS_PDU_TYPE_EMM, DE_EMM_EPS_ADD_REQ_RESULT, NULL);
/* 1D Forbidden TAI(s) for the list of "forbidden tracking areas for roaming" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1D, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for roaming\"");
/* 1E Forbidden TAI(s) for the list of "forbidden tracking areas for regional provision of service" Tracking area identity list 9.9.3.33 O TLV 8-98 */
ELEM_OPT_TLV(0x1E, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, " - Forbidden TAI(s) for the list of \"forbidden tracking areas for regional provision of service\"");
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3 EPS session management messages
*/
/*
* 8.3.1 Activate dedicated EPS bearer context accept
*/
static void
nas_esm_act_ded_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the UE to the network */
pinfo->link_dir = P2P_DIR_UL;
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
/* 5C Extended EPS QoS Extended quality of service 9.9.4.30 O TLV 12 */
ELEM_OPT_TLV(0x5C, NAS_PDU_TYPE_ESM, DE_ESM_EXT_EPS_QOS, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.2 Activate dedicated EPS bearer context reject
*/
static void
nas_esm_act_ded_eps_bearer_ctx_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by UE to the network to reject activation of a dedicated EPS bearer context */
pinfo->link_dir = P2P_DIR_UL;
/* ESM cause ESM cause 9.9.4.2 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.3 Activate dedicated EPS bearer context request
*/
static void
nas_esm_act_ded_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the network to the UE to request activation of a dedicated EPS bearer context... */
pinfo->link_dir = P2P_DIR_DL;
/* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
bit_offset+=4;
/* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
/*bit_offset+=4;*/
/* Fix the lengths */
curr_len--;
curr_offset++;
/* EPS QoS EPS quality of service 9.9.4.3 M LV 2-10 */
ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS, NULL, ei_nas_eps_missing_mandatory_elemen);
/* TFT Traffic flow template 9.9.4.16 M LV 2-256 */
ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , NULL, ei_nas_eps_missing_mandatory_elemen);
/* 5D Transaction identifier Transaction identifier 9.9.4.17 O TLV 3-4 */
ELEM_OPT_TLV( 0x5d , GSM_A_PDU_TYPE_GM, DE_LINKED_TI , " - Transaction identifier" );
/* 30 Negotiated QoS Quality of service 9.9.4.12 O TLV 14-18 */
ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
/* 32 Negotiated LLC SAPI LLC service access point identifier 9.9.4.7 O TV 2 */
ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
/* 8- Radio priority Radio priority 9.9.4.13 O TV 1 */
ELEM_OPT_TV_SHORT ( 0x80 , GSM_A_PDU_TYPE_GM , DE_RAD_PRIO , NULL );
/* 34 Packet flow Identifier Packet flow Identifier 9.9.4.8 O TLV 3 */
ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL );
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* C- WLAN offload indication WLAN offload indication 9.9.4.18 O TV 1 */
ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
/* 5C Extended EPS QoS Extended EPS quality of service 9.9.4.30 O TLV 12 */
ELEM_OPT_TLV(0x5C, NAS_PDU_TYPE_ESM, DE_ESM_EXT_EPS_QOS, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.4 Activate default EPS bearer context accept
*/
static void
nas_esm_act_def_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the UE to the network to acknowledge activation of a default EPS bearer context */
pinfo->link_dir = P2P_DIR_UL;
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.5 Activate default EPS bearer context reject
*/
static void
nas_esm_act_def_eps_bearer_ctx_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by UE to the network to reject activation of a default EPS bearer context. */
pinfo->link_dir = P2P_DIR_UL;
/* ESM cause ESM cause 9.9.4.4 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.6 Activate default EPS bearer context request
*/
static void
nas_esm_act_def_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the network to the UE to request activation of a default EPS bearer context. */
pinfo->link_dir = P2P_DIR_DL;
/* EPS QoS EPS quality of service 9.9.4.3 M LV 2-10 */
ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS, NULL, ei_nas_eps_missing_mandatory_elemen);
/* Access point name Access point name 9.9.4.1 M LV 2-101 */
ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL, ei_nas_eps_missing_mandatory_elemen);
/* PDN address PDN address 9.9.4.9 M LV 6-14 DE_ESM_PDN_ADDR*/
ELEM_MAND_LV( NAS_PDU_TYPE_ESM, DE_ESM_PDN_ADDR , NULL, ei_nas_eps_missing_mandatory_elemen);
/* 5D Transaction identifier Transaction identifier 9.9.4.17 O TLV 3-4 */
ELEM_OPT_TLV( 0x5d , GSM_A_PDU_TYPE_GM, DE_LINKED_TI , " - Transaction identifier" );
/* 30 Negotiated QoS Quality of service 9.9.4.12 O TLV 14-18 */
ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - Negotiated QoS" );
/* 32 Negotiated LLC SAPI LLC service access point identifier 9.9.4.7 O TV 2 */
ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
/* 8- Radio priority Radio priority 9.9.4.13 O TV 1 */
ELEM_OPT_TV_SHORT ( 0x80 , GSM_A_PDU_TYPE_GM , DE_RAD_PRIO , NULL );
/* 34 Packet flow Identifier Packet flow Identifier 9.9.4.8 O TLV 3 */
ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL );
/* 5E APN-AMBR APN aggregate maximum bit rate 9.9.4.2 O TLV 4-8 DE_ESM_APN_AGR_MAX_BR*/
ELEM_OPT_TLV( 0x5e , NAS_PDU_TYPE_ESM, DE_ESM_APN_AGR_MAX_BR , NULL );
/* 58 ESM cause ESM cause 9.9.4.4 O TV 2 */
ELEM_OPT_TV( 0x58 , NAS_PDU_TYPE_ESM, DE_ESM_CAUSE , NULL );
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* B- Connectivity type Connectivity type 9.9.4.2A O TV 1 */
ELEM_OPT_TV_SHORT(0xB0 , GSM_A_PDU_TYPE_GM, DE_SM_CONNECTIVITY_TYPE, NULL);
/* C- WLAN offload indication WLAN offload indication 9.9.4.18 O TV 1 */
ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 66 Header compression configuration Header compression configuration 9.9.4.22 O TLV 5-257 */
ELEM_OPT_TLV(0x66, NAS_PDU_TYPE_ESM, DE_ESM_HDR_COMPR_CONFIG, NULL);
/* 9- Control plane only indication Control plane only indication 9.9.4.23 O TV 1 */
ELEM_OPT_TV_SHORT(0x90, NAS_PDU_TYPE_ESM, DE_ESM_CTRL_PLANE_ONLY_IND, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
/* 6E Serving PLMN rate control Serving PLMN rate control 9.9.4.28 O TLV 4 */
ELEM_OPT_TLV(0x6E, NAS_PDU_TYPE_ESM, DE_ESM_SERV_PLMN_RATE_CTRL, NULL);
/* 5F Extended APN-AMBR Extended APN aggregate maximum bit rate 9.9.4.29 O TLV 8 */
ELEM_OPT_TLV(0x5F, NAS_PDU_TYPE_ESM, DE_ESM_EXT_APN_AGR_MAX_BR , NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.7 Bearer resource allocation reject
*/
static void
nas_esm_bearer_res_all_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the network to the UE to reject the allocation of a dedicated bearer resource. */
pinfo->link_dir = P2P_DIR_DL;
/* ESM cause ESM cause 9.9.4.4 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 37 Back-off timer value GPRS timer 3 9.9.3.16B O TLV 3 */
ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Back-off timer value");
/* 6B Re-attempt indicator Re-attempt indicator 9.9.4.13A O TLV 3 */
ELEM_OPT_TLV(0x6B, NAS_PDU_TYPE_ESM, DE_ESM_RE_ATTEMPT_IND, NULL);
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.8 Bearer resource allocation request
*/
static void
nas_esm_bearer_res_all_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the UE to the network to request the allocation of a dedicated bearer resource. */
pinfo->link_dir = P2P_DIR_UL;
/* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
bit_offset+=4;
/* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
/*bit_offset+=4;*/
/* Fix the lengths */
curr_len--;
curr_offset++;
/* Traffic flow aggregate Traffic flow aggregate description 9.9.4.15 M LV 2-256 */
ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , " - Traffic flow aggregate", ei_nas_eps_missing_mandatory_elemen);
/* Required traffic flow QoS EPS quality of service 9.9.4.3 M LV 2-10 */
ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS, " - Required traffic flow QoS", ei_nas_eps_missing_mandatory_elemen);
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* C- Device properties Device properties 9.9.2.0A O TV 1 */
ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
/* 5C Extended EPS QoS Extended EPS quality of service 9.9.4.30 O TLV 12 */
ELEM_OPT_TLV(0x5C, NAS_PDU_TYPE_ESM, DE_ESM_EXT_EPS_QOS, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.9 Bearer resource modification reject
*/
static void
nas_esm_bearer_res_mod_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the network to the UE to reject the modification of a dedicated bearer resource. */
pinfo->link_dir = P2P_DIR_DL;
/* ESM cause ESM cause 9.9.4.4 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 37 Back-off timer value GPRS timer 3 9.9.3.16B O TLV 3 */
ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Back-off timer value");
/* 6B Re-attempt indicator Re-attempt indicator 9.9.4.13A O TLV 3 */
ELEM_OPT_TLV(0x6B, NAS_PDU_TYPE_ESM, DE_ESM_RE_ATTEMPT_IND, NULL);
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.10 Bearer resource modification request
*/
static void
nas_esm_bearer_res_mod_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the UE to the network to request the modification of a dedicated bearer resource. */
pinfo->link_dir = P2P_DIR_UL;
/* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
bit_offset+=4;
/* EPS bearer identity for packet filter Linked EPS bearer identity 9.9.4.6 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
/*bit_offset+=4;*/
/* Fix the lengths */
curr_len--;
curr_offset++;
/* Traffic flow aggregate Traffic flow aggregate description 9.9.4.15 M LV 2-256 */
ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , " - Traffic flow aggregate", ei_nas_eps_missing_mandatory_elemen);
/* 5B Required traffic flow QoS EPS quality of service 9.9.4.3 O TLV 3-11 */
ELEM_OPT_TLV( 0x5B , NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS , " - Required traffic flow QoS" );
/* 58 ESM cause ESM cause 9.9.4.4 O TV 2 */
ELEM_OPT_TV( 0x58 , NAS_PDU_TYPE_ESM, DE_ESM_CAUSE , NULL );
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* C- Device properties Device properties 9.9.2.0A O TV 1 */
ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 66 Header compression configuration Header compression configuration 9.9.4.22 O TLV 5-257 */
ELEM_OPT_TLV(0x66, NAS_PDU_TYPE_ESM, DE_ESM_HDR_COMPR_CONFIG, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
/* 5C Extended EPS QoS Extended EPS quality of service 9.9.4.30 O TLV 12 */
ELEM_OPT_TLV(0x5C, NAS_PDU_TYPE_ESM, DE_ESM_EXT_EPS_QOS, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.11 Deactivate EPS bearer context accept
*/
static void
nas_esm_deact_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the UE to acknowledge deactivation of the EPS bearer context... */
pinfo->link_dir = P2P_DIR_UL;
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.12 Deactivate EPS bearer context request
*/
static void
nas_esm_deact_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the network to request deactivation of an active EPS bearer context. */
pinfo->link_dir = P2P_DIR_DL;
/* ESM cause ESM cause 9.9.4.4 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 37 T3396 value GPRS timer 3 9.9.3.16B O TLV 3 */
ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3396 value");
/* C- WLAN offload indication WLAN offload indication 9.9.4.18 O TV 1 */
ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.12A ESM dummy message
* No IE:s
*/
static void
nas_esm_dummy_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint curr_len;
curr_offset = offset;
curr_len = len;
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.13 ESM information request
* No IE:s
*/
static void
nas_esm_inf_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len)
{
guint32 curr_offset;
guint curr_len;
curr_offset = offset;
curr_len = len;
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.14 ESM information response
*/
static void
nas_esm_inf_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the UE to the network in response to an ESM INFORMATION REQUEST... */
pinfo->link_dir = P2P_DIR_UL;
/* 28 Access point name Access point name 9.9.4.1 O TLV 3-102 */
ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.15 ESM status
*/
static void
nas_esm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* ESM cause ESM cause 9.9.4.4 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.16 Modify EPS bearer context accept
*/
static void
nas_esm_mod_eps_bearer_ctx_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the UE to the network to acknowledge the modification of an active EPS bearer context. */
pinfo->link_dir = P2P_DIR_UL;
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.17 Modify EPS bearer context reject
*/
static void
nas_esm_mod_eps_bearer_ctx_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the UE or the network to reject a modification of an active EPS bearer context. */
pinfo->link_dir = P2P_DIR_UL;
/* ESM cause ESM cause 9.9.4.4 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.18 Modify EPS bearer context request
*/
static void
nas_esm_mod_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/*This message is sent by the network to inform the UE about events which are relevant for the upper layer... */
pinfo->link_dir = P2P_DIR_DL;
/* 5B New EPS QoS EPS quality of service 9.9.4.3 O TLV 3-11 */
ELEM_OPT_TLV( 0x5B , NAS_PDU_TYPE_ESM, DE_ESM_EPS_QOS , " - New EPS QoS" );
/* 36 TFT Traffic flow template 9.9.4.16 O TLV 3-257 */
ELEM_OPT_TLV( 0x36 , GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE , NULL );
/* 30 New QoS Quality of service 9.9.4.12 O TLV 14-18 */
ELEM_OPT_TLV( 0x30 , GSM_A_PDU_TYPE_GM, DE_QOS , " - New QoS" );
/* 32 Negotiated LLC SAPI LLC service access point identifier 9.9.4.7 O TV 2 */
ELEM_OPT_TV( 0x32 , GSM_A_PDU_TYPE_GM, DE_LLC_SAPI , " - Negotiated LLC SAPI" );
/* 8- Radio priority Radio priority 9.9.4.13 O TV 1 */
ELEM_OPT_TV_SHORT ( 0x80 , GSM_A_PDU_TYPE_GM , DE_RAD_PRIO , NULL );
/* 34 Packet flow Identifier Packet flow Identifier 9.9.4.8 O TLV 3 */
ELEM_OPT_TLV( 0x34 , GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID , NULL );
/* 5E APN-AMBR APN aggregate maximum bit rate 9.9.4.2 O TLV 4-8 */
ELEM_OPT_TLV( 0x5E , NAS_PDU_TYPE_ESM, DE_ESM_APN_AGR_MAX_BR , NULL );
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* C- WLAN offload indication WLAN offload indication 9.9.4.18 O TV 1 */
ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 66 Header compression configuration Header compression configuration 9.9.4.22 O TLV 5-257 */
ELEM_OPT_TLV(0x66, NAS_PDU_TYPE_ESM, DE_ESM_HDR_COMPR_CONFIG, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
/* 5F Extended APN-AMBR Extended APN aggregate maximum bit rate 9.9.4.29 O TLV 8 */
ELEM_OPT_TLV(0x5F, NAS_PDU_TYPE_ESM, DE_ESM_EXT_APN_AGR_MAX_BR , NULL);
/* 5C Extended EPS QoS Extended EPS quality of service 9.9.4.30 O TLV 12 */
ELEM_OPT_TLV(0x5C, NAS_PDU_TYPE_ESM, DE_ESM_EXT_EPS_QOS, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.18A Notification
*/
static void
nas_esm_notification(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
/* Notification indicator Notification indicator 9.9.4.7A M LV 2 */
ELEM_MAND_LV(NAS_PDU_TYPE_ESM, DE_ESM_NOTIF_IND, NULL, ei_nas_eps_missing_mandatory_elemen);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.19 PDN connectivity reject
*/
static void
nas_esm_pdn_con_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/*This message is sent by the network to the UE to reject establishment of a PDN connection. */
pinfo->link_dir = P2P_DIR_DL;
/* ESM cause ESM cause 9.9.4.4 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 37 Back-off timer value GPRS timer 3 9.9.3.16B O TLV 3 */
ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Back-off timer value");
/* 6B Re-attempt indicator Re-attempt indicator 9.9.4.13A O TLV 3 */
ELEM_OPT_TLV(0x6B, NAS_PDU_TYPE_ESM, DE_ESM_RE_ATTEMPT_IND, NULL);
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.20 PDN connectivity request
*/
void
nas_esm_pdn_con_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
int bit_offset;
curr_offset = offset;
curr_len = len;
/*This message is sent by the UE to the network to initiate establishment of a PDN connection. */
pinfo->link_dir = P2P_DIR_UL;
/* PDN type PDN type 9.9.4.10 M V 1/2 */
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_esm_pdn_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
bit_offset+=4;
/* Request type 9.9.4.14 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_esm_request_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
/*bit_offset+=4;*/
/* Fix the lengths */
curr_len--;
curr_offset++;
/* D- ESM information transfer flag 9.9.4.5 O TV 1 */
ELEM_OPT_TV_SHORT( 0xd0 , NAS_PDU_TYPE_ESM, DE_ESM_INF_TRF_FLG , NULL );
/* 28 Access point name 9.9.4.1 O TLV 3-102 */
ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME , NULL );
/* 27 Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* C- Device properties Device properties 9.9.2.0A O TV 1 */
ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
/* 33 NBIFOM container NBIFOM container 9.9.4.19 O TLV 3-257 */
ELEM_OPT_TLV(0x33, NAS_PDU_TYPE_ESM, DE_ESM_NBIFOM_CONT, NULL);
/* 66 Header compression configuration Header compression configuration 9.9.4.22 O TLV 5-257 */
ELEM_OPT_TLV(0x66, NAS_PDU_TYPE_ESM, DE_ESM_HDR_COMPR_CONFIG, NULL);
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.21 PDN disconnect reject
*/
static void
nas_esm_pdn_disc_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* This message is sent by the network to the UE to reject release of a PDN connection. */
pinfo->link_dir = P2P_DIR_DL;
/* ESM cause ESM cause 9.9.4.4 M V 1 */
ELEM_MAND_V(NAS_PDU_TYPE_ESM, DE_ESM_CAUSE, NULL, ei_nas_eps_missing_mandatory_elemen);
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.22 PDN disconnect request
*/
static void
nas_esm_pdn_disc_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset, bit_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/*This message is sent by the UE to the network to initiate release of a PDN connection. */
pinfo->link_dir = P2P_DIR_UL;
/* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
bit_offset = curr_offset<<3;
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
bit_offset+=4;
/* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
/*bit_offset+=4;*/
/* Fix the lengths */
curr_len--;
curr_offset++;
/* 27 Protocol configuration options Protocol configuration options 9.9.4.11 O TLV 3-253 */
ELEM_OPT_TLV( 0x27 , GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT , NULL );
/* 7B Extended protocol configuration options Extended protocol configuration options 9.9.4.26 O TLV-E 4-65538 */
ELEM_OPT_TLV_E(0x7B, NAS_PDU_TYPE_ESM, DE_ESM_EXT_PCO, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.23 Remote UE report
*/
static void
nas_esm_remote_ue_report(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_UL;
/* 79 Remote UE Context Connected Remote UE context list 9.9.4.20 O TLV-E 3-65538 */
ELEM_OPT_TLV_E(0x79, NAS_PDU_TYPE_ESM, DE_ESM_REMOTE_UE_CONTEXT_LIST, " - Remote UE Context Connected");
/* 7A Remote UE Context Disconnected Remote UE context list 9.9.4.20 O TLV-E 3-65538 */
ELEM_OPT_TLV_E(0x7A, NAS_PDU_TYPE_ESM, DE_ESM_REMOTE_UE_CONTEXT_LIST, " - Remote UE Context Disconnected");
/* 6F ProSe Key Management Function address PKMF address 9.9.4.21 O TLV 3-19 */
ELEM_OPT_TLV(0x6F, NAS_PDU_TYPE_ESM, DE_ESM_PKMF_ADDRESS, " - ProSe Key Management Function address");
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.24 Remote UE report response
*/
static void
nas_esm_remote_ue_report_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
/*guint32 consumed;*/
guint curr_len;
curr_offset = offset;
curr_len = len;
pinfo->link_dir = P2P_DIR_DL;
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
/*
* 8.3.25 ESM data transport
*/
static void
nas_esm_data_transport(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len)
{
guint32 curr_offset;
guint32 consumed;
guint curr_len;
curr_offset = offset;
curr_len = len;
/* User data container User data container 9.9.4.24 M LV-E 2-n */
ELEM_MAND_LV_E(NAS_PDU_TYPE_ESM, DE_ESM_USER_DATA_CONT, NULL, ei_nas_eps_missing_mandatory_elemen);
/* F- Release assistance indication Release assistance indication 9.9.4.25 O TV 1 */
ELEM_OPT_TV_SHORT(0xF0, NAS_PDU_TYPE_ESM, DE_ESM_REL_ASSIST_IND, NULL);
EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_nas_eps_extraneous_data);
}
#define NUM_NAS_MSG_ESM (sizeof(nas_msg_esm_strings)/sizeof(value_string))
static gint ett_nas_msg_esm[NUM_NAS_MSG_ESM];
static void (*nas_msg_esm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len) = {
nas_esm_act_def_eps_bearer_ctx_req, /* Activate default EPS bearer context request*/
nas_esm_act_def_eps_bearer_ctx_acc, /* Activate default EPS bearer context accept*/
nas_esm_act_def_eps_bearer_ctx_rej, /* Activate default EPS bearer context reject*/
nas_esm_act_ded_eps_bearer_ctx_req, /* Activate dedicated EPS bearer context request*/
nas_esm_act_ded_eps_bearer_ctx_acc, /* Activate dedicated EPS bearer context accept*/
nas_esm_act_ded_eps_bearer_ctx_rej, /* Activate dedicated EPS bearer context reject*/
nas_esm_mod_eps_bearer_ctx_req, /* Modify EPS bearer context request*/
nas_esm_mod_eps_bearer_ctx_acc, /* Modify EPS bearer context accept*/
nas_esm_mod_eps_bearer_ctx_rej, /* Modify EPS bearer context reject*/
nas_esm_deact_eps_bearer_ctx_req, /* Deactivate EPS bearer context request*/
nas_esm_deact_eps_bearer_ctx_acc, /* Deactivate EPS bearer context accept*/
nas_esm_pdn_con_req, /* 8.3.18 PDN connectivity request */
nas_esm_pdn_con_rej, /* PDN connectivity reject*/
nas_esm_pdn_disc_req, /* PDN disconnect request*/
nas_esm_pdn_disc_rej, /* PDN disconnect reject*/
nas_esm_bearer_res_all_req, /* Bearer resource allocation request*/
nas_esm_bearer_res_all_rej, /* Bearer resource allocation reject*/
nas_esm_bearer_res_mod_req, /* Bearer resource modification request*/
nas_esm_bearer_res_mod_rej, /* Bearer resource modification reject*/
nas_esm_inf_req, /* ESM information request, No IE:s*/
nas_esm_inf_resp, /* ESM information response*/
nas_esm_notification, /* Notification */
nas_esm_dummy_msg, /* ESM dummy message */
nas_esm_status, /* ESM status */
nas_esm_remote_ue_report, /* Remote UE report */
nas_esm_remote_ue_report_resp, /* Remote UE report response */
nas_esm_data_transport, /* ESM data transport */
NULL, /* NONE */
};
static void
get_nas_esm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
{
gint idx;
*msg_str = try_val_to_str_idx_ext((guint32) (oct & 0xff), &nas_msg_esm_strings_ext, &idx);
*hf_idx = hf_nas_eps_msg_esm_type;
if (*msg_str != NULL) {
*ett_tree = ett_nas_msg_esm[idx];
*msg_fcn_p = nas_msg_esm_fcn[idx];
}
return;
}
#define NUM_NAS_MSG_EMM (sizeof(nas_msg_emm_strings)/sizeof(value_string))
static gint ett_nas_msg_emm[NUM_NAS_MSG_EMM];
static void (*nas_msg_emm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len) = {
nas_emm_attach_req, /* Attach request */
nas_emm_attach_acc, /* Attach accept */
nas_emm_attach_comp, /* Attach complete */
nas_emm_attach_rej, /* Attach reject */
nas_emm_detach_req, /* Detach request */
NULL, /* 8.2.10 Detach accept */
nas_emm_trac_area_upd_req, /* Tracking area update request */
nas_emm_trac_area_upd_acc, /* Tracking area update accept */
NULL, /* Tracking area update complete (No IE's)*/
nas_emm_trac_area_upd_rej, /* Tracking area update reject */
nas_emm_ext_serv_req, /* Extended service request */
nas_emm_ctrl_plane_serv_req,/* Control plane servire request */
nas_emm_serv_rej, /* Service reject */
nas_emm_serv_accept, /* Service accept */
nas_emm_guti_realloc_cmd, /* GUTI reallocation command */
NULL, /* GUTI reallocation complete (No IE's) */
nas_emm_auth_req, /* Authentication request */
nas_emm_auth_resp, /* Authentication response */
NULL, /* Authentication reject (No IE:s)*/
nas_emm_id_req, /* Identity request */
nas_emm_id_res, /* Identity response */
nas_emm_auth_fail, /* Authentication failure */
nas_emm_sec_mode_cmd, /* Security mode command */
nas_emm_sec_mode_comp, /* Security mode complete */
nas_emm_sec_mode_rej, /* Security mode reject */
nas_emm_emm_status, /* EMM status */
nas_emm_emm_inf, /* EMM information */
nas_emm_dl_nas_trans, /* Downlink NAS transport */
nas_emm_ul_nas_trans, /* Uplink NAS transport */
nas_emm_cs_serv_not, /* 8.2.9 CS service notification */
nas_emm_dl_gen_nas_trans, /* Downlink generic NAS transport */
nas_emm_ul_gen_nas_trans, /* Uplink generic NAS transport */
NULL, /* NONE */
};
static void
get_nas_emm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
{
gint idx;
*msg_str = try_val_to_str_idx_ext((guint32) (oct & 0xff), &nas_msg_emm_strings_ext, &idx);
*hf_idx = hf_nas_eps_msg_emm_type;
if (*msg_str != NULL) {
*ett_tree = ett_nas_msg_emm[idx];
*msg_fcn_p = nas_msg_emm_fcn[idx];
}
return;
}
static const value_string nas_eps_esm_bearer_id_vals[] = {
{ 0x0, "No EPS bearer identity assigned"},
{ 0x1, "EPS bearer identity value 1"},
{ 0x2, "EPS bearer identity value 2"},
{ 0x3, "EPS bearer identity value 3"},
{ 0x4, "EPS bearer identity value 4"},
{ 0x5, "EPS bearer identity value 5"},
{ 0x6, "EPS bearer identity value 6"},
{ 0x7, "EPS bearer identity value 7"},
{ 0x8, "EPS bearer identity value 8"},
{ 0x9, "EPS bearer identity value 9"},
{ 0xa, "EPS bearer identity value 10"},
{ 0xb, "EPS bearer identity value 11"},
{ 0xc, "EPS bearer identity value 12"},
{ 0xd, "EPS bearer identity value 13"},
{ 0xe, "EPS bearer identity value 14"},
{ 0xf, "EPS bearer identity value 15"},
{ 0, NULL }
};
/*
* EPS session management messages.
* A plain NAS message is pased to this function
*/
static void
dissect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
const gchar *msg_str;
guint32 len;
gint ett_tree;
int hf_idx;
void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
guint8 oct;
len = tvb_reported_length(tvb);
/*
* EPS bearer identity 9.3.2
*/
proto_tree_add_item(tree, hf_nas_eps_bearer_id, tvb, offset, 1, ENC_BIG_ENDIAN);
/* Protocol discriminator 9.2 */
proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Procedure transaction identity 9.4
* The procedure transaction identity and its use are defined in 3GPP TS 24.007
*/
proto_tree_add_item(tree, hf_nas_eps_esm_proc_trans_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/*message type IE*/
oct = tvb_get_guint8(tvb,offset);
msg_fcn_p = NULL;
ett_tree = -1;
hf_idx = -1;
msg_str = NULL;
get_nas_esm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
if (msg_str) {
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, msg_str);
} else {
proto_tree_add_expert_format(tree, pinfo, &ei_nas_eps_unknown_msg_type, tvb, offset, 1, "Unknown Message Type 0x%02x", oct);
return;
}
/*
* Add NAS message name
*/
proto_tree_add_item(tree, hf_idx, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/*
* decode elements
*/
if (msg_fcn_p == NULL)
{
if (tvb_reported_length_remaining(tvb, offset)) {
proto_tree_add_item(tree, hf_nas_eps_msg_elems, tvb, offset, len - offset, ENC_NA);
}
}
else
{
(*msg_fcn_p)(tvb, tree, pinfo, offset, len - offset);
}
}
/*
* The "real" security header has been dissected or if dissect_header = TRUE
*/
static void
dissect_nas_eps_emm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean second_header)
{
const gchar *msg_str;
guint32 len, security_header_type;
gint ett_tree;
int hf_idx;
void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len);
guint8 oct;
len = tvb_reported_length(tvb);
/* 9.3.1 Security header type */
if (second_header) {
security_header_type = tvb_get_guint8(tvb,offset)>>4;
proto_tree_add_item_ret_uint(tree, hf_nas_eps_security_header_type, tvb, offset, 1, ENC_BIG_ENDIAN, &security_header_type);
proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
if (security_header_type != 0) {
/* Message authentication code */
proto_tree_add_item(tree, hf_nas_eps_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
offset+=4;
/* Sequence number */
proto_tree_add_item(tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
if ((security_header_type == 2)||(security_header_type == 4))
/* Integrity protected and ciphered = 2, Integrity protected and ciphered with new EPS security context = 4 */
return;
proto_tree_add_item(tree, hf_nas_eps_security_header_type, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
}
}
/* Message type IE*/
oct = tvb_get_guint8(tvb,offset);
msg_fcn_p = NULL;
ett_tree = -1;
hf_idx = -1;
msg_str = NULL;
get_nas_emm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
if (msg_str) {
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, msg_str);
} else {
proto_tree_add_expert_format(tree, pinfo, &ei_nas_eps_unknown_msg_type, tvb, offset, 1, "Unknown Message Type 0x%02x", oct);
return;
}
/*
* Add NAS message name
*/
proto_tree_add_item(tree, hf_idx, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/*
* decode elements
*/
if (msg_fcn_p == NULL)
{
if (tvb_reported_length_remaining(tvb, offset)) {
proto_tree_add_item(tree, hf_nas_eps_msg_elems, tvb, offset, len - offset, ENC_NA);
}
}
else
{
(*msg_fcn_p)(tvb, tree, pinfo, offset, len - offset);
}
}
static int
dissect_nas_eps_plain(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *item;
proto_tree *nas_eps_tree;
guint8 pd;
int offset = 0;
/* make entry in the Protocol column on summary display */
col_append_sep_str(pinfo->cinfo, COL_PROTOCOL, "/", "NAS-EPS");
item = proto_tree_add_item(tree, proto_nas_eps, tvb, 0, -1, ENC_NA);
nas_eps_tree = proto_item_add_subtree(item, ett_nas_eps);
/* SERVICE REQUEST (security header type equal to 12 or greater) is not a plain NAS message */
pd = tvb_get_guint8(tvb,offset);
if (((pd&0x0f) == 0x07) && ((pd&0xf0) >= 0xc0)) {
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Service request");
/* Security header type Security header type 9.3.1 M V 1/2 */
proto_tree_add_item(nas_eps_tree, hf_nas_eps_security_header_type, tvb, 0, 1, ENC_BIG_ENDIAN);
/* Protocol discriminator Protocol discriminator 9.2 M V 1/2 */
proto_tree_add_item(nas_eps_tree, hf_gsm_a_L3_protocol_discriminator, tvb, 0, 1, ENC_BIG_ENDIAN);
offset++;
nas_emm_service_req(tvb, nas_eps_tree, pinfo, offset, tvb_reported_length(tvb)-offset);
return tvb_captured_length(tvb);
}
pd &= 0x0f;
switch (pd) {
case 2:
/* EPS session management messages.
* Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
*/
dissect_nas_eps_esm_msg(tvb, pinfo, nas_eps_tree, offset);
break;
case 7:
/* EPS mobility management messages.
* Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
*/
dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, TRUE);
break;
case 15:
/* Special conformance testing functions for User Equipment messages.
* Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
*/
if (gsm_a_dtap_handle) {
tvbuff_t *new_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(gsm_a_dtap_handle, new_tvb,pinfo, nas_eps_tree);
break;
} /* else fall through default */
/* FALL THROUGH */
default:
proto_tree_add_expert_format(nas_eps_tree, pinfo, &ei_nas_eps_unknown_pd, tvb, offset, -1, "Not a NAS EPS PD %u (%s)",
pd, val_to_str_const(pd, protocol_discriminator_vals, "Unknown"));
break;
}
return tvb_captured_length(tvb);
}
/* TS 24.301 8.2.1
* 9 General message format and information elements coding
* 9.1 Overview
* Within the protocols defined in the present document, every message, except the SERVICE REQUEST message,
* is a standard L3 message as defined in 3GPP TS 24.007 [12]. This means that the message consists of the following parts:
* 1) if the message is a plain NAS message:
* a) protocol discriminator;
* b) EPS bearer identity or security header type;
* c) procedure transaction identity;
* d) message type;
* e) other information elements, as required.
* 2) if the message is a security protected NAS message:
* a) protocol discriminator;
* b) security header type;
* c) message authentication code;
* d) sequence number;
* e) plain NAS message, as defined in item 1.
*
* The EPS bearer identity and the procedure transaction identity are only used in messages
* with protocol discriminator EPS session management. Octet 1a with the procedure transaction
* identity shall only be included in these messages.
*/
/*
* All messages received here will have the security header:
* Figure 9.1.2: General message organization example for a security protected NAS message
* 9.3.1 Bits 5 to 8 of the first octet of every EPS Mobility Management (EMM)
* message contain the Security header type IE.
* 4.4.4.2 All ESM messages are integrity protected.
*/
static int
dissect_nas_eps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *item;
proto_tree *nas_eps_tree;
guint32 pd, security_header_type;
int offset = 0;
guint32 len;
guint32 msg_auth_code;
len = tvb_reported_length(tvb);
/* The protected NAS message header is 6 octets long, and the NAS message header is at least 2 octets long. */
/* If the length of the tvbuffer is less than 8 octets, we can safely conclude the message is not protected
or is a service request. */
if (len < 8) {
dissect_nas_eps_plain(tvb, pinfo, tree, data);
return tvb_captured_length(tvb);
}
if (g_nas_eps_dissect_plain) {
dissect_nas_eps_plain(tvb, pinfo, tree, data);
return tvb_captured_length(tvb);
}
/* make entry in the Protocol column on summary display */
col_append_sep_str(pinfo->cinfo, COL_PROTOCOL, "/", "NAS-EPS");
item = proto_tree_add_item(tree, proto_nas_eps, tvb, 0, -1, ENC_NA);
nas_eps_tree = proto_item_add_subtree(item, ett_nas_eps);
/* Security header type Security header type 9.3.1 M V 1/2 */
proto_tree_add_item_ret_uint(nas_eps_tree, hf_nas_eps_security_header_type, tvb, 0, 1, ENC_BIG_ENDIAN, &security_header_type);
/* Protocol discriminator Protocol discriminator 9.2 M V 1/2 */
proto_tree_add_item_ret_uint(nas_eps_tree, hf_gsm_a_L3_protocol_discriminator, tvb, 0, 1, ENC_BIG_ENDIAN, &pd);
offset++;
/* Message authentication code Message authentication code 9.5 M V 4 */
if (security_header_type == 0) {
if (pd == 7) {
/* Plain EPS mobility management messages. */
dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, FALSE);
} else {
proto_tree_add_expert(nas_eps_tree, pinfo, &ei_nas_eps_esm_tp_not_integ_prot, tvb, offset, len-4);
}
return tvb_captured_length(tvb);
} else {
if (pd != 7) {
proto_tree_add_expert(nas_eps_tree, pinfo, &ei_nas_eps_sec_hdr_wrong_pd, tvb, offset, len-4);
return tvb_captured_length(tvb);
}
/* SERVICE REQUEST (12 or greater) is not a plain NAS message treat separately */
if (security_header_type >= 12) {
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Service request");
nas_emm_service_req(tvb, nas_eps_tree, pinfo, offset, len-offset);
return tvb_captured_length(tvb);
}
/* Message authentication code */
proto_tree_add_item(nas_eps_tree, hf_nas_eps_msg_auth_code, tvb, offset, 4, ENC_BIG_ENDIAN);
msg_auth_code = tvb_get_ntohl(tvb, offset);
offset+=4;
if ((security_header_type == 2)||(security_header_type == 4)) {
/* Possible ciphered message */
if (msg_auth_code != 0) {
/* Sequence number Sequence number 9.6 M V 1 */
proto_tree_add_item(nas_eps_tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Integrity protected and ciphered = 2, Integrity protected and ciphered with new EPS security context = 4 */
/* Read security_header_type / EPS bearer id AND pd */
pd = tvb_get_guint8(tvb,offset);
/* If pd is in plaintext this message probably isn't ciphered */
/* Use preferences settings to override this behavior */
if (!g_nas_eps_null_decipher ||
((pd != 7) && (pd != 15) && ((pd&0x0f) != 2))) {
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Ciphered message");
proto_tree_add_item(nas_eps_tree, hf_nas_eps_ciphered_msg, tvb, offset, len-6, ENC_NA);
return tvb_captured_length(tvb);
}
} else {
/* msg_auth_code == 0, probably not ciphered */
/* Sequence number Sequence number 9.6 M V 1 */
proto_tree_add_item(nas_eps_tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
}
} else {
/* Sequence number Sequence number 9.6 M V 1 */
proto_tree_add_item(nas_eps_tree, hf_nas_eps_seq_no, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
}
}
/* NAS message NAS message 9.7 M V 1-n */
pd = tvb_get_guint8(tvb,offset)&0x0f;
switch (pd) {
case 2:
/* EPS session management messages.
* Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
*/
dissect_nas_eps_esm_msg(tvb, pinfo, nas_eps_tree, offset);
break;
case 7:
/* EPS mobility management messages.
* Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
*/
dissect_nas_eps_emm_msg(tvb, pinfo, nas_eps_tree, offset, TRUE);
break;
case 15:
/* Special conformance testing functions for User Equipment messages.
* Ref 3GPP TS 24.007 version 8.0.0 Release 8, Table 11.2: Protocol discriminator values
*/
if (gsm_a_dtap_handle) {
tvbuff_t *new_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, nas_eps_tree);
break;
} /* else fall through default */
/* FALL THROUGH */
default:
proto_tree_add_expert_format(nas_eps_tree, pinfo, &ei_nas_eps_unknown_pd, tvb, offset, -1, "Not a NAS EPS PD %u (%s)",
pd, val_to_str_const(pd, protocol_discriminator_vals, "Unknown"));
break;
}
return tvb_captured_length(tvb);
}
void
proto_register_nas_eps(void)
{
guint i;
guint last_offset;
module_t *nas_eps_module;
/* List of fields */
static hf_register_info hf[] = {
{ &hf_nas_eps_msg_emm_type,
{ "NAS EPS Mobility Management Message Type", "nas-eps.nas_msg_emm_type",
FT_UINT8, BASE_HEX|BASE_EXT_STRING, &nas_msg_emm_strings_ext, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_common_elem_id,
{ "Element ID", "nas-eps.common.elem_id",
FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_elem_id,
{ "Element ID", "nas-eps.emm.elem_id",
FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL }
},
{ &hf_nas_eps_bearer_id,
{ "EPS bearer identity", "nas-eps.bearer_id",
FT_UINT8, BASE_DEC, VALS(nas_eps_esm_bearer_id_vals), 0xf0,
NULL, HFILL }
},
{ &hf_nas_eps_spare_bits,
{ "Spare bit(s)", "nas-eps.spare_bits",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_spare_b7,
{ "Spare bit(s)", "nas-eps.spare_bits",
FT_UINT8, BASE_HEX, NULL, 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_security_header_type,
{ "Security header type","nas-eps.security_header_type",
FT_UINT8,BASE_DEC|BASE_EXT_STRING, &security_header_type_vals_ext, 0xf0,
NULL, HFILL }
},
{ &hf_nas_eps_msg_auth_code,
{ "Message authentication code","nas-eps.msg_auth_code",
FT_UINT32,BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_seq_no,
{ "Sequence number","nas-eps.seq_no",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_ciphered_msg,
{ "Ciphered message","nas-eps.ciphered_msg",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_msg_elems,
{ "Message Elements", "nas-eps.message_elements",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_seq_no_short,
{ "Sequence number (short)","nas-eps.seq_no_short",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi0,
{ "EBI(0) spare","nas-eps.emm.ebi0",
FT_BOOLEAN, 8, NULL, 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi1,
{ "EBI(1)","nas-eps.emm.ebi1",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi2,
{ "EBI(2)","nas-eps.emm.ebi2",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi3,
{ "EBI(3)","nas-eps.emm.ebi3",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi4,
{ "EBI(4)","nas-eps.emm.ebi4",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi5,
{ "EBI(5)","nas-eps.emm.ebi5",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi6,
{ "EBI(6)","nas-eps.emm.ebi6",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi7,
{ "EBI(7)","nas-eps.emm.ebi7",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi8,
{ "EBI(8)","nas-eps.emm.ebi8",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi9,
{ "EBI(9)","nas-eps.emm.ebi9",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi10,
{ "EBI(10)","nas-eps.emm.ebi10",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi11,
{ "EBI(11)","nas-eps.emm.ebi11",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi12,
{ "EBI(12)","nas-eps.emm.ebi12",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi13,
{ "EBI(13)","nas-eps.emm.ebi13",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi14,
{ "EBI(14)","nas-eps.emm.ebi14",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ebi15,
{ "EBI(15)","nas-eps.emm.ebi15",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ebi_vals), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_dl_nas_cnt,
{ "DL NAS COUNT value","nas-eps.emm.dl_nas_cnt",
FT_UINT8,BASE_DEC, NULL, 0x0f,
NULL, HFILL }
},
{&hf_nas_eps_emm_nonce_mme,
{ "NonceMME","nas-eps.emm.nonce_mme",
FT_UINT32,BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{&hf_nas_eps_emm_nonce,
{ "Nonce","nas-eps.emm.nonce",
FT_UINT32,BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_id,
{ "Paging identity value","nas-eps.emm.paging_id",
FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_paging_id_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_nbiot_allowed_value,
{ "NB-IoT allowed value","nas-eps.emm.nbiot_allowed_value",
FT_BOOLEAN, BASE_NONE, TFS(&tfs_not_allowed_allowed), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eps_optim_info,
{ "EPS optimization info","nas-eps.emm.eps_optim_info",
FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_eps_optim_info), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eutran_allowed_value,
{ "E-UTRAN allowed value","nas-eps.emm.eutran_allowed_value",
FT_BOOLEAN, BASE_NONE, TFS(&tfs_not_allowed_allowed), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eps_att_type,
{ "EPS attach type","nas-eps.emm.eps_att_type",
FT_UINT8,BASE_DEC, VALS(nas_eps_emm_eps_att_type_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_cp_ciot,
{ "Control plane CIoT EPS optimization","nas-eps.emm.cp_ciot",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_er_wo_pdn,
{ "EMM-REGISTERED w/o PDN connectivity","nas-eps.emm.er_wo_pdn",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_esr_ps,
{ "Support of EXTENDED SERVICE REQUEST for packet services","nas-eps.emm.esr_ps",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_cs_lcs,
{ "CS-LCS","nas-eps.emm.cs_lcs",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_cs_lcs_vals), 0x18,
"Location services indicator in CS", HFILL }
},
{ &hf_nas_eps_emm_epc_lcs,
{ "Location services via EPC","nas-eps.emm.epc_lcs",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_emc_bs,
{ "Emergency bearer services in S1 mode","nas-eps.emm.emc_bs",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ims_vops,
{ "IMS voice over PS session in S1 mode","nas-eps.emm.ims_vops",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_15_bearers,
{ "Signalling for a maximum number of 15 EPS bearer contexts","nas-eps.emm.15_bearers",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_iwkn26,
{ "Interworking without N26 interface","nas-eps.emm.iwkn26",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_restrict_dcnr,
{ "Restriction on the use of dual connectivity with NR","nas-eps.emm.restrict_dcnr",
FT_BOOLEAN, 8, TFS(&tfs_restricted_not_restricted), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_restrict_ec,
{ "Restriction on enhanced coverage","nas-eps.emm.restrict_ec",
FT_BOOLEAN , 8, TFS(&tfs_restricted_not_restricted), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_epco,
{ "Extended protocol configuration options","nas-eps.emm.epco",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_hc_cp_ciot,
{ "Header compression for control plane CIoT EPS optimization","nas-eps.emm.hc_cp_ciot",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_s1_u_data,
{ "S1-u data transfer","nas-eps.emm.s1_u_data",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_up_ciot,
{ "User plane CIoT EPS optimization","nas-eps.emm.up_ciot",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ptcc,
{ "Paging timing collision control","nas-eps.emm.ptcc",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_pr,
{ "Paging restriction","nas-eps.emm.pr",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_rpr,
{ "Reject paging request","nas-eps.emm.rpr",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_piv,
{ "Paging indication for voice services","nas-eps.emm.piv",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ncr,
{ "NAS signalling connection release","nas-eps.emm.ncr",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_tsc,
{ "Type of security context flag (TSC)","nas-eps.emm.tsc",
FT_BOOLEAN,BASE_DEC, TFS(&nas_eps_tsc_value), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_nas_key_set_id,
{ "NAS key set identifier","nas-eps.emm.nas_key_set_id",
FT_UINT8,BASE_DEC, VALS(nas_eps_emm_NAS_key_set_identifier_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_odd_even,
{ "Odd/even indication","nas-eps.emm.odd_even",
FT_BOOLEAN, 8, TFS(&nas_eps_odd_even_value), 0x8,
NULL, HFILL }
},
{ &hf_nas_eps_emm_type_of_id,
{ "Type of identity","nas-eps.emm.type_of_id",
FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_id_vals), 0x07,
NULL, HFILL }
},
{ &hf_nas_eps_emm_mme_grp_id,
{ "MME Group ID","nas-eps.emm.mme_grp_id",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_imei,
{ "IMEI", "nas-eps.emm.imei",
FT_STRING, BASE_NONE, NULL, 0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_mme_code,
{ "MME Code","nas-eps.emm.mme_code",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_m_tmsi,
{ "M-TMSI","nas-eps.emm.m_tmsi",
FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
"Global flt 3gpp.tmsi", HFILL }
},
{ &hf_nas_eps_esm_msg_cont,
{ "ESM message container contents","nas-eps.emm.esm_msg_cont",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_imeisv_req,
{ "IMEISV request","nas-eps.emm.imeisv_req",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_imeisv_req_vals), 0x07,
NULL, HFILL }
},
{ &hf_nas_eps_emm_toi,
{ "Type of integrity protection algorithm","nas-eps.emm.toi",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_toi_vals), 0x07,
NULL, HFILL }
},
{ &hf_nas_eps_emm_toc,
{ "Type of ciphering algorithm","nas-eps.emm.toc",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_toc_vals), 0x70,
NULL, HFILL }
},
{ &hf_nas_eps_emm_EPS_attach_result,
{ "Attach result","nas-eps.emm.EPS_attach_result",
FT_UINT8,BASE_DEC, VALS(nas_eps_emm_EPS_attach_result_values), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_spare_half_octet,
{ "Spare half octet","nas-eps.emm.spare_half_octet",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_add_upd_res,
{ "AURV","nas-eps.emm.add_upd_res",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_add_upd_res_vals), 0x0,
"Additional update result value", HFILL }
},
{ &hf_nas_eps_emm_pnb_ciot,
{ "Preferred CIoT network behaviour","nas-eps.emm.pnb_ciot",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_pnb_ciot_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_saf,
{ "SAF","nas-eps.emm.saf",
FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_saf_value), 0x0,
"Signalling active flag", HFILL }
},
{ &hf_nas_eps_emm_add_upd_type,
{ "AUTV","nas-eps.emm.add_upd_type",
FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_add_upd_type_value), 0x0,
"Additional update type value", HFILL }
},
{ &hf_nas_eps_emm_res,
{ "RES","nas-eps.emm.res",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_sms_services_status,
{ "SMS services status value","nas-eps.emm.sms_services_status",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_sms_services_status_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_csfb_resp,
{ "CSFB response","nas-eps.emm.csfb_resp",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_csfb_resp_vals), 0x03,
NULL, HFILL }
},
{ &hf_nas_eps_emm_cause,
{ "Cause","nas-eps.emm.cause",
FT_UINT8, BASE_DEC|BASE_EXT_STRING, &nas_eps_emm_cause_values_ext, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_id_type2,
{ "Identity type 2","nas-eps.emm.id_type2",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_id_type2_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_short_mac,
{ "Message authentication code (short)","nas-eps.emm.short_mac",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_tai_tol,
{ "Type of list","nas-eps.emm.tai_tol",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_tai_tol_vals), 0x60,
NULL, HFILL }
},
{ &hf_nas_eps_emm_tai_n_elem,
{ "Number of elements","nas-eps.emm.tai_n_elem",
FT_UINT8, BASE_DEC, NULL, 0x1f,
NULL, HFILL }
},
{ &hf_nas_eps_emm_tai_tac,
{ "Tracking area code(TAC)","nas-eps.emm.tai_tac",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eea0,
{ "EEA0","nas-eps.emm.eea0",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_128eea1,
{ "128-EEA1","nas-eps.emm.128eea1",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_128eea2,
{ "128-EEA2","nas-eps.emm.128eea2",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eea3,
{ "128-EEA3","nas-eps.emm.eea3",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eea4,
{ "EEA4","nas-eps.emm.eea4",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eea5,
{ "EEA5","nas-eps.emm.eea5",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eea6,
{ "EEA6","nas-eps.emm.eea6",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eea7,
{ "EEA7","nas-eps.emm.eea7",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eia0,
{ "EIA0","nas-eps.emm.eia0",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_128eia1,
{ "128-EIA1","nas-eps.emm.128eia1",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_128eia2,
{ "128-EIA2","nas-eps.emm.128eia2",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eia3,
{ "128-EIA3","nas-eps.emm.eia3",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eia4,
{ "EIA4","nas-eps.emm.eia4",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eia5,
{ "EIA5","nas-eps.emm.eia5",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eia6,
{ "EIA6","nas-eps.emm.eia6",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_eps_upip,
{ "EPS-UPIP","nas-eps.emm.eps_upip",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uea0,
{ "UEA0","nas-eps.emm.uea0",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uea1,
{ "UEA1","nas-eps.emm.uea1",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uea2,
{ "UEA2","nas-eps.emm.uea2",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uea3,
{ "UEA3","nas-eps.emm.uea3",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uea4,
{ "UEA4","nas-eps.emm.uea4",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uea5,
{ "UEA5","nas-eps.emm.uea5",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uea6,
{ "UEA6","nas-eps.emm.uea6",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uea7,
{ "UEA7","nas-eps.emm.uea7",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ucs2_supp,
{ "UCS2 support (UCS2)","nas-eps.emm.emm_ucs2_supp",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ucs2_supp_flg_value), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uia1,
{ "UMTS integrity algorithm UIA1","nas-eps.emm.uia1",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uia2,
{ "UMTS integrity algorithm UIA2","nas-eps.emm.uia2",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uia3,
{ "UMTS integrity algorithm UIA3","nas-eps.emm.uia3",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uia4,
{ "UMTS integrity algorithm UIA4","nas-eps.emm.uia4",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uia5,
{ "UMTS integrity algorithm UIA5","nas-eps.emm.uia5",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uia6,
{ "UMTS integrity algorithm UIA6","nas-eps.emm.uia6",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_uia7,
{ "UMTS integrity algorithm UIA7","nas-eps.emm.uia7",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_gea1,
{ "GPRS encryption algorithm GEA1","nas-eps.emm.gea1",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_gea2,
{ "GPRS encryption algorithm GEA2","nas-eps.emm.gea2",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_gea3,
{ "GPRS encryption algorithm GEA3","nas-eps.emm.gea3",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_gea4,
{ "GPRS encryption algorithm GEA4","nas-eps.emm.gea4",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_gea5,
{ "GPRS encryption algorithm GEA5","nas-eps.emm.gea5",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_gea6,
{ "GPRS encryption algorithm GEA6","nas-eps.emm.gea6",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_gea7,
{ "GPRS encryption algorithm GEA7","nas-eps.emm.gea7",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_eps_emm_ext_emerg_num_list_eenlv,
{ "Extended Emergency Number List Validity","nas-eps.emm.ext_emerg_num_list.eenlv",
FT_BOOLEAN, 8, TFS(&tfs_eenlv_value), 0x01,
NULL, HFILL }
},
{ &hf_eps_emm_ext_emerg_num_list_emerg_num_len,
{ "Emergency number information length","nas-eps.emm.ext_emerg_num_list.emerg_num.len",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_eps_emm_ext_emerg_num_list_emerg_num,
{ "Emergency number","nas-eps.emm.ext_emerg_num_list.emerg_num",
FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_eps_emm_ext_emerg_num_list_sub_serv_field_len,
{ "Sub-services field length","nas-eps.emm.ext_emerg_num_list.sub_serv_field.len",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_eps_emm_ext_emerg_num_list_sub_serv_field,
{ "Sub-services field","nas-eps.emm.ext_emerg_num_list.sub_serv_field",
FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_prose_dd_cap,
{ "ProSe direct discovery","nas-eps.emm.prose_dd_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_prose_cap,
{ "ProSe","nas-eps.emm.prose_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_h245_ash_cap,
{ "H.245 After SRVCC Handover","nas-eps.emm.h245_ash_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_acc_csfb_cap,
{ "Access class control for CSFB","nas-eps.emm.acc_csfb_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_lpp_cap,
{ "LTE Positioning Protocol","nas-eps.emm.lpp_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_lcs_cap,
{ "Location services (LCS) notification mechanisms","nas-eps.emm.lcs_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_1xsrvcc_cap,
{ "SRVCC from E-UTRAN to cdma2000 1xCS","nas-eps.emm.1xsrvcc_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_nf_cap,
{ "Notification procedure","nas-eps.emm.nf_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_epco_cap,
{ "Extended protocol configuration options","nas-eps.emm.epco_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_hc_cp_ciot_cap,
{ "Header compression for control plane CIoT EPS optimization","nas-eps.emm.hc_cp_ciot_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_er_wo_pdn_cap,
{ "EMM-REGISTERED w/o PDN connectivity","nas-eps.emm.er_wo_pdn_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_s1u_data_cap,
{ "S1-U data transfer","nas-eps.emm.s1u_data_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_up_ciot_cap,
{ "User plane CIoT EPS optimization","nas-eps.emm.up_ciot_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_cp_ciot_cap,
{ "Control plane CIoT EPS optimization","nas-eps.emm.cp_ciot_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_prose_relay_cap,
{ "ProSe UE-to-network relay","nas-eps.emm.prose_relay_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_prose_dc_cap,
{ "ProSe direct communication","nas-eps.emm.prose_dc_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_15_bearers_cap,
{ "Signalling for a maximum number of 15 EPS bearer contexts","nas-eps.emm.15_bearers_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_sgc_cap,
{ "Service gap control","nas-eps.emm.sgc_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_n1mode_cap,
{ "N1 mode for 3GPP access","nas-eps.emm.n1mode_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_dcnr_cap,
{ "Dual connectivity with NR","nas-eps.emm.dcnr_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_cp_backoff_cap,
{ "Control plane data backoff","nas-eps.emm.cp_backoff_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_restrict_ec_cap,
{ "Restriction on use of enhanced coverage","nas-eps.emm.restrict_ec_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_v2x_pc5_cap,
{ "V2X communication over PC5","nas-eps.emm.v2x_pc5_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_multiple_drb_cap,
{ "Multiple DRB","nas-eps.emm.multiple_drb_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_rpr_cap,
{ "Reject paging request","nas-eps.emm.rpr_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_piv_cap,
{ "Paging indication for voice services","nas-eps.emm.piv_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_ncr_cap,
{ "NAS signalling connection release","nas-eps.emm.ncr_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_v2x_nr_pc5_cap,
{ "V2X communication over NR-PC5","nas-eps.emm.v2x_nr_pc5_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_up_mt_edt_cap,
{ "User plane Mobile Terminated-Early Data Transmission","nas-eps.emm.up_mt_edt_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_cp_mt_edt_cap,
{ "Control plane Mobile Terminated-Early Data Transmission","nas-eps.emm.cp_mt_edt_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_wsua_cap,
{ "Wake-up signal assistance","nas-eps.emm.wsua_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_racs_cap,
{ "Radio capability signalling optimisation","nas-eps.emm.racs_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_ptcc_cap,
{ "Paging timing collision control","nas-eps.emm.ptcc_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_pr_cap,
{ "Paging restriction","nas-eps.emm.pr_cap",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ue_ra_cap_inf_upd_need_flg,
{ "URC upd","nas-eps.emm.ue_ra_cap_inf_upd_need_flg",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_ue_ra_cap_inf_upd_need_flg), 0x01,
"UE radio capability information update needed flag", HFILL }
},
{ &hf_nas_eps_emm_ss_code,
{ "SS Code","nas-eps.emm.ss_code",
FT_UINT8,BASE_DEC, VALS(ssCode_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_lcs_ind,
{ "LCS indicator","nas-eps.emm.emm_lcs_ind",
FT_UINT8,BASE_DEC, VALS(nas_eps_emm_lcs_ind_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_gen_msg_cont_type,
{ "Container type","nas-eps.emm.gen_msg_cont_type",
FT_UINT8,BASE_DEC|BASE_RANGE_STRING, RVALS(nas_eps_emm_gen_msg_cont_type_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_apn_ambr_ul,
{ "APN-AMBR for uplink","nas-eps.esm.apn_ambr_ul",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_apn_ambr_dl,
{ "APN-AMBR for downlink","nas-eps.esm.apn_ambr_dl",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_apn_ambr_ul_ext,
{ "APN-AMBR for uplink (extended)","nas-eps.esm.apn_ambr_ul_ext",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_apn_ambr_dl_ext,
{ "APN-AMBR for downlink (extended)","nas-eps.esm.apn_ambr_dl_ext",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_apn_ambr_ul_ext2,
{ "APN-AMBR for uplink (extended-2)","nas-eps.esm.apn_ambr_ul_ext2",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_apn_ambr_dl_ext2,
{ "APN-AMBR for downlink (extended-2)","nas-eps.esm.apn_ambr_dl_ext2",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_apn_ambr_ul_total,
{ "Total APN-AMBR for uplink","nas-eps.esm.apn_ambr_ul_total",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_apn_ambr_dl_total,
{ "Total APN-AMBR for downlink","nas-eps.esm.apn_ambr_dl_total",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_guti_type,
{ "GUTI type", "nas-eps.emm.guti_type",
FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_guti_type_value), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_hash_mme,
{ "HashMME", "nas-eps.emm.hash_mme",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_replayed_nas_msg_cont,
{ "Replayed NAS message container", "nas-eps.emm.replayed_nas_msg_cont",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_redir_policy,
{ "Redirection to GERAN security policy", "nas-eps.emm.redic_policy",
FT_BOOLEAN, 8, TFS(&nas_eps_redir_policy_vals), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ea0,
{ "5G-EA0","nas-eps.emm.5g_ea0",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_128_5g_ea1,
{ "128-5G-EA1","nas-eps.emm.128_5g_ea1",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_128_5g_ea2,
{ "128-5G-EA2","nas-eps.emm.128_5g_ea2",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_128_5g_ea3,
{ "128-5G-EA3","nas-eps.emm.128_5g_ea3",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ea4,
{ "5G-EA4","nas-eps.emm.5g_ea4",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ea5,
{ "5G-EA5","nas-eps.emm.5g_ea5",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ea6,
{ "5G-EA6","nas-eps.emm.5g_ea6",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ea7,
{ "5G-EA7","nas-eps.emm.5g_ea7",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ea8,
{ "5G-EA8","nas-eps.emm.5g_ea8",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ea9,
{ "5G-EA9","nas-eps.emm.5g_ea9",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ea10,
{ "5G-EA10","nas-eps.emm.5g_ea10",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ea11,
{ "5G-EA11","nas-eps.emm.5g_ea11",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ea12,
{ "5G-EA12","nas-eps.emm.5g_ea12",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ea13,
{ "5G-EA13","nas-eps.emm.5g_ea13",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ea14,
{ "5G-EA14","nas-eps.emm.5g_ea14",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ea15,
{ "5G-EA15","nas-eps.emm.5g_ea15",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ia0,
{ "5G-IA0","nas-eps.emm.5g_ia0",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_128_5g_ia1,
{ "128-5G-IA1","nas-eps.emm.128_5g_ia1",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_128_5g_ia2,
{ "128-5G-IA2","nas-eps.emm.128_5g_ia2",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_128_5g_ia3,
{ "128-5G-IA3","nas-eps.emm.128_5g_ia3",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ia4,
{ "5G-IA4","nas-eps.emm.5g_ia4",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ia5,
{ "5G-IA5","nas-eps.emm.5g_ia5",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ia6,
{ "5G-IA6","nas-eps.emm.5g_ia6",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ia7,
{ "5G-IA7","nas-eps.emm.5g_ia7",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ia8,
{ "5G-IA8","nas-eps.emm.5g_ia8",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ia9,
{ "5G-IA9","nas-eps.emm.5g_ia9",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ia10,
{ "5G-IA10","nas-eps.emm.5g_ia10",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ia11,
{ "5G-IA11","nas-eps.emm.5g_ia11",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ia12,
{ "5G-IA12","nas-eps.emm.5g_ia12",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ia13,
{ "5G-IA13","nas-eps.emm.5g_ia13",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ia14,
{ "5G-IA14","nas-eps.emm.5g_ia14",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ia15,
{ "5G-IA15","nas-eps.emm.5g_ia15",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_cipher_key,
{ "Ciphering keys for ciphered broadcast assistance data","nas-eps.emm.cipher_key",
FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_ciphering_set_id,
{ "Ciphering set ID","nas-eps.emm.ciph_key_data.ciphering_set_id",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_ciphering_key,
{ "Ciphering key","nas-eps.emm.ciph_key_data.ciphering_key",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_c0_len,
{ "c0 length","nas-eps.emm.ciph_key_data.c0_len",
FT_UINT8, BASE_DEC, NULL, 0x1f,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_c0,
{ "c0","nas-eps.emm.ciph_key_data.c0",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_1,
{ "Ciphering data set for positioning SIB type 1-1","nas-eps.emm.ciph_key_data.pos_sib_type_1_1",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_2,
{ "Ciphering data set for positioning SIB type 1-2","nas-eps.emm.ciph_key_data.pos_sib_type_1_2",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_3,
{ "Ciphering data set for positioning SIB type 1-3","nas-eps.emm.ciph_key_data.pos_sib_type_1_3",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_4,
{ "Ciphering data set for positioning SIB type 1-4","nas-eps.emm.ciph_key_data.pos_sib_type_1_4",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_5,
{ "Ciphering data set for positioning SIB type 1-5","nas-eps.emm.ciph_key_data.pos_sib_type_1_5",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_6,
{ "Ciphering data set for positioning SIB type 1-6","nas-eps.emm.ciph_key_data.pos_sib_type_1_6",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_1_7,
{ "Ciphering data set for positioning SIB type 1-7","nas-eps.emm.ciph_key_data.pos_sib_type_1_7",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_1,
{ "Ciphering data set for positioning SIB type 2-1","nas-eps.emm.ciph_key_data.pos_sib_type_2_1",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_2,
{ "Ciphering data set for positioning SIB type 2-2","nas-eps.emm.ciph_key_data.pos_sib_type_2_2",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_3,
{ "Ciphering data set for positioning SIB type 2-3","nas-eps.emm.ciph_key_data.pos_sib_type_2_3",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_4,
{ "Ciphering data set for positioning SIB type 2-4","nas-eps.emm.ciph_key_data.pos_sib_type_2_4",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_5,
{ "Ciphering data set for positioning SIB type 2-5","nas-eps.emm.ciph_key_data.pos_sib_type_2_5",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_6,
{ "Ciphering data set for positioning SIB type 2-6","nas-eps.emm.ciph_key_data.pos_sib_type_2_6",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_7,
{ "Ciphering data set for positioning SIB type 2-7","nas-eps.emm.ciph_key_data.pos_sib_type_2_7",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_8,
{ "Ciphering data set for positioning SIB type 2-8","nas-eps.emm.ciph_key_data.pos_sib_type_2_8",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_9,
{ "Ciphering data set for positioning SIB type 2-9","nas-eps.emm.ciph_key_data.pos_sib_type_2_9",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_10,
{ "Ciphering data set for positioning SIB type 2-10","nas-eps.emm.ciph_key_data.pos_sib_type_2_10",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_11,
{ "Ciphering data set for positioning SIB type 2-11","nas-eps.emm.ciph_key_data.pos_sib_type_2_11",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_12,
{ "Ciphering data set for positioning SIB type 2-12","nas-eps.emm.ciph_key_data.pos_sib_type_2_12",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_13,
{ "Ciphering data set for positioning SIB type 2-13","nas-eps.emm.ciph_key_data.pos_sib_type_2_13",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_14,
{ "Ciphering data set for positioning SIB type 2-14","nas-eps.emm.ciph_key_data.pos_sib_type_2_14",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_15,
{ "Ciphering data set for positioning SIB type 2-15","nas-eps.emm.ciph_key_data.pos_sib_type_2_15",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_16,
{ "Ciphering data set for positioning SIB type 2-16","nas-eps.emm.ciph_key_data.pos_sib_type_2_16",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_17,
{ "Ciphering data set for positioning SIB type 2-17","nas-eps.emm.ciph_key_data.pos_sib_type_2_17",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_18,
{ "Ciphering data set for positioning SIB type 2-18","nas-eps.emm.ciph_key_data.pos_sib_type_2_18",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x80,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_2_19,
{ "Ciphering data set for positioning SIB type 2-19","nas-eps.emm.ciph_key_data.pos_sib_type_2_19",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_pos_sib_type_3_1,
{ "Ciphering data set for positioning SIB type 3-1","nas-eps.emm.ciph_key_data.pos_sib_type_3_1",
FT_BOOLEAN, 8, TFS(&tfs_applicable_not_applicable), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_validity_start_time,
{ "Validity start time", "nas-eps.emm.ciph_key_data.validity_start_time",
FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_validity_duration,
{ "Validity duration", "nas-eps.emm.ciph_key_data.validity_duration",
FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_minute_minutes, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ciph_key_data_tais_list_len,
{ "TAIs list length", "nas-eps.emm.ciph_key_data.tais_list_len",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_detach_req_UL,
{ "Uplink","nas-eps.emm.detach_req_ul",
FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_detach_req_DL,
{ "Downlink","nas-eps.emm.detach_req_dl",
FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_switch_off,
{ "Switch off","nas-eps.emm.switch_off",
FT_UINT8,BASE_DEC, VALS(nas_eps_emm_switch_off_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_detach_type_UL,
{ "Detach Type","nas-eps.emm.detach_type_ul",
FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_detach_UL_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_detach_type_DL,
{ "Detach Type","nas-eps.emm.detach_type_dl",
FT_UINT8,BASE_DEC, VALS(nas_eps_emm_type_of_detach_DL_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_qci,
{ "Quality of Service Class Identifier (QCI)","nas-eps.esm.qci",
FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(nas_eps_qci_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_mbr_ul,
{ "Maximum bit rate for uplink","nas-eps.esm.mbr_ul",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_mbr_dl,
{ "Maximum bit rate for downlink","nas-eps.esm.mbr_dl",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_gbr_ul,
{ "Guaranteed bit rate for uplink","nas-eps.esm.gbr_ul",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_gbr_dl,
{ "Guaranteed bit rate for downlink","nas-eps.esm.gbr_dl",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_embr_ul,
{ "Maximum bit rate for uplink(ext)","nas-eps.esm.embr_ul",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_embr_dl,
{ "Maximum bit rate for downlink(ext)","nas-eps.esm.embr_dl",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_egbr_ul,
{ "Guaranteed bit rate for uplink(ext)","nas-eps.esm.egbr_ul",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_egbr_dl,
{ "Guaranteed bit rate for downlink(ext)","nas-eps.esm.egbr_dl",
FT_UINT8,BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_cause,
{ "Cause","nas-eps.esm.cause",
FT_UINT8,BASE_DEC|BASE_EXT_STRING, &nas_eps_esm_cause_vals_ext, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_eit,
{ "EIT (ESM information transfer)", "nas-eps.esm.eit",
FT_BOOLEAN, 8, TFS(&nas_eps_emm_eit_vals), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_esm_notif_ind,
{ "Notification indicator value","nas-eps.esm.notif_ind",
FT_UINT8,BASE_DEC, VALS(nas_eps_esm_notif_ind_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_pdn_ipv4,
{"PDN IPv4", "nas-eps.esm.pdn_ipv4",
FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{ &hf_nas_eps_esm_pdn_ipv6_if_id,
{"PDN IPv6 if id", "nas-eps.esm.pdn_ipv6_if_id",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{ &hf_nas_eps_esm_eplmnc,
{ "EPLMNC", "nas-eps.esm.eplmnc",
FT_BOOLEAN, 8, TFS(&nas_eps_esm_eplmnc_value), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_esm_ratc,
{ "RATC", "nas-eps.esm.ratc",
FT_BOOLEAN, 8, TFS(&nas_eps_esm_ratc_value), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_esm_linked_bearer_id,
{ "Linked EPS bearer identity","nas-eps.esm.linked_bearer_id",
FT_UINT8,BASE_DEC, VALS(nas_eps_esm_linked_bearer_id_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_nbifom_cont,
{ "NBIFOM container content","nas-eps.esm.nbifom_cont",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_nb_ue_contexts,
{ "Number of remote UE contexts","nas-eps.esm.remote_ue_context_list.nb_ue_contexts",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_ue_context_len,
{ "Length of remote UE context","nas-eps.esm.remote_ue_context_list.ue_context.len",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_ue_context_nb_user_id,
{ "Number of user identities","nas-eps.esm.remote_ue_context_list.ue_context.nb_user_id",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_ue_context_user_id_len,
{ "Length of user identity","nas-eps.esm.remote_ue_context_list.ue_context.user_id_len",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_ue_context_odd_even_indic,
{ "Odd/even indication","nas-eps.esm.remote_ue_context_list.ue_context.odd_even_indic",
FT_BOOLEAN, 8, TFS(&nas_eps_odd_even_value), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_ue_context_user_id_type,
{ "Type of user identity","nas-eps.esm.remote_ue_context_list.ue_context.user_id_type",
FT_UINT8, BASE_DEC, VALS(nas_eps_esm_user_info_type_values), 0x07,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_ue_context_encr_imsi,
{ "Encrypted IMSI", "nas-eps.esm.remote_ue_context_list.ue_context.encr_imsi",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_ue_context_msisdn,
{ "MSISDN", "nas-eps.esm.remote_ue_context_list.ue_context.msisdn",
FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_ue_context_imei,
{ "IMEI", "nas-eps.esm.remote_ue_context_list.ue_context.imei",
FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_ue_context_imeisv,
{ "IMEISV", "nas-eps.esm.remote_ue_context_list.ue_context.imeisv",
FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_ue_context_address_type,
{ "Address type","nas-eps.esm.remote_ue_context_list.ue_context.address_type",
FT_UINT8, BASE_DEC, VALS(nas_eps_esm_address_type_values), 0x07,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_ue_context_ipv4,
{ "IPv4 address","nas-eps.esm.remote_ue_context_list.ue_context.ipv4",
FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_ue_context_port_number,
{ "Port number","nas-eps.esm.remote_ue_context_list.ue_context.port_number",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_remote_ue_context_list_ue_context_ipv6_prefix,
{ "IPv6 prefix","nas-eps.esm.remote_ue_context_list.ue_context.ipv6_prefix",
FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_pkmf_address_type,
{ "Address type","nas-eps.esm.pkmf.address_type",
FT_UINT8, BASE_DEC, VALS(nas_eps_esm_pkmf_address_type_values), 0x07,
NULL, HFILL }
},
{ &hf_nas_eps_esm_pkmf_ipv4,
{ "IPv4 address","nas-eps.esm.pkmf.ipv4",
FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_pkmf_ipv6,
{ "IPv6 address","nas-eps.esm.pkmf.ipv6",
FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_comp_config_prof_0104,
{ "RoHC profile 0x0104 (IP)", "nas-eps.esm.hdr_comp_config.prof_0104",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_comp_config_prof_0103,
{ "RoHC profile 0x0103 (ESP/IP)", "nas-eps.esm.hdr_comp_config.prof_0103",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_comp_config_prof_0102,
{ "RoHC profile 0x0102 (UDP/IP)", "nas-eps.esm.hdr_comp_config.prof_0102",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_comp_config_prof_0006,
{ "RoHC profile 0x0006 (TCP/IP)", "nas-eps.esm.hdr_comp_config.prof_0006",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_comp_config_prof_0004,
{ "RoHC profile 0x0004 (IP)", "nas-eps.esm.hdr_comp_config.prof_0004",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_comp_config_prof_0003,
{ "RoHC profile 0x0003 (ESP/IP)", "nas-eps.esm.hdr_comp_config.prof_0003",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_comp_config_prof_0002,
{ "RoHC profile 0x0002 (UDP/IP)", "nas-eps.esm.hdr_comp_config.prof_0002",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_max_cid,
{ "MAX_CID", "nas-eps.esm.hdr_comp_config.max_cid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_add_hdr_compr_cxt_setup_params_type,
{ "Additional header compression context setup parameters type", "nas-eps.esm.hdr_comp_config.add_hdr_compr_cxt_setup_params_type",
FT_UINT8, BASE_HEX, VALS(nas_eps_esm_add_hdr_compr_cxt_setup_params_type_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_add_hdr_compr_cxt_setup_params_cont,
{ "Additional header compression context setup parameters container", "nas-eps.esm.hdr_comp_config.add_hdr_compr_cxt_setup_params_cont",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_ctrl_plane_only_ind_cpoi,
{ "CPOI", "nas-eps.esm.ctrl_plane_only_ind.cpoi",
FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_ctrl_plane_only_ind_cpoi_value), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_user_data_cont,
{ "User data contents", "nas-eps.esm.user_data_cont",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_rel_assist_ind_ddx,
{ "Downlink data expected","nas-eps.esm.rel_assist_ind.ddx",
FT_UINT8, BASE_DEC, VALS(nas_eps_esm_rel_assist_ind_ddx_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi7,
{ "EBI(7)", "nas-eps.esm.hdr_compr_config_status.ebi7",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x8000,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi6,
{ "EBI(6)", "nas-eps.esm.hdr_compr_config_status.ebi6",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x4000,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi5,
{ "EBI(5)", "nas-eps.esm.hdr_compr_config_status.ebi5",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x2000,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi4,
{ "EBI(4)", "nas-eps.esm.hdr_compr_config_status.ebi4",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x1000,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi3,
{ "EBI(3)", "nas-eps.esm.hdr_compr_config_status.ebi3",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x0800,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi2,
{ "EBI(2)", "nas-eps.esm.hdr_compr_config_status.ebi2",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x0400,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi1,
{ "EBI(1)", "nas-eps.esm.hdr_compr_config_status.ebi1",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x0200,
NULL, HFILL }
},
{ &hf_nas_eps_esm_spare_bits0x0100,
{ "Spare bit(s)", "nas-eps.spare_bits",
FT_UINT16, BASE_HEX, NULL, 0x0100,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi15,
{ "EBI(15)", "nas-eps.esm.hdr_compr_config_status.ebi15",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x0080,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi14,
{ "EBI(14)", "nas-eps.esm.hdr_compr_config_status.ebi14",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x0040,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi13,
{ "EBI(13)", "nas-eps.esm.hdr_compr_config_status.ebi13",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x0020,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi12,
{ "EBI(12)", "nas-eps.esm.hdr_compr_config_status.ebi12",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x0010,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi11,
{ "EBI(11)", "nas-eps.esm.hdr_compr_config_status.ebi11",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x0008,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi10,
{ "EBI(10)", "nas-eps.esm.hdr_compr_config_status.ebi10",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x0004,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi9,
{ "EBI(9)", "nas-eps.esm.hdr_compr_config_status.ebi9",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x0002,
NULL, HFILL }
},
{ &hf_nas_eps_esm_hdr_compr_config_status_ebi8,
{ "EBI(8)", "nas-eps.esm.hdr_compr_config_status.ebi8",
FT_BOOLEAN, 16, TFS(&nas_eps_esm_hdr_compr_config_status_ebi_value), 0x0001,
NULL, HFILL }
},
{ &hf_nas_eps_esm_serv_plmn_rate_ctrl_val,
{ "Serving PLMN rate control value", "nas-eps.esm.serv_plmn_rate_ctrl_val",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_ext_apn_ambr_dl_unit,
{ "Unit for extended APN-AMBR for downlink", "nas-eps.esm.ext_apn_ambr_dl_unit",
FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(nas_eps_ext_apn_ambr_unit_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_ext_apn_ambr_dl,
{ "Extended APN-AMBR for downlink", "nas-eps.esm.ext_apn_ambr_dl",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_ext_apn_ambr_ul_unit,
{ "Unit for extended APN-AMBR for uplink", "nas-eps.esm.ext_apn_ambr_ul_unit",
FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(nas_eps_ext_apn_ambr_unit_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_ext_apn_ambr_ul,
{ "Extended APN-AMBR for uplink", "nas-eps.esm.ext_apn_ambr_ul",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_ext_mbr_unit,
{ "Unit for maximum bit rate", "nas-eps.esm.ext_mbr_unit",
FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(nas_eps_ext_eps_qos_unit_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_ext_mbr_ul,
{ "Maximum bit rate for uplink", "nas-eps.esm.ext_mbr_ul",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_ext_mbr_dl,
{ "Maximum bit rate for downlink", "nas-eps.esm.ext_mbr_dl",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_ext_gbr_unit,
{ "Unit for guaranteed bit rate", "nas-eps.esm.ext_gbr_unit",
FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(nas_eps_ext_eps_qos_unit_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_ext_gbr_ul,
{ "Guaranteed bit rate for uplink", "nas-eps.esm.ext_gbr_ul",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_ext_gbr_dl,
{ "Guaranteed bit rate for downlink", "nas-eps.esm.ext_gbr_dl",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_active_flg,
{ "Active flag", "nas-eps.emm.active_flg",
FT_BOOLEAN, BASE_NONE, TFS(&nas_eps_emm_active_flg_value), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_ctrl_plane_serv_type,
{ "Control plane service type", "nas-eps.emm.ctrl_plane_serv_type",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_data_serv_type_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_eps_update_result_value,
{ "EPS update result value","nas-eps.emm.eps_update_result_value",
FT_UINT8,BASE_DEC, VALS(nas_eps_emm_eps_update_result_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_eps_update_type_value,
{ "EPS update type value", "nas-eps.emm.update_type_value",
FT_UINT8,BASE_DEC, VALS(nas_eps_emm_eps_update_type_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_service_type,
{ "Service type", "nas-eps.emm.service_type",
FT_UINT8,BASE_DEC|BASE_RANGE_STRING, RVALS(nas_eps_service_type_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_nas_msg_cont,
{ "NAS message container content", "nas-eps.emm.nas_msg_cont",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_gen_msg_cont,
{ "Generic message container content", "nas-eps.emm.gen_msg_cont",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_cmn_add_info,
{ "Additional information content", "nas-eps.cmn.add_info",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
/* ESM hf cvariables */
{ &hf_nas_eps_msg_esm_type,
{ "NAS EPS session management messages", "nas-eps.nas_msg_esm_type",
FT_UINT8, BASE_HEX|BASE_EXT_STRING, &nas_msg_esm_strings_ext, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_elem_id,
{ "Element ID", "nas-eps.esm.elem_id",
FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_proc_trans_id,
{ "Procedure transaction identity", "nas-eps.esm.proc_trans_id",
FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_pdn_type,
{ "PDN type", "nas-eps.esm_pdn_type",
FT_UINT8, BASE_DEC, VALS(nas_eps_esm_pdn_type_values), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_esm_request_type,
{ "Request type", "nas-eps.esm_request_type",
FT_UINT8, BASE_DEC, VALS(nas_eps_esm_request_type_values), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_ehc_cp_ciot,
{ "Ethernet header compression for control plane CIoT 5GS optimization", "nas-eps.emm.5g_ehc_cp_ciot",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5gs_pnb_ciot,
{ "5GS Preferred CIoT network behaviour", "nas-eps.emm.5gs_pnb_ciot",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_5gs_pnb_ciot_vals), 0x30,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_up_ciot,
{ "User plane CIoT 5GS optimization", "nas-eps.emm.5g_up_ciot",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_hc_cp_ciot,
{ "Header compression for control plane CIoT 5GS optimization", "nas-eps.emm.5g_hc_cp_ciot",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }
},
{ &hf_nas_eps_emm_n3_data,
{ "N3 data transfer", "nas-eps.emm.n3_data",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }
},
{ &hf_nas_eps_emm_5g_cp_ciot,
{ "Control plane CIoT 5GS optimization", "nas-eps.emm.5g_cp_ciot",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ue_radio_cap_id_available,
{ "UE radio capability ID availability", "nas-eps.emm.ue_radio_cap_id_available",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_ue_radio_cap_id_avail_vals), 0x07,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ue_radio_cap_id_request,
{ "UE radio capability ID request", "nas-eps.emm.ue_radio_cap_id_request",
FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
NULL, HFILL }
},
{ &hf_nas_eps_emm_wus_assist_info_type,
{ "Type", "nas-eps.emm.wus_assist_info.type",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_wus_assist_info_type_vals), 0xe0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_wus_assist_info_ue_paging_prob,
{ "UE paging probability information", "nas-eps.emm.wus_assist_info.ue_paging_probability",
FT_UINT8, BASE_CUSTOM, CF_FUNC(de_emm_wus_assist_info_ue_paging_prob_fmt), 0x1f,
NULL, HFILL }
},
{ &hf_nas_eps_emm_nb_s1_drx_param,
{ "DRX value", "nas-eps.emm.nb_s1_drx_param",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_nb_s1_drx_params_vals), 0x0f,
NULL, HFILL }
},
{ &hf_nas_eps_emm_imsi_offset,
{ "IMSI offset", "nas-eps.emm.imsi_offset",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_ue_request_type,
{ "UE request type", "nas-eps.emm.ue_request_type",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_ue_request_type_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_type,
{ "Paging restriction type", "nas-eps.emm.paging_restriction.type",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_paging_restriction_type_vals), 0x0,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi7,
{ "EBI(7)", "nas-eps.esm.paging_restriction.ebi7",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x8000,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi6,
{ "EBI(6)", "nas-eps.esm.paging_restriction.ebi6",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x4000,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi5,
{ "EBI(5)", "nas-eps.esm.paging_restriction.ebi5",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x2000,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi4,
{ "EBI(4)", "nas-eps.esm.paging_restriction.ebi4",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x1000,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi3,
{ "EBI(3)", "nas-eps.esm.paging_restriction.ebi3",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x0800,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi2,
{ "EBI(2)", "nas-eps.esm.paging_restriction.ebi2",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x0400,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi1,
{ "EBI(1)", "nas-eps.esm.paging_restriction.ebi1",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x0200,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi0,
{ "EBI(0)", "nas-eps.esm.paging_restriction.ebi0",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x0100,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi15,
{ "EBI(15)", "nas-eps.esm.paging_restriction.ebi15",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x0080,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi14,
{ "EBI(14)", "nas-eps.esm.paging_restriction.ebi14",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x0040,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi13,
{ "EBI(13)", "nas-eps.esm.paging_restriction.ebi13",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x0020,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi12,
{ "EBI(12)", "nas-eps.esm.paging_restriction.ebi12",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x0010,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi11,
{ "EBI(11)", "nas-eps.esm.paging_restriction.ebi11",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x0008,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi10,
{ "EBI(10)", "nas-eps.esm.paging_restriction.ebi10",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x0004,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi9,
{ "EBI(9)", "nas-eps.esm.paging_restriction.ebi9",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x0002,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_ebi8,
{ "EBI(8)", "nas-eps.esm.paging_restriction.ebi8",
FT_BOOLEAN, 16, TFS(&tfs_not_restricted_restricted), 0x0001,
NULL, HFILL }
},
{ &hf_nas_eps_emm_paging_restriction_decision,
{ "Paging restriction decision", "nas-eps.esm.paging_restriction.decision",
FT_UINT8, BASE_DEC, VALS(nas_eps_emm_eps_add_req_result_vals), 0x0,
NULL, HFILL }
},
};
static ei_register_info ei[] = {
{ &ei_nas_eps_extraneous_data, { "nas-eps.extraneous_data", PI_PROTOCOL, PI_NOTE, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)", EXPFILL }},
{ &ei_nas_eps_unknown_identity, { "nas-eps.emm.unknown_identity", PI_PROTOCOL, PI_WARN, "Type of identity not known", EXPFILL }},
{ &ei_nas_eps_unknown_type_of_list, { "nas-eps.emm.tai_unknown_list_type", PI_PROTOCOL, PI_WARN, "Unknown type of list", EXPFILL }},
{ &ei_nas_eps_wrong_nb_of_elems, { "nas-eps.emm.tai_wrong_number_of_elems", PI_PROTOCOL, PI_ERROR, "[Wrong number of elements?]", EXPFILL }},
{ &ei_nas_eps_unknown_msg_type, { "nas-eps.unknown_msg_type", PI_PROTOCOL, PI_WARN, "Unknown Message Type", EXPFILL }},
{ &ei_nas_eps_unknown_pd, { "nas-eps.unknown_pd", PI_PROTOCOL, PI_ERROR, "Unknown protocol discriminator", EXPFILL }},
{ &ei_nas_eps_esm_tp_not_integ_prot, { "nas-eps.esm_tp_not_integrity_protected", PI_PROTOCOL, PI_ERROR, "All ESM / Test Procedures messages should be integrity protected", EXPFILL }},
{ &ei_nas_eps_sec_hdr_wrong_pd, { "nas-eps.sec_hdr_wrong_pd", PI_PROTOCOL, PI_ERROR, "A security header should use EMM protocol discriminator", EXPFILL }},
{ &ei_nas_eps_missing_mandatory_elemen, { "nas-eps.missing_mandatory_element", PI_PROTOCOL, PI_ERROR, "Missing Mandatory element, rest of dissection is suspect", EXPFILL }},
};
expert_module_t* expert_nas_eps;
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS 11
gint *ett[NUM_INDIVIDUAL_ELEMS +
NUM_NAS_EPS_COMMON_ELEM +
NUM_NAS_MSG_EMM + NUM_NAS_EMM_ELEM+
NUM_NAS_MSG_ESM + NUM_NAS_ESM_ELEM];
ett[0] = &ett_nas_eps;
ett[1] = &ett_nas_eps_esm_msg_cont;
ett[2] = &ett_nas_eps_nas_msg_cont;
ett[3] = &ett_nas_eps_gen_msg_cont;
ett[4] = &ett_nas_eps_cmn_add_info;
ett[5] = &ett_nas_eps_remote_ue_context;
ett[6] = &ett_nas_eps_esm_user_data_cont;
ett[7] = &ett_nas_eps_replayed_nas_msg_cont;
ett[8] = &ett_nas_eps_ext_emerg_num;
ett[9] = &ett_nas_eps_ciph_data_set;
ett[10] = &ett_nas_eps_wus_assist_info_type;
last_offset = NUM_INDIVIDUAL_ELEMS;
for (i=0; i < NUM_NAS_EPS_COMMON_ELEM; i++, last_offset++)
{
ett_nas_eps_common_elem[i] = -1;
ett[last_offset] = &ett_nas_eps_common_elem[i];
}
/* EMM */
for (i=0; i < NUM_NAS_MSG_EMM; i++, last_offset++)
{
ett_nas_msg_emm[i] = -1;
ett[last_offset] = &ett_nas_msg_emm[i];
}
for (i=0; i < NUM_NAS_EMM_ELEM; i++, last_offset++)
{
ett_nas_eps_emm_elem[i] = -1;
ett[last_offset] = &ett_nas_eps_emm_elem[i];
}
/* EPS */
for (i=0; i < NUM_NAS_MSG_ESM; i++, last_offset++)
{
ett_nas_msg_esm[i] = -1;
ett[last_offset] = &ett_nas_msg_esm[i];
}
for (i=0; i < NUM_NAS_ESM_ELEM; i++, last_offset++)
{
ett_nas_eps_esm_elem[i] = -1;
ett[last_offset] = &ett_nas_eps_esm_elem[i];
}
/* Register protocol */
proto_nas_eps = proto_register_protocol(PNAME, PSNAME, PFNAME);
/* Register fields and subtrees */
proto_register_field_array(proto_nas_eps, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_nas_eps = expert_register_protocol(proto_nas_eps);
expert_register_field_array(expert_nas_eps, ei, array_length(ei));
/* Register dissector */
register_dissector(PFNAME, dissect_nas_eps, proto_nas_eps);
/* Backward compatibility with old filters name */
proto_register_alias(proto_nas_eps, "nas_eps");
/* Register dissector */
register_dissector("nas-eps_plain", dissect_nas_eps_plain, proto_nas_eps);
/* Register configuration options to always dissect as plain messages */
nas_eps_module = prefs_register_protocol(proto_nas_eps, proto_reg_handoff_nas_eps);
prefs_register_bool_preference(nas_eps_module,
"dissect_plain",
"Force dissect as plain NAS EPS",
"Always dissect NAS EPS messages as plain",
&g_nas_eps_dissect_plain);
prefs_register_bool_preference(nas_eps_module,
"null_decipher",
"Try to detect and decode EEA0 ciphered messages",
"This should work when the NAS ciphering algorithm is NULL (128-EEA0)",
&g_nas_eps_null_decipher);
prefs_register_enum_preference(nas_eps_module, "decode_user_data_container_as",
"Try to decode User Data Container content as",
NULL,
&g_nas_eps_decode_user_data_container_as,
nas_eps_user_data_container_as_vals, FALSE);
prefs_register_string_preference(nas_eps_module, "non_ip_data_dissector",
"Dissector name for non IP data", NULL,
&g_nas_eps_non_ip_data_dissector);
prefs_register_obsolete_preference(nas_eps_module, "user_data_container_as_ip");
}
/* Heuristic dissector looks for "nas-eps" string at packet start */
static gboolean dissect_nas_eps_heur(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data _U_)
{
gint offset = 0;
tvbuff_t *nas_tvb;
/* Needs to be at least as long as:
- the signature string
- at least one byte of NAS PDU payload */
if (tvb_captured_length_remaining(tvb, offset) < (gint)(strlen(PFNAME)+1)) {
return FALSE;
}
/* OK, compare with signature string */
if (tvb_strneql(tvb, offset, PFNAME, strlen(PFNAME)) != 0) {
return FALSE;
}
offset += (gint)strlen(PFNAME);
/* Clear protocol name */
col_clear(pinfo->cinfo, COL_PROTOCOL);
/* Clear info column */
col_clear(pinfo->cinfo, COL_INFO);
/* Create tvb that starts at actual NAS PDU */
nas_tvb = tvb_new_subset_remaining(tvb, offset);
dissect_nas_eps(nas_tvb, pinfo, tree, NULL);
return TRUE;
}
void
proto_reg_handoff_nas_eps(void)
{
static gint initialized = FALSE;
if (!initialized) {
heur_dissector_add("udp", dissect_nas_eps_heur, "NAS-EPS over UDP", "nas_eps_udp", proto_nas_eps, HEURISTIC_DISABLE);
gsm_a_dtap_handle = find_dissector_add_dependency("gsm_a_dtap", proto_nas_eps);
lpp_handle = find_dissector_add_dependency("lpp", proto_nas_eps);
nbifom_handle = find_dissector_add_dependency("nbifom", proto_nas_eps);
ipv4_handle = find_dissector_add_dependency("ip", proto_nas_eps);
ipv6_handle = find_dissector_add_dependency("ipv6", proto_nas_eps);
ethernet_handle = find_dissector_add_dependency("eth_withoutfcs", proto_nas_eps);
initialized = TRUE;
}
if (g_nas_eps_non_ip_data_dissector[0] != '\0') {
non_ip_data_handle = find_dissector(g_nas_eps_non_ip_data_dissector);
} else {
non_ip_data_handle = NULL;
}
}
/*
* Editor modelines
*
* Local Variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/
|