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
|
/* packet-ixveriwave.c
* Routines for calling the right protocol for the ethertype.
*
* Tom Cook <tcook@ixiacom.com>
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "config.h"
#include <math.h>
#include <epan/packet.h>
#include <epan/proto_data.h>
#include <epan/tfs.h>
#include <epan/unit_strings.h>
#include <wiretap/wtap.h>
void proto_register_ixveriwave(void);
void proto_reg_handoff_ixveriwave(void);
static void ethernettap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *tap_tree);
static void wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, proto_tree *tap_tree,
uint16_t vw_msdu_length);
static void wlantap_dissect_octo(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, proto_tree *tap_tree,
uint8_t cmd_type, int log_mode);
typedef struct {
uint32_t previous_frame_num;
uint64_t previous_end_time;
} frame_end_data;
typedef struct ifg_info {
uint32_t ifg;
uint64_t previous_end_time;
uint64_t current_start_time;
} ifg_info;
static frame_end_data previous_frame_data;
/* static int ieee80211_mhz2ieee(int freq, int flags); */
#define COMMON_LENGTH_OFFSET 2
#define ETHERNETTAP_VWF_TXF 0x01 /* frame was transmitted flag */
#define ETHERNETTAP_VWF_FCSERR 0x02 /* frame has FCS error */
#define VW_RADIOTAPF_TXF 0x01 /* frame was transmitted */
#define VW_RADIOTAPF_FCSERR 0x02 /* FCS error detected */
#define VW_RADIOTAPF_RETRERR 0x04 /* excess retry error detected */
#define VW_RADIOTAPF_DCRERR 0x10 /* decrypt error detected */
#define VW_RADIOTAPF_ENCMSK 0x60 /* encryption type mask */
/* 0 = none, 1 = WEP, 2 = TKIP, 3 = CCKM */
#define VW_RADIOTAPF_ENCSHIFT 5 /* shift amount to right-align above field */
#define VW_RADIOTAPF_IS_WEP 0x20 /* encryption type value = WEP */
#define VW_RADIOTAPF_IS_TKIP 0x40 /* encryption type value = TKIP */
#define VW_RADIOTAPF_IS_CCMP 0x60 /* encryption type value = CCMP */
#define VW_RADIOTAPF_SEQ_ERR 0x80 /* flow sequence error detected */
#define VW_RADIOTAP_FPGA_VER_vVW510021 0x000C /* vVW510021 version detected */
#define VW_RADIOTAP_FPGA_VER_vVW510021_11n 0x000D
#define CHAN_CCK 0x00020 /* CCK channel */
#define CHAN_OFDM 0x00040 /* OFDM channel */
#define FLAGS_SHORTPRE 0x0002 /* sent/received
* with short
* preamble
*/
#define FLAGS_WEP 0x0004 /* sent/received
* with WEP encryption
*/
#define FLAGS_CHAN_HT 0x0040 /* HT mode */
#define FLAGS_CHAN_VHT 0x0080 /* VHT mode */
#define FLAGS_CHAN_SHORTGI 0x0100 /* short guard interval */
#define FLAGS_CHAN_40MHZ 0x0200 /* 40 Mhz channel bandwidth */
#define FLAGS_CHAN_80MHZ 0x0400 /* 80 Mhz channel bandwidth */
#define FLAGS_CHAN_160MHZ 0x0800 /* 160 Mhz channel bandwidth */
#define INFO_MPDU_OF_A_MPDU 0x0400 /* MPDU of A-MPDU */
#define INFO_FIRST_MPDU_OF_A_MPDU 0x0800 /* first MPDU of A-MPDU */
#define INFO_LAST_MPDU_OF_A_MPDU 0x1000 /* last MPDU of A-MPDU */
#define INFO_MSDU_OF_A_MSDU 0x2000 /* MSDU of A-MSDU */
#define INFO_FIRST_MSDU_OF_A_MSDU 0x4000 /* first MSDU of A-MSDU */
#define INFO_LAST_MSDU_OF_A_MSDU 0x8000 /* last MSDU of A-MSDU */
#define PLCP_TYPE_LEGACY 0x00 /* pre-HT (11 legacy/11b/11a/11g) */
#define PLCP_TYPE_MIXED 0x01 /* HT, mixed (11n) */
#define PLCP_TYPE_GREENFIELD 0x02 /* HT, greenfield (11n) */
#define PLCP_TYPE_VHT_MIXED 0x03 /* VHT (11ac) */
#define ETHERNET_PORT 1
#define WLAN_PORT 0
#define OCTO_TIMESTAMP_FIELDS_LEN 32 /* (4+4+8+8+4+4) */
#define OCTO_MODIFIED_RF_LEN 76 /* Number of RF bytes to be displayed*/
#define VW_INFO_OFF 48
#define IFG_MAX_VAL 0xEE6B2800
/*
* VHT bandwidth values.
*/
#define VHT_BW_20_MHZ 0
#define VHT_BW_40_MHZ 1
#define VHT_BW_80_MHZ 2
#define VHT_BW_160_MHZ 3
static int proto_ixveriwave;
static dissector_handle_t ethernet_handle;
/* static int hf_ixveriwave_version; */
static int hf_ixveriwave_frame_length;
/* static int hf_ixveriwave_fcs; */
static int hf_ixveriwave_vw_msdu_length;
static int hf_ixveriwave_vw_flowid;
static int hf_ixveriwave_vw_vcid;
static int hf_ixveriwave_vw_seqnum;
static int hf_ixveriwave_vw_mslatency;
static int hf_ixveriwave_vw_latency;
static int hf_ixveriwave_vw_sig_ts;
static int hf_ixveriwave_vw_delay;
static int hf_ixveriwave_vw_startt;
static int hf_ixveriwave_vw_endt;
static int hf_ixveriwave_vw_pktdur;
static int hf_ixveriwave_vw_ifg;
// RF LOGGING
static int hf_radiotap_rf_info;
static int hf_radiotap_rfinfo_rfid;
/*
static int hf_radiotap_rfinfo_noise;
static int hf_radiotap_rfinfo_noise_anta;
static int hf_radiotap_rfinfo_noise_antb;
static int hf_radiotap_rfinfo_noise_antc;
static int hf_radiotap_rfinfo_noise_antd;
*/
static int hf_radiotap_rfinfo_snr;
static int hf_radiotap_rfinfo_snr_anta;
static int hf_radiotap_rfinfo_snr_antb;
static int hf_radiotap_rfinfo_snr_antc;
static int hf_radiotap_rfinfo_snr_antd;
static int hf_radiotap_rfinfo_pfe;
static int hf_radiotap_rfinfo_pfe_anta;
static int hf_radiotap_rfinfo_pfe_antb;
static int hf_radiotap_rfinfo_pfe_antc;
static int hf_radiotap_rfinfo_pfe_antd;
static int hf_radiotap_rfinfo_sigdata;
static int hf_radiotap_rfinfo_avg_evm_sd_siga;
static int hf_radiotap_rfinfo_avg_evm_sd_sigb;
static int hf_radiotap_rfinfo_avg_evm_sd_sigc;
static int hf_radiotap_rfinfo_avg_evm_sd_sigd;
static int hf_radiotap_rfinfo_sigpilot;
static int hf_radiotap_rfinfo_avg_evm_sp_siga;
static int hf_radiotap_rfinfo_avg_evm_sp_sigb;
static int hf_radiotap_rfinfo_avg_evm_sp_sigc;
static int hf_radiotap_rfinfo_avg_evm_sp_sigd;
static int hf_radiotap_rfinfo_datadata;
static int hf_radiotap_rfinfo_avg_evm_dd_siga;
static int hf_radiotap_rfinfo_avg_evm_dd_sigb;
static int hf_radiotap_rfinfo_avg_evm_dd_sigc;
static int hf_radiotap_rfinfo_avg_evm_dd_sigd;
static int hf_radiotap_rfinfo_datapilot;
static int hf_radiotap_rfinfo_avg_evm_dp_siga;
static int hf_radiotap_rfinfo_avg_evm_dp_sigb;
static int hf_radiotap_rfinfo_avg_evm_dp_sigc;
static int hf_radiotap_rfinfo_avg_evm_dp_sigd;
static int hf_radiotap_rfinfo_avg_ws_symbol;
static int hf_radiotap_rfinfo_avg_evm_ws_siga;
static int hf_radiotap_rfinfo_avg_evm_ws_sigb;
static int hf_radiotap_rfinfo_avg_evm_ws_sigc;
static int hf_radiotap_rfinfo_avg_evm_ws_sigd;
static int hf_radiotap_rfinfo_contextpa;
static int hf_radiotap_rfinfo_contextpA_snr_noise_valid;
static int hf_radiotap_rfinfo_contextpA_pfe_valid;
static int hf_radiotap_rfinfo_contextpA_pfe_is_cck;
static int hf_radiotap_rfinfo_contextpA_agc_idle2iqrdy_no_gain_change;
static int hf_radiotap_rfinfo_contextpA_agc_high_pwr_terminated;
static int hf_radiotap_rfinfo_contextpA_agc_high_pwr_terminator;
/* static int hf_radiotap_rfinfo_contextpA_frame_format; */
/* static int hf_radiotap_rfinfo_contextpA_ofdm_or_cck; */
/* static int hf_radiotap_rfinfo_contextpA_sigbandwidth_of_evm; */
static int hf_radiotap_rfinfo_contextpA_qam_modulation;
static int hf_radiotap_rfinfo_frameformatA;
static int hf_radiotap_rfinfo_sigbwevmA;
static int hf_radiotap_rfinfo_legacytypeA;
static int hf_radiotap_rfinfo_contextpb;
static int hf_radiotap_rfinfo_contextpB_snr_noise_valid;
static int hf_radiotap_rfinfo_contextpB_pfe_valid;
static int hf_radiotap_rfinfo_contextpB_pfe_is_cck;
static int hf_radiotap_rfinfo_contextpB_agc_idle2iqrdy_no_gain_change;
static int hf_radiotap_rfinfo_contextpB_agc_high_pwr_terminated;
static int hf_radiotap_rfinfo_contextpB_agc_high_pwr_terminator;
static int hf_radiotap_rfinfo_contextpB_qam_modulation;
static int hf_radiotap_rfinfo_frameformatB;
static int hf_radiotap_rfinfo_sigbwevmB;
static int hf_radiotap_rfinfo_legacytypeB;
static int hf_radiotap_rfinfo_contextpc;
static int hf_radiotap_rfinfo_contextpC_snr_noise_valid;
static int hf_radiotap_rfinfo_contextpC_pfe_valid;
static int hf_radiotap_rfinfo_contextpC_pfe_is_cck;
static int hf_radiotap_rfinfo_contextpC_agc_idle2iqrdy_no_gain_change;
static int hf_radiotap_rfinfo_contextpC_agc_high_pwr_terminated;
static int hf_radiotap_rfinfo_contextpC_agc_high_pwr_terminator;
static int hf_radiotap_rfinfo_contextpC_qam_modulation;
static int hf_radiotap_rfinfo_frameformatC;
static int hf_radiotap_rfinfo_sigbwevmC;
static int hf_radiotap_rfinfo_legacytypeC;
static int hf_radiotap_rfinfo_contextpd;
static int hf_radiotap_rfinfo_contextpD_snr_noise_valid;
static int hf_radiotap_rfinfo_contextpD_pfe_valid;
static int hf_radiotap_rfinfo_contextpD_pfe_is_cck;
static int hf_radiotap_rfinfo_contextpD_agc_idle2iqrdy_no_gain_change;
static int hf_radiotap_rfinfo_contextpD_agc_high_pwr_terminated;
static int hf_radiotap_rfinfo_contextpD_agc_high_pwr_terminator;
static int hf_radiotap_rfinfo_contextpD_qam_modulation;
static int hf_radiotap_rfinfo_frameformatD;
static int hf_radiotap_rfinfo_sigbwevmD;
static int hf_radiotap_rfinfo_legacytypeD;
/* static int hf_radiotap_rfinfo_tbd; */
/* Fields for both Ethernet and WLAN */
static int hf_ixveriwave_vw_l4id;
/* Ethernet fields */
static int hf_ixveriwave_vwf_txf;
static int hf_ixveriwave_vwf_fcserr;
static int hf_ixveriwave_vw_info;
static int hf_ixveriwave_vw_info_go_no_flow;
static int hf_ixveriwave_vw_info_go_with_flow;
/*veriwave note: i know the below method seems clunky, but
they didn't have a item_format at the time to dynamically add the appropriate decode text*/
static int hf_ixveriwave_vw_info_retry_count;
static int hf_ixveriwave_vw_error;
/*error flags*/
static int hf_ixveriwave_vw_error_1_alignment_error;
static int hf_ixveriwave_vw_error_1_packet_fcs_error;
static int hf_ixveriwave_vw_error_1_bad_magic_byte_signature;
static int hf_ixveriwave_vw_error_1_bad_payload_checksum;
static int hf_ixveriwave_vw_error_1_frame_too_long;
static int hf_ixveriwave_vw_error_1_ip_checksum_error;
static int hf_ixveriwave_vw_error_1_l4_checksum_error;
static int hf_ixveriwave_vw_error_1_id_mismatch;
static int hf_ixveriwave_vw_error_1_length_error;
static int hf_ixveriwave_vw_error_1_underflow;
static int hf_ixveriwave_vw_error_1_late_collision;
static int hf_ixveriwave_vw_error_1_excessive_collisions;
/* WLAN fields */
static int hf_radiotap_flags;
static int hf_radiotap_flags_preamble;
static int hf_radiotap_flags_wep;
static int hf_radiotap_flags_ht;
static int hf_radiotap_flags_vht;
static int hf_radiotap_flags_short_gi;
static int hf_radiotap_flags_40mhz;
static int hf_radiotap_flags_80mhz;
static int hf_radiotap_datarate;
static int hf_radiotap_mcsindex;
static int hf_radiotap_nss;
static int hf_radiotap_dbm_anta;
static int hf_radiotap_dbm_antb;
static int hf_radiotap_dbm_antc;
static int hf_radiotap_dbm_antd;
static int hf_radiotap_plcptype;
static int hf_radiotap_vwf_txf;
static int hf_radiotap_vwf_fcserr;
static int hf_radiotap_vwf_dcrerr;
static int hf_radiotap_vwf_retrerr;
static int hf_radiotap_vwf_enctype;
static int hf_radiotap_vw_ht_length;
static int hf_radiotap_vw_info;
static int hf_radiotap_vw_info_2_ack_withheld_from_frame;
static int hf_radiotap_vw_info_2_sent_cts_to_self_before_data;
static int hf_radiotap_vw_info_2_mpdu_of_a_mpdu;
static int hf_radiotap_vw_info_2_first_mpdu_of_a_mpdu;
static int hf_radiotap_vw_info_2_last_pdu_of_a_mpdu;
static int hf_radiotap_vw_info_2_msdu_of_a_msdu;
static int hf_radiotap_vw_info_2_first_msdu_of_a_msdu;
static int hf_radiotap_vw_info_2_last_msdu_of_a_msdu;
static int hf_radiotap_vw_errors;
static int hf_radiotap_vw_errors_rx_2_crc16_or_parity_error;
static int hf_radiotap_vw_errors_rx_2_non_supported_rate_or_service_field;
static int hf_radiotap_vw_errors_rx_2_short_frame;
static int hf_radiotap_vw_errors_rx_2_fcs_error;
static int hf_radiotap_vw_errors_rx_2_l2_de_aggregation_error;
static int hf_radiotap_vw_errors_rx_2_duplicate_mpdu;
static int hf_radiotap_vw_errors_rx_2_bad_flow_magic_number;
static int hf_radiotap_vw_errors_rx_2_flow_payload_checksum_error;
static int hf_radiotap_vw_errors_rx_2_ip_checksum_error;
static int hf_radiotap_vw_errors_rx_2_l4_checksum_error;
static int hf_radiotap_vw_errors_tx_2_crc32_error;
static int hf_radiotap_vw_errors_tx_2_ip_checksum_error;
static int hf_radiotap_vw_errors_tx_2_ack_timeout;
static int hf_radiotap_vw_errors_tx_2_cts_timeout;
static int hf_radiotap_vw_errors_tx_2_last_retry_attempt;
static int hf_radiotap_vw_errors_tx_2_internal_error;
static int hf_radiotap_vht_mu_mimo_flg;
static int hf_radiotap_vht_user_pos;
static int hf_radiotap_vht_su_mimo_flg;
static int hf_radiotap_l1info;
static int hf_radiotap_l1info_preamble;
static int hf_radiotap_l1info_rateindex;
static int hf_radiotap_l1info_ht_mcsindex;
static int hf_radiotap_l1info_vht_mcsindex;
static int hf_radiotap_l1info_nss;
static int hf_radiotap_l1info_transmitted;
static int hf_radiotap_sigbandwidth;
/* static int hf_radiotap_rssi; */
static int hf_radiotap_modulation;
static int hf_radiotap_dbm_tx_anta;
static int hf_radiotap_dbm_tx_antb;
static int hf_radiotap_dbm_tx_antc;
static int hf_radiotap_dbm_tx_antd;
static int hf_radiotap_sigbandwidthmask;
static int hf_radiotap_antennaportenergydetect;
static int hf_radiotap_tx_antennaselect;
static int hf_radiotap_tx_stbcselect;
static int hf_radiotap_mumask;
static int hf_radiotap_l1infoc;
static int hf_radiotap_vht_ndp_flg;
static int hf_radiotap_plcp_info;
static int hf_radiotap_plcp_type;
static int hf_radiotap_plcp_default;
static int hf_radiotap_plcp_signal;
static int hf_radiotap_plcp_locked_clocks;
static int hf_radiotap_plcp_modulation;
static int hf_radiotap_plcp_length_extension;
static int hf_radiotap_plcp_length;
static int hf_radiotap_plcp_crc16;
static int hf_radiotap_ofdm_service;
static int hf_radiotap_ofdm_rate;
static int hf_radiotap_ofdm_length;
static int hf_radiotap_ofdm_parity;
static int hf_radiotap_ofdm_tail;
/* HT-SIG1 */
static int hf_radiotap_ht_mcsindex;
static int hf_radiotap_ht_bw;
static int hf_radiotap_ht_length;
/* HT-SIG2 */
static int hf_radiotap_ht_smoothing;
static int hf_radiotap_ht_notsounding;
static int hf_radiotap_ht_aggregation;
static int hf_radiotap_ht_stbc;
static int hf_radiotap_ht_feccoding;
static int hf_radiotap_ht_short_gi;
static int hf_radiotap_ht_ness;
static int hf_radiotap_ht_crc;
static int hf_radiotap_ht_tail;
/* VHT-SIG-A1 */
static int hf_radiotap_vht_bw;
static int hf_radiotap_vht_stbc;
static int hf_radiotap_vht_group_id;
static int hf_radiotap_vht_su_nsts;
static int hf_radiotap_vht_su_partial_aid;
static int hf_radiotap_vht_u0_nsts;
static int hf_radiotap_vht_u1_nsts;
static int hf_radiotap_vht_u2_nsts;
static int hf_radiotap_vht_u3_nsts;
static int hf_radiotap_vht_txop_ps_not_allowed;
/* VHT-SIG-A2 */
static int hf_radiotap_vht_short_gi;
static int hf_radiotap_vht_short_gi_nsym_disambig;
static int hf_radiotap_vht_su_coding_type;
static int hf_radiotap_vht_u0_coding_type;
static int hf_radiotap_vht_ldpc_ofdmsymbol;
static int hf_radiotap_vht_su_mcs;
static int hf_radiotap_vht_beamformed;
static int hf_radiotap_vht_u1_coding_type;
static int hf_radiotap_vht_u2_coding_type;
static int hf_radiotap_vht_u3_coding_type;
static int hf_radiotap_vht_crc;
static int hf_radiotap_vht_tail;
/* VHT-SIG-B */
static int hf_radiotap_vht_su_sig_b_length_20_mhz;
static int hf_radiotap_vht_su_sig_b_length_40_mhz;
static int hf_radiotap_vht_su_sig_b_length_80_160_mhz;
static int hf_radiotap_vht_mu_sig_b_length_20_mhz;
static int hf_radiotap_vht_mu_mcs_20_mhz;
static int hf_radiotap_vht_mu_sig_b_length_40_mhz;
static int hf_radiotap_vht_mu_mcs_40_mhz;
static int hf_radiotap_vht_mu_sig_b_length_80_160_mhz;
static int hf_radiotap_vht_mu_mcs_80_160_mhz;
static int hf_radiotap_rfid;
static int hf_radiotap_l2_l4_info;
static int hf_radiotap_bssid;
static int hf_radiotap_clientidvalid;
static int hf_radiotap_bssidvalid;
static int hf_radiotap_unicastormulticast;
/*static int hf_radiotap_wlantype; */
static int hf_radiotap_tid;
static int hf_radiotap_ac;
static int hf_radiotap_l4idvalid;
static int hf_radiotap_containshtfield;
static int hf_radiotap_istypeqos;
static int hf_radiotap_flowvalid;
static int hf_radiotap_payloaddecode;
static int hf_radiotap_vw_info_rx;
static int hf_radiotap_vw_info_rx_crypto_wep_encoded;
static int hf_radiotap_vw_info_rx_crypto_tkip_encoded;
static int hf_radiotap_vw_info_rx_crypto_rx_tkip_tsc_seqskip;
static int hf_radiotap_vw_info_rx_crypto_rx_ccmp_pn_seqskip;
static int hf_radiotap_vw_info_rx_tkip_not_full_msdu;
static int hf_radiotap_vw_info_rx_mpdu_length_gt_mpdu_octets;
static int hf_radiotap_vw_info_rx_tkip_ccmp_tsc_seqerr;
static int hf_radiotap_vw_info_rx_ack_withheld_from_frame;
static int hf_radiotap_vw_info_rx_client_bssid_matched;
static int hf_radiotap_vw_info_rx_mpdu_of_a_mpdu;
static int hf_radiotap_vw_info_rx_first_mpdu_of_a_mpdu;
static int hf_radiotap_vw_info_rx_last_mpdu_of_a_mpdu;
static int hf_radiotap_vw_info_rx_msdu_of_a_msdu;
static int hf_radiotap_vw_info_rx_first_msdu_of_a_msdu;
static int hf_radiotap_vw_info_rx_last_msdu_of_a_msdu;
static int hf_radiotap_vw_info_rx_layer_1_info_0;
static int hf_radiotap_vw_info_rx_layer_1_info_1;
static int hf_radiotap_vw_info_rx_vht_frame_received_with_vht_sig_b_length;
static int hf_radiotap_vw_info_rx_vht_frame_received_without_vht_sig_b_length;
static int hf_radiotap_vw_info_rx_factory_internal;
static int * const radiotap_info_rx_fields[] = {
&hf_radiotap_vw_info_rx_crypto_wep_encoded,
&hf_radiotap_vw_info_rx_crypto_tkip_encoded,
&hf_radiotap_vw_info_rx_crypto_rx_tkip_tsc_seqskip,
&hf_radiotap_vw_info_rx_crypto_rx_ccmp_pn_seqskip,
&hf_radiotap_vw_info_rx_tkip_not_full_msdu,
&hf_radiotap_vw_info_rx_mpdu_length_gt_mpdu_octets,
&hf_radiotap_vw_info_rx_tkip_ccmp_tsc_seqerr,
&hf_radiotap_vw_info_rx_ack_withheld_from_frame,
&hf_radiotap_vw_info_rx_client_bssid_matched,
&hf_radiotap_vw_info_rx_mpdu_of_a_mpdu,
&hf_radiotap_vw_info_rx_first_mpdu_of_a_mpdu,
&hf_radiotap_vw_info_rx_last_mpdu_of_a_mpdu,
&hf_radiotap_vw_info_rx_msdu_of_a_msdu,
&hf_radiotap_vw_info_rx_first_msdu_of_a_msdu,
&hf_radiotap_vw_info_rx_last_msdu_of_a_msdu,
&hf_radiotap_vw_info_rx_layer_1_info_0,
&hf_radiotap_vw_info_rx_layer_1_info_1,
&hf_radiotap_vw_info_rx_vht_frame_received_with_vht_sig_b_length,
&hf_radiotap_vw_info_rx_vht_frame_received_without_vht_sig_b_length,
&hf_radiotap_vw_info_rx_factory_internal,
NULL,
};
static int hf_radiotap_vw_info_tx;
static int hf_radiotap_vw_info_tx_crypto_wep_encoded;
static int hf_radiotap_vw_info_tx_crypto_tkip_encoded;
static int hf_radiotap_vw_info_tx_crypto_c_bit_error;
static int hf_radiotap_vw_info_tx_crypto_tkip_not_full_msdu;
static int hf_radiotap_vw_info_tx_crypto_software_error;
static int hf_radiotap_vw_info_tx_crypto_short_fault;
static int hf_radiotap_vw_info_tx_crypto_payload_length_fault;
static int hf_radiotap_vw_info_tx_sent_rts_before_data;
static int hf_radiotap_vw_info_tx_sent_cts_to_self_before_data;
static int hf_radiotap_vw_info_tx_mpdu_of_a_mpdu;
static int hf_radiotap_vw_info_tx_first_mpdu_of_a_mpdu;
static int hf_radiotap_vw_info_tx_last_mpdu_of_a_mpdu;
static int hf_radiotap_vw_info_tx_msdu_of_a_msdu;
static int hf_radiotap_vw_info_tx_first_msdu_of_a_msdu;
static int hf_radiotap_vw_info_tx_last_msdu_of_a_msdu;
static int * const radiotap_info_tx_fields[] = {
&hf_radiotap_vw_info_tx_crypto_wep_encoded,
&hf_radiotap_vw_info_tx_crypto_tkip_encoded,
&hf_radiotap_vw_info_tx_crypto_c_bit_error,
&hf_radiotap_vw_info_tx_crypto_tkip_not_full_msdu,
&hf_radiotap_vw_info_tx_crypto_software_error,
&hf_radiotap_vw_info_tx_crypto_short_fault,
&hf_radiotap_vw_info_tx_crypto_payload_length_fault,
&hf_radiotap_vw_info_tx_sent_rts_before_data,
&hf_radiotap_vw_info_tx_sent_cts_to_self_before_data,
&hf_radiotap_vw_info_tx_mpdu_of_a_mpdu,
&hf_radiotap_vw_info_tx_first_mpdu_of_a_mpdu,
&hf_radiotap_vw_info_tx_last_mpdu_of_a_mpdu,
&hf_radiotap_vw_info_tx_msdu_of_a_msdu,
&hf_radiotap_vw_info_tx_first_msdu_of_a_msdu,
&hf_radiotap_vw_info_tx_last_msdu_of_a_msdu,
NULL,
};
static int hf_radiotap_vw_errors_rx_sig_field_crc_parity_error;
static int hf_radiotap_vw_errors_rx_non_supported_service_field;
static int hf_radiotap_vw_errors_rx_frame_length_error;
static int hf_radiotap_vw_errors_rx_vht_sig_ab_crc_error;
static int hf_radiotap_vw_errors_rx_crc32_error;
static int hf_radiotap_vw_errors_rx_l2_de_aggregation_error;
static int hf_radiotap_vw_errors_rx_duplicate_mpdu;
static int hf_radiotap_vw_errors_rx_bad_flow_magic_number;
static int hf_radiotap_vw_errors_rx_bad_flow_payload_checksum;
static int hf_radiotap_vw_errors_rx_illegal_vht_sig_value;
static int hf_radiotap_vw_errors_rx_ip_checksum_error;
static int hf_radiotap_vw_errors_rx_l4_checksum_error;
static int hf_radiotap_vw_errors_rx_l1_unsupported_feature;
static int hf_radiotap_vw_errors_rx_l1_packet_termination;
static int hf_radiotap_vw_errors_rx_internal_error_bit15;
static int hf_radiotap_vw_errors_rx_wep_mic_miscompare;
static int hf_radiotap_vw_errors_rx_wep_tkip_rate_exceeded;
static int hf_radiotap_vw_errors_rx_crypto_short_error;
static int hf_radiotap_vw_errors_rx_extiv_fault_a;
static int hf_radiotap_vw_errors_rx_extiv_fault_b;
static int hf_radiotap_vw_errors_rx_internal_error_bit21;
static int hf_radiotap_vw_errors_rx_protected_fault_a;
static int hf_radiotap_vw_errors_rx_rx_mac_crypto_incompatibility;
static int hf_radiotap_vw_errors_rx_factory_debug;
static int hf_radiotap_vw_errors_rx_internal_error_bit32;
static int hf_radiotap_vw_errors_tx_packet_fcs_error;
static int hf_radiotap_vw_errors_tx_ip_checksum_error;
static int hf_radiotap_vw_tx_retrycount;
static int hf_radiotap_vw_tx_factorydebug;
static int ett_radiotap_info;
static int ett_radiotap_errors;
static int ett_radiotap_times;
static int ett_radiotap_layer1;
static int ett_radiotap_layer2to4;
static int ett_radiotap_rf;
static int ett_radiotap_plcp;
static int ett_radiotap_infoc;
static int ett_radiotap_contextp;
static int ett_rf_info;
static int ett_commontap;
static int ett_commontap_times;
static int ett_ethernettap_info;
static int ett_ethernettap_error;
static int ett_ethernettap_flags;
static int ett_radiotap_flags;
static dissector_handle_t ieee80211_radio_handle;
static dissector_handle_t ixveriwave_handle;
#define ALIGN_OFFSET(offset, width) \
( (((offset) + ((width) - 1)) & (~((width) - 1))) - offset )
static int
dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
bool is_octo = false;
int log_mode;
proto_tree *common_tree = NULL;
proto_item *ti = NULL;
proto_item *vw_times_ti = NULL;
proto_tree *vw_times_tree = NULL;
proto_item *rf_infot = NULL;
proto_tree *rf_info_tree = NULL;
int offset;
uint16_t length;
unsigned length_remaining;
uint64_t vw_startt=0, vw_endt=0;
uint32_t true_length;
uint32_t vw_latency, vw_pktdur;
uint32_t vw_msdu_length=0;
tvbuff_t *next_tvb;
ifg_info *p_ifg_info;
uint8_t ixport_type,cmd_type, mgmt_byte = 0;
uint8_t frameformat, legacy_type;
unsigned rfid;
int8_t noisevalida, noisevalidb, noisevalidc, noisevalidd, pfevalida, pfevalidb, pfevalidc, pfevalidd;
uint16_t vw_info_ifg;
int ifg_flag = 0;
proto_tree *vwrft, *vw_rfinfo_tree = NULL, *rfinfo_contextp_tree;
static int * const context_a_flags[] = {
&hf_radiotap_rfinfo_contextpA_snr_noise_valid,
&hf_radiotap_rfinfo_contextpA_pfe_valid,
&hf_radiotap_rfinfo_contextpA_pfe_is_cck,
&hf_radiotap_rfinfo_contextpA_agc_idle2iqrdy_no_gain_change,
&hf_radiotap_rfinfo_contextpA_agc_high_pwr_terminated,
&hf_radiotap_rfinfo_contextpA_agc_high_pwr_terminator,
/*
&hf_radiotap_rfinfo_contextpA_frame_format,
&hf_radiotap_rfinfo_contextpA_ofdm_or_cck,
&hf_radiotap_rfinfo_contextpA_sigbandwidth_of_evm,
*/
&hf_radiotap_rfinfo_contextpA_qam_modulation,
NULL
};
static int * const context_b_flags[] = {
&hf_radiotap_rfinfo_contextpB_snr_noise_valid,
&hf_radiotap_rfinfo_contextpB_pfe_valid,
&hf_radiotap_rfinfo_contextpB_pfe_is_cck,
&hf_radiotap_rfinfo_contextpB_agc_idle2iqrdy_no_gain_change,
&hf_radiotap_rfinfo_contextpB_agc_high_pwr_terminated,
&hf_radiotap_rfinfo_contextpB_agc_high_pwr_terminator,
/*
&hf_radiotap_rfinfo_contextpB_bit8,
&hf_radiotap_rfinfo_contextpB_bit10,
&hf_radiotap_rfinfo_contextpB_bit11,
*/
&hf_radiotap_rfinfo_contextpB_qam_modulation,
NULL
};
static int * const context_c_flags[] = {
&hf_radiotap_rfinfo_contextpC_snr_noise_valid,
&hf_radiotap_rfinfo_contextpC_pfe_valid,
&hf_radiotap_rfinfo_contextpC_pfe_is_cck,
&hf_radiotap_rfinfo_contextpC_agc_idle2iqrdy_no_gain_change,
&hf_radiotap_rfinfo_contextpC_agc_high_pwr_terminated,
&hf_radiotap_rfinfo_contextpC_agc_high_pwr_terminator,
/*
&hf_radiotap_rfinfo_contextpC_bit8,
&hf_radiotap_rfinfo_contextpC_bit10,
&hf_radiotap_rfinfo_contextpC_bit11,
*/
&hf_radiotap_rfinfo_contextpC_qam_modulation,
NULL
};
static int * const context_d_flags[] = {
&hf_radiotap_rfinfo_contextpD_snr_noise_valid,
&hf_radiotap_rfinfo_contextpD_pfe_valid,
&hf_radiotap_rfinfo_contextpD_pfe_is_cck,
&hf_radiotap_rfinfo_contextpD_agc_idle2iqrdy_no_gain_change,
&hf_radiotap_rfinfo_contextpD_agc_high_pwr_terminated,
&hf_radiotap_rfinfo_contextpD_agc_high_pwr_terminator,
/*
&hf_radiotap_rfinfo_contextpD_bit8,
&hf_radiotap_rfinfo_contextpD_bit10,
&hf_radiotap_rfinfo_contextpD_bit11,
*/
&hf_radiotap_rfinfo_contextpD_qam_modulation,
NULL
};
offset = 0;
//mgmt_bytes = tvb_get_letohs(tvb, offset);
//1st octet are as command type((7..4 bits)which indicates as Tx, Rx or RF frame) & port type((3..0 bits)ethernet or wlantap).
//Command type Rx = 0, Tx = 1, RF = 3 , RF_RX = 4
//2nd octet are as Reduce logging(7..4 bits) & fpga version(3..0 bits).
//log mode = 0 is normal capture and 1 is reduced capture
//FPGA version = 1 for OCTO versions
//OCTO version like 48, 61, 83
ixport_type = tvb_get_uint8(tvb, offset);
cmd_type = (ixport_type & 0xf0) >> 4;
ixport_type &= 0x0f;
/*
* If the command type is non-zero, this is from an OCTO board.
*/
if (cmd_type != 0)
{
is_octo = true;
if (cmd_type != 3)
{
mgmt_byte = tvb_get_uint8(tvb, offset+1);
log_mode = (mgmt_byte & 0xf0) >> 4;
}
else
{
log_mode = 0;
}
}
else
{
/*
* If it's zero, it could *still* be from an octo board, if the
* command type is Rx.
*/
mgmt_byte = tvb_get_uint8(tvb, offset+1);
if ((mgmt_byte & 0x0f) != 0)
is_octo = true;
log_mode = (mgmt_byte & 0xf0) >> 4;
}
length = tvb_get_letohs(tvb, offset + COMMON_LENGTH_OFFSET);
col_add_str(pinfo->cinfo, COL_PROTOCOL, ixport_type ? "ETH" : "WLAN");
col_clear(pinfo->cinfo, COL_INFO);
true_length = pinfo->fd->pkt_len - length - tvb_get_letohs(tvb, offset + length) + 4; /* add FCS length into captured length */
col_add_fstr(pinfo->cinfo, COL_INFO, "%s Capture, Length %u",
ixport_type ? "IxVeriWave Ethernet Tap" : "IxVeriWave Radio Tap", length);
/* Dissect the packet */
ti = proto_tree_add_protocol_format(tree, proto_ixveriwave,
tvb, 0, length, "%s Header",
ixport_type ? "IxVeriWave Ethernet Tap" : "IxVeriWave Radio Tap");
common_tree = proto_item_add_subtree(ti, ett_commontap);
//checked for only RF frames should be skipped from the other logging details.
if (!is_octo)
{
/*
* Pre-OCTO common header.
*/
/* common header length */
proto_tree_add_uint(common_tree, hf_ixveriwave_frame_length,
tvb, 4, 2, true_length);
length_remaining = length;
offset +=4;
length_remaining -=4;
/* MSDU length */
if (length_remaining >= 2) {
proto_tree_add_item_ret_uint(common_tree, hf_ixveriwave_vw_msdu_length, tvb, offset, 2, ENC_LITTLE_ENDIAN, &vw_msdu_length);
offset +=2;
length_remaining -=2;
}
/*extract flow id , 4bytes*/
if (length_remaining >= 4) {
proto_tree_add_item(common_tree, hf_ixveriwave_vw_flowid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset +=4;
length_remaining -=4;
}
/*extract client id, 2bytes*/
if (length_remaining >= 2) {
proto_tree_add_item(common_tree, hf_ixveriwave_vw_vcid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset +=2;
length_remaining -=2;
}
/*extract sequence number , 2bytes*/
if (length_remaining >= 2) {
proto_tree_add_item(common_tree, hf_ixveriwave_vw_seqnum, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset +=2;
length_remaining -=2;
}
/*extract latency, 4 bytes*/
if (length_remaining >= 4) {
vw_latency = tvb_get_letohl(tvb, offset);
/* start a tree going for the various packet times */
if (vw_latency != 0) {
vw_times_ti = proto_tree_add_float_format(common_tree,
hf_ixveriwave_vw_mslatency,
tvb, offset, 4, (float)(vw_latency/1000000.0),
"Frame timestamp values: (latency %.3f msec)",
(float)(vw_latency/1000000.0));
vw_times_tree = proto_item_add_subtree(vw_times_ti, ett_commontap_times);
proto_tree_add_uint(vw_times_tree, hf_ixveriwave_vw_latency, tvb, offset, 4, vw_latency);
}
else
{
vw_times_ti = proto_tree_add_float_format(common_tree,
hf_ixveriwave_vw_mslatency,
tvb, offset, 4, (float)(vw_latency/1000000.0),
"Frame timestamp values:");
vw_times_tree = proto_item_add_subtree(vw_times_ti, ett_commontap_times);
proto_tree_add_uint_format_value(vw_times_tree, hf_ixveriwave_vw_latency,
tvb, offset, 4, vw_latency, "N/A");
}
offset +=4;
length_remaining -=4;
}
/*extract signature timestamp, 4 bytes (32 LSBs only, nsec)*/
if (length_remaining >= 4) {
/* TODO: what should this fieldname be? */
proto_tree_add_item(vw_times_tree, hf_ixveriwave_vw_sig_ts,
tvb, offset, 4, ENC_BIG_ENDIAN);
offset +=4;
length_remaining -=4;
}
/*extract frame start timestamp, 8 bytes (nsec)*/
if (length_remaining >= 8) {
proto_tree_add_item_ret_uint64(vw_times_tree, hf_ixveriwave_vw_startt,
tvb, offset, 8, ENC_LITTLE_ENDIAN, &vw_startt);
offset +=8;
length_remaining -=8;
}
/* extract frame end timestamp, 8 bytes (nsec)*/
if (length_remaining >= 8) {
proto_tree_add_item_ret_uint64(vw_times_tree, hf_ixveriwave_vw_endt,
tvb, offset, 8, ENC_LITTLE_ENDIAN, &vw_endt);
offset +=8;
length_remaining -=8;
}
/*extract frame duration , 4 bytes*/
if (length_remaining >= 4) {
vw_pktdur = tvb_get_letohl(tvb, offset);
if (vw_endt >= vw_startt) {
/* Add to root summary */
if (ixport_type == ETHERNET_PORT) {
proto_item_append_text(vw_times_ti, " (Frame duration=%u nsecs)", vw_pktdur);
proto_tree_add_uint(vw_times_tree, hf_ixveriwave_vw_pktdur,
tvb, offset-16, 16, vw_pktdur);
}
else {
proto_item_append_text(vw_times_ti, " (Frame duration=%u usecs)", vw_pktdur);
proto_tree_add_uint(vw_times_tree, hf_ixveriwave_vw_pktdur,
tvb, offset-16, 16, vw_pktdur);
}
}
else {
proto_tree_add_uint_format_value(vw_times_tree, hf_ixveriwave_vw_pktdur,
tvb, offset, 0, vw_pktdur, "N/A");
/* Add to root summary */
proto_item_append_text(vw_times_ti, " (Frame duration=N/A)");
}
offset +=4;
}
} else { //Rather then the legacy it takes care to show the Time Header for RadioTapHeader in new format
/*
* OCTO time header.
*/
length_remaining = length;
offset +=4;
length_remaining -=4;
/* XXX - not if the command is 3 */
/*extract latency, 4 bytes*/
if (length_remaining >= 4) {
vw_latency = tvb_get_letohl(tvb, offset);
/* start a tree going for the various packet times */
if (vw_latency != 0) {
vw_times_ti = proto_tree_add_float_format(common_tree,
hf_ixveriwave_vw_mslatency,
tvb, offset, 4, (float)(vw_latency/1000000.0),
"Time Header(latency %.3f msec)",
(float)(vw_latency/1000000.0));
vw_times_tree = proto_item_add_subtree(vw_times_ti, ett_commontap_times);
proto_tree_add_uint(vw_times_tree, hf_ixveriwave_vw_latency, tvb, offset, 4, vw_latency);
}
else
{
vw_times_ti = proto_tree_add_float_format(common_tree,
hf_ixveriwave_vw_mslatency,
tvb, offset, 4, (float)(vw_latency/1000000.0),
"Time Header");
vw_times_tree = proto_item_add_subtree(vw_times_ti, ett_commontap_times);
if (cmd_type != 1) {
proto_tree_add_uint_format_value(vw_times_tree, hf_ixveriwave_vw_latency,
tvb, offset, 4, vw_latency, "N/A");
}
}
offset +=4;
length_remaining -=4;
}
/*extract signature timestamp, 4 bytes (32 LSBs only, nsec)*/
if (length_remaining >= 4) {
/* TODO: what should this fieldname be? */
if (cmd_type != 1)
proto_tree_add_item(vw_times_tree, hf_ixveriwave_vw_sig_ts,
tvb, offset, 4, ENC_BIG_ENDIAN);
else
proto_tree_add_item(vw_times_tree, hf_ixveriwave_vw_delay,
tvb, offset, 4, ENC_BIG_ENDIAN);
offset +=4;
length_remaining -=4;
}
/*extract frame start timestamp, 8 bytes (nsec)*/
if (length_remaining >= 8) {
proto_tree_add_item_ret_uint64(vw_times_tree, hf_ixveriwave_vw_startt,
tvb, offset, 8, ENC_LITTLE_ENDIAN, &vw_startt);
offset +=8;
length_remaining -=8;
}
/* extract frame end timestamp, 8 bytes (nsec)*/
if (length_remaining >= 8) {
proto_tree_add_item_ret_uint64(vw_times_tree, hf_ixveriwave_vw_endt,
tvb, offset, 8, ENC_LITTLE_ENDIAN, &vw_endt);
offset +=8;
length_remaining -=8;
}
/*extract frame duration , 4 bytes*/
if (length_remaining >= 4) {
vw_pktdur = tvb_get_letohl(tvb, offset);
if (vw_endt >= vw_startt) {
/* Add to root summary */
if (ixport_type == ETHERNET_PORT) {
proto_item_append_text(vw_times_ti, " (Frame duration=%u nsecs)", vw_pktdur);
proto_tree_add_uint(vw_times_tree, hf_ixveriwave_vw_pktdur,
tvb, offset-16, 16, vw_pktdur);
}
else {
proto_item_append_text(vw_times_ti, " (Frame duration=%u usecs)", vw_pktdur);
proto_tree_add_uint(vw_times_tree, hf_ixveriwave_vw_pktdur,
tvb, offset, 4, vw_pktdur);
}
}
else {
proto_tree_add_uint_format_value(vw_times_tree, hf_ixveriwave_vw_pktdur,
tvb, offset, 0, vw_pktdur, "N/A");
/* Add to root summary */
proto_item_append_text(vw_times_ti, " (Frame duration=N/A)");
}
offset += 4;
}
}
/*
* Calculate the IFG
* Check for an existing ifg value associated with the frame
*/
p_ifg_info = (ifg_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ixveriwave, 0);
if (!p_ifg_info)
{
/* allocate the space */
p_ifg_info = wmem_new0(wmem_file_scope(), struct ifg_info);
/* Doesn't exist, so we need to calculate the value */
if (previous_frame_data.previous_frame_num !=0 && (pinfo->num - previous_frame_data.previous_frame_num == 1))
{
p_ifg_info->ifg = (uint32_t)(vw_startt - previous_frame_data.previous_end_time);
p_ifg_info->previous_end_time = previous_frame_data.previous_end_time;
}
else
{
p_ifg_info->ifg = 0;
p_ifg_info->previous_end_time = 0;
}
/* Store current data into the static structure */
previous_frame_data.previous_end_time = vw_endt;
previous_frame_data.previous_frame_num = pinfo->num;
/* Record the current start time */
p_ifg_info->current_start_time = vw_startt;
/* Add the ifg onto the frame */
p_add_proto_data(wmem_file_scope(), pinfo, proto_ixveriwave, 0, p_ifg_info);
}
if (is_octo) {
p_ifg_info = (struct ifg_info *) p_get_proto_data(wmem_file_scope(), pinfo, proto_ixveriwave, 0);
switch (cmd_type) {
case 0:
vw_info_ifg = tvb_get_ntohs(tvb, offset+ VW_INFO_OFF );
if ((vw_info_ifg & 0x0004) && !(vw_info_ifg & 0x0008)) /* If the packet is part of an A-MPDU but not the first MPDU */
ifg_flag = 1;
else
ifg_flag = 0;
break;
case 1:
vw_info_ifg = tvb_get_letohs(tvb, offset+ VW_INFO_OFF);
if ((vw_info_ifg & 0x0400) && !(vw_info_ifg & 0x0800)) /* If the packet is part of an A-MPDU but not the first MPDU */
ifg_flag = 1;
else
ifg_flag = 0;
break;
case 4:
vw_info_ifg = tvb_get_ntohs(tvb, offset+ VW_INFO_OFF + OCTO_MODIFIED_RF_LEN);
if ((vw_info_ifg & 0x0004) && !(vw_info_ifg & 0x0008)) /* If the packet is part of an A-MPDU but not the first MPDU */
ifg_flag = 1;
else
ifg_flag = 0;
break;
default:
break;
}
if (ifg_flag == 1) /* If the packet is part of an A-MPDU but not the first MPDU */
ti = proto_tree_add_uint(common_tree, hf_ixveriwave_vw_ifg, tvb, 18, 0, 0);
else {
/*** if (p_ifg_info->ifg < IFG_MAX_VAL) ***/
if ((int32_t) p_ifg_info->ifg >= 0)
ti = proto_tree_add_uint(common_tree, hf_ixveriwave_vw_ifg, tvb, 18, 0, p_ifg_info->ifg);
else
ti = proto_tree_add_uint_format_value(common_tree, hf_ixveriwave_vw_ifg, tvb, 18, 0, p_ifg_info->ifg, "Cannot be determined");
}
proto_item_set_generated(ti);
}
if(cmd_type ==3 || cmd_type ==4)
{
float flttmp;
frameformat = tvb_get_uint8(tvb, offset+33)& 0x03;
legacy_type = tvb_get_uint8(tvb, offset+33)& 0x04 >>2;
if(cmd_type ==3)
offset += 1;
// Only RF header implementation
if (tree) {
vwrft = proto_tree_add_item(common_tree, hf_radiotap_rf_info,
tvb, offset, 76, ENC_NA);
vw_rfinfo_tree = proto_item_add_subtree(vwrft, ett_radiotap_rf);
proto_tree_add_item_ret_uint(vw_rfinfo_tree,
hf_radiotap_rfinfo_rfid, tvb, offset,
1, ENC_LITTLE_ENDIAN, &rfid);
proto_item_append_text(vwrft, " (RFID = %u)", rfid);
offset += 4;
//Section for Noise
noisevalida = tvb_get_uint8(tvb, offset+65)& 0x01;
noisevalidb = tvb_get_uint8(tvb, offset+67)& 0x01;
noisevalidc = tvb_get_uint8(tvb, offset+69)& 0x01;
noisevalidd = tvb_get_uint8(tvb, offset+71)& 0x01;
/*
noisea = tvb_get_ntohis(tvb, offset);
//noisevalida = tvb_get_uint8(tvb, offset+65)& 0x01;
if (noisevalida == 1)
rf_infot = proto_tree_add_float_format(vw_rfinfo_tree, hf_radiotap_rfinfo_noise,
tvb, offset, 8, (float)(noisea/16.0),"Noise: A:%.2fdBm, ", (float)(noisea/16.0));
//These are 16-bit signed numbers with four fraction bits representing NOISE in dBm. So 0xFFFF represents -1/16 dBm.
else
rf_infot = proto_tree_add_float_format(vw_rfinfo_tree, hf_radiotap_rfinfo_noise,
tvb, offset, 8, (float)(noisea/16.0),"Noise: A: N/A, ", (float)(noisea/16.0));
rf_info_tree = proto_item_add_subtree(rf_infot, ett_rf_info);
noiseb = tvb_get_ntohs(tvb, offset+2);
noisevalidb = tvb_get_uint8(tvb, offset+67)& 0x01;
if (noisevalidb == 1)
proto_item_append_text(rf_infot, "B:%.2fdBm, ", (float)(noiseb/16.0));
else
proto_item_append_text(rf_infot, "B: N/A, ", (float)(noiseb/16.0));
noisec = tvb_get_ntohs(tvb, offset+4);
noisevalidc = tvb_get_uint8(tvb, offset+69)& 0x01;
if (noisevalidc == 1)
proto_item_append_text(rf_infot, "C:%.2fdBm, ", (float)(noisec/16.0));
else
proto_item_append_text(rf_infot, "C: N/A, ", (float)(noisec/16.0));
noised = tvb_get_ntohs(tvb, offset+6);
noisevalidd = tvb_get_uint8(tvb, offset+71)& 0x01;
if (noisevalidd == 1)
proto_item_append_text(rf_infot, "D:%.2fdBm", (float)(noised/16.0));
else
proto_item_append_text(rf_infot, "D: N/A", (float)(noised/16.0));
*/
offset += 8;
//Section for SNR
//These are 16-bit signed numbers with four fraction bits in units of dB . So 0xFFFF represents -1/16 dB.
rf_infot = proto_tree_add_none_format(vw_rfinfo_tree, hf_radiotap_rfinfo_snr, tvb, offset, 8, "SNR: ");
rf_info_tree = proto_item_add_subtree(rf_infot, ett_rf_info);
flttmp = (float)round(tvb_get_ntohs(tvb, offset) / 16.0f);
if (noisevalida == 1)
{
proto_tree_add_float(rf_info_tree, hf_radiotap_rfinfo_snr_anta, tvb, offset, 2, flttmp);
proto_item_append_text(rf_infot, "A:%.0fdB, ", flttmp);
}
else
{
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_snr_anta, tvb, offset, 2, flttmp, "N/A");
proto_item_append_text(rf_infot, "A:N/A, ");
}
offset += 2;
flttmp = (float)round(tvb_get_ntohs(tvb, offset) / 16.0f);
if (noisevalidb == 1)
{
proto_tree_add_float(rf_info_tree, hf_radiotap_rfinfo_snr_antb, tvb, offset, 2, flttmp);
proto_item_append_text(rf_infot, "B:%.0fdB, ", flttmp);
}
else
{
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_snr_antb, tvb, offset, 2, flttmp, "N/A");
proto_item_append_text(rf_infot, "B:N/A, ");
}
offset += 2;
flttmp = (float)round(tvb_get_ntohs(tvb, offset) / 16.0f);
if (noisevalidc == 1)
{
proto_tree_add_float(rf_info_tree, hf_radiotap_rfinfo_snr_antc, tvb, offset, 2, flttmp);
proto_item_append_text(rf_infot, "C:%.0fdB, ", flttmp);
}
else
{
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_snr_antc, tvb, offset, 2, flttmp, "N/A");
proto_item_append_text(rf_infot, "C:N/A, ");
}
offset += 2;
flttmp = (float)round(tvb_get_ntohs(tvb, offset) / 16.0f);
if (noisevalidd == 1)
{
proto_tree_add_float(rf_info_tree, hf_radiotap_rfinfo_snr_antd, tvb, offset, 2, flttmp);
proto_item_append_text(rf_infot, "D:%.0fdB", flttmp);
}
else
{
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_snr_antd, tvb, offset, 2, flttmp, "N/A");
proto_item_append_text(rf_infot, "D:N/A");
}
offset += 2;
//Section for PFE
pfevalida = (tvb_get_uint8(tvb, offset+49)& 0x02) >>1;
pfevalidb = (tvb_get_uint8(tvb, offset+51)& 0x02) >>1;
pfevalidc = (tvb_get_uint8(tvb, offset+53)& 0x02) >>1;
pfevalidd = (tvb_get_uint8(tvb, offset+55)& 0x02) >>1;
rf_infot = proto_tree_add_none_format(vw_rfinfo_tree, hf_radiotap_rfinfo_pfe,
tvb, offset, 8, "PFE: ");
rf_info_tree = proto_item_add_subtree(rf_infot, ett_rf_info);
if ((frameformat == 0) && (legacy_type == 0))
{
//The basic unit of OFDM frequency error measurement is in units of 80 MHz/2^22.
//This works out to approximately 19.073 Hz per measurement unit.
flttmp = (float)(tvb_get_ntohs(tvb, offset)*19.073);
}
else
{
//The basic unit of CCK frequency error measurement is in units of 88 MHz/2^22.
//This works out to approximately 20.981 Hz.
flttmp = (float)(tvb_get_ntohs(tvb, offset)*20.981);
}
if (pfevalida == 1)
{
proto_item_append_text(rf_infot, "SS#1:%.0fHz, ", flttmp);
proto_tree_add_float(rf_info_tree, hf_radiotap_rfinfo_pfe_anta,
tvb, offset, 2, flttmp);
}
else
{
proto_item_append_text(rf_infot, "SS#1:N/A, ");
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_pfe_anta,
tvb, offset, 2, flttmp, "N/A");
}
offset += 2;
if ((frameformat == 0) && (legacy_type == 0))
{
flttmp = (float)(tvb_get_ntohs(tvb, offset)*19.073);
}
else
{
flttmp = (float)(tvb_get_ntohs(tvb, offset)*20.981);
}
if (pfevalidb == 1)
{
proto_item_append_text(rf_infot, "SS#2:%.0fHz, ", flttmp);
proto_tree_add_float(rf_info_tree, hf_radiotap_rfinfo_pfe_antb,
tvb, offset, 2, flttmp);
}
else
{
proto_item_append_text(rf_infot, "SS#2:N/A, ");
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_pfe_antb,
tvb, offset, 2, flttmp, "N/A");
}
offset += 2;
if ((frameformat == 0) && (legacy_type == 0))
{
flttmp = (float)(tvb_get_ntohs(tvb, offset)*19.073);
}
else
{
flttmp = (float)(tvb_get_ntohs(tvb, offset)*20.981);
}
if (pfevalidc == 1)
{
proto_item_append_text(rf_infot, "SS#3:%.0fHz, ", flttmp);
proto_tree_add_float(rf_info_tree, hf_radiotap_rfinfo_pfe_antc,
tvb, offset, 2, flttmp);
}
else
{
proto_item_append_text(rf_infot, "SS#3:N/A, ");
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_pfe_antc,
tvb, offset, 2, flttmp, "N/A");
}
offset += 2;
if ((frameformat == 0) && (legacy_type == 0))
{
flttmp = (float)(tvb_get_ntohs(tvb, offset)*19.073);
}
else
{
flttmp = (float)(tvb_get_ntohs(tvb, offset)*20.981);
}
if (pfevalidd == 1)
{
proto_item_append_text(rf_infot, "SS#4:%.0fHz", flttmp);
proto_tree_add_float(rf_info_tree, hf_radiotap_rfinfo_pfe_antd,
tvb, offset, 2, flttmp);
}
else
{
proto_item_append_text(rf_infot, "SS#4:N/A");
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_pfe_antd,
tvb, offset, 2, flttmp, "N/A");
}
offset += 2;
//AVG EVM SIG Data
rf_infot = proto_tree_add_none_format(vw_rfinfo_tree, hf_radiotap_rfinfo_sigdata, tvb, offset, 8, "AVG EVM SIG Data: ");
rf_info_tree = proto_item_add_subtree(rf_infot, ett_rf_info);
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#1:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_sd_siga,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#2:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_sd_sigb,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#3:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_sd_sigc,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#4:%.1f%%", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_sd_sigd,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
//AVG EVM SIG Pilot
rf_infot = proto_tree_add_none_format(vw_rfinfo_tree, hf_radiotap_rfinfo_sigpilot, tvb, offset, 8, "AVG EVM SIG Pilot: ");
rf_info_tree = proto_item_add_subtree(rf_infot, ett_rf_info);
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#1:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_sp_siga,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#2:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_sp_sigb,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#3:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_sp_sigc,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#4:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_sp_sigd,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
//AVG EVM DATA Data
rf_infot = proto_tree_add_none_format(vw_rfinfo_tree, hf_radiotap_rfinfo_datadata,
tvb, offset, 8, "AVG EVM DATA Data: ");
rf_info_tree = proto_item_add_subtree(rf_infot, ett_rf_info);
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#1:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_dd_siga,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#2:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_dd_sigb,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#3:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_dd_sigc,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#4:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_dd_sigd,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
//AVG EVM DATA Pilot
rf_infot = proto_tree_add_none_format(vw_rfinfo_tree, hf_radiotap_rfinfo_datapilot,
tvb, offset, 8, "AVG EVM DATA Pilot: ");
rf_info_tree = proto_item_add_subtree(rf_infot, ett_rf_info);
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#1:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_dp_siga,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#2:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_dp_sigb,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#3:%.1f%%, ", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_dp_sigc,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
flttmp = (float)(tvb_get_ntohs(tvb, offset)/512.0);
proto_item_append_text(rf_infot, "SS#4:%.1f%%", flttmp);
proto_tree_add_float_format_value(rf_info_tree, hf_radiotap_rfinfo_avg_evm_dp_sigd,
tvb, offset, 2, flttmp, "%.1f%%", flttmp);
offset += 2;
//EVM Worst Symbol
rf_infot = proto_tree_add_item(vw_rfinfo_tree, hf_radiotap_rfinfo_avg_ws_symbol,
tvb, offset, 8, ENC_NA);
rf_info_tree = proto_item_add_subtree(rf_infot, ett_rf_info);
proto_tree_add_item(rf_info_tree, hf_radiotap_rfinfo_avg_evm_ws_siga, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_item_append_text(rf_infot, ": SS#1:%u%%, ", tvb_get_ntohs(tvb, offset));
offset += 2;
proto_tree_add_item(rf_info_tree, hf_radiotap_rfinfo_avg_evm_ws_sigb, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_item_append_text(rf_infot, "SS#2:%u%%, ", tvb_get_ntohs(tvb, offset));
offset += 2;
proto_tree_add_item(rf_info_tree, hf_radiotap_rfinfo_avg_evm_ws_sigc, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_item_append_text(rf_infot, "SS#3:%u%%, ", tvb_get_ntohs(tvb, offset));
offset += 2;
proto_tree_add_item(rf_info_tree, hf_radiotap_rfinfo_avg_evm_ws_sigd, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_item_append_text(rf_infot, "SS#4:%u%%", tvb_get_ntohs(tvb, offset));
offset += 2;
//ContextA
ti = proto_tree_add_bitmask(rf_info_tree, tvb, offset, hf_radiotap_rfinfo_contextpa, ett_radiotap_contextp, context_a_flags, ENC_BIG_ENDIAN);
rfinfo_contextp_tree = proto_item_add_subtree(ti, ett_radiotap_contextp);
frameformat = tvb_get_uint8(tvb, offset)& 0x03;
if (frameformat == 0)
{
proto_tree_add_item(rfinfo_contextp_tree, hf_radiotap_rfinfo_legacytypeA, tvb, offset, 1, ENC_NA);
}
else
{
proto_tree_add_item(rfinfo_contextp_tree, hf_radiotap_rfinfo_frameformatA, tvb, offset, 1, ENC_NA);
}
proto_tree_add_item(rfinfo_contextp_tree, hf_radiotap_rfinfo_sigbwevmA, tvb, offset, 1, ENC_NA);
offset += 2;
//ContextB
ti = proto_tree_add_bitmask(rf_info_tree, tvb, offset, hf_radiotap_rfinfo_contextpb, ett_radiotap_contextp, context_b_flags, ENC_BIG_ENDIAN);
rfinfo_contextp_tree = proto_item_add_subtree(ti, ett_radiotap_contextp);
frameformat = tvb_get_uint8(tvb, offset)& 0x03;
if (frameformat == 0)
{
proto_tree_add_item(rfinfo_contextp_tree, hf_radiotap_rfinfo_legacytypeB, tvb, offset, 1, ENC_NA);
}
else
{
proto_tree_add_item(rfinfo_contextp_tree, hf_radiotap_rfinfo_frameformatB, tvb, offset, 1, ENC_NA);
}
proto_tree_add_item(rfinfo_contextp_tree, hf_radiotap_rfinfo_sigbwevmB, tvb, offset, 1, ENC_NA);
offset += 2;
//ContextC
ti = proto_tree_add_bitmask(vw_rfinfo_tree, tvb, offset, hf_radiotap_rfinfo_contextpc, ett_radiotap_contextp, context_c_flags, ENC_BIG_ENDIAN);
rfinfo_contextp_tree = proto_item_add_subtree(ti, ett_radiotap_contextp);
frameformat = tvb_get_uint8(tvb, offset)& 0x03;
if (frameformat == 0)
{
proto_tree_add_item(rfinfo_contextp_tree, hf_radiotap_rfinfo_legacytypeC, tvb, offset, 1, ENC_NA);
}
else
{
proto_tree_add_item(rfinfo_contextp_tree, hf_radiotap_rfinfo_frameformatC, tvb, offset, 1, ENC_NA);
}
proto_tree_add_item(rfinfo_contextp_tree, hf_radiotap_rfinfo_sigbwevmC, tvb, offset, 1, ENC_NA);
offset += 2;
//ContextD
ti = proto_tree_add_bitmask(vw_rfinfo_tree, tvb, offset, hf_radiotap_rfinfo_contextpd, ett_radiotap_contextp, context_d_flags, ENC_BIG_ENDIAN);
rfinfo_contextp_tree = proto_item_add_subtree(ti, ett_radiotap_contextp);
frameformat = tvb_get_uint8(tvb, offset)& 0x03;
if (frameformat == 0)
{
proto_tree_add_item(rfinfo_contextp_tree, hf_radiotap_rfinfo_legacytypeD, tvb, offset, 1, ENC_NA);
}
else
{
proto_tree_add_item(rfinfo_contextp_tree, hf_radiotap_rfinfo_frameformatD, tvb, offset, 1, ENC_NA);
}
proto_tree_add_item(rfinfo_contextp_tree, hf_radiotap_rfinfo_sigbwevmD, tvb, offset, 1, ENC_NA);
/*offset += 2;*/
}
}
if (cmd_type !=3) //only RF
{
proto_item_set_len(vw_times_ti, 28);
/* Grab the rest of the frame. */
if(!is_octo)
{
next_tvb = tvb_new_subset_remaining(tvb, length);
}
else
{
if (cmd_type ==4) //RF+Rx
next_tvb = tvb_new_subset_remaining(tvb, 108);
else
next_tvb = tvb_new_subset_remaining(tvb, 32);
}
/* dissect the ethernet or wlan header next */
if (ixport_type == ETHERNET_PORT)
ethernettap_dissect(next_tvb, pinfo, tree, common_tree);
else {
if (is_octo)
wlantap_dissect_octo(next_tvb, pinfo, tree, common_tree,
cmd_type, log_mode);
else
wlantap_dissect(next_tvb, pinfo, tree, common_tree,
vw_msdu_length);
}
}
return tvb_captured_length(tvb);
}
/*
* Returns the amount required to align "offset" with "width"
*/
#define ALIGN_OFFSET(offset, width) \
( (((offset) + ((width) - 1)) & (~((width) - 1))) - offset )
static void
ethernettap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *tap_tree)
{
proto_tree *vwift,*vw_infoFlags_tree = NULL;
int offset = 0;
tvbuff_t *next_tvb;
unsigned length, length_remaining;
bool vwf_txf = false;
ifg_info *p_ifg_info;
proto_item *ti;
/* First add the IFG information */
p_ifg_info = (struct ifg_info *) p_get_proto_data(wmem_file_scope(), pinfo, proto_ixveriwave, 0);
ti = proto_tree_add_uint(tap_tree, hf_ixveriwave_vw_ifg,
tvb, offset, 0, p_ifg_info->ifg);
proto_item_set_generated(ti);
length = tvb_get_letohs(tvb, offset);
length_remaining = length;
offset += 2;
length_remaining -= 2;
/* extract flags (currently use only TX/RX and FCS error flag) */
if (length >= 2) {
proto_tree_add_item_ret_boolean(tap_tree, hf_ixveriwave_vwf_txf,
tvb, offset, 2, ENC_LITTLE_ENDIAN, &vwf_txf);
proto_tree_add_item(tap_tree, hf_ixveriwave_vwf_fcserr,
tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
length_remaining -= 2;
}
/*extract info flags , 2bytes*/
if (length_remaining >= 2) {
vwift = proto_tree_add_item(tap_tree, hf_ixveriwave_vw_info, tvb, offset, 2, ENC_LITTLE_ENDIAN);
vw_infoFlags_tree = proto_item_add_subtree(vwift, ett_ethernettap_info);
if (vwf_txf == 0) {
/* then it's an rx case */
proto_tree_add_item(vw_infoFlags_tree, hf_ixveriwave_vw_info_go_no_flow,
tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(vw_infoFlags_tree, hf_ixveriwave_vw_info_go_with_flow,
tvb, offset, 2, ENC_LITTLE_ENDIAN);
} else {
/* it's a tx case */
proto_tree_add_item(vw_infoFlags_tree, hf_ixveriwave_vw_info_retry_count,
tvb, offset, 2, ENC_LITTLE_ENDIAN);
}
offset +=2;
length_remaining -=2;
}
/*extract error , 4bytes*/
if (length_remaining >= 4) {
if (vwf_txf == 0) {
/* then it's an rx case */
static int * const vw_error_rx_flags[] = {
&hf_ixveriwave_vw_error_1_alignment_error,
&hf_ixveriwave_vw_error_1_packet_fcs_error,
&hf_ixveriwave_vw_error_1_bad_magic_byte_signature,
&hf_ixveriwave_vw_error_1_bad_payload_checksum,
&hf_ixveriwave_vw_error_1_frame_too_long,
&hf_ixveriwave_vw_error_1_ip_checksum_error,
&hf_ixveriwave_vw_error_1_l4_checksum_error,
&hf_ixveriwave_vw_error_1_id_mismatch,
&hf_ixveriwave_vw_error_1_length_error,
&hf_ixveriwave_vw_error_1_underflow,
NULL
};
proto_tree_add_bitmask(tap_tree, tvb, offset, hf_ixveriwave_vw_error, ett_ethernettap_error, vw_error_rx_flags, ENC_LITTLE_ENDIAN);
} else {
/* it's a tx case */
static int * const vw_error_tx_flags[] = {
&hf_ixveriwave_vw_error_1_packet_fcs_error,
&hf_ixveriwave_vw_error_1_ip_checksum_error,
&hf_ixveriwave_vw_error_1_underflow,
&hf_ixveriwave_vw_error_1_late_collision,
&hf_ixveriwave_vw_error_1_excessive_collisions,
NULL
};
proto_tree_add_bitmask(tap_tree, tvb, offset, hf_ixveriwave_vw_error, ett_ethernettap_error, vw_error_tx_flags, ENC_LITTLE_ENDIAN);
}
offset +=4;
length_remaining -=4;
}
/*extract l4id , 4bytes*/
if (length_remaining >= 4) {
proto_tree_add_item(tap_tree, hf_ixveriwave_vw_l4id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
length_remaining -=4;
}
/*extract pad, 4bytes*/
if (length_remaining >= 4) {
/* throw away pad */
}
/* Grab the rest of the frame. */
next_tvb = tvb_new_subset_remaining(tvb, length);
/* dissect the ethernet header next */
call_dissector(ethernet_handle, next_tvb, pinfo, tree);
}
static int
decode_ofdm_signal(proto_tree *tree, tvbuff_t *tvb, int offset)
{
proto_tree_add_item(tree, hf_radiotap_ofdm_rate,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_radiotap_ofdm_length,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_radiotap_ofdm_parity,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_radiotap_ofdm_tail,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
return offset + 3;
}
static int
decode_ht_sig(proto_tree *tree, tvbuff_t *tvb, int offset,
struct ieee_802_11_phdr *phdr)
{
unsigned bw;
unsigned stbc_streams;
unsigned feccoding;
bool short_gi;
unsigned ness;
/* HT-SIG1 */
proto_tree_add_item(tree, hf_radiotap_ht_mcsindex,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
proto_tree_add_item_ret_uint(tree, hf_radiotap_ht_bw,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&bw);
/*
* XXX - how to distinguish between 20 MHz, 20+20U, and
* 20+20L if the bit is not set?
*
* Or is this something that radiotap only sets for transmitted
* packets, so you only get the total bandwidth for received
* packets?
*/
if (bw != 0)
{
phdr->phy_info.info_11n.has_bandwidth = true;
phdr->phy_info.info_11n.bandwidth = PHDR_802_11_BANDWIDTH_40_MHZ;
}
proto_tree_add_item(tree, hf_radiotap_ht_length,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
offset += 3;
/* HT-SIG2 */
proto_tree_add_item(tree, hf_radiotap_ht_smoothing,
tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_radiotap_ht_notsounding,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_radiotap_ht_aggregation,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
proto_tree_add_item_ret_uint(tree, hf_radiotap_ht_stbc,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&stbc_streams);
phdr->phy_info.info_11n.has_stbc_streams = true;
phdr->phy_info.info_11n.stbc_streams = stbc_streams;
proto_tree_add_item_ret_uint(tree, hf_radiotap_ht_feccoding,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&feccoding);
phdr->phy_info.info_11n.has_fec = true;
phdr->phy_info.info_11n.fec = feccoding;
proto_tree_add_item_ret_boolean(tree, hf_radiotap_ht_short_gi,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&short_gi);
phdr->phy_info.info_11n.has_short_gi = true;
phdr->phy_info.info_11n.short_gi = short_gi;
proto_tree_add_item_ret_uint(tree, hf_radiotap_ht_ness,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&ness);
phdr->phy_info.info_11n.has_ness = true;
phdr->phy_info.info_11n.ness = ness;
proto_tree_add_item(tree, hf_radiotap_ht_crc,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_radiotap_ht_tail,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
offset += 3;
return offset;
}
static int
decode_vht_sig(proto_tree *tree, tvbuff_t *tvb, int offset,
struct ieee_802_11_phdr *phdr)
{
unsigned bw;
bool stbc;
unsigned group_id;
unsigned partial_aid;
bool txop_ps_not_allowed;
bool short_gi;
bool short_gi_nsym_disambig;
bool ldpc_ofdmsymbol;
bool beamformed;
/* VHT-SIG-A1 */
proto_tree_add_item_ret_uint(tree, hf_radiotap_vht_bw,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&bw);
switch (bw)
{
case 0:
phdr->phy_info.info_11ac.has_bandwidth = true;
phdr->phy_info.info_11ac.bandwidth = PHDR_802_11_BANDWIDTH_20_MHZ;
break;
case 1:
phdr->phy_info.info_11ac.has_bandwidth = true;
phdr->phy_info.info_11ac.bandwidth = PHDR_802_11_BANDWIDTH_40_MHZ;
break;
case 2:
phdr->phy_info.info_11ac.has_bandwidth = true;
phdr->phy_info.info_11ac.bandwidth = PHDR_802_11_BANDWIDTH_80_MHZ;
break;
case 3:
/* XXX - how to distinguish between 160 MHz and 80+80 MHz? */
break;
}
proto_tree_add_item_ret_boolean(tree, hf_radiotap_vht_stbc,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&stbc);
phdr->phy_info.info_11ac.has_stbc = true;
phdr->phy_info.info_11ac.stbc = stbc;
proto_tree_add_item_ret_uint(tree, hf_radiotap_vht_group_id,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&group_id);
phdr->phy_info.info_11ac.has_group_id = true;
phdr->phy_info.info_11ac.group_id = group_id;
if ((group_id == 0) || (group_id == 63)) // SU VHT type
{
proto_tree_add_item(tree, hf_radiotap_vht_su_nsts,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
proto_tree_add_item_ret_uint(tree, hf_radiotap_vht_su_partial_aid,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&partial_aid);
phdr->phy_info.info_11ac.has_partial_aid = true;
phdr->phy_info.info_11ac.partial_aid = partial_aid;
}
else
{
// The below is MU VHT type*
proto_tree_add_item(tree, hf_radiotap_vht_u0_nsts,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_radiotap_vht_u1_nsts,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_radiotap_vht_u2_nsts,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_radiotap_vht_u3_nsts,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
}
proto_tree_add_item_ret_boolean(tree, hf_radiotap_vht_txop_ps_not_allowed,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&txop_ps_not_allowed);
phdr->phy_info.info_11ac.has_txop_ps_not_allowed = true;
phdr->phy_info.info_11ac.txop_ps_not_allowed = txop_ps_not_allowed;
offset += 3;
/* VHT-SIG-A2 */
proto_tree_add_item_ret_boolean(tree, hf_radiotap_vht_short_gi,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&short_gi);
phdr->phy_info.info_11ac.has_short_gi = true;
phdr->phy_info.info_11ac.short_gi = short_gi;
proto_tree_add_item_ret_boolean(tree, hf_radiotap_vht_short_gi_nsym_disambig,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&short_gi_nsym_disambig);
phdr->phy_info.info_11ac.has_short_gi_nsym_disambig = true;
phdr->phy_info.info_11ac.short_gi_nsym_disambig = short_gi_nsym_disambig;
if ((group_id == 0) || (group_id == 63)) // SU VHT type
{
proto_tree_add_item(tree, hf_radiotap_vht_su_coding_type,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
}
else
{
// it is MU MIMO type BCC coding
// extract U0 Coding
proto_tree_add_item(tree, hf_radiotap_vht_u0_coding_type,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
}
proto_tree_add_item_ret_boolean(tree, hf_radiotap_vht_ldpc_ofdmsymbol,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&ldpc_ofdmsymbol);
phdr->phy_info.info_11ac.has_ldpc_extra_ofdm_symbol = true;
phdr->phy_info.info_11ac.ldpc_extra_ofdm_symbol = ldpc_ofdmsymbol;
if ((group_id == 0) || (group_id == 63)) // SU VHT type
{
proto_tree_add_item(tree, hf_radiotap_vht_su_mcs,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
proto_tree_add_item_ret_boolean(tree, hf_radiotap_vht_beamformed,
tvb, offset, 3, ENC_LITTLE_ENDIAN,
&beamformed);
phdr->phy_info.info_11ac.has_beamformed = true;
phdr->phy_info.info_11ac.beamformed = beamformed;
}
else
{
// extract U1 Coding type
proto_tree_add_item(tree, hf_radiotap_vht_u1_coding_type,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
// extract U2 Coding type
proto_tree_add_item(tree, hf_radiotap_vht_u2_coding_type,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
// extract U3 Coding type
proto_tree_add_item(tree, hf_radiotap_vht_u3_coding_type,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
// reserved
}
proto_tree_add_item(tree, hf_radiotap_vht_crc,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_radiotap_vht_tail,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
offset += 3;
/* VHT-SIG-B */
if ((group_id == 0) || (group_id == 63)) // SU VHT type
{
switch (bw)
{
case VHT_BW_20_MHZ:
proto_tree_add_item(tree, hf_radiotap_vht_su_sig_b_length_20_mhz,
tvb, offset, 4, ENC_LITTLE_ENDIAN);
break;
case VHT_BW_40_MHZ:
proto_tree_add_item(tree, hf_radiotap_vht_su_sig_b_length_40_mhz,
tvb, offset, 4, ENC_LITTLE_ENDIAN);
break;
case VHT_BW_80_MHZ:
case VHT_BW_160_MHZ:
proto_tree_add_item(tree, hf_radiotap_vht_su_sig_b_length_80_160_mhz,
tvb, offset, 4, ENC_LITTLE_ENDIAN);
break;
}
}
else
{
switch (bw)
{
case VHT_BW_20_MHZ:
proto_tree_add_item(tree, hf_radiotap_vht_mu_sig_b_length_20_mhz,
tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_radiotap_vht_mu_mcs_20_mhz,
tvb, offset, 4, ENC_LITTLE_ENDIAN);
break;
case VHT_BW_40_MHZ:
proto_tree_add_item(tree, hf_radiotap_vht_mu_sig_b_length_40_mhz,
tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_radiotap_vht_mu_mcs_40_mhz,
tvb, offset, 4, ENC_LITTLE_ENDIAN);
break;
case VHT_BW_80_MHZ:
case VHT_BW_160_MHZ:
proto_tree_add_item(tree, hf_radiotap_vht_mu_sig_b_length_80_160_mhz,
tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_radiotap_vht_mu_mcs_80_160_mhz,
tvb, offset, 4, ENC_LITTLE_ENDIAN);
break;
}
}
offset += 4;
return offset;
}
static void
wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree *tap_tree, uint16_t vw_msdu_length)
{
proto_tree *ft, *flags_tree = NULL;
int align_offset, offset;
tvbuff_t *next_tvb;
unsigned length;
int8_t dbm;
uint8_t rate_mcs_index = 0;
uint8_t plcp_type;
uint8_t vht_ndp_flag, vht_mu_mimo_flg;
float phyRate;
proto_tree *vweft, *vw_errorFlags_tree = NULL;
uint16_t vw_info, vw_chanflags, vw_flags, vw_ht_length, vw_rflags;
uint32_t vw_errors;
uint8_t vht_user_pos;
ifg_info *p_ifg_info;
proto_item *ti;
bool short_preamble;
uint8_t nss;
struct ieee_802_11_phdr phdr;
/* We don't have any 802.11 metadata yet. */
memset(&phdr, 0, sizeof(phdr));
phdr.fcs_len = -1;
phdr.decrypted = false;
phdr.datapad = false;
phdr.phy = PHDR_802_11_PHY_UNKNOWN;
//Command type Rx = 0, Tx = 1, RF = 3, RF_RX = 4
//log mode = 0 is normal capture and 1 is reduced capture
/* Pre-OCTO. */
/* First add the IFG information, need to grab the info bit field here */
vw_info = tvb_get_letohs(tvb, 20);
p_ifg_info = (struct ifg_info *) p_get_proto_data(wmem_file_scope(), pinfo, proto_ixveriwave, 0);
if ((vw_info & INFO_MPDU_OF_A_MPDU) && !(vw_info & INFO_FIRST_MPDU_OF_A_MPDU)) /* If the packet is part of an A-MPDU but not the first MPDU */
ti = proto_tree_add_uint(tap_tree, hf_ixveriwave_vw_ifg, tvb, 18, 0, 0);
else
ti = proto_tree_add_uint(tap_tree, hf_ixveriwave_vw_ifg, tvb, 18, 0, p_ifg_info->ifg);
proto_item_set_generated(ti);
offset = 0;
/* header length */
length = tvb_get_letohs(tvb, offset);
offset += 2;
/* rflags */
vw_rflags = tvb_get_letohs(tvb, offset);
phdr.fcs_len = 0;
ft = proto_tree_add_item(tap_tree, hf_radiotap_flags, tvb, offset, 2, ENC_LITTLE_ENDIAN);
flags_tree = proto_item_add_subtree(ft, ett_radiotap_flags);
proto_tree_add_item_ret_boolean(flags_tree, hf_radiotap_flags_preamble, tvb, offset, 2, ENC_LITTLE_ENDIAN, &short_preamble);
proto_tree_add_item(flags_tree, hf_radiotap_flags_wep, tvb, offset, 2, ENC_LITTLE_ENDIAN);
if ( vw_rflags & FLAGS_CHAN_HT ) {
proto_tree_add_item(flags_tree, hf_radiotap_flags_ht, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(flags_tree, hf_radiotap_flags_40mhz, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(flags_tree, hf_radiotap_flags_short_gi, tvb, offset, 2, ENC_LITTLE_ENDIAN);
}
if ( vw_rflags & FLAGS_CHAN_VHT ) {
proto_tree_add_item(flags_tree, hf_radiotap_flags_vht, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(flags_tree, hf_radiotap_flags_short_gi, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(flags_tree, hf_radiotap_flags_40mhz, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(flags_tree, hf_radiotap_flags_80mhz, tvb, offset, 2, ENC_LITTLE_ENDIAN);
}
offset += 2;
/* channel flags */
vw_chanflags = tvb_get_letohs(tvb, offset);
offset += 2;
/* PHY rate */
phyRate = (float)tvb_get_letohs(tvb, offset) / 10;
offset += 2;
/* PLCP type */
plcp_type = tvb_get_uint8(tvb,offset) & 0x03;
vht_ndp_flag = tvb_get_uint8(tvb,offset) & 0x80;
offset++;
/* Rate/MCS index */
rate_mcs_index = tvb_get_uint8(tvb, offset);
offset++;
/* number of spatial streams */
nss = tvb_get_uint8(tvb, offset);
offset++;
if ((vw_rflags & FLAGS_CHAN_HT) || (vw_rflags & FLAGS_CHAN_VHT)) {
if (vw_rflags & FLAGS_CHAN_VHT) {
phdr.phy = PHDR_802_11_PHY_11AC;
phdr.phy_info.info_11ac.has_short_gi = true;
phdr.phy_info.info_11ac.short_gi = ((vw_rflags & FLAGS_CHAN_SHORTGI) != 0);
/*
* XXX - this probably has only one user, so only one MCS index
* and only one NSS.
*/
phdr.phy_info.info_11ac.nss[0] = nss;
phdr.phy_info.info_11ac.mcs[0] = rate_mcs_index;
} else {
/*
* XXX - where's the number of extension spatial streams?
* The code in wiretap/vwr.c doesn't seem to provide it.
* It could dig it out of the HT PLCP header in HT-SIG.
*/
phdr.phy = PHDR_802_11_PHY_11N;
phdr.phy_info.info_11n.has_mcs_index = true;
phdr.phy_info.info_11n.mcs_index = rate_mcs_index;
phdr.phy_info.info_11n.has_short_gi = true;
phdr.phy_info.info_11n.short_gi = ((vw_rflags & FLAGS_CHAN_SHORTGI) != 0);
phdr.phy_info.info_11n.has_greenfield = true;
phdr.phy_info.info_11n.greenfield = (plcp_type == PLCP_TYPE_GREENFIELD);
}
proto_tree_add_item(tap_tree, hf_radiotap_mcsindex,
tvb, offset - 2, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tap_tree, hf_radiotap_nss,
tvb, offset - 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_uint_format_value(tap_tree, hf_radiotap_datarate,
tvb, offset - 5, 2, tvb_get_letohs(tvb, offset-5),
"%.1f (MCS %d)", phyRate, rate_mcs_index);
} else {
/*
* XXX - CHAN_OFDM could be 11a or 11g. Unfortunately, we don't
* have the frequency, or anything else, to distinguish between
* them.
*/
if (vw_chanflags & CHAN_CCK) {
phdr.phy = PHDR_802_11_PHY_11B;
phdr.phy_info.info_11b.has_short_preamble = true;
phdr.phy_info.info_11b.short_preamble = short_preamble;
}
phdr.has_data_rate = true;
phdr.data_rate = tvb_get_letohs(tvb, offset-5) / 5;
proto_tree_add_uint_format_value(tap_tree, hf_radiotap_datarate,
tvb, offset - 5, 2, tvb_get_letohs(tvb, offset-5),
"%.1f Mb/s", phyRate);
}
col_add_fstr(pinfo->cinfo, COL_TX_RATE, "%.1f", phyRate);
/* RSSI/antenna A RSSI */
dbm = tvb_get_int8(tvb, offset);
phdr.has_signal_dbm = true;
phdr.signal_dbm = dbm;
col_add_fstr(pinfo->cinfo, COL_RSSI, "%d dBm", dbm);
proto_tree_add_item(tap_tree, hf_radiotap_dbm_anta, tvb, offset, 1, ENC_NA);
offset++;
/* Antenna B RSSI, or 100 if absent */
dbm = tvb_get_int8(tvb, offset);
if (dbm != 100) {
proto_tree_add_item(tap_tree, hf_radiotap_dbm_antb, tvb, offset, 1, ENC_NA);
}
offset++;
/* Antenna C RSSI, or 100 if absent */
dbm = tvb_get_int8(tvb, offset);
if (dbm != 100) {
proto_tree_add_item(tap_tree, hf_radiotap_dbm_antc, tvb, offset, 1, ENC_NA);
}
offset++;
/* Antenna D RSSI, or 100 if absent */
dbm = tvb_get_int8(tvb, offset);
if (dbm != 100) {
proto_tree_add_item(tap_tree, hf_radiotap_dbm_antd, tvb, offset, 1, ENC_NA);
}
offset+=2; /* also skips padding octet */
/* VeriWave flags */
vw_flags = tvb_get_letohs(tvb, offset);
if ((vw_rflags & FLAGS_CHAN_HT) || (vw_rflags & FLAGS_CHAN_VHT)) {
if (plcp_type == PLCP_TYPE_VHT_MIXED) {
if (!(vw_flags & VW_RADIOTAPF_TXF) && (vht_ndp_flag == 0x80)) {
/*** VHT-NDP rx frame and ndp_flag is set***/
proto_tree_add_uint(tap_tree, hf_radiotap_plcptype,
tvb, offset-3, 1, plcp_type);
} else {
/*** VHT-NDP transmitted frame ***/
if (vw_msdu_length == 4) { /*** Transmit frame and msdu_length = 4***/
proto_tree_add_uint(tap_tree, hf_radiotap_plcptype,
tvb, offset-3, 1, plcp_type);
}
}
}
}
proto_tree_add_item(tap_tree, hf_radiotap_vwf_txf, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tap_tree, hf_radiotap_vwf_fcserr, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tap_tree, hf_radiotap_vwf_dcrerr, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tap_tree, hf_radiotap_vwf_retrerr, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tap_tree, hf_radiotap_vwf_enctype, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
/* XXX - this should do nothing */
align_offset = ALIGN_OFFSET(offset, 2);
offset += align_offset;
/* HT length */
vw_ht_length = tvb_get_letohs(tvb, offset);
if ((vw_ht_length != 0)) {
proto_tree_add_uint_format_value(tap_tree, hf_radiotap_vw_ht_length,
tvb, offset, 2, vw_ht_length, "%u (includes the sum of the pieces of the aggregate and their respective Start_Spacing + Delimiter + MPDU + Padding)",
vw_ht_length);
#if 0
if (plcp_type == PLCP_TYPE_VHT_MIXED)
{
proto_tree_add_uint_format(tap_tree, hf_radiotap_vw_ht_length,
tvb, offset, 2, vw_ht_length, "VHT length: %u (includes the sum of the pieces of the aggregate and their respective Start_Spacing + Delimiter + MPDU + Padding)",
vw_ht_length);
}
else
{
proto_tree_add_uint_format(tap_tree, hf_radiotap_vw_ht_length,
tvb, offset, 2, vw_ht_length, "HT length: %u (includes the sum of the pieces of the aggregate and their respective Start_Spacing + Delimiter + MPDU + Padding)",
vw_ht_length);
}
#endif
}
offset += 2;
align_offset = ALIGN_OFFSET(offset, 2);
offset += align_offset;
/* info */
if (!(vw_flags & VW_RADIOTAPF_TXF)) { /* then it's an rx case */
/*FPGA_VER_vVW510021 version decodes */
static int * const vw_info_rx_2_flags[] = {
&hf_radiotap_vw_info_2_ack_withheld_from_frame,
&hf_radiotap_vw_info_2_sent_cts_to_self_before_data,
&hf_radiotap_vw_info_2_mpdu_of_a_mpdu,
&hf_radiotap_vw_info_2_first_mpdu_of_a_mpdu,
&hf_radiotap_vw_info_2_last_pdu_of_a_mpdu,
&hf_radiotap_vw_info_2_msdu_of_a_msdu,
&hf_radiotap_vw_info_2_first_msdu_of_a_msdu,
&hf_radiotap_vw_info_2_last_msdu_of_a_msdu,
NULL
};
proto_tree_add_bitmask(tap_tree, tvb, offset, hf_radiotap_vw_info, ett_radiotap_info, vw_info_rx_2_flags, ENC_LITTLE_ENDIAN);
} else { /* it's a tx case */
static int * const vw_info_tx_2_flags[] = {
&hf_radiotap_vw_info_2_mpdu_of_a_mpdu,
&hf_radiotap_vw_info_2_first_mpdu_of_a_mpdu,
&hf_radiotap_vw_info_2_last_pdu_of_a_mpdu,
&hf_radiotap_vw_info_2_msdu_of_a_msdu,
&hf_radiotap_vw_info_2_first_msdu_of_a_msdu,
&hf_radiotap_vw_info_2_last_msdu_of_a_msdu,
NULL
};
/* FPGA_VER_vVW510021 and VW_FPGA_VER_vVW510006 tx info decodes same*/
proto_tree_add_bitmask(tap_tree, tvb, offset, hf_radiotap_vw_info, ett_radiotap_info, vw_info_tx_2_flags, ENC_LITTLE_ENDIAN);
}
offset += 2;
/* errors */
vw_errors = tvb_get_letohl(tvb, offset);
vweft = proto_tree_add_uint(tap_tree, hf_radiotap_vw_errors,
tvb, offset, 4, vw_errors);
vw_errorFlags_tree = proto_item_add_subtree(vweft, ett_radiotap_errors);
/* build the individual subtrees for the various types of error flags */
/* NOTE: as the upper 16 bits aren't used at the moment, we pretend that */
/* the error flags field is only 16 bits (instead of 32) to save space */
if (!(vw_flags & VW_RADIOTAPF_TXF)) {
/* then it's an rx case */
/*FPGA_VER_vVW510021 version decodes */
proto_tree_add_item(vw_errorFlags_tree,
hf_radiotap_vw_errors_rx_2_crc16_or_parity_error, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(vw_errorFlags_tree,
hf_radiotap_vw_errors_rx_2_non_supported_rate_or_service_field, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(vw_errorFlags_tree,
hf_radiotap_vw_errors_rx_2_short_frame, tvb, offset, 2, ENC_LITTLE_ENDIAN);
/* veriwave removed 8-2007, don't display reserved bit*/
proto_tree_add_item(vw_errorFlags_tree,
hf_radiotap_vw_errors_rx_2_fcs_error, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(vw_errorFlags_tree,
hf_radiotap_vw_errors_rx_2_l2_de_aggregation_error, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(vw_errorFlags_tree,
hf_radiotap_vw_errors_rx_2_duplicate_mpdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(vw_errorFlags_tree,
hf_radiotap_vw_errors_rx_2_bad_flow_magic_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(vw_errorFlags_tree,
hf_radiotap_vw_errors_rx_2_flow_payload_checksum_error, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(vw_errorFlags_tree,
hf_radiotap_vw_errors_rx_2_ip_checksum_error, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(vw_errorFlags_tree,
hf_radiotap_vw_errors_rx_2_l4_checksum_error, tvb, offset, 2, ENC_LITTLE_ENDIAN);
} else { /* it's a tx case */
/* FPGA_VER_vVW510021 and VW_FPGA_VER_vVW510006 tx error decodes same*/
proto_tree_add_item(vw_errorFlags_tree,
hf_radiotap_vw_errors_tx_packet_fcs_error, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(vw_errorFlags_tree,
hf_radiotap_vw_errors_tx_ip_checksum_error, tvb, offset, 2, ENC_LITTLE_ENDIAN);
}
offset += 4;
/*** POPULATE THE AMSDU VHT MIXED MODE CONTAINER FORMAT ***/
/* XXX - what about other modes? PLCP here? */
if ((vw_rflags & FLAGS_CHAN_VHT) && vw_ht_length != 0)
{
if (plcp_type == PLCP_TYPE_VHT_MIXED) //If the frame is VHT type
{
offset += 4; /*** 4 bytes of ERROR ***/
/*** Extract SU/MU MIMO flag from RX L1 Info ***/
vht_user_pos = tvb_get_uint8(tvb, offset);
vht_mu_mimo_flg = (vht_user_pos & 0x08) >> 3;
if (vht_mu_mimo_flg == 1) {
proto_tree_add_item(tap_tree, hf_radiotap_vht_mu_mimo_flg, tvb, offset, 1, ENC_NA);
/*** extract user Position in case of mu-mimo ***/
proto_tree_add_item(tap_tree, hf_radiotap_vht_user_pos, tvb, offset, 1, ENC_NA);
} else {
proto_tree_add_item(tap_tree, hf_radiotap_vht_su_mimo_flg, tvb, offset, 1, ENC_NA);
}
offset += 1; /*** skip the RX L1 Info byte ****/
/* L-SIG */
offset = decode_ofdm_signal(tap_tree, tvb, offset);
/* VHT-SIG */
/* XXX - does this include VHT-SIG-B? */
decode_vht_sig(tap_tree, tvb, offset, &phdr);
}
}
/* Grab the rest of the frame. */
if (plcp_type == PLCP_TYPE_VHT_MIXED) {
length = length + 17; /*** 16 bytes of PLCP + 1 byte of L1InfoC(UserPos) **/
}
next_tvb = tvb_new_subset_remaining(tvb, length);
/* dissect the 802.11 radio information and header next */
call_dissector_with_data(ieee80211_radio_handle, next_tvb, pinfo, tree, &phdr);
}
static void
wlantap_dissect_octo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree *tap_tree, uint8_t cmd_type, int log_mode)
{
int offset;
tvbuff_t *next_tvb;
unsigned length;
int8_t dbm;
uint8_t rate_mcs_index = 0, vw_bssid;
uint8_t plcp_type;
uint8_t vht_ndp_flag, vht_mu_mimo_flg;
float phyRate;
proto_tree *vwict, *vw_infoC_tree = NULL;
uint16_t vw_vcid, mpdu_length;
uint32_t vw_seqnum;
uint32_t vht_user_pos;
uint8_t plcp_default;
proto_item *vwl1i;
proto_tree *vw_l1info_tree = NULL, *vwl2l4t,*vw_l2l4info_tree = NULL, *vwplt,*vw_plcpinfo_tree = NULL;
bool direction, short_preamble;
uint8_t nss, sigbw, cidv, bssidv, flowv, l4idv;
struct ieee_802_11_phdr phdr;
/* We don't have any 802.11 metadata yet. */
memset(&phdr, 0, sizeof(phdr));
phdr.fcs_len = -1;
phdr.decrypted = false;
phdr.datapad = false;
phdr.phy = PHDR_802_11_PHY_UNKNOWN;
//Command type Rx = 0, Tx = 1, RF = 3, RF_RX = 4
//log mode = 0 is normal capture and 1 is reduced capture
/*
* FPGA version is non-zero, meaning this is OCTO.
* The first part is a timestamp header.
*/
//RadioTapHeader New format for L1Info
offset = 0;
length = tvb_get_letohs(tvb, offset);
offset += 2;
vwl1i = proto_tree_add_item(tap_tree, hf_radiotap_l1info, tvb, offset, 12, ENC_NA);
vw_l1info_tree = proto_item_add_subtree(vwl1i, ett_radiotap_layer1);
plcp_type = tvb_get_uint8(tvb, offset+4) & 0x0f;
/* l1p_1 byte */
switch (plcp_type)
{
case PLCP_TYPE_LEGACY: /* Legacy (pre-HT - 11b/11a/11g) */
/*
* XXX - CHAN_OFDM could be 11a or 11g. Unfortunately, we don't
* have the frequency, or anything else, to distinguish between
* them.
*/
short_preamble = !(tvb_get_uint8(tvb, offset) & 0x40);
proto_tree_add_boolean(vw_l1info_tree, hf_radiotap_l1info_preamble,
tvb, offset, 1, short_preamble);
rate_mcs_index = tvb_get_uint8(tvb, offset) & 0x3f;
proto_tree_add_uint(vw_l1info_tree, hf_radiotap_l1info_rateindex,
tvb, offset, 1, rate_mcs_index);
if (rate_mcs_index < 4)
{
/* CCK */
phdr.phy = PHDR_802_11_PHY_11B;
phdr.phy_info.info_11b.has_short_preamble = true;
phdr.phy_info.info_11b.short_preamble = short_preamble;
}
break;
case PLCP_TYPE_MIXED: /* HT Mixed */
case PLCP_TYPE_GREENFIELD: /* HT Greenfield */
rate_mcs_index = tvb_get_uint8(tvb, offset) & 0x3f;
proto_tree_add_uint(vw_l1info_tree, hf_radiotap_l1info_ht_mcsindex,
tvb, offset, 1, rate_mcs_index);
phdr.phy = PHDR_802_11_PHY_11N;
phdr.phy_info.info_11n.has_mcs_index = true;
phdr.phy_info.info_11n.mcs_index = rate_mcs_index;
phdr.phy_info.info_11n.has_greenfield = true;
phdr.phy_info.info_11n.greenfield = (plcp_type == PLCP_TYPE_GREENFIELD);
break;
case PLCP_TYPE_VHT_MIXED: /* VHT Mixed */
rate_mcs_index = tvb_get_uint8(tvb, offset) & 0x0f;
proto_tree_add_uint(vw_l1info_tree, hf_radiotap_l1info_vht_mcsindex,
tvb, offset, 1, rate_mcs_index);
phdr.phy = PHDR_802_11_PHY_11AC;
/*
* XXX - this probably has only one user, so only one MCS index.
*/
phdr.phy_info.info_11ac.mcs[0] = rate_mcs_index;
}
offset++;
/* NSS and direction octet */
switch (plcp_type)
{
case PLCP_TYPE_LEGACY: /* Legacy (pre-HT - 11b/11a/11g) */
break;
case PLCP_TYPE_MIXED: /* HT Mixed */
case PLCP_TYPE_GREENFIELD: /* HT Greenfield (Not supported) */
nss = (tvb_get_uint8(tvb, offset) & 0xf0) >> 4;
proto_tree_add_uint(vw_l1info_tree, hf_radiotap_l1info_nss,
tvb, offset, 1, nss);
break;
case PLCP_TYPE_VHT_MIXED: /* VHT Mixed */
nss = (tvb_get_uint8(tvb, offset) & 0xf0) >> 4;
proto_tree_add_uint(vw_l1info_tree, hf_radiotap_l1info_nss,
tvb, offset, 1, nss);
/*
* XXX - this probably has only one user, so only one NSS.
*/
phdr.phy_info.info_11ac.nss[0] = nss;
break;
}
direction = ((tvb_get_uint8(tvb, offset) & 0x01) != 0);
proto_tree_add_boolean(vw_l1info_tree, hf_radiotap_l1info_transmitted,
tvb, offset, 1, direction);
proto_item_append_text(vwl1i, " (Direction=%s)",
direction ? "Transmit" : "Receive");
offset++;
/* New pieces of lines for
* #802.11 radio information#
* Referred from code changes done for old FPGA version
* **/
phdr.fcs_len = (log_mode == 3) ? 0 : 4;
switch (plcp_type)
{
case PLCP_TYPE_LEGACY: /* Legacy (pre-HT - 11b/11a/11g) */
phdr.has_data_rate = true;
phdr.data_rate = tvb_get_letohs(tvb, offset) / 5;
break;
case PLCP_TYPE_MIXED: /* HT Mixed */
case PLCP_TYPE_GREENFIELD: /* HT Greenfield (Not supported) */
case PLCP_TYPE_VHT_MIXED: /* VHT Mixed */
break;
}
phyRate = (float)tvb_get_letohs(tvb, offset) / 10;
proto_tree_add_uint_format_value(vw_l1info_tree, hf_radiotap_datarate,
tvb, offset, 2, tvb_get_letohs(tvb, offset),
"%.1f Mb/s", phyRate);
offset = offset + 2;
col_add_fstr(pinfo->cinfo, COL_TX_RATE, "%.1f", phyRate);
sigbw = (tvb_get_uint8(tvb, offset) & 0xf0) >> 4;
plcp_type = tvb_get_uint8(tvb, offset) & 0x0f;
proto_tree_add_uint(vw_l1info_tree,
hf_radiotap_sigbandwidth, tvb, offset, 1, sigbw);
if (plcp_type != PLCP_TYPE_LEGACY)
{
/* HT or VHT */
proto_tree_add_uint(vw_l1info_tree,
hf_radiotap_modulation, tvb, offset, 1, plcp_type);
}
else
{
/* pre-HT */
if (rate_mcs_index < 4)
proto_tree_add_uint_format_value(vw_l1info_tree, hf_radiotap_modulation,
tvb, offset, 1, plcp_type, "CCK (%u)", plcp_type);
else
proto_tree_add_uint_format_value(vw_l1info_tree, hf_radiotap_modulation,
tvb, offset, 1, plcp_type, "OFDM (%u)", plcp_type);
}
offset++;
dbm = tvb_get_int8(tvb, offset);
phdr.has_signal_dbm = true;
phdr.signal_dbm = dbm;
col_add_fstr(pinfo->cinfo, COL_RSSI, "%d dBm", dbm);
if (cmd_type != 1)
proto_tree_add_item(vw_l1info_tree, hf_radiotap_dbm_anta,
tvb, offset, 1, ENC_NA);
else
proto_tree_add_item(vw_l1info_tree, hf_radiotap_dbm_tx_anta,
tvb, offset, 1, ENC_NA);
offset++;
dbm = tvb_get_int8(tvb, offset);
if (dbm != 100) {
if (cmd_type != 1)
proto_tree_add_item(vw_l1info_tree, hf_radiotap_dbm_antb,
tvb, offset, 1, ENC_NA);
else
proto_tree_add_item(vw_l1info_tree,
hf_radiotap_dbm_tx_antb,
tvb, offset, 1, ENC_NA);
}
offset++;
dbm = tvb_get_int8(tvb, offset);
if (dbm != 100) {
if (cmd_type != 1)
proto_tree_add_item(vw_l1info_tree, hf_radiotap_dbm_antc,
tvb, offset, 1, ENC_NA);
else
proto_tree_add_item(vw_l1info_tree, hf_radiotap_dbm_tx_antc,
tvb, offset, 1, ENC_NA);
}
offset++;
dbm = tvb_get_int8(tvb, offset);
if (dbm != 100) {
if (cmd_type != 1)
proto_tree_add_item(vw_l1info_tree, hf_radiotap_dbm_antd,
tvb, offset, 1, ENC_NA);
else
proto_tree_add_item(vw_l1info_tree,
hf_radiotap_dbm_tx_antd,
tvb, offset, 1, ENC_NA);
}
offset++;
proto_tree_add_item(vw_l1info_tree, hf_radiotap_sigbandwidthmask, tvb, offset, 1, ENC_NA);
offset++;
if (cmd_type != 1)
{
proto_tree_add_item(vw_l1info_tree, hf_radiotap_antennaportenergydetect, tvb, offset, 1, ENC_NA);
}
else
{
proto_tree_add_item(vw_l1info_tree, hf_radiotap_tx_antennaselect, tvb, offset, 1, ENC_NA);
proto_tree_add_item(vw_l1info_tree, hf_radiotap_tx_stbcselect, tvb, offset, 1, ENC_NA);
}
if (plcp_type == PLCP_TYPE_VHT_MIXED)
{
proto_tree_add_item(vw_l1info_tree, hf_radiotap_mumask, tvb, offset, 1, ENC_NA);
}
offset++;
if (plcp_type == PLCP_TYPE_VHT_MIXED)
{
// Extract SU/MU MIMO flag from RX L1 Info
vht_user_pos = tvb_get_uint8(tvb, offset);
vwict = proto_tree_add_item(vw_l1info_tree,
hf_radiotap_l1infoc, tvb, offset, 1, ENC_NA);
vw_infoC_tree = proto_item_add_subtree(vwict, ett_radiotap_infoc);
vht_ndp_flag = (vht_user_pos & 0x80) >> 7;
vht_mu_mimo_flg = (vht_user_pos & 0x08) >> 3;
proto_tree_add_item(vw_infoC_tree, hf_radiotap_vht_ndp_flg, tvb, offset, 1, ENC_NA);
if (vht_ndp_flag == 0)
{
if (vht_mu_mimo_flg == 1) {
proto_tree_add_uint(vw_infoC_tree, hf_radiotap_vht_mu_mimo_flg,
tvb, offset, 1, vht_mu_mimo_flg);
// extract user Position in case of mu-mimo
proto_tree_add_item(vw_infoC_tree, hf_radiotap_vht_user_pos, tvb, offset, 1, ENC_NA);
} else {
proto_tree_add_item(vw_infoC_tree, hf_radiotap_vht_su_mimo_flg, tvb, offset, 1, ENC_NA);
}
}
}
offset++;
mpdu_length = tvb_get_letohs(tvb, offset);
if (cmd_type != 1) //Checking for Rx and Tx
{
proto_tree_add_item(vw_l1info_tree, hf_ixveriwave_frame_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
}
offset += 2;
//RadioTapHeader New format for PLCP section
//vw_plcp_info = tvb_get_uint8(tvb, offset);
vwplt = proto_tree_add_item(tap_tree, hf_radiotap_plcp_info, tvb, offset, 16, ENC_NA);
vw_plcpinfo_tree = proto_item_add_subtree(vwplt, ett_radiotap_plcp);
switch (plcp_type)
{
case PLCP_TYPE_LEGACY:
if (rate_mcs_index < 4)
{
/*
* From IEEE Std 802.11-2012:
*
* According to section 17.2.2 "PPDU format", the PLCP header
* for the High Rate DSSS PHY (11b) has a SIGNAL field that's
* 8 bits, followed by a SERVICE field that's 8 bits, followed
* by a LENGTH field that's 16 bits, followed by a CRC field
* that's 16 bits. The PSDU follows it. Section 17.2.3 "PPDU
* field definitions" describes those fields.
*
* According to section 19.3.2 "PPDU format", the frames for the
* Extended Rate PHY (11g) either extend the 11b format, using
* additional bits in the SERVICE field, or extend the 11a
* format.
*/
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_type,
tvb, offset-10, 1, plcp_type, "Format: Legacy CCK ");
proto_tree_add_item(vw_plcpinfo_tree, hf_radiotap_plcp_signal,
tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
proto_tree_add_item(vw_plcpinfo_tree, hf_radiotap_plcp_locked_clocks,
tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(vw_plcpinfo_tree, hf_radiotap_plcp_modulation,
tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(vw_plcpinfo_tree, hf_radiotap_plcp_length_extension,
tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
proto_tree_add_item(vw_plcpinfo_tree, hf_radiotap_plcp_length,
tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
proto_tree_add_item(vw_plcpinfo_tree, hf_radiotap_plcp_crc16,
tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
/* Presumably padding */
offset += 9;
}
else
{
/*
* From IEEE Std 802.11-2012:
*
* According to sections 18.3.2 "PLCP frame format" and 18.3.4
* "SIGNAL field", the PLCP for the OFDM PHY (11a) has a SIGNAL
* field that's 24 bits, followed by a service field that's
* 16 bits, followed by the PSDU. Section 18.3.5.2 "SERVICE
* field" describes the SERVICE field.
*
* According to section 19.3.2 "PPDU format", the frames for the
* Extended Rate PHY (11g) either extend the 11b format, using
* additional bits in the SERVICE field, or extend the 11a
* format.
*/
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_type, "Format: Legacy OFDM ");
/* SIGNAL */
offset = decode_ofdm_signal(vw_plcpinfo_tree, tvb, offset);
/* SERVICE */
proto_tree_add_item(vw_plcpinfo_tree, hf_radiotap_ofdm_service,
tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
/* Presumably just padding */
offset += 10;
}
break;
case PLCP_TYPE_MIXED:
/*
* From IEEE Std 802.11-2012:
*
* According to section 20.3.2 "PPDU format", the HT-mixed
* PLCP header has a "Non-HT SIGNAL field" (L-SIG), which
* looks like an 11a SIGNAL field, followed by an HT SIGNAL
* field (HT-SIG) described in section 20.3.9.4.3 "HT-SIG
* definition".
*/
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_type, "Format: HT ");
/* L-SIG */
offset = decode_ofdm_signal(vw_plcpinfo_tree, tvb, offset);
/* HT-SIG */
offset = decode_ht_sig(vw_plcpinfo_tree, tvb, offset, &phdr);
proto_tree_add_item(vw_plcpinfo_tree, hf_radiotap_ofdm_service,
tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
/* Are these 4 bytes significant, or are they just padding? */
offset += 4;
break;
case PLCP_TYPE_GREENFIELD:
/*
* From IEEE Std 802.11-2012:
*
* According to section 20.3.2 "PPDU format", the HT-greenfield
* PLCP header just has the HT SIGNAL field (HT-SIG) above, with
* no L-SIG field.
*/
/* HT-SIG */
offset = decode_ht_sig(vw_plcpinfo_tree, tvb, offset, &phdr);
/*
* XXX - does this follow the PLCP header for HT greenfield?
* It immediately follows the PLCP header for other PHYs.
*/
proto_tree_add_item(vw_plcpinfo_tree, hf_radiotap_ofdm_service,
tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
/*
* XXX - if so, is this padding, or significant?
*/
offset += 7;
break;
case PLCP_TYPE_VHT_MIXED:
/*
* According to section 22.3.2 "VHT PPDU format" of IEEE Std
* 802.11ac-2013, the VHT PLCP header has a "non-HT SIGNAL field"
* (L-SIG), which looks like an 11a SIGNAL field, followed by
* a VHT Signal A field (VHT-SIG-A) described in section
* 22.3.8.3.3 "VHT-SIG-A definition", with training fields
* between it and a VHT Signal B field (VHT-SIG-B) described
* in section 22.3.8.3.6 "VHT-SIG-B definition", followed by
* the PSDU.
*/
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_type, "Format: VHT ");
/* L-SIG */
offset = decode_ofdm_signal(vw_plcpinfo_tree, tvb, offset);
/* VHT-SIG */
offset = decode_vht_sig(vw_plcpinfo_tree, tvb, offset, &phdr);
break;
default:
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_type, "Format: Null ");
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP0: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP1: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP2: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP3: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP4: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP5: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP6: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP7: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP8: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP9: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP10: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP11: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP12: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP13: %u ", plcp_default);
offset = offset + 1;
plcp_default = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(vw_plcpinfo_tree, hf_radiotap_plcp_default,
tvb, offset, 1, plcp_default, "PLCP14: %u ", plcp_default);
offset = offset + 1;
}
proto_tree_add_item(vw_plcpinfo_tree, hf_radiotap_rfid,
tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
//RadioTapHeader New format for L2-L4_Info
vwl2l4t = proto_tree_add_item(tap_tree, hf_radiotap_l2_l4_info,
tvb, offset, 23, ENC_NA);
vw_l2l4info_tree = proto_item_add_subtree(vwl2l4t, ett_radiotap_layer2to4);
cidv = ((tvb_get_uint8(tvb, offset+3)& 0x20) >> 5);
bssidv = ((tvb_get_uint8(tvb, offset+3)& 0x40) >> 6);
if (cmd_type != 1)
{
vw_vcid = (tvb_get_letohs(tvb, offset)) &0x0fff;
if (cidv == 1)
{
proto_tree_add_uint(vw_l2l4info_tree, hf_ixveriwave_vw_vcid, tvb, offset, 2, vw_vcid);
}
else
{
proto_tree_add_uint_format_value(vw_l2l4info_tree, hf_ixveriwave_vw_vcid,
tvb, offset, 2, vw_vcid, "Invalid");
}
offset++;
vw_bssid = ((tvb_get_letohs(tvb, offset)) &0x0ff0)>>4;
if (bssidv == 1)
{
proto_tree_add_uint(vw_l2l4info_tree, hf_radiotap_bssid,
tvb, offset, 2, vw_bssid);
}
else
{
proto_tree_add_uint_format_value(vw_l2l4info_tree, hf_radiotap_bssid,
tvb, offset, 2, vw_bssid, "Invalid");
}
offset +=2;
proto_tree_add_item(vw_l2l4info_tree, hf_radiotap_clientidvalid, tvb, offset, 1, ENC_NA);
proto_tree_add_item(vw_l2l4info_tree, hf_radiotap_bssidvalid, tvb, offset, 1, ENC_NA);
proto_tree_add_item(vw_l2l4info_tree, hf_radiotap_unicastormulticast, tvb, offset, 1, ENC_NA);
offset++;
}
else
{
if (cidv == 1)
{
proto_tree_add_item(vw_l2l4info_tree, hf_ixveriwave_vw_vcid,
tvb, offset, 2, ENC_LITTLE_ENDIAN);
}
else
{
vw_vcid = tvb_get_letohs(tvb, offset);
proto_tree_add_uint_format_value(vw_l2l4info_tree, hf_ixveriwave_vw_vcid,
tvb, offset, 2, vw_vcid, "Invalid");
}
offset +=3;
proto_tree_add_item(vw_l2l4info_tree, hf_radiotap_clientidvalid, tvb, offset, 1, ENC_NA);
offset++;
}
/*
wlantype = tvb_get_uint8(tvb, offset)& 0x3f;
proto_tree_add_uint(vw_l2l4info_tree, hf_radiotap_wlantype,
tvb, offset, 1, wlantype);
*/
proto_tree_add_item(vw_l2l4info_tree, hf_radiotap_tid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset++;
if (cmd_type == 1)
{
proto_tree_add_item(vw_l2l4info_tree, hf_radiotap_ac, tvb, offset, 1, ENC_NA);
}
l4idv = (tvb_get_uint8(tvb, offset)& 0x10) >> 4;
proto_tree_add_item(vw_l2l4info_tree, hf_radiotap_l4idvalid, tvb, offset, 1, ENC_NA);
proto_tree_add_item(vw_l2l4info_tree, hf_radiotap_containshtfield, tvb, offset, 1, ENC_NA);
proto_tree_add_item(vw_l2l4info_tree, hf_radiotap_istypeqos, tvb, offset, 1, ENC_NA);
flowv = (tvb_get_uint8(tvb, offset)& 0x80) >> 7;
proto_tree_add_item(vw_l2l4info_tree, hf_radiotap_flowvalid, tvb, offset, 1, ENC_NA);
offset++;
proto_tree_add_item_ret_uint(vw_l2l4info_tree, hf_ixveriwave_vw_seqnum,
tvb, offset, 1, ENC_NA, &vw_seqnum);
offset++;
if (flowv == 1)
{
proto_tree_add_item(vw_l2l4info_tree, hf_ixveriwave_vw_flowid,
tvb, offset, 3, ENC_LITTLE_ENDIAN);
}
else
{
proto_tree_add_uint_format_value(vw_l2l4info_tree, hf_ixveriwave_vw_flowid,
tvb, offset, 2, tvb_get_letohl(tvb, offset) & 0xffffff, "Invalid");
}
offset +=3;
if (l4idv == 1)
{
proto_tree_add_item(vw_l2l4info_tree, hf_ixveriwave_vw_l4id,
tvb, offset, 2, ENC_LITTLE_ENDIAN);
}
else
{
proto_tree_add_uint_format_value(vw_l2l4info_tree, hf_ixveriwave_vw_l4id,
tvb, offset, 2, tvb_get_letohs(tvb, offset), "Invalid");
}
offset +=2;
proto_tree_add_item(vw_l2l4info_tree, hf_radiotap_payloaddecode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset +=4;
if (cmd_type != 1) { /* then it's an rx case */
/*FPGA_VER_vVW510021 version decodes */
proto_tree_add_bitmask(vw_l2l4info_tree, tvb, offset, hf_radiotap_vw_info_rx, ett_radiotap_info, radiotap_info_rx_fields, ENC_LITTLE_ENDIAN);
} else { /* it's a tx case */
/* FPGA_VER_vVW510021 and VW_FPGA_VER_vVW510006 tx info decodes same*/
proto_tree_add_bitmask(vw_l2l4info_tree, tvb, offset, hf_radiotap_vw_info_tx, ett_radiotap_info, radiotap_info_tx_fields, ENC_LITTLE_ENDIAN);
}
offset +=3;
/* build the individual subtrees for the various types of error flags */
/* NOTE: as the upper 16 bits aren't used at the moment, we pretend that */
/* the error flags field is only 16 bits (instead of 32) to save space */
if (cmd_type != 1) {
/* then it's an rx case */
static int * const vw_errors_rx_flags[] = {
&hf_radiotap_vw_errors_rx_sig_field_crc_parity_error,
&hf_radiotap_vw_errors_rx_non_supported_service_field,
&hf_radiotap_vw_errors_rx_frame_length_error,
&hf_radiotap_vw_errors_rx_vht_sig_ab_crc_error,
&hf_radiotap_vw_errors_rx_crc32_error,
&hf_radiotap_vw_errors_rx_l2_de_aggregation_error,
&hf_radiotap_vw_errors_rx_duplicate_mpdu,
&hf_radiotap_vw_errors_rx_bad_flow_magic_number,
&hf_radiotap_vw_errors_rx_bad_flow_payload_checksum,
&hf_radiotap_vw_errors_rx_illegal_vht_sig_value,
&hf_radiotap_vw_errors_rx_ip_checksum_error,
&hf_radiotap_vw_errors_rx_l4_checksum_error,
&hf_radiotap_vw_errors_rx_l1_unsupported_feature,
&hf_radiotap_vw_errors_rx_l1_packet_termination,
&hf_radiotap_vw_errors_rx_internal_error_bit15,
&hf_radiotap_vw_errors_rx_wep_mic_miscompare,
&hf_radiotap_vw_errors_rx_wep_tkip_rate_exceeded,
&hf_radiotap_vw_errors_rx_crypto_short_error,
&hf_radiotap_vw_errors_rx_extiv_fault_a,
&hf_radiotap_vw_errors_rx_extiv_fault_b,
&hf_radiotap_vw_errors_rx_internal_error_bit21,
&hf_radiotap_vw_errors_rx_protected_fault_a,
&hf_radiotap_vw_errors_rx_rx_mac_crypto_incompatibility,
&hf_radiotap_vw_errors_rx_factory_debug,
&hf_radiotap_vw_errors_rx_internal_error_bit32,
NULL
};
proto_tree_add_bitmask(vw_l2l4info_tree, tvb, offset, hf_radiotap_vw_errors, ett_radiotap_errors, vw_errors_rx_flags, ENC_LITTLE_ENDIAN);
} else { /* it's a tx case */
static int * const vw_errors_tx_flags[] = {
&hf_radiotap_vw_errors_tx_2_crc32_error,
&hf_radiotap_vw_errors_tx_2_ip_checksum_error,
&hf_radiotap_vw_errors_tx_2_ack_timeout,
&hf_radiotap_vw_errors_tx_2_cts_timeout,
&hf_radiotap_vw_errors_tx_2_last_retry_attempt,
&hf_radiotap_vw_errors_tx_2_internal_error,
NULL
};
/* FPGA_VER_vVW510021 and VW_FPGA_VER_vVW510006 tx error decodes same*/
proto_tree_add_bitmask(vw_l2l4info_tree, tvb, offset, hf_radiotap_vw_errors, ett_radiotap_errors, vw_errors_tx_flags, ENC_LITTLE_ENDIAN);
// proto_tree_add_item(vw_l2l4info_tree, hf_ixveriwave_vw_seqnum,
// tvb, offset, 1, vw_seqnum);
//offset++;
proto_tree_add_item(vw_l2l4info_tree, hf_radiotap_vw_tx_retrycount, tvb, offset+2, 1, ENC_NA);
proto_tree_add_item(vw_l2l4info_tree, hf_radiotap_vw_tx_factorydebug, tvb, offset+2, 2, ENC_LITTLE_ENDIAN);
}
/*offset +=4;*/
if (vwl2l4t && log_mode)
proto_item_append_text(vwl2l4t, " (Reduced)");
if (cmd_type != 4)
proto_item_set_len(tap_tree, length + OCTO_TIMESTAMP_FIELDS_LEN);
else
proto_item_set_len(tap_tree, length + OCTO_TIMESTAMP_FIELDS_LEN + OCTO_MODIFIED_RF_LEN);
if (mpdu_length != 0) {
/* There's data to dissect; grab the rest of the frame. */
next_tvb = tvb_new_subset_remaining(tvb, length);
/* dissect the 802.11 radio information and header next */
call_dissector_with_data(ieee80211_radio_handle, next_tvb, pinfo, tree, &phdr);
}
}
void proto_register_ixveriwave(void)
{
/* true_false_strings for TX/RX and FCS error flags */
static const true_false_string tfs_tx_rx_type = { "Transmitted", "Received" };
static const true_false_string tfs_fcserr_type = { "Incorrect", "Correct" };
static const true_false_string tfs_preamble_type = { "Short", "Long", };
/* true_false_string for decrypt error flag */
static const true_false_string tfs_decrypterr_type = { "Decrypt Failed", "Decrypt Succeeded" };
/* true_false_string for excess retry error flag */
static const true_false_string tfs_retryerr_type = {"Excess retry abort", "Retry limit not reached" };
static const true_false_string tfs_legacy_type = {"802.11b LEGACY CCK", "LEGACY OFDM"};
static const value_string signal_vals[] = {
{ 0x0a, "1 Mb/s" },
{ 0x14, "2 MB/s" },
{ 0x37, "5.5 Mb/s" },
{ 0x6e, "11 Mb/s" },
{ 0xdc, "22 Mb/s" },
{ 0x1e, "DSSS-OFDM" },
{ 0, NULL }
};
static const value_string modulation_vals[] = {
{ 0, "CCK" },
{ 1, "PBCC" },
{ 0, NULL }
};
static const value_string fec_encoding_vals[] = {
{ 0, "BCC" },
{ 1, "LDPC" },
{ 0, NULL },
};
static const value_string modulation_type[] = {
{ 0, "LEGACY" },
{ 1, "HT" },
{ 2, "HT-Greenfield" },
{ 3, "VHT" },
{ 0, NULL },
};
static const value_string sbw_type[] = {
{ 0, "5 MHz" },
{ 1, "10 MHz" },
{ 2, "20 MHz" },
{ 3, "40 MHz" },
{ 4, "80 MHz" },
{ 5, "reserved" },
{ 6, "reserved" },
{ 7, "reserved" },
{ 0, NULL },
};
#if 0
static const value_string mcs[] = {
{ 0, "DBPSK" },
{ 1, "DQPSK" },
{ 2, "CCK (4bits)" },
{ 3, "CCK (8bits)" },
{ 4, "BPSK (1/2)" },
{ 5, "BPSK (3/4)" },
{ 6, "QPSK (1/2)" },
{ 7, "QPSK (3/4)" },
{ 8, "16-QAM (1/2)" },
{ 9, "16-QAM (3/4)" },
{ 10, "64-QAM (1/2)" },
{ 11, "64-QAM (3/4)" },
{ 0, NULL },
};
#endif
/* Added value_string for encryption type field */
static const value_string encrypt_type[] = {
{ 0, "No encryption" },
{ 1, "WEP encryption" },
{ 2, "TKIP encryption" },
{ 3, "AES-CCMP encryption" },
{ 0, NULL },
};
static const value_string bmbit[] = {
{0, "Unicast"},
{1, "Multicast"},
{ 0, NULL },
};
static const value_string sbw_evm[] = {
{ VHT_BW_20_MHZ, "20 MHz" },
{ VHT_BW_40_MHZ, "40 MHz" },
{ VHT_BW_80_MHZ, "80 MHz" },
{ VHT_BW_160_MHZ, "160 MHz" },
{ 0, NULL },
};
static const value_string frameformat_type[] = {
{ 0x0, "LEGACY" },
{ 0x1, "HT" },
{ 0x3, "VHT" },
{ 0, NULL },
};
static const value_string crypto_TKIP_type[] = {
{ 0x0, "False" },
{ 0x1, "TKIP Encapped" },
{ 0x2, "CCMP Encapped" },
{ 0x3, "BIP Encapped" },
{ 0, NULL },
};
static hf_register_info hf[] = {
{ &hf_ixveriwave_frame_length,
{ "Actual frame length", "ixveriwave.frame_length",
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_ixveriwave_vw_msdu_length,
{ "MSDU length", "ixveriwave.msdu_length",
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_ixveriwave_vw_flowid,
{ "Flow ID", "ixveriwave.flowid",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_ixveriwave_vw_vcid,
{ "Client ID", "ixveriwave.clientid",
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_ixveriwave_vw_seqnum,
{ "Sequence number", "ixveriwave.seqnum",
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_ixveriwave_vw_mslatency,
{ "Msec latency", "ixveriwave.mslatency",
FT_FLOAT, 0, NULL, 0x0, NULL, HFILL } },
{ &hf_ixveriwave_vw_latency,
{ "Frame latency", "ixveriwave.latency",
FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_nanoseconds), 0x0, NULL, HFILL } },
{ &hf_ixveriwave_vw_sig_ts,
{ "Frame Signature Timestamp(32 LSBs)", "ixveriwave.sig_ts",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_ixveriwave_vw_delay,
{ "Frame Queue Delay (32 LSBs)", "ixveriwave.delay_ts",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_ixveriwave_vw_startt,
{ "Frame start timestamp", "ixveriwave.startt",
FT_UINT64, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0, NULL, HFILL } },
{ &hf_ixveriwave_vw_endt,
{ "Frame end timestamp", "ixveriwave.endt",
FT_UINT64, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0, NULL, HFILL } },
{ &hf_ixveriwave_vw_pktdur,
{ "Frame duration", "ixveriwave.pktdur",
FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_nanoseconds), 0x0, NULL, HFILL } },
{ &hf_ixveriwave_vw_ifg,
{ "Inter-frame gap (usecs)", "ixveriwave.ifg",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
// RF LOGGING
{ &hf_radiotap_rf_info,
{ "RF Header", "ixveriwave.RFInfo",
FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_rfid,
{ "RF_ID", "ixveriwave.rfinfo.rfid",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
#if 0
{ &hf_radiotap_rfinfo_noise,
{ "Noise", "ixveriwave.rfinfo.noise",
FT_FLOAT, 0, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_noise_anta,
{ "Noise Antenna A", "ixveriwave.noise_anta",
FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_noise_antb,
{ "Noise Antenna B", "ixveriwave.noise_antb",
FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_noise_antc,
{ "Noise Antenna C", "ixveriwave.noise_antc",
FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_noise_antd,
{ "Noise Antenna D", "ixveriwave.noise_antd",
FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
#endif
{ &hf_radiotap_rfinfo_snr,
{ "SNR", "ixveriwave.snr",
FT_NONE, BASE_NONE, NULL, 0x0, "Signal-to-noise ratio", HFILL } },
{ &hf_radiotap_rfinfo_snr_anta,
{ "SNR Antenna A", "ixveriwave.snr_anta",
FT_FLOAT, BASE_NONE|BASE_UNIT_STRING, UNS(&units_decibels), 0x0, "Signal-to-noise ratio", HFILL } },
{ &hf_radiotap_rfinfo_snr_antb,
{ "SNR Antenna B", "ixveriwave.snr_antb",
FT_FLOAT, BASE_NONE|BASE_UNIT_STRING, UNS(&units_decibels), 0x0, "Signal-to-noise ratio", HFILL } },
{ &hf_radiotap_rfinfo_snr_antc,
{ "SNR Antenna C", "ixveriwave.snr_antc",
FT_FLOAT, BASE_NONE|BASE_UNIT_STRING, UNS(&units_decibels), 0x0, "Signal-to-noise ratio", HFILL } },
{ &hf_radiotap_rfinfo_snr_antd,
{ "SNR Antenna D", "ixveriwave.snr_antd",
FT_FLOAT, BASE_NONE|BASE_UNIT_STRING, UNS(&units_decibels), 0x0, "Signal-to-noise ratio", HFILL } },
{ &hf_radiotap_rfinfo_pfe,
{ "PFE", "ixveriwave.rfinfo.pfe",
FT_NONE, BASE_NONE, NULL, 0x0, "Preamble Frequency Error metric", HFILL } },
{ &hf_radiotap_rfinfo_pfe_anta,
{ "PFE SS#1", "ixveriwave.pfe_anta",
FT_FLOAT, BASE_NONE|BASE_UNIT_STRING, UNS(&units_hz), 0x0, "Preamble Frequency Error metric", HFILL } },
{ &hf_radiotap_rfinfo_pfe_antb,
{ "PFE SS#2", "ixveriwave.pfe_antb",
FT_FLOAT, BASE_NONE|BASE_UNIT_STRING, UNS(&units_hz), 0x0, "Preamble Frequency Error metric", HFILL } },
{ &hf_radiotap_rfinfo_pfe_antc,
{ "PFE SS#3", "ixveriwave.pfe_antc",
FT_FLOAT, BASE_NONE|BASE_UNIT_STRING, UNS(&units_hz), 0x0, "Preamble Frequency Error metric", HFILL } },
{ &hf_radiotap_rfinfo_pfe_antd,
{ "PFE SS#4", "ixveriwave.pfe_antd",
FT_FLOAT, BASE_NONE|BASE_UNIT_STRING, UNS(&units_hz), 0x0, "Preamble Frequency Error metric", HFILL } },
{ &hf_radiotap_rfinfo_sigdata,
{ "AVG EVM SIG Data", "ixveriwave.rfinfo.sigdata",
FT_NONE, BASE_NONE, NULL, 0x0, "Average EVM for DATA SUBCARRIERS for all SIG symbols of the frame", HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_sd_siga,
{ "AVG EVM SIG Data SS#1", "ixveriwave.avg_evm_sda",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_sd_sigb,
{ "AVG EVM SIG Data SS#2", "ixveriwave.avg_evm_sdb",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_sd_sigc,
{ "AVG EVM SIG Data SS#3", "ixveriwave.avg_evm_sdc",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_sd_sigd,
{ "AVG EVM SIG Data SS#4", "ixveriwave.avg_evm_sdd",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_sigpilot,
{ "AVG EVM SIG Pilot", "ixveriwave.rfinfo.sigpilot",
FT_NONE, BASE_NONE, NULL, 0x0, "Average EVM for PILOT SUBCARRIERS for all SIG symbols of the frame", HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_sp_siga,
{ "AVG EVM SIG Pilot SS#1", "ixveriwave.avg_evm_spa",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_sp_sigb,
{ "AVG EVM SIG Pilot SS#2", "ixveriwave.avg_evm_spb",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_sp_sigc,
{ "AVG EVM SIG Pilot SS#3", "ixveriwave.avg_evm_spc",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_sp_sigd,
{ "AVG EVM SIG Pilot SS#4", "ixveriwave.avg_evm_spd",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_datadata,
{ "AVG EVM DATA Data", "ixveriwave.rfinfo.datadata",
FT_NONE, BASE_NONE, NULL, 0x0, "Average EVM for DATA SUBCARRIERS for all DATA symbols of the frame", HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_dd_siga,
{ "AVG EVM DATA Data SS#1", "ixveriwave.avg_evm_dda",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_dd_sigb,
{ "AVG EVM DATA Data SS#2", "ixveriwave.avg_evm_ddb",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_dd_sigc,
{ "AVG EVM DATA Data SS#3", "ixveriwave.avg_evm_ddc",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_dd_sigd,
{ "AVG EVM DATA Data SS#4", "ixveriwave.avg_evm_ddd",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_datapilot,
{ "AVG EVM DATA Pilot", "ixveriwave.rfinfo.datapilot",
FT_NONE, BASE_NONE, NULL, 0x0, "Average EVM for PILOT SUBCARRIERS for all DATA symbols of the frame", HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_dp_siga,
{ "AVG EVM DATA Pilot SSI-1", "ixveriwave.avg_evm_dpa",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_dp_sigb,
{ "AVG EVM DATA Pilot SSI-2", "ixveriwave.avg_evm_dpb",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_dp_sigc,
{ "AVG EVM DATA Pilot SSI-3", "ixveriwave.avg_evm_dpc",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_dp_sigd,
{ "AVG EVM DATA Pilot SSI-4", "ixveriwave.avg_evm_dpd",
FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_ws_symbol,
{ "EVM Worst Symbol", "ixveriwave.wssymbol",
FT_NONE, BASE_NONE, NULL, 0, "WORST-CASE SYMBOL", HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_ws_siga,
{ "EVM Worst Symbol SS#1", "ixveriwave.avg_evm_wsa",
FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_percent), 0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_ws_sigb,
{ "EVM Worst Symbol SS#2", "ixveriwave.avg_evm_wsb",
FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_percent), 0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_ws_sigc,
{ "EVM Worst Symbol SS#3", "ixveriwave.avg_evm_wsc",
FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_percent), 0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_avg_evm_ws_sigd,
{ "EVM Worst Symbol SS#4", "ixveriwave.avg_evm_wsd",
FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_percent), 0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpa,
{ "CONTEXT_A", "ixveriwave.contextpa",
FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpA_snr_noise_valid,
{ "SNR_NOISE_valid", "ixveriwave.contextpA.snr_noise_valid",
FT_BOOLEAN, 16, NULL, 0x0001, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpA_pfe_valid,
{ "PFE_valid", "ixveriwave.contextpA.pfe_valid",
FT_BOOLEAN, 16, NULL, 0x0002, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpA_pfe_is_cck,
{ "PFE_is_CCK", "ixveriwave.contextpA.pfe_is_cck",
FT_BOOLEAN, 16, NULL, 0x0004, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpA_agc_idle2iqrdy_no_gain_change,
{ "AGC 3", "ixveriwave.contextpA.agc_idle2iqrdy_no_gain_change",
FT_BOOLEAN, 16, NULL, 0x0008, "Automatic Gain Control-[3] agc_idle2iqrdy_no_gain_change", HFILL } },
{ &hf_radiotap_rfinfo_contextpA_agc_high_pwr_terminated,
{ "AGC 4", "ixveriwave.contextpA.agc_high_pwr_terminated",
FT_BOOLEAN, 16, NULL, 0x0010, "Automatic Gain Control-[4] agc_high_pwr_terminated", HFILL } },
{ &hf_radiotap_rfinfo_contextpA_agc_high_pwr_terminator,
{ "AGC 5", "ixveriwave.contextpA.agc_high_pwr_terminator",
FT_BOOLEAN, 16, NULL, 0x0020, "Automatic Gain Control-[5] agc_high_pwr_terminator", HFILL } },
#if 0
{ &hf_radiotap_rfinfo_contextpA_frame_format,
{ "Frame format", "ixveriwave.contextp.frame_format",
FT_UINT16, BASE_DEC, VALS(frameformat_type), 0x0300, "0: LEGACY. 1:HT. 3:-VHT.", HFILL } },
{ &hf_radiotap_rfinfo_contextpA_ofdm_or_cck,
{ "OFDM or CCK", "ixveriwave.contextp.ofdm_or_cck",
FT_BOOLEAN, 16, TFS(&tfs_legacy_type), 0x0400, "0: LEGACY OFDM 1: 802.11b LEGACY CCK", HFILL } },
{ &hf_radiotap_rfinfo_contextpA_sigbandwidth_of_evm,
{ "SigBandWidth of EVM", "ixveriwave.contextp.sigbandwidth_of_evm",
FT_UINT16, BASE_DEC, VALS(sbw_evm), 0x1800, "Signal Bandwidth of EVM measurement", HFILL } },
#endif
{ &hf_radiotap_rfinfo_contextpA_qam_modulation,
{ "QAM modulation", "ixveriwave.contextpA.qam_modulation",
FT_UINT16, BASE_DEC, NULL, 0xe000, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpb,
{ "CONTEXT_B", "ixveriwave.contextpb",
FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpc,
{ "CONTEXT_C", "ixveriwave.contextpc",
FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpd,
{ "CONTEXT_D", "ixveriwave.contextpd",
FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpB_snr_noise_valid,
{ "SNR_NOISE_valid", "ixveriwave.contextpB.snr_noise_valid",
FT_BOOLEAN, 16, NULL, 0x0001, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpB_pfe_valid,
{ "PFE_valid", "ixveriwave.contextpB.pfe_valid",
FT_BOOLEAN, 16, NULL, 0x0002, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpB_pfe_is_cck,
{ "PFE_is_CCK", "ixveriwave.contextpB.pfe_is_cck",
FT_BOOLEAN, 16, NULL, 0x0004, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpB_agc_idle2iqrdy_no_gain_change,
{ "AGC 3", "ixveriwave.contextpB.agc_idle2iqrdy_no_gain_change",
FT_BOOLEAN, 16, NULL, 0x0008, "Automatic Gain Control-[3] agc_idle2iqrdy_no_gain_change", HFILL } },
{ &hf_radiotap_rfinfo_contextpB_agc_high_pwr_terminated,
{ "AGC 4", "ixveriwave.contextpB.agc_high_pwr_terminated",
FT_BOOLEAN, 16, NULL, 0x0010, "Automatic Gain Control-[4] agc_high_pwr_terminated", HFILL } },
{ &hf_radiotap_rfinfo_contextpB_agc_high_pwr_terminator,
{ "AGC 5", "ixveriwave.contextpB.agc_high_pwr_terminator",
FT_BOOLEAN, 16, NULL, 0x0020, "Automatic Gain Control-[5] agc_high_pwr_terminator", HFILL } },
{ &hf_radiotap_rfinfo_contextpB_qam_modulation,
{ "QAM modulation", "ixveriwave.contextpB.qam_modulation",
FT_UINT16, BASE_DEC, NULL, 0xe000, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpC_snr_noise_valid,
{ "SNR_NOISE_valid", "ixveriwave.contextpC.snr_noise_valid",
FT_BOOLEAN, 16, NULL, 0x0001, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpC_pfe_valid,
{ "PFE_valid", "ixveriwave.contextpC.pfe_valid",
FT_BOOLEAN, 16, NULL, 0x0002, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpC_pfe_is_cck,
{ "PFE_is_CCK", "ixveriwave.contextpC.pfe_is_cck",
FT_BOOLEAN, 16, NULL, 0x0004, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpC_agc_idle2iqrdy_no_gain_change,
{ "AGC 3", "ixveriwave.contextpC.agc_idle2iqrdy_no_gain_change",
FT_BOOLEAN, 16, NULL, 0x0008, "Automatic Gain Control-[3] agc_idle2iqrdy_no_gain_change", HFILL } },
{ &hf_radiotap_rfinfo_contextpC_agc_high_pwr_terminated,
{ "AGC 4", "ixveriwave.contextpC.agc_high_pwr_terminated",
FT_BOOLEAN, 16, NULL, 0x0010, "Automatic Gain Control-[4] agc_high_pwr_terminated", HFILL } },
{ &hf_radiotap_rfinfo_contextpC_agc_high_pwr_terminator,
{ "AGC 5", "ixveriwave.contextpC.agc_high_pwr_terminator",
FT_BOOLEAN, 16, NULL, 0x0020, "Automatic Gain Control-[5] agc_high_pwr_terminator", HFILL } },
{ &hf_radiotap_rfinfo_contextpC_qam_modulation,
{ "QAM modulation", "ixveriwave.contextpC.qam_modulation",
FT_UINT16, BASE_DEC, NULL, 0xe000, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpD_snr_noise_valid,
{ "SNR_NOISE_valid", "ixveriwave.contextpD.snr_noise_valid",
FT_BOOLEAN, 16, NULL, 0x0001, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpD_pfe_valid,
{ "PFE_valid", "ixveriwave.contextpD.pfe_valid",
FT_BOOLEAN, 16, NULL, 0x0002, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpD_pfe_is_cck,
{ "PFE_is_CCK", "ixveriwave.contextpD.pfe_is_cck",
FT_BOOLEAN, 16, NULL, 0x0004, NULL, HFILL } },
{ &hf_radiotap_rfinfo_contextpD_agc_idle2iqrdy_no_gain_change,
{ "AGC 3", "ixveriwave.contextpD.agc_idle2iqrdy_no_gain_change",
FT_BOOLEAN, 16, NULL, 0x0008, "Automatic Gain Control-[3] agc_idle2iqrdy_no_gain_change", HFILL } },
{ &hf_radiotap_rfinfo_contextpD_agc_high_pwr_terminated,
{ "AGC 4", "ixveriwave.contextpD.agc_high_pwr_terminated",
FT_BOOLEAN, 16, NULL, 0x0010, "Automatic Gain Control-[4] agc_high_pwr_terminated", HFILL } },
{ &hf_radiotap_rfinfo_contextpD_agc_high_pwr_terminator,
{ "AGC 5", "ixveriwave.contextpD.agc_high_pwr_terminator",
FT_BOOLEAN, 16, NULL, 0x0020, "Automatic Gain Control-[5] agc_high_pwr_terminator", HFILL } },
{ &hf_radiotap_rfinfo_contextpD_qam_modulation,
{ "QAM modulation", "ixveriwave.contextpD.qam_modulation",
FT_UINT16, BASE_DEC, NULL, 0xe000, NULL, HFILL } },
{ &hf_radiotap_rfinfo_frameformatA,
{ "Frame format", "ixveriwave.rfinfo.frameformatA",
FT_UINT8, BASE_DEC, VALS(frameformat_type), 0x03, NULL, HFILL } },
{ &hf_radiotap_rfinfo_frameformatB,
{ "Frame format", "ixveriwave.rfinfo.frameformatB",
FT_UINT8, BASE_DEC, VALS(frameformat_type), 0x03, NULL, HFILL } },
{ &hf_radiotap_rfinfo_frameformatC,
{ "Frame format", "ixveriwave.rfinfo.frameformatC",
FT_UINT8, BASE_DEC, VALS(frameformat_type), 0x03, NULL, HFILL } },
{ &hf_radiotap_rfinfo_frameformatD,
{ "Frame format", "ixveriwave.rfinfo.frameformatD",
FT_UINT8, BASE_DEC, VALS(frameformat_type), 0x03, NULL, HFILL } },
{ &hf_radiotap_rfinfo_legacytypeA,
{ "Frame format", "ixveriwave.rfinfo.legacytypeA",
FT_BOOLEAN, 8, TFS(&tfs_legacy_type), 0x04, NULL, HFILL } },
{ &hf_radiotap_rfinfo_legacytypeB,
{ "Frame format", "ixveriwave.rfinfo.legacytypeB",
FT_BOOLEAN, 8, TFS(&tfs_legacy_type), 0x04, NULL, HFILL } },
{ &hf_radiotap_rfinfo_legacytypeC,
{ "Frame format", "ixveriwave.rfinfo.legacytypeC",
FT_BOOLEAN, 8, TFS(&tfs_legacy_type), 0x04, NULL, HFILL } },
{ &hf_radiotap_rfinfo_legacytypeD,
{ "Frame format", "ixveriwave.rfinfo.legacytypeD",
FT_BOOLEAN, 8, TFS(&tfs_legacy_type), 0x04, NULL, HFILL } },
{ &hf_radiotap_rfinfo_sigbwevmA,
{ "SigBandWidth of EVM", "ixveriwave.rfinfo.sigbwevmA",
FT_UINT8, BASE_DEC, VALS(sbw_evm), 0x18, NULL, HFILL } },
{ &hf_radiotap_rfinfo_sigbwevmB,
{ "SigBandWidth of EVM", "ixveriwave.rfinfo.sigbwevmB",
FT_UINT8, BASE_DEC, VALS(sbw_evm), 0x18, NULL, HFILL } },
{ &hf_radiotap_rfinfo_sigbwevmC,
{ "SigBandWidth of EVM", "ixveriwave.rfinfo.sigbwevmC",
FT_UINT8, BASE_DEC, VALS(sbw_evm), 0x18, NULL, HFILL } },
{ &hf_radiotap_rfinfo_sigbwevmD,
{ "SigBandWidth of EVM", "ixveriwave.rfinfo.sigbwevmD",
FT_UINT8, BASE_DEC, VALS(sbw_evm), 0x18, NULL, HFILL } },
#if 0
{ &hf_radiotap_rfinfo_tbd,
{ "RF_TBD", "ixveriwave.rfinfo.tbd",
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
#endif
/* Fields for both Ethernet and WLAN */
{ &hf_ixveriwave_vw_l4id,
{ "Layer 4 ID", "ixveriwave.layer4id",
FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
/* Ethernet fields */
{ &hf_ixveriwave_vwf_txf,
{ "Frame direction", "ixveriwave.vwflags.txframe",
FT_BOOLEAN, 8, TFS(&tfs_tx_rx_type), ETHERNETTAP_VWF_TXF, NULL, HFILL } },
{ &hf_ixveriwave_vwf_fcserr,
{ "MAC FCS check", "ixveriwave.vwflags.fcserr",
FT_BOOLEAN, 8, TFS(&tfs_fcserr_type), ETHERNETTAP_VWF_FCSERR, NULL, HFILL } },
{ &hf_ixveriwave_vw_info,
{ "Info field", "ixveriwave.eth_info",
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
/* rx info decodes for fpga ver VW510024 */
/*all are reserved*/
/* rx info decodes for fpga ver VW510012 */
{ &hf_ixveriwave_vw_info_go_no_flow,
{ "Go no flow", "ixveriwave.eth_info.go_no_flow",
FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL } },
{ &hf_ixveriwave_vw_info_go_with_flow,
{ "Go with flow", "ixveriwave.eth_info.go_with_flow",
FT_BOOLEAN, 16, NULL, 0x0200, NULL, HFILL } },
/* tx info decodes for VW510024 and 510012 */
/* we don't need to enumerate through these, basically for both,
info is the retry count. for 510024, the 15th bit indicates if
the frame was impressed on the enet tx media with one or more octets having tx_en
framing signal deasserted. this is caused by software setting the drain all register bit.
*/
{ &hf_ixveriwave_vw_info_retry_count,
{ "Retry count", "ixveriwave.eth_info.retry_count",
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_ixveriwave_vw_error,
{ "Errors", "ixveriwave.eth_error",
FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
/* rx error decodes for fpga ver VW510012 and VW510024 */
/* tx error decodes for VW510024 and previous versions */
/* rx-only */
{ &hf_ixveriwave_vw_error_1_alignment_error,
{ "Alignment error", "ixveriwave.eth_error.rx_alignment_error",
FT_BOOLEAN, 12, NULL, 0x001, NULL, HFILL } },
/* rx and tx */
{ &hf_ixveriwave_vw_error_1_packet_fcs_error,
{ "Packet FCS error", "ixveriwave.eth_error.rx_packet_fcs_error",
FT_BOOLEAN, 12, NULL, 0x002, NULL, HFILL } },
/* rx-only */
{ &hf_ixveriwave_vw_error_1_bad_magic_byte_signature,
{ "Bad magic byte signature", "ixveriwave.eth_error.rx_bad_magic_byte_signature",
FT_BOOLEAN, 12, NULL, 0x004, NULL, HFILL } },
/* rx-only */
{ &hf_ixveriwave_vw_error_1_bad_payload_checksum,
{ "Bad payload checksum", "ixveriwave.eth_error.rx_bad_payload_checksum",
FT_BOOLEAN, 12, NULL, 0x008, NULL, HFILL } },
/* rx-only */
{ &hf_ixveriwave_vw_error_1_frame_too_long,
{ "Frame too long error", "ixveriwave.eth_error.rx_frame_too_long",
FT_BOOLEAN, 12, NULL, 0x010, NULL, HFILL } },
/* rx and tx */
{ &hf_ixveriwave_vw_error_1_ip_checksum_error,
{ "IP checksum error", "ixveriwave.eth_error.rx_ip_checksum_error",
FT_BOOLEAN, 12, NULL, 0x020, NULL, HFILL } },
/* rx-only */
{ &hf_ixveriwave_vw_error_1_l4_checksum_error,
{ "L4 (TCP/ICMP/IGMP/UDP) checksum error", "ixveriwave.eth_error.rx_l4_checksum_error",
FT_BOOLEAN, 12, NULL, 0x040, NULL, HFILL } },
/* rx-only */
{ &hf_ixveriwave_vw_error_1_id_mismatch,
{ "ID mismatch(for fpga510012)", "ixveriwave.eth_error.rx_id_mismatch",
FT_BOOLEAN, 12, NULL, 0x080, NULL, HFILL } },
/* rx-only */
{ &hf_ixveriwave_vw_error_1_length_error,
{ "Length error", "ixveriwave.eth_error.rx_length_error",
FT_BOOLEAN, 12, NULL, 0x100, NULL, HFILL } },
/* rx and tx */
{ &hf_ixveriwave_vw_error_1_underflow,
{ "Underflow", "ixveriwave.eth_error.rx_underflow",
FT_BOOLEAN, 12, NULL, 0x200, NULL, HFILL } },
/* tx-only */
{ &hf_ixveriwave_vw_error_1_late_collision,
{ "Late collision", "ixveriwave.eth_error.late_collision",
FT_BOOLEAN, 12, NULL, 0x400, NULL, HFILL } },
{ &hf_ixveriwave_vw_error_1_excessive_collisions,
{ "Excessive collisions", "ixveriwave.eth_error.excessive_collisions",
FT_BOOLEAN, 12, NULL, 0x800, NULL, HFILL } },
/*all other bits are reserved */
/* WLAN fields */
{ &hf_radiotap_flags,
{ "Flags", "ixveriwave.flags",
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_flags_preamble,
{ "Preamble", "ixveriwave.flags.preamble",
FT_BOOLEAN, 12, TFS(&tfs_preamble_type), FLAGS_SHORTPRE,
"Sent/Received with short preamble", HFILL } },
{ &hf_radiotap_flags_wep,
{ "WEP", "ixveriwave.flags.wep",
FT_BOOLEAN, 12, NULL, FLAGS_WEP,
"Sent/Received with WEP encryption", HFILL } },
{ &hf_radiotap_flags_ht,
{ "HT frame", "ixveriwave.flags.ht",
FT_BOOLEAN, 12, NULL, FLAGS_CHAN_HT, NULL, HFILL } },
{ &hf_radiotap_flags_vht,
{ "VHT frame", "ixveriwave.flags.vht",
FT_BOOLEAN, 12, NULL, FLAGS_CHAN_VHT, NULL, HFILL } },
{ &hf_radiotap_flags_short_gi,
{ "Short guard interval", "ixveriwave.flags.short_gi",
FT_BOOLEAN, 12, NULL, FLAGS_CHAN_SHORTGI, NULL, HFILL } },
{ &hf_radiotap_flags_40mhz,
{ "40 MHz channel bandwidth", "ixveriwave.flags.40mhz",
FT_BOOLEAN, 12, NULL, FLAGS_CHAN_40MHZ, NULL, HFILL } },
{ &hf_radiotap_flags_80mhz,
{ "80 MHz channel bandwidth", "ixveriwave.flags.80mhz",
FT_BOOLEAN, 12, NULL, FLAGS_CHAN_80MHZ, NULL, HFILL } },
{ &hf_radiotap_datarate,
{ "Data rate", "ixveriwave.datarate",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Speed this frame was sent/received at", HFILL } },
{ &hf_radiotap_mcsindex,
{ "MCS index", "ixveriwave.mcs",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_nss,
{ "Number of spatial streams", "ixveriwave.nss",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_dbm_anta,
{ "SSI Signal for Antenna A", "ixveriwave.dbm_anta",
FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0x0,
"RF signal power at the antenna from a fixed, arbitrary value in decibels from one milliwatt", HFILL } },
{ &hf_radiotap_dbm_antb,
{ "SSI Signal for Antenna B", "ixveriwave.dbm_antb",
FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0x0,
"RF signal power at the antenna from a fixed, arbitrary value in decibels from one milliwatt", HFILL } },
{ &hf_radiotap_dbm_antc,
{ "SSI Signal for Antenna C", "ixveriwave.dbm_antc",
FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0x0,
"RF signal power at the antenna from a fixed, arbitrary value in decibels from one milliwatt", HFILL } },
{ &hf_radiotap_dbm_antd,
{ "SSI Signal for Antenna D", "ixveriwave.dbm_antd",
FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0x0,
"RF signal power at the antenna from a fixed, arbitrary value in decibels from one milliwatt", HFILL } },
/* All other enumerations are reserved.*/
{ &hf_radiotap_plcptype,
{ "VHT_NDP", "ixveriwave.plcptype",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
/* VeriWave-specific flags */
{ &hf_radiotap_vwf_txf,
{ "Frame direction", "ixveriwave.vwflags.txframe",
FT_BOOLEAN, 16, TFS(&tfs_tx_rx_type), VW_RADIOTAPF_TXF, NULL, HFILL } },
{ &hf_radiotap_vwf_fcserr,
{ "MAC FCS check", "ixveriwave.vwflags.fcserr",
FT_BOOLEAN, 16, TFS(&tfs_fcserr_type), VW_RADIOTAPF_FCSERR, NULL, HFILL } },
{ &hf_radiotap_vwf_dcrerr,
{ "Decryption error", "ixveriwave.vwflags.decrypterr",
FT_BOOLEAN, 16, TFS(&tfs_decrypterr_type), VW_RADIOTAPF_DCRERR, NULL, HFILL } },
{ &hf_radiotap_vwf_retrerr,
{ "TX retry limit", "ixveriwave.vwflags.retryerr",
FT_BOOLEAN, 16, TFS(&tfs_retryerr_type), VW_RADIOTAPF_RETRERR, NULL, HFILL } },
{ &hf_radiotap_vwf_enctype,
{ "Encryption type", "ixveriwave.vwflags.encrypt",
FT_UINT16, BASE_DEC, VALS(encrypt_type), VW_RADIOTAPF_ENCMSK, NULL, HFILL } },
{ &hf_radiotap_vw_ht_length,
{ "HT length", "ixveriwave.ht_length",
FT_UINT16, BASE_DEC, NULL, 0x0, "Total IP length (incl all pieces of an aggregate)", HFILL } },
{ &hf_radiotap_vw_info,
{ "Info field", "ixveriwave.wlan_info",
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
/*v510006 uses bits */
{ &hf_radiotap_vw_info_2_ack_withheld_from_frame,
{ "ACK withheld from frame", "ixveriwave.wlan_info.ack_withheld_from_frame",
FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL } },
{ &hf_radiotap_vw_info_2_sent_cts_to_self_before_data,
{ "Sent CTS to self before data", "ixveriwave.wlan_info.sent_cts_to_self_before_data",
FT_BOOLEAN, 16, NULL, 0x0200, NULL, HFILL } },
{ &hf_radiotap_vw_info_2_mpdu_of_a_mpdu,
{ "MPDU of A-MPDU", "ixveriwave.wlan_info.mpdu_of_a_mpdu",
FT_BOOLEAN, 16, NULL, INFO_MPDU_OF_A_MPDU, NULL, HFILL } },
{ &hf_radiotap_vw_info_2_first_mpdu_of_a_mpdu,
{ "First MPDU of A-MPDU", "ixveriwave.wlan_info.first_mpdu_of_a_mpdu",
FT_BOOLEAN, 16, NULL, INFO_FIRST_MPDU_OF_A_MPDU, NULL, HFILL } },
{ &hf_radiotap_vw_info_2_last_pdu_of_a_mpdu,
{ "Last MPDU of A-MPDU", "ixveriwave.wlan_info.last_pdu_of_a_mpdu",
FT_BOOLEAN, 16, NULL, INFO_LAST_MPDU_OF_A_MPDU, NULL, HFILL } },
{ &hf_radiotap_vw_info_2_msdu_of_a_msdu,
{ "MSDU of A-MSDU", "ixveriwave.wlan_info.msdu_of_a_msdu",
FT_BOOLEAN, 16, NULL, INFO_MSDU_OF_A_MSDU, NULL, HFILL } },
{ &hf_radiotap_vw_info_2_first_msdu_of_a_msdu,
{ "First MSDU of A-MSDU", "ixveriwave.wlan_info.first_msdu_of_a_msdu",
FT_BOOLEAN, 16, NULL, INFO_FIRST_MSDU_OF_A_MSDU, NULL, HFILL } },
{ &hf_radiotap_vw_info_2_last_msdu_of_a_msdu,
{ "Last MSDU of A-MSDU", "ixveriwave.wlan_info.last_msdu_of_a_msdu",
FT_BOOLEAN, 16, NULL, INFO_LAST_MSDU_OF_A_MSDU, NULL, HFILL } },
{ &hf_radiotap_vw_errors,
{ "Errors", "ixveriwave.errors",
FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
/* rx error decodes for fpga ver VW510021 */
{ &hf_radiotap_vw_errors_rx_2_crc16_or_parity_error,
{ "CRC16 or parity error", "ixveriwave.errors.crc16_or_parity_error",
FT_BOOLEAN, 16, NULL, 0x0001, "error bit 0", HFILL } },
{ &hf_radiotap_vw_errors_rx_2_non_supported_rate_or_service_field,
{ "Non-supported rate or service field", "ixveriwave.errors.supported_rate_or_service_field",
FT_BOOLEAN, 16, NULL, 0x0002, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_2_short_frame,
{ "Short frame error. Frame is shorter than length.", "ixveriwave.errors.short_frame",
FT_BOOLEAN, 16, NULL, 0x0004, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_2_fcs_error,
{ "FCS error", "ixveriwave.errors.fcs_error",
FT_BOOLEAN, 16, NULL, 0x0010, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_2_l2_de_aggregation_error,
{ "L2 de-aggregation error", "ixveriwave.errors.de_aggregation_error",
FT_BOOLEAN, 16, NULL, 0x0020, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_2_duplicate_mpdu,
{ "Duplicate MPDU", "ixveriwave.errors.duplicate_mpdu",
FT_BOOLEAN, 16, NULL, 0x0040, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_2_bad_flow_magic_number,
{ "Bad_Sig: Bad flow magic number (includes bad flow crc16)", "ixveriwave.errors.bad_flow_magic_number",
FT_BOOLEAN, 16, NULL, 0x0080, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_2_flow_payload_checksum_error,
{ "Bad flow payload checksum", "ixveriwave.errors.flow_payload_checksum_error",
FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_2_ip_checksum_error,
{ "IP checksum error", "ixveriwave.errors.ip_checksum_error",
FT_BOOLEAN, 16, NULL, 0x0400, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_2_l4_checksum_error,
{ "L4 (TCP/ICMP/IGMP/UDP) checksum error", "ixveriwave.errors.l4_checksum_error",
FT_BOOLEAN, 16, NULL, 0x0800, NULL, HFILL } },
/* tx error decodes for fpga ver VW510021 */
{ &hf_radiotap_vw_errors_tx_2_crc32_error,
{ "CRC32 Error", "ixveriwave.errors.crc32_error",
FT_BOOLEAN, 32, NULL, 0x00000002, NULL, HFILL } },
{ &hf_radiotap_vw_errors_tx_2_ip_checksum_error,
{ "IP Checksum Error", "ixveriwave.errors.ip_checksum_error",
FT_BOOLEAN, 32, NULL, 0x00000020, NULL, HFILL } },
{ &hf_radiotap_vw_errors_tx_2_ack_timeout,
{ "ACK Timeout", "ixveriwave.errors.ack_timeout",
FT_BOOLEAN, 32, NULL, 0x00000100, NULL, HFILL } },
{ &hf_radiotap_vw_errors_tx_2_cts_timeout,
{ "CTS Timeout", "ixveriwave.errors.cts_timeout",
FT_BOOLEAN, 32, NULL, 0x00000200, NULL, HFILL } },
{ &hf_radiotap_vw_errors_tx_2_last_retry_attempt,
{ "Last Retry Attempt for this MPDU", "ixveriwave.errors.last_retry_attempt",
FT_BOOLEAN, 32, NULL, 0x00000400, NULL, HFILL } },
{ &hf_radiotap_vw_errors_tx_2_internal_error,
{ "Internal Error", "ixveriwave.errors.internal_error",
FT_BOOLEAN, 32, NULL, 0x80000000, NULL, HFILL } },
{ &hf_radiotap_vht_mu_mimo_flg,
{ "VHT MU MIMO", "ixveriwave.VHT_mu_mimo_flg",
FT_UINT8, BASE_DEC, NULL, 0x08, NULL, HFILL } },
{ &hf_radiotap_vht_user_pos,
{ "VHT User Pos", "ixveriwave.VHT_user_pos",
FT_UINT8, BASE_DEC, NULL, 0x03, NULL, HFILL } },
{ &hf_radiotap_vht_su_mimo_flg,
{ "VHT SU MIMO", "ixveriwave.VHT_su_mimo_flg",
FT_UINT8, BASE_DEC, NULL, 0x04, NULL, HFILL } },
{ &hf_radiotap_l1info,
{ "Layer 1 Header", "ixveriwave.l1info",
FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL } },
{ &hf_radiotap_l1info_preamble,
{ "Preamble", "ixveriwave.l1info.preamble",
FT_BOOLEAN, BASE_NONE, TFS(&tfs_preamble_type), 0x0,
"Sent/Received with short preamble", HFILL } },
{ &hf_radiotap_l1info_rateindex,
{ "Rate index", "ixveriwave.l1info.rate",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_l1info_ht_mcsindex,
{ "MCS index", "ixveriwave.mcs",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_l1info_vht_mcsindex,
{ "MCS index", "ixveriwave.mcs",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_l1info_nss,
{ "Number of spatial streams", "ixveriwave.nss",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_l1info_transmitted,
{ "Frame direction", "ixveriwave.txframe",
FT_BOOLEAN, BASE_NONE, TFS(&tfs_tx_rx_type), 0x0, NULL, HFILL } },
{ &hf_radiotap_sigbandwidth,
{ "Signaling Band Width", "ixveriwave.sigbandwidth",
FT_UINT8, BASE_DEC, VALS(sbw_type), 0x0, NULL, HFILL } },
#if 0
{&hf_radiotap_rssi,
{ "RSSI", "ixveriwave.rssi",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
#endif
{ &hf_radiotap_modulation,
{ "Modulation", "ixveriwave.Modulation",
FT_UINT8, BASE_DEC, VALS(modulation_type), 0x0, NULL, HFILL } },
{ &hf_radiotap_dbm_tx_anta,
{ "TX Power for Antenna A", "ixveriwave.dbm_anta",
FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0x0,
"RF signal power at the antenna from a fixed, arbitrary value in decibels from one milliwatt", HFILL } },
{ &hf_radiotap_dbm_tx_antb,
{ "TX Power for Antenna B", "ixveriwave.dbm_antb",
FT_INT32, BASE_DEC, NULL, 0x0,
"RF signal power at the antenna from a fixed, arbitrary value in decibels from one milliwatt", HFILL } },
{ &hf_radiotap_dbm_tx_antc,
{ "TX Power for Antenna C", "ixveriwave.dbm_antc",
FT_INT32, BASE_DEC, NULL, 0x0,
"RF signal power at the antenna from a fixed, arbitrary value in decibels from one milliwatt", HFILL } },
{ &hf_radiotap_dbm_tx_antd,
{ "TX Power for Antenna D", "ixveriwave.dbm_antd",
FT_INT32, BASE_DEC, NULL, 0x0,
"RF signal power at the antenna from a fixed, arbitrary value in decibels from one milliwatt", HFILL } },
{ &hf_radiotap_sigbandwidthmask,
{ "Signaling Band Width Mask", "ixveriwave.sigbandwidthmask",
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_antennaportenergydetect,
{ "Antenna Port Energy Detect", "ixveriwave.antennaportenergydetect",
FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL } },
{ &hf_radiotap_tx_antennaselect,
{ "Antenna Select", "ixveriwave.tx.antennaselect",
FT_UINT8, BASE_HEX, NULL, 0x07, NULL, HFILL } },
{ &hf_radiotap_tx_stbcselect,
{ "STBC Select", "ixveriwave.tx.stbcselect",
FT_UINT8, BASE_HEX, NULL, 0x18, NULL, HFILL } },
{ &hf_radiotap_mumask,
{ "MU_MASK", "ixveriwave.mumask",
FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL } },
{&hf_radiotap_l1infoc,
{"L1InfoC", "ixveriwave.l1InfoC",
FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_vht_ndp_flg,
{ "NDP", "ixveriwave.VHT_ndp_flg",
FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL } },
{ &hf_radiotap_plcp_info,
{"PLCP Header", "ixveriwave.plcp_info",
FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL } },
{ &hf_radiotap_plcp_type,
{ "PLCP_TYPE", "ixveriwave.plcp.type",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_plcp_default,
{ "PLCP", "ixveriwave.plcp",
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_plcp_signal,
{ "Signal", "ixveriwave.plcp.signal",
FT_UINT8, BASE_HEX, VALS(signal_vals), 0x0, NULL, HFILL } },
{ &hf_radiotap_plcp_locked_clocks,
{ "Locked clocks", "ixveriwave.plcp.locked_clocks",
FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL } },
{ &hf_radiotap_plcp_modulation,
{ "Modulation", "ixveriwave.plcp.modulation",
FT_UINT8, BASE_DEC, VALS(modulation_vals), 0x08, NULL, HFILL } },
{ &hf_radiotap_plcp_length_extension,
{ "Length extension", "ixveriwave.plcp.length_extension",
FT_UINT8, BASE_DEC, NULL, 0xe0, NULL, HFILL } },
{ &hf_radiotap_plcp_length,
{ "PLCP Length", "ixveriwave.plcp.length",
FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_plcp_crc16,
{ "PLCP CRC-16", "ixveriwave.plcp.crc16",
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_ofdm_service,
{ "Service", "ixveriwave.ofdm.service",
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
/* SIGNAL (11a)/L-SIG (11n, 11ac) */
{ &hf_radiotap_ofdm_rate,
{ "Rate", "ixveriwave.ofdm.rate",
FT_UINT24, BASE_HEX, NULL, 0x00000f, NULL, HFILL } },
{ &hf_radiotap_ofdm_length,
{ "PLCP Length", "ixveriwave.ofdm.length",
FT_UINT24, BASE_DEC, NULL, 0x01ffe0, NULL, HFILL } },
{ &hf_radiotap_ofdm_parity,
{ "Parity", "ixveriwave.ofdm.parity",
FT_UINT24, BASE_DEC, NULL, 0x020000, NULL, HFILL } },
{ &hf_radiotap_ofdm_tail,
{ "Tail", "ixveriwave.ofdm.tail",
FT_UINT24, BASE_HEX, NULL, 0xfc0000, NULL, HFILL } },
/* HT-SIG1 */
{ &hf_radiotap_ht_mcsindex,
{ "MCS index", "ixveriwave.ht.mcs",
FT_UINT24, BASE_DEC, NULL, 0x00007f, NULL, HFILL } },
{ &hf_radiotap_ht_bw,
{ "CBW 20/40", "ixveriwave.ht.bw",
FT_UINT24, BASE_HEX, NULL, 0x000080, NULL, HFILL } },
{ &hf_radiotap_ht_length,
{ "HT Length", "ixveriwave.ht.length",
FT_UINT24, BASE_DEC, NULL, 0xffff00, NULL, HFILL } },
/* HT-SIG2 */
{ &hf_radiotap_ht_smoothing,
{ "Smoothing", "ixveriwave.ht.smoothing",
FT_BOOLEAN, 24, NULL, 0x000001, NULL, HFILL } },
{ &hf_radiotap_ht_notsounding,
{ "Not Sounding", "ixveriwave.ht.notsounding",
FT_BOOLEAN, 24, NULL, 0x000002, NULL, HFILL } },
{ &hf_radiotap_ht_aggregation,
{ "Aggregation", "ixveriwave.ht.aggregation",
FT_BOOLEAN, 24, NULL, 0x000008, NULL, HFILL } },
{ &hf_radiotap_ht_stbc,
{ "STBC", "ixveriwave.ht.stbc",
FT_UINT24, BASE_DEC, NULL, 0x000030, NULL, HFILL } },
{ &hf_radiotap_ht_feccoding,
{ "FEC Coding", "ixveriwave.ht.feccoding",
FT_UINT24, BASE_DEC, VALS(fec_encoding_vals), 0x000040, NULL, HFILL } },
{ &hf_radiotap_ht_short_gi,
{ "Short GI", "ixveriwave.ht.short_gi",
FT_BOOLEAN, 24, NULL, 0x000080, NULL, HFILL } },
{ &hf_radiotap_ht_ness,
{ "Number of Extension Spatial Streams", "ixveriwave.ness",
FT_UINT24, BASE_DEC, NULL, 0x000300, NULL, HFILL } },
{ &hf_radiotap_ht_crc,
{ "CRC", "ixveriwave.ht.crc",
FT_UINT24, BASE_HEX, NULL, 0x03fc00, NULL, HFILL } },
{ &hf_radiotap_ht_tail,
{ "Tail Bits", "ixveriwave.ht.tail",
FT_UINT24, BASE_HEX, NULL, 0xfc0000, NULL, HFILL } },
/* VHT-SIG-A1 */
{ &hf_radiotap_vht_bw,
{ "BW", "ixveriwave.vht.bw",
FT_UINT24, BASE_HEX, VALS(sbw_evm), 0x000003, NULL, HFILL } },
{ &hf_radiotap_vht_stbc,
{ "STBC", "ixveriwave.vht.stbc",
FT_BOOLEAN, 24, NULL, 0x000008, NULL, HFILL } },
{ &hf_radiotap_vht_group_id,
{ "Group Id", "ixveriwave.vht.group_id",
FT_UINT24, BASE_DEC, NULL, 0x0003f0, NULL, HFILL } },
{ &hf_radiotap_vht_su_nsts,
{ "SU NSTS", "ixveriwave.vht.su_nsts",
FT_UINT24, BASE_DEC, NULL, 0x001c00, NULL, HFILL } },
{ &hf_radiotap_vht_su_partial_aid,
{ "SU Partial AID", "ixveriwave.vht.su_partial_aid",
FT_UINT24, BASE_HEX, NULL, 0x3fe000, NULL, HFILL } },
{ &hf_radiotap_vht_u0_nsts,
{ "MU[0] NSTS", "ixveriwave.vht.u0_nsts",
FT_UINT24, BASE_DEC, NULL, 0x001c00, NULL, HFILL } },
{ &hf_radiotap_vht_u1_nsts,
{ "MU[1] NSTS", "ixveriwave.vht.u1_nsts",
FT_UINT24, BASE_DEC, NULL, 0x00e000, NULL, HFILL } },
{ &hf_radiotap_vht_u2_nsts,
{ "MU[2] NSTS", "ixveriwave.vht.u2_nsts",
FT_UINT24, BASE_DEC, NULL, 0x070000, NULL, HFILL } },
{ &hf_radiotap_vht_u3_nsts,
{ "MU[3] NSTS", "ixveriwave.vht.u3_nsts",
FT_UINT24, BASE_DEC, NULL, 0x380000, NULL, HFILL } },
{ &hf_radiotap_vht_txop_ps_not_allowed,
{ "TXOP_PS_NOT_ALLOWED", "ixveriwave.vht.txop_ps_not_allowed",
FT_BOOLEAN, 24, NULL, 0x400000, NULL, HFILL } },
/* VHT-SIG-A2 */
{ &hf_radiotap_vht_short_gi,
{ "Short GI", "ixveriwave.short_gi",
FT_BOOLEAN, 24, NULL, 0x000001, NULL, HFILL } },
{ &hf_radiotap_vht_short_gi_nsym_disambig,
{ "Short GI NSYM Disambiguation", "ixveriwave.short_gi_nsym_disambig",
FT_BOOLEAN, 24, NULL, 0x000002, NULL, HFILL } },
{ &hf_radiotap_vht_su_coding_type,
{ "SU Coding Type", "ixveriwave.vht.su_coding_type",
FT_UINT24, BASE_DEC, VALS(fec_encoding_vals), 0x000004, NULL, HFILL } },
{ &hf_radiotap_vht_u0_coding_type,
{ "MU[0] Coding Type", "ixveriwave.vht.u0_coding_type",
FT_UINT24, BASE_DEC, VALS(fec_encoding_vals), 0x000004, NULL, HFILL } },
{ &hf_radiotap_vht_ldpc_ofdmsymbol,
{ "LDPC Extra OFDM Symbol", "ixveriwave.vht.ldpc_ofdmsymbol",
FT_BOOLEAN, 24, NULL, 0x000008, NULL, HFILL } },
{ &hf_radiotap_vht_su_mcs,
{ "VHT MCS", "ixveriwave.vht.su_mcs",
FT_UINT24, BASE_DEC, NULL, 0x0000f0, NULL, HFILL } },
{ &hf_radiotap_vht_u1_coding_type,
{ "MU[1] Coding Type", "ixveriwave.vht.u1_coding_type",
FT_UINT24, BASE_DEC, VALS(fec_encoding_vals), 0x000010, NULL, HFILL } },
{ &hf_radiotap_vht_u2_coding_type,
{ "MU[2] Coding Type", "ixveriwave.vht.u2_coding_type",
FT_UINT24, BASE_DEC, VALS(fec_encoding_vals), 0x000020, NULL, HFILL } },
{ &hf_radiotap_vht_u3_coding_type,
{ "MU[3] Coding Type", "ixveriwave.vht.u3_coding_type",
FT_UINT24, BASE_DEC, VALS(fec_encoding_vals), 0x000040, NULL, HFILL } },
{ &hf_radiotap_vht_beamformed,
{ "Beamformed", "ixveriwave.vht.beamformed",
FT_BOOLEAN, 24, NULL, 0x000100, NULL, HFILL } },
{ &hf_radiotap_vht_crc,
{ "CRC8", "ixveriwave.vht.crc",
FT_UINT24, BASE_HEX, NULL, 0x03fc00, NULL, HFILL } },
{ &hf_radiotap_vht_tail,
{ "Tail", "ixveriwave.vht.tail",
FT_UINT24, BASE_HEX, NULL, 0xfc0000, NULL, HFILL } },
/* VHT-SIG-B */
{ &hf_radiotap_vht_su_sig_b_length_20_mhz,
{ "SIG-B Length", "ixveriwave.vht.sig_b_length",
FT_UINT32, BASE_DEC, NULL, 0x0001ffff, NULL, HFILL } },
{ &hf_radiotap_vht_su_sig_b_length_40_mhz,
{ "SIG-B Length", "ixveriwave.vht.sig_b_length",
FT_UINT32, BASE_DEC, NULL, 0x0007ffff, NULL, HFILL } },
{ &hf_radiotap_vht_su_sig_b_length_80_160_mhz,
{ "SIG-B Length", "ixveriwave.vht.sig_b_length",
FT_UINT32, BASE_DEC, NULL, 0x001fffff, NULL, HFILL } },
{ &hf_radiotap_vht_mu_sig_b_length_20_mhz,
{ "SIG-B Length", "ixveriwave.vht.sig_b_length",
FT_UINT32, BASE_DEC, NULL, 0x0000ffff, NULL, HFILL } },
{ &hf_radiotap_vht_mu_mcs_20_mhz,
{ "MCS index", "ixveriwave.vht.mcs",
FT_UINT32, BASE_DEC, NULL, 0x000f0000, NULL, HFILL } },
{ &hf_radiotap_vht_mu_sig_b_length_40_mhz,
{ "SIG-B Length", "ixveriwave.vht.sig_b_length",
FT_UINT32, BASE_DEC, NULL, 0x0001ffff, NULL, HFILL } },
{ &hf_radiotap_vht_mu_mcs_40_mhz,
{ "MCS index", "ixveriwave.vht.mcs",
FT_UINT32, BASE_DEC, NULL, 0x001e0000, NULL, HFILL } },
{ &hf_radiotap_vht_mu_sig_b_length_80_160_mhz,
{ "SIG-B Length", "ixveriwave.vht.sig_b_length",
FT_UINT32, BASE_DEC, NULL, 0x0007ffff, NULL, HFILL } },
{ &hf_radiotap_vht_mu_mcs_80_160_mhz,
{ "MCS index", "ixveriwave.vht.mcs",
FT_UINT32, BASE_DEC, NULL, 0x00780000, NULL, HFILL } },
{ &hf_radiotap_rfid,
{ "RFID", "ixveriwave.rfid",
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_l2_l4_info,
{"Layer 2-4 Header", "ixveriwave.l2_l4info",
FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL } },
{ &hf_radiotap_bssid,
{"BSS ID", "ixveriwave.bssid",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_clientidvalid,
{ "Client Id Valid", "ixveriwave.clientidvalid",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20, NULL, HFILL } },
{ &hf_radiotap_bssidvalid,
{ "BSS ID Valid", "ixveriwave.bssidvalid",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40, NULL, HFILL } },
{ &hf_radiotap_unicastormulticast,
{ "Unicast/Multicast", "ixveriwave.unicastormulticast",
FT_UINT8, BASE_DEC, VALS(bmbit), 0x80, NULL, HFILL } },
#if 0
{ &hf_radiotap_wlantype,
{ "WLAN Type", "ixveriwave.wlantype",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
#endif
{ &hf_radiotap_tid,
{ "TID", "ixveriwave.tid",
FT_UINT16, BASE_HEX, NULL, 0x01c0, NULL, HFILL } },
{ &hf_radiotap_ac,
{ "AC", "ixveriwave.tx.ac",
FT_UINT8, BASE_HEX, NULL, 0x0e, NULL, HFILL } },
{ &hf_radiotap_l4idvalid,
{ "Layer 4 Id Valid", "ixveriwave.l4idvalid",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10, NULL, HFILL } },
{ &hf_radiotap_containshtfield,
{ "Contains HT Field", "ixveriwave.containshtfield",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20, NULL, HFILL } },
{ &hf_radiotap_istypeqos,
{ "Is Type QOS", "ixveriwave.istypeqos",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40, NULL, HFILL } },
{ &hf_radiotap_flowvalid,
{ "Flow Id Valid", "ixveriwave.flowvalid",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80, NULL, HFILL } },
{ &hf_radiotap_payloaddecode,
{ "Payload Decode", "ixveriwave.payloaddecode",
FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx,
{ "Info field", "ixveriwave.info",
FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL } },
/* rx info decodes for fpga ver VW510021 */
{ &hf_radiotap_vw_info_rx_crypto_wep_encoded,
{ "Crypto WEP Encoded", "ixveriwave.info.crypto_wep_encoded",
FT_BOOLEAN, 24, NULL, 0x000001, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_crypto_tkip_encoded,
{ "Crypto TKIP Encoded", "ixveriwave.info.crypto_tkip_encoded",
FT_UINT24, BASE_DEC, VALS(crypto_TKIP_type), 0x000006, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_crypto_rx_tkip_tsc_seqskip,
{ "Crypto RX TKIP TSC SEQSKIP", "ixveriwave.info.crypto_rx_tkip_tsc_seqskip",
FT_BOOLEAN, 24, NULL, 0x000008, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_crypto_rx_ccmp_pn_seqskip,
{ "Crypto RX CCMP PN SEQSKIP", "ixveriwave.info.crypto_rx_ccmp_pn_seqskip",
FT_BOOLEAN, 24, NULL, 0x000010, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_tkip_not_full_msdu,
{ "TKIP not full MSDU", "ixveriwave.info.tkip_not_full_msdu",
FT_BOOLEAN, 24, NULL, 0x000020, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_mpdu_length_gt_mpdu_octets,
{ "MPDU Length field is greater than MPDU octets", "ixveriwave.info.mpdu_length_gt_mpdu_octets",
FT_BOOLEAN, 24, NULL, 0x000040, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_tkip_ccmp_tsc_seqerr,
{ "RX TKIP / CCMP TSC SEQERR", "ixveriwave.info.tkip_ccmp_tsc_seqerr",
FT_BOOLEAN, 24, NULL, 0x000080, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_ack_withheld_from_frame,
{ "ACK withheld from frame", "ixveriwave.info.ack_withheld_from_frame",
FT_BOOLEAN, 24, NULL, 0x000100, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_client_bssid_matched,
{ "Client BSSID matched", "ixveriwave.info.client_bssid_matched",
FT_BOOLEAN, 24, NULL, 0x000200, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_mpdu_of_a_mpdu,
{ "MPDU of A-MPDU", "ixveriwave.info.mpdu_of_a_mpdu",
FT_BOOLEAN, 24, NULL, 0x000400, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_first_mpdu_of_a_mpdu,
{ "First MPDU of A-MPDU", "ixveriwave.info.first_mpdu_of_a_mpdu",
FT_BOOLEAN, 24, NULL, 0x000800, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_last_mpdu_of_a_mpdu,
{ "Last MPDU of A-MPDU", "ixveriwave.info.last_mpdu_of_a_mpdu",
FT_BOOLEAN, 24, NULL, 0x001000, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_msdu_of_a_msdu,
{ "MSDU of A-MSDU", "ixveriwave.info.msdu_of_a_msdu",
FT_BOOLEAN, 24, NULL, 0x002000, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_first_msdu_of_a_msdu,
{ "First MSDU of A-MSDU", "ixveriwave.info.first_msdu_of_a_msdu",
FT_BOOLEAN, 24, NULL, 0x004000, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_last_msdu_of_a_msdu,
{ "Last MSDU of A-MSDU", "ixveriwave.info.last_msdu_of_a_msdu",
FT_BOOLEAN, 24, NULL, 0x008000, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_layer_1_info_0,
{ "Layer 1 Info[0]", "ixveriwave.info.layer_1_info_0",
FT_UINT24, BASE_DEC, NULL, 0x010000, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_layer_1_info_1,
{ "Layer 1 Info[1]", "ixveriwave.info.layer_1_info_1",
FT_UINT24, BASE_DEC, NULL, 0x020000, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_vht_frame_received_with_vht_sig_b_length,
{ "VHT frame received with the use of the VHT_SIG_B.LENGTH", "ixveriwave.info.vht_frame_received_with_vht_sig_b_length",
FT_BOOLEAN, 24, NULL, 0x040000, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_vht_frame_received_without_vht_sig_b_length,
{ "VHT frame received without the use of VHT_SIG_B.LENGTH", "ixveriwave.info.vht_frame_received_without_vht_sig_b_length",
FT_BOOLEAN, 24, NULL, 0x080000, NULL, HFILL } },
{ &hf_radiotap_vw_info_rx_factory_internal,
{ "Factory Internal", "ixveriwave.info.factory_internal",
FT_UINT24, BASE_DEC, NULL, 0xf00000, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx,
{ "Info field", "ixveriwave.info",
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
/* tx info decodes for VW510021 and previous versions */
{ &hf_radiotap_vw_info_tx_crypto_wep_encoded,
{ "Crypto WEP Encoded", "ixveriwave.info.crypto_wep_encoded",
FT_BOOLEAN, 16, NULL, 0x0001, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_crypto_tkip_encoded,
{ "Crypto TKIP Encoded", "ixveriwave.info.crypto_tkip_encoded",
FT_UINT16, BASE_DEC, VALS(crypto_TKIP_type), 0x0006, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_crypto_c_bit_error,
{ "Crypto C bit Error", "ixveriwave.info.crypto_c_bit_error",
FT_BOOLEAN, 16, NULL, 0x0008, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_crypto_tkip_not_full_msdu,
{ "Crypto TKIP not full MSDU", "ixveriwave.info.crypto_tkip_not_full_msdu",
FT_BOOLEAN, 16, NULL, 0x0010, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_crypto_software_error,
{ "Crypto Software Error", "ixveriwave.info.crypto_software_error",
FT_BOOLEAN, 16, NULL, 0x0020, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_crypto_short_fault,
{ "Crypto Short Fault", "ixveriwave.info.crypto_short_fault",
FT_BOOLEAN, 16, NULL, 0x0040, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_crypto_payload_length_fault,
{ "Crypto Payload Length Fault", "ixveriwave.info.crypto_payload_length_fault",
FT_BOOLEAN, 16, NULL, 0x0080, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_sent_rts_before_data,
{ "Sent RTS before Data", "ixveriwave.info.sent_rts_before_data",
FT_BOOLEAN, 16, NULL, 0x0100, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_sent_cts_to_self_before_data,
{ "Sent CTS to Self before Data", "ixveriwave.info.sent_cts_to_self_before_data",
FT_BOOLEAN, 16, NULL, 0x0200, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_mpdu_of_a_mpdu,
{ "MPDU of A-MPDU", "ixveriwave.info.tx_mpdu_of_a_mpdu",
FT_BOOLEAN, 16, NULL, INFO_MPDU_OF_A_MPDU, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_first_mpdu_of_a_mpdu,
{ "First MPDU of A-MPDU", "ixveriwave.info.first_mpdu_of_a_mpdu",
FT_BOOLEAN, 16, NULL, INFO_FIRST_MPDU_OF_A_MPDU, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_last_mpdu_of_a_mpdu,
{ "Last MPDU of A-MPDU", "ixveriwave.info.last_mpdu_of_a_mpdu",
FT_BOOLEAN, 16, NULL, INFO_LAST_MPDU_OF_A_MPDU, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_msdu_of_a_msdu,
{ "MSDU of A-MSDU", "ixveriwave.info.msdu_of_a_msdu",
FT_BOOLEAN, 16, NULL, INFO_MSDU_OF_A_MSDU, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_first_msdu_of_a_msdu,
{ "First MSDU of A-MSDU", "ixveriwave.info.first_msdu_of_a_msdu",
FT_BOOLEAN, 16, NULL, INFO_FIRST_MSDU_OF_A_MSDU, NULL, HFILL } },
{ &hf_radiotap_vw_info_tx_last_msdu_of_a_msdu,
{ "Last MSDU of A-MSDU", "ixveriwave.info.last_msdu_of_a_msdu",
FT_BOOLEAN, 16, NULL, INFO_LAST_MSDU_OF_A_MSDU, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_sig_field_crc_parity_error,
{ "SIG Field CRC/Parity Error", "ixveriwave.errors.sig_field_crc_parity_error",
FT_BOOLEAN, 32, NULL, 0x00000001, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_non_supported_service_field,
{ "Non-supported service field", "ixveriwave.errors.non_supported_service_field",
FT_BOOLEAN, 32, NULL, 0x00000002, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_frame_length_error,
{ "Frame Length Error", "ixveriwave.errors.frame_length_error",
FT_BOOLEAN, 32, NULL, 0x00000004, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_vht_sig_ab_crc_error,
{ "VHT_SIG_A/B CRC Error", "ixveriwave.errors.vht_sig_ab_crc_error",
FT_BOOLEAN, 32, NULL, 0x00000008, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_crc32_error,
{ "CRC32 Error", "ixveriwave.errors.crc32_error",
FT_BOOLEAN, 32, NULL, 0x00000010, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_l2_de_aggregation_error,
{ "L2 de-aggregation error", "ixveriwave.errors.l2_de_aggregation_error",
FT_BOOLEAN, 32, NULL, 0x00000020, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_duplicate_mpdu,
{ "Duplicate MPDU", "ixveriwave.errors.duplicate_mpdu",
FT_BOOLEAN, 32, NULL, 0x00000040, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_bad_flow_magic_number,
{ "Bad flow magic number", "ixveriwave.errors.bad_flow_magic_number",
FT_BOOLEAN, 32, NULL, 0x00000080, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_bad_flow_payload_checksum,
{ "Bad flow payload checksum", "ixveriwave.errors.bad_flow_payload_checksum",
FT_BOOLEAN, 32, NULL, 0x00000100, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_illegal_vht_sig_value,
{ "Illegal VHT_SIG Value", "ixveriwave.errors.illegal_vht_sig_value",
FT_BOOLEAN, 32, NULL, 0x00000200, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_ip_checksum_error,
{ "IP checksum error", "ixveriwave.errors.ip_checksum_error",
FT_BOOLEAN, 32, NULL, 0x00000400, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_l4_checksum_error,
{ "L4 (TCP/ICMP/IGMP/UDP) checksum error", "ixveriwave.errors.l4_checksum_error",
FT_BOOLEAN, 32, NULL, 0x00000800, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_l1_unsupported_feature,
{ "Layer 1 Unsupported Feature", "ixveriwave.errors.l1_unsupported_feature",
FT_BOOLEAN, 32, NULL, 0x00001000, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_l1_packet_termination,
{ "Layer 1 Packet Termination", "ixveriwave.errors.l1_packet_termination",
FT_BOOLEAN, 32, NULL, 0x00004000, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_internal_error_bit15,
{ "Internal Error", "ixveriwave.errors.internal_error",
FT_BOOLEAN, 32, NULL, 0x00008000, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_wep_mic_miscompare,
{ "WEP IVC/TKIP/CCMP/BIP MIC Miscompare", "ixveriwave.errors.wep_mic_miscompare",
FT_BOOLEAN, 32, NULL, 0x00010000, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_wep_tkip_rate_exceeded,
{ "WEP/TKIP Rate Exceeded", "ixveriwave.errors.wep_tkip_rate_exceeded",
FT_BOOLEAN, 32, NULL, 0x00020000, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_crypto_short_error,
{ "Crypto Short Error", "ixveriwave.errors.crypto_short_error",
FT_BOOLEAN, 32, NULL, 0x00040000, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_extiv_fault_a,
{ "EXTIV Fault A", "ixveriwave.errors.extiv_fault_a",
FT_BOOLEAN, 32, NULL, 0x00080000, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_extiv_fault_b,
{ "EXTIV Fault B", "ixveriwave.errors.extiv_fault_b",
FT_BOOLEAN, 32, NULL, 0x00100000, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_internal_error_bit21,
{ "Internal Error", "ixveriwave.errors.internal_error",
FT_BOOLEAN, 32, NULL, 0x00200000, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_protected_fault_a,
{ "Protected Fault A", "ixveriwave.errors.protected_fault_a",
FT_BOOLEAN, 32, NULL, 0x00400000, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_rx_mac_crypto_incompatibility,
{ "RX MAC Crypto Incompatibility", "ixveriwave.errors.rx_mac_crypto_incompatibility",
FT_BOOLEAN, 32, NULL, 0x00800000, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_factory_debug,
{ "Factory Debug", "ixveriwave.errors.factory_debug",
FT_UINT32, BASE_HEX, NULL, 0x7F000000, NULL, HFILL } },
{ &hf_radiotap_vw_errors_rx_internal_error_bit32,
{ "Internal Error", "ixveriwave.errors.internal_error",
FT_BOOLEAN, 32, NULL, 0x80000000, NULL, HFILL } },
{ &hf_radiotap_vw_errors_tx_packet_fcs_error,
{ "Packet FCS error", "ixveriwave.errors.packet_fcs_error",
FT_BOOLEAN, 16, NULL, 0x0002, NULL, HFILL } },
{ &hf_radiotap_vw_errors_tx_ip_checksum_error,
{ "IP checksum error", "ixveriwave.errors.ip_checksum_error",
FT_BOOLEAN, 16, NULL, 0x0020, NULL, HFILL } },
{ &hf_radiotap_vw_tx_retrycount,
{ "Retry Count", "ixveriwave.tx.retrycount",
FT_UINT8, BASE_DEC, NULL, 0x1f, NULL, HFILL } },
{ &hf_radiotap_vw_tx_factorydebug,
{ "Factory Debug", "ixveriwave.tx.factorydebug",
FT_UINT16, BASE_HEX, NULL, 0x7f80, NULL, HFILL } },
};
static int *ett[] = {
&ett_commontap,
&ett_commontap_times,
&ett_ethernettap_info,
&ett_ethernettap_error,
&ett_ethernettap_flags,
&ett_radiotap_flags,
&ett_radiotap_info,
&ett_radiotap_times,
&ett_radiotap_errors,
&ett_radiotap_layer1,
&ett_radiotap_layer2to4,
&ett_radiotap_rf,
&ett_radiotap_plcp,
&ett_radiotap_infoc,
&ett_rf_info,
&ett_radiotap_contextp,
};
proto_ixveriwave = proto_register_protocol("ixveriwave", "ixveriwave", "ixveriwave");
proto_register_field_array(proto_ixveriwave, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
ixveriwave_handle = register_dissector("ixveriwave", dissect_ixveriwave, proto_ixveriwave);
}
void proto_reg_handoff_ixveriwave(void)
{
/* handle for ethertype dissector */
ethernet_handle = find_dissector_add_dependency("eth_withoutfcs", proto_ixveriwave);
/* handle for 802.11+radio information dissector */
ieee80211_radio_handle = find_dissector_add_dependency("wlan_radio", proto_ixveriwave);
dissector_add_uint("wtap_encap", WTAP_ENCAP_IXVERIWAVE, ixveriwave_handle);
}
/*
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/
|