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
|
/* msg_dcd.c
* WiMax MAC Management DCD Message decoder
*
* Copyright (c) 2007 by Intel Corporation.
*
* Author: Lu Pan <lu.pan@intel.com>
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1999 Gerald Combs
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
/* Include files */
#include "config.h"
/*
#define DEBUG
*/
#include <epan/packet.h>
#include <epan/unit_strings.h>
#include <wsutil/array.h>
#include "wimax_tlv.h"
#include "wimax_mac.h"
#include "wimax_utils.h"
#include "wimax_prefs.h"
void proto_register_mac_mgmt_msg_dcd(void);
void proto_reg_handoff_mac_mgmt_msg_dcd(void);
static dissector_handle_t dcd_handle;
static int proto_mac_mgmt_msg_dcd_decoder;
static int ett_mac_mgmt_msg_dcd_decoder;
/* fix fields */
static int hf_dcd_downlink_channel_id;
static int hf_dcd_config_change_count;
static int hf_dcd_dl_burst_profile_rsv;
static int hf_dcd_dl_burst_profile_diuc;
static int hf_dcd_bs_eirp;
static int hf_dcd_frame_duration;
static int hf_dcd_phy_type;
static int hf_dcd_power_adjustment;
static int hf_dcd_channel_nr;
static int hf_dcd_ttg;
static int hf_dcd_rtg;
#ifdef WIMAX_16D_2004
static int hf_dcd_rss;
#endif
static int hf_dcd_channel_switch_frame_nr;
static int hf_dcd_frequency;
static int hf_dcd_bs_id;
static int hf_dcd_frame_duration_code;
static int hf_dcd_frame_nr;
#ifdef WIMAX_16D_2004
static int hf_dcd_size_cqich_id;
static int hf_dcd_h_arq_ack_delay_dl;
#else
static int hf_dcd_h_arq_ack_delay_ul;
#endif
static int hf_dcd_mac_version;
static int hf_dcd_restart_count;
/* static int hf_dl_burst_reserved; */
/* static int hf_dl_burst_diuc; */
static int hf_dcd_burst_freq;
static int hf_dcd_burst_fec;
static int hf_dcd_burst_diuc_exit_threshold;
static int hf_dcd_burst_diuc_entry_threshold;
static int hf_dcd_burst_tcs;
static int hf_dcd_tlv_t_19_permutation_type_for_broadcast_regions_in_harq_zone;
static int hf_dcd_tlv_t_20_maximum_retransmission;
static int hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter;
static int hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_physical_cinr_measurements;
static int hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_rssi_measurements;
static int hf_dcd_tlv_t_22_dl_amc_allocated_physical_bands_bitmap;
static int hf_dcd_tlv_t_34_dl_region_definition;
static int hf_dcd_tlv_t_34_dl_region_definition_num_region;
static int hf_dcd_tlv_t_34_dl_region_definition_reserved;
static int hf_dcd_tlv_t_34_dl_region_definition_symbol_offset;
static int hf_dcd_eirxp;
static int hf_dcd_tlv_t_34_dl_region_definition_subchannel_offset;
static int hf_dcd_tlv_t_34_dl_region_definition_num_symbols;
static int hf_dcd_tlv_t_34_dl_region_definition_num_subchannels;
static int hf_dcd_tlv_t_50_ho_type_support;
static int hf_dcd_tlv_t_50_ho_type_support_ho;
static int hf_dcd_tlv_t_50_ho_type_support_mdho;
static int hf_dcd_tlv_t_50_ho_type_support_fbss_ho;
static int hf_dcd_tlv_t_50_ho_type_support_reserved;
static int hf_dcd_tlv_t_31_h_add_threshold;
static int hf_dcd_tlv_t_45_paging_interval_length;
static int hf_dcd_tlv_t_45_paging_interval_reserved;
static int hf_dcd_tlv_t_32_h_delete_threshold;
static int hf_dcd_tlv_t_33_asr;
static int hf_dcd_tlv_t_33_asr_m;
static int hf_dcd_tlv_t_33_asr_l;
static int hf_dcd_tlv_t_35_paging_group_id;
static int hf_dcd_tlv_t_36_tusc1_permutation_active_subchannels_bitmap;
static int hf_dcd_tlv_t_37_tusc2_permutation_active_subchannels_bitmap;
static int hf_dcd_tlv_t_51_hysteresis_margin;
static int hf_dcd_tlv_t_52_time_to_trigger_duration;
static int hf_dcd_tlv_t_60_noise_interference;
static int hf_dcd_tlv_t_153_downlink_burst_profile_for_mutiple_fec_types;
static int hf_dcd_tlv_t_541_type_function_action;
static int hf_dcd_tlv_t_541_type;
static int hf_dcd_tlv_t_541_function;
static int hf_dcd_tlv_t_541_action;
static int hf_dcd_tlv_t_542_trigger_value;
static int hf_dcd_tlv_t_543_trigger_averaging_duration;
static int hf_dcd_unknown_type;
static int hf_dcd_invalid_tlv;
/* DCD DIUC messages (table 143) */
static const value_string diuc_msgs[] =
{
{ 0, "Downlink Burst Profile 1"},
{ 1, "Downlink Burst Profile 2"},
{ 2, "Downlink Burst Profile 3"},
{ 3, "Downlink Burst Profile 4"},
{ 4, "Downlink Burst Profile 5"},
{ 5, "Downlink Burst Profile 6"},
{ 6, "Downlink Burst Profile 7"},
{ 7, "Downlink Burst Profile 8"},
{ 8, "Downlink Burst Profile 9"},
{ 9, "Downlink Burst Profile 10"},
{10, "Downlink Burst Profile 11"},
{11, "Downlink Burst Profile 12"},
{12, "Downlink Burst Profile 13"},
{13, "Reserved"},
{14, "Gap"},
{15, "End of DL-MAP"},
{0, NULL}
};
static const value_string vals_dcd_type[] =
{
{0, "CINR metric"},
{1, "RSSI metric"},
{2, "RTD metric"},
{3, "Reserved"},
{0, NULL}
};
static const value_string vals_dcd_function[] =
{
{0, "Reserved"},
{1, "Metric of neighbor BS is greater than absolute value"},
{2, "Metric of neighbor BS is less than absolute value"},
{3, "Metric of neighbor BS is greater than serving BS metric by relative value"},
{4, "Metric of neighbor BS is less than serving BS metric by relative value"},
{5, "Metric of serving BS greater than absolute value"},
{6, "Metric of serving BS less than absolute value"},
{7, "Reserved"},
{0, NULL}
};
static const value_string vals_dcd_action[] =
{
{0, "Reserved"},
{1, "Respond on trigger with MOB_SCN-REP after the end of each scanning interval"},
{2, "Respond on trigger with MOB_MSH-REQ"},
{3, "On trigger, MS starts neighbor BS scanning process by sending MOB_SCN-REQ"},
{4, "Reserved"},
{0, NULL}
};
static const value_string vals_dcd_power_adjustmnt[] =
{
{0, "Preserve Peak Power"},
{1, "Preserve Mean Power"},
{0, NULL}
};
#if 0
static const true_false_string tfs_dcd_power_adjustment =
{
"Preserve Mean Power",
"Preserve Peak Power"
};
#endif
#if 0
static const value_string vals_reg_rsp_status[] =
{
{0, "OK"},
{1, "Message authentication failure"},
{0, NULL}
};
#endif
static const value_string vals_dcd_burst_tcs[] =
{
{0, "TCS disabled"},
{1, "TCS enabled"},
{0, NULL}
};
#if 0
static const true_false_string tfs_dcd_burst_tcs =
{
"TCS enabled",
"TCS disabled"
};
#endif
static const value_string vals_dcd_frame_duration[] =
{
{0, "2.5"},
{1, "4"},
{2, "5"},
{3, "8"},
{4, "10"},
{5, "12.5"},
{6, "20"},
{0, NULL}
};
#ifdef WIMAX_16D_2004
static const value_string vals_dcd_size_of_cqich_id[] =
{
{0, "Reserved"},
{1, "3 bits"},
{2, "4 bits"},
{3, "5 bits"},
{4, "6 bits"},
{5, "7 bits"},
{6, "8 bits"},
{7, "9 bits"},
{0, NULL}
};
#endif
static const value_string vals_dcd_mac_version[] =
{
{ 1, "Conformance with IEEE Std 802.16-2001"},
{ 2, "Conformance with IEEE Std 802.16c-2002 and its predecessors"},
{ 3, "Conformance with IEEE Std 802.16a-2003 and its predecessors"},
{ 4, "Conformance with IEEE Std 802.16-2004"},
{ 5, "Conformance with IEEE Std 802.16-2004 and IEEE Std 802.16e-2005"},
{ 6, "Conformance with IEEE Std 802.16-2004, IEEE Std 802.16e-2005 and IEEE Std 802.16f-2005"},
{ 7, "Conformance with IEEE Std 802.16-2004, IEEE Std 802.16e-2005, IEEE Std 802.16f-2005 and IEEE Std 802.16g-2007"},
{ 8, "Conformance with IEEE Std 802.16-2009"},
{ 9, "Conformance with IEEE Std 802.16-2009 and IEEE Std 802.16j-2009"},
{10, "Reserved"},
{0, NULL}
};
/* table 363 */
static const value_string vals_dcd_burst_fec_ofdma[] =
{
{ 0, "QPSK (CC) 1/2"},
{ 1, "QPSK (CC) 3/4"},
{ 2, "16-QAM (CC) 1/2"},
{ 3, "16-QAM (CC) 3/4"},
{ 4, "64-QAM (CC) 1/2"},
{ 5, "64-QAM (CC) 2/3"},
{ 6, "64-QAM (CC) 3/4"},
{ 7, "QPSK (BTC) 1/2"},
{ 8, "QPSK (BTC) 3/4 or 2/3"},
{ 9, "16-QAM (BTC) 3/5"},
{10, "16-QAM (BTC) 4/5"},
{11, "64-QAM (BTC) 2/3 or 5/8"},
{12, "64-QAM (BTC) 5/6 or 4/5"},
{13, "QPSK (CTC) 1/2"},
{14, "Reserved"},
{15, "QPSK (CTC) 3/4"},
{16, "16-QAM (CTC) 1/2"},
{17, "16-QAM (CTC) 3/4"},
{18, "64-QAM (CTC) 1/2"},
{19, "64-QAM (CTC) 2/3"},
{20, "64-QAM (CTC) 3/4"},
{21, "64-QAM (CTC) 5/6"},
{22, "QPSK (ZT CC) 1/2"},
{23, "QPSK (ZT CC) 3/4"},
{24, "16-QAM (ZT CC) 1/2"},
{25, "16-QAM (ZT CC) 3/4"},
{26, "64-QAM (ZT CC) 1/2"},
{27, "64-QAM (ZT CC) 2/3"},
{28, "64-QAM (ZT CC) 3/4"},
{29, "QPSK (LDPC) 1/2"},
{30, "QPSK (LDPC) 2/3 A code"},
{31, "16-QAM (LDPC) 3/4 A code"},
{32, "16-QAM (LDPC) 1/2"},
{33, "16-QAM (LDPC) 2/3 A code"},
{34, "16-QAM (LDPC) 3/4 A code"},
{35, "64-QAM (LDPC) 1/2"},
{36, "64-QAM (LDPC) 2/3 A code"},
{37, "64-QAM (LDPC) 3/4 A code"},
{38, "QPSK (LDPC) 2/3 B code"},
{39, "QPSK (LDPC) 3/4 B code"},
{40, "16-QAM (LDPC) 2/3 B code"},
{41, "16-QAM (LDPC) 3/4 B code"},
{42, "64-QAM (LDPC) 2/3 B code"},
{43, "64-QAM (LDPC) 3/4 B code"},
{44, "QPSK (CC with optional interleaver) 1/2"},
{45, "QPSK (CC with optional interleaver) 3/4"},
{46, "16-QAM (CC with optional interleaver) 1/2"},
{47, "16-QAM (CC optional interleaver) 3/4"},
{48, "64-QAM (CC with optional interleaver) 2/3"},
{49, "64-QAM (CC with optional interleaver) 3/4"},
{50, "QPSK (LDPC) 5/6"},
{51, "16-QAM (LDPC) 5/6"},
{52, "64-QAM (LDPC) 5/6"},
{0, NULL}
};
static const value_string vals_dcd_permutation_type[] =
{
{0, "PUSC"},
{1, "FUSC"},
{2, "optional FUSC"},
{3, "AMC"},
{0, NULL}
};
static const value_string tfs_support[] =
{
{0, "not supported"},
{1, "supported"},
{0, NULL}
};
/* WiMax MAC Management DCD message (table 15) dissector */
static int dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
unsigned offset = 0;
unsigned tvb_len, length;
int tlv_type, tlv_len, tlv_offset, tlv_value_offset;
unsigned dl_burst_diuc, dl_num_regions;
proto_item *dcd_item, *tlv_item, *sub_item;
proto_tree *dcd_tree, *tlv_tree, *sub_tree;
tlv_info_t tlv_info;
char* proto_str;
{ /* we are being asked for details */
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type DCD */
dcd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset, tvb_len, "Downlink Channel Descriptor (DCD)");
/* add MAC DCD subtree */
dcd_tree = proto_item_add_subtree(dcd_item, ett_mac_mgmt_msg_dcd_decoder);
/* Decode and display the Downlink Channel Descriptor (DCD) */
/* display the Downlink Channel ID */
proto_tree_add_item(dcd_tree, hf_dcd_downlink_channel_id, tvb, offset, 1, ENC_BIG_ENDIAN);
/* set the offset for the Configuration Change Count */
offset++;
/* display the Configuration Change Count */
proto_tree_add_item(dcd_tree, hf_dcd_config_change_count, tvb, offset, 1, ENC_BIG_ENDIAN);
/* set the offset for the TLV Encoded info */
offset++;
/* process the DCD TLV Encoded information (table 358) */
while(offset < tvb_len)
{
/* get the TLV information */
init_tlv_info(&tlv_info, tvb, offset);
/* get the TLV type */
tlv_type = get_tlv_type(&tlv_info);
/* get the TLV length */
tlv_len = get_tlv_length(&tlv_info);
if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
{ /* invalid tlv info */
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DCD TLV error");
proto_tree_add_item(dcd_tree, hf_dcd_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
break;
}
/* get the TLV value offset */
tlv_value_offset = get_tlv_value_offset(&tlv_info);
#ifdef DEBUG /* for debug only */
proto_tree_add_protocol_format(dcd_tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset, (tlv_len + tlv_value_offset), "DCD Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, tlv_len, offset, tvb_len);
#endif
/* update the offset */
offset += tlv_value_offset;
/* process DCD TLVs */
switch (tlv_type)
{
case DCD_DOWNLINK_BURST_PROFILE:
{ /* Downlink Burst Profile TLV (table 363)*/
/* get the DIUC */
dl_burst_diuc = (tvb_get_uint8(tvb, offset) & 0x0F);
/* display TLV info */
/* add TLV subtree */
proto_str = wmem_strdup_printf(pinfo->pool, "Downlink_Burst_Profile (DIUC=%u)", dl_burst_diuc);
tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dcd_decoder, dcd_tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset-tlv_value_offset, tlv_len, proto_str);
/* detail display */
proto_tree_add_item(tlv_tree, hf_dcd_dl_burst_profile_rsv, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_dcd_dl_burst_profile_diuc, tvb, offset, 1, ENC_BIG_ENDIAN);
/* process subTLVs */
for (tlv_offset = 1; tlv_offset < tlv_len; )
{ /* get the TLV information */
init_tlv_info(&tlv_info, tvb, (offset+tlv_offset));
/* get the TLV type */
tlv_type = get_tlv_type(&tlv_info);
/* get the TLV length */
length = get_tlv_length(&tlv_info);
if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
{ /* invalid tlv info */
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DL Burst Profile TLV error");
proto_tree_add_item(tlv_tree, hf_dcd_invalid_tlv, tvb, offset, (tlv_len - offset - tlv_offset), ENC_NA);
break;
}
switch (tlv_type)
{
case DCD_BURST_FREQUENCY:
{
add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_freq, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
break;
}
case DCD_BURST_FEC_CODE_TYPE:
{
add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_fec, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
break;
}
case DCD_BURST_DIUC_EXIT_THRESHOLD:
{
add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_diuc_exit_threshold, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
break;
}
case DCD_BURST_DIUC_ENTRY_THRESHOLD:
{
add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_diuc_entry_threshold, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
break;
}
case DCD_BURST_TCS_ENABLE:
{
add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_tcs, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
break;
}
default:
/* ??? */
break;
}
tlv_offset += (length+get_tlv_value_offset(&tlv_info));
}
break;
}
case DCD_BS_EIRP:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_bs_eirp, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_FRAME_DURATION:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_frame_duration, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_PHY_TYPE:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_phy_type, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_POWER_ADJUSTMENT:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_power_adjustment, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_CHANNEL_NR:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_channel_nr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_TTG:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_ttg, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_RTG:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_rtg, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
#ifdef WIMAX_16D_2004
case DCD_RSS:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_rss, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
#else
case DCD_EIRXP:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_eirxp, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
#endif
case DCD_CHANNEL_SWITCH_FRAME_NR:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_channel_switch_frame_nr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_FREQUENCY:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_frequency, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_BS_ID:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_bs_id, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_FRAME_DURATION_CODE:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_frame_duration_code, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_FRAME_NR:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_frame_nr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
#ifdef WIMAX_16D_2004
case DCD_SIZE_CQICH_ID:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_size_cqich_id, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
#endif
case DCD_H_ARQ_ACK_DELAY:
{
#ifdef WIMAX_16D_2004
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_h_arq_ack_delay_dl, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
#else
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_h_arq_ack_delay_ul, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
#endif
break;
}
case DCD_MAC_VERSION:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_mac_version, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_19_PERMUTATION_TYPE_FOR_BROADCAST_REGION_IN_HARQ_ZONE:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_19_permutation_type_for_broadcast_regions_in_harq_zone, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_20_MAXIMUM_RETRANSMISSION:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_20_maximum_retransmission, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_21_DEFAULT_RSSI_AND_CINR_AVERAGING_PARAMETER:
{
tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_physical_cinr_measurements, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_rssi_measurements, tvb, offset, 1, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_22_DL_AMC_ALLOCATED_PHYSICAL_BANDS_BITMAP:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_22_dl_amc_allocated_physical_bands_bitmap, tvb, offset-tlv_value_offset, ENC_NA);
break;
}
case DCD_TLV_T_34_DL_REGION_DEFINITION:
{
tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_34_dl_region_definition, tvb, offset-tlv_value_offset, ENC_NA);
tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
dl_num_regions = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_num_region, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
tlv_offset = offset;
for(length = 0; length < dl_num_regions; length++)
{
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_symbol_offset, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_subchannel_offset, tvb, (tlv_offset+1), 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_num_symbols, tvb, (tlv_offset+2), 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_num_subchannels, tvb, (tlv_offset+3), 1, ENC_BIG_ENDIAN);
tlv_offset += 4;
}
break;
}
case DCD_TLV_T_50_HO_TYPE_SUPPORT:
{
tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_50_ho_type_support, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_50_ho_type_support_ho, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_50_ho_type_support_mdho, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_50_ho_type_support_fbss_ho, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_50_ho_type_support_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_31_H_ADD_THRESHOLD:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_31_h_add_threshold, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_32_H_DELETE_THRESHOLD:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_32_h_delete_threshold, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_33_ASR:
{
tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_33_asr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_33_asr_m, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_33_asr_l, tvb, offset, 1, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_35_PAGING_GROUP_ID:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_35_paging_group_id, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_36_TUSC1_PERMUTATION_ACTIVE_SUBCHANNELS_BITMAP:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_36_tusc1_permutation_active_subchannels_bitmap, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_37_TUSC2_PERMUTATION_ACTIVE_SUBCHANNELS_BITMAP:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_37_tusc2_permutation_active_subchannels_bitmap, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_51_HYSTERSIS_MARGIN:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_51_hysteresis_margin, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_52_TIME_TO_TRIGGER_DURATION:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_52_time_to_trigger_duration, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_54_TRIGGER:
{ /* Trigger TLV (table 358a & 358b) */
/* add TLV subtree */
tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dcd_decoder, dcd_tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset-tlv_value_offset, tlv_len, "DCD Trigger");
for (tlv_offset = 0; tlv_offset < tlv_len; )
{
/* get the TLV information */
init_tlv_info(&tlv_info, tvb, (offset + tlv_offset));
/* get the TLV type */
tlv_type = get_tlv_type(&tlv_info);
/* get the TLV length */
length = get_tlv_length(&tlv_info);
if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
{ /* invalid tlv info */
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Trigger TLV error");
proto_tree_add_item(tlv_tree, hf_dcd_invalid_tlv, tvb, offset, (tlv_len - offset - tlv_offset), ENC_NA);
break;
}
/* update the offset */
tlv_offset += get_tlv_value_offset(&tlv_info);
/* table 358a */
switch (tlv_type)
{
case DCD_TLV_T_541_TYPE_FUNCTION_ACTION:
{ /* table 358b */
sub_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_tlv_t_541_type_function_action, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
sub_tree = proto_item_add_subtree(sub_item, ett_mac_mgmt_msg_dcd_decoder);
proto_tree_add_item(sub_tree, hf_dcd_tlv_t_541_type, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_dcd_tlv_t_541_function, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_dcd_tlv_t_541_action, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
}
break;
case DCD_TLV_T542_TRIGGER_VALUE:
add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_tlv_t_542_trigger_value, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
break;
case DCD_TLV_T_543_TRIGGER_AVERAGING_DURATION:
add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_tlv_t_543_trigger_averaging_duration, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
break;
}
tlv_offset += length;
}
break;
}
case DCD_TLV_T_60_NOISE_AND_INTERFERENCE:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_60_noise_interference, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_153_DOWNLINK_BURST_PROFILE_FOR_MULTIPLE_FEC_TYPES:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_153_downlink_burst_profile_for_mutiple_fec_types, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_RESTART_COUNT:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_restart_count, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
}
case DCD_TLV_T_45_PAGING_INTERVAL_LENGTH:
{
if (include_cor2_changes) {
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_45_paging_interval_reserved, tvb, offset-tlv_value_offset, ENC_NA);
} else {
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_45_paging_interval_length, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
}
break;
}
default:
{
add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_unknown_type, tvb, offset-tlv_value_offset, ENC_NA);
break;
}
}
offset += tlv_len;
} /* end of TLV process while loop */
}
return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
void proto_register_mac_mgmt_msg_dcd(void)
{
/* DCD display */
static hf_register_info hf[] =
{
{
&hf_dcd_tlv_t_33_asr,
{
"ASR (Anchor Switch Report) Slot Length (M) and Switching Period (L)", "wmx.dcd.asr",
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_33_asr_l,
{
"ASR Switching Period (L)", "wmx.dcd.asr.l",
FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_frame_frames), 0x0f, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_33_asr_m,
{
"ASR Slot Length (M)", "wmx.dcd.asr.m",
FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_frame_frames), 0xf0, NULL, HFILL
}
},
{
&hf_dcd_bs_eirp,
{
"BS EIRP", "wmx.dcd.bs_eirp",
FT_INT16, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_dbm), 0x00, NULL, HFILL
}
},
{
&hf_dcd_bs_id,
{
"Base Station ID", "wmx.dcd.bs_id",
FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_restart_count,
{
"BS Restart Count", "wmx.dcd.bs_restart_count",
FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
}
},
#if 0
{
&hf_dl_burst_diuc,
{
"DIUC", "wmx.dcd.burst.diuc",
FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
}
},
#endif
{
&hf_dcd_burst_diuc_entry_threshold,
{
"DIUC Minimum Entry Threshold (in 0.25 dB units)", "wmx.dcd.burst.diuc_entry_threshold",
FT_FLOAT, BASE_NONE, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_burst_diuc_exit_threshold,
{
"DIUC Mandatory Exit Threshold (in 0.25 dB units)", "wmx.dcd.burst.diuc_exit_threshold",
FT_FLOAT, BASE_NONE, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_burst_fec,
{
"FEC Code Type", "wmx.dcd.burst.fec",
FT_UINT8, BASE_DEC, VALS(vals_dcd_burst_fec_ofdma), 0x00, NULL, HFILL
}
},
{
&hf_dcd_burst_freq,
{
"Frequency", "wmx.dcd.burst.freq",
FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_khz), 0x00, NULL, HFILL
}
},
#if 0
{
&hf_dl_burst_reserved,
{
"Reserved", "wmx.dcd.burst.reserved",
FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL
}
},
#endif
{
&hf_dcd_burst_tcs,
{
"TCS", "wmx.dcd.burst.tcs",
FT_UINT8, BASE_DEC, VALS(vals_dcd_burst_tcs), 0x00, NULL, HFILL
}
},
{
&hf_dcd_channel_nr,
{
"Channel Nr", "wmx.dcd.channel_nr",
FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_config_change_count,
{
"Configuration Change Count", "wmx.dcd.config_change_count",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_physical_cinr_measurements,
{
"Default Averaging Parameter for Physical CINR Measurements (in multiples of 1/16)", "wmx.dcd.default_physical_cinr_meas_averaging_parameter",
FT_UINT8, BASE_HEX, NULL, 0xf0, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter,
{
"Default RSSI and CINR Averaging Parameter", "wmx.dcd.default_rssi_and_cinr_averaging_parameter",
FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_rssi_measurements,
{
"Default Averaging Parameter for RSSI Measurements (in multiples of 1/16)", "wmx.dcd.default_rssi_meas_averaging_parameter",
FT_UINT8, BASE_HEX, NULL, 0x0f, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_22_dl_amc_allocated_physical_bands_bitmap,
{
"DL AMC Allocated Physical Bands Bitmap", "wmx.dcd.dl_amc_allocated_phy_bands_bitmap",
FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
}
},
{
&hf_dcd_dl_burst_profile_diuc,
{
"DIUC", "wmx.dcd.dl_burst_profile_diuc",
FT_UINT8, BASE_DEC, VALS(diuc_msgs), 0x0F, NULL, HFILL
}
},
{
&hf_dcd_dl_burst_profile_rsv,
{
"Reserved", "wmx.dcd.dl_burst_profile_rsv",
FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL
}
},
{
&hf_dcd_downlink_channel_id,
{
"Reserved", "wmx.dcd.dl_channel_id",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_153_downlink_burst_profile_for_mutiple_fec_types,
{
"Downlink Burst Profile for Multiple FEC Types","wmx.dcd.dl_burst_profile_multiple_fec_types",
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_34_dl_region_definition,
{
"DL Region Definition", "wmx.dcd.dl_region_definition",
FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_34_dl_region_definition_num_region,
{
"Number of Regions", "wmx.dcd.dl_region_definition.num_region",
FT_UINT8, BASE_DEC, NULL, 0xFC, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_34_dl_region_definition_num_subchannels,
{
"Number of Subchannels", "wmx.dcd.dl_region_definition.num_subchannels",
FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_34_dl_region_definition_num_symbols,
{
"Number of OFDMA Symbols", "wmx.dcd.dl_region_definition.num_symbols",
FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_34_dl_region_definition_reserved,
{
"Reserved", "wmx.dcd.dl_region_definition.reserved",
FT_UINT8, BASE_DEC, NULL, 0x03, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_34_dl_region_definition_subchannel_offset,
{
"Subchannel Offset", "wmx.dcd.dl_region_definition.subchannel_offset",
FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_34_dl_region_definition_symbol_offset,
{
"OFDMA Symbol Offset", "wmx.dcd.dl_region_definition.symbol_offset",
FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
}
},
#ifndef WIMAX_16D_2004
{
&hf_dcd_eirxp,
{
"EIRXP (IR, max)", "wmx.dcd.eirxp",
FT_INT16, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_dbm), 0x00, NULL, HFILL
}
},
#endif
{
&hf_dcd_frame_duration,
{
"Frame Duration", "wmx.dcd.frame_duration",
FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_frame_duration_code,
{
"Frame Duration Code", "wmx.dcd.frame_duration_code",
FT_UINT8, BASE_HEX, VALS(vals_dcd_frame_duration), 0x00, NULL, HFILL
}
},
{
&hf_dcd_frame_nr,
{
"Frame Number", "wmx.dcd.frame_nr",
FT_UINT24, BASE_DEC, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_frequency,
{
"Downlink Center Frequency", "wmx.dcd.frequency",
FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_khz), 0x00, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_31_h_add_threshold,
{
"H_add Threshold", "wmx.dcd.h_add_threshold",
FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_db), 0x0, NULL, HFILL
}
},
#ifdef WIMAX_16D_2004
{
&hf_dcd_h_arq_ack_delay_dl,
{
"H-ARQ ACK Delay for DL Burst", "wmx.dcd.h_arq_ack_delay_dl_burst",
FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_frame_offset), 0x00, "", HFILL
}
},
#else
{
&hf_dcd_h_arq_ack_delay_ul,
{
"H-ARQ ACK Delay for UL Burst", "wmx.dcd.h_arq_ack_delay_ul_burst",
FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_frame_offset), 0x00, NULL, HFILL
}
},
#endif
{
&hf_dcd_tlv_t_32_h_delete_threshold,
{
"H_delete Threshold", "wmx.dcd.h_delete_threshold",
FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_db), 0x0, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_50_ho_type_support,
{
"HO Type Support", "wmx.dcd.ho_type_support",
FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_50_ho_type_support_fbss_ho,
{
"FBSS HO", "wmx.dcd.ho_type_support.fbss_ho",
FT_UINT8, BASE_HEX, VALS(tfs_support), 0x20, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_50_ho_type_support_ho,
{
"HO", "wmx.dcd.ho_type_support.ho",
FT_UINT8, BASE_HEX, VALS(tfs_support), 0x80, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_50_ho_type_support_mdho,
{
"MDHO", "wmx.dcd.ho_type_support.mdho",
FT_UINT8, BASE_HEX, VALS(tfs_support), 0x40, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_50_ho_type_support_reserved,
{
"Reserved", "wmx.dcd.ho_type_support.reserved",
FT_UINT8, BASE_HEX, NULL, 0x1f, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_51_hysteresis_margin,
{
"Hysteresis Margin", "wmx.dcd.hysteresis_margin",
FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_db), 0x0, NULL, HFILL
}
},
{
&hf_dcd_invalid_tlv,
{
"Invalid TLV", "wmx.dcd.invalid_tlv",
FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
}
},
{
&hf_dcd_mac_version,
{
"MAC Version", "wmx.dcd.mac_version",
FT_UINT8, BASE_DEC, VALS(vals_dcd_mac_version), 0x00, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_20_maximum_retransmission,
{
"Maximum Retransmission", "wmx.dcd.maximum_retransmission",
FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_60_noise_interference,
{
"Noise and Interference", "wmx.dcd.noise_interference",
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_35_paging_group_id,
{
"Paging Group ID", "wmx.dcd.paging_group_id",
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_36_tusc1_permutation_active_subchannels_bitmap,
{
"TUSC1 permutation active subchannels bitmap", "wmx.dcd.tusc1",
FT_UINT16, BASE_HEX, NULL, 0xFF80, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_37_tusc2_permutation_active_subchannels_bitmap,
{
"TUSC2 permutation active subchannels bitmap", "wmx.dcd.tusc2",
FT_UINT16, BASE_HEX, NULL, 0xFFF8, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_45_paging_interval_length,
{
"Paging Interval Length", "wmx.dcd.paging_interval_length",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_45_paging_interval_reserved,
{
"Reserved", "wmx.dcd.paging_interval_reserved",
FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_19_permutation_type_for_broadcast_regions_in_harq_zone,
{
"Permutation Type for Broadcast Region in HARQ Zone", "wmx.dcd.permutation_type_broadcast_region_in_harq_zone",
FT_UINT8, BASE_DEC, VALS(vals_dcd_permutation_type), 0x00, NULL, HFILL
}
},
{
&hf_dcd_phy_type,
{
"PHY Type", "wmx.dcd.phy_type",
FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_power_adjustment,
{
"Power Adjustment Rule", "wmx.dcd.power_adjustment",
FT_UINT8, BASE_HEX, VALS(vals_dcd_power_adjustmnt), 0x00, NULL, HFILL
}
},
#ifdef WIMAX_16D_2004
{
&hf_dcd_rss,
{
"RSS (IR, max)", "wmx.dcd.rss",
FT_INT16, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_dbm), 0x00, "", HFILL
}
},
#endif
{
&hf_dcd_rtg,
{
"RTG", "wmx.dcd.rtg",
FT_UINT8, BASE_HEX|BASE_UNIT_STRING, UNS(&wimax_units_ps), 0x00, NULL, HFILL
}
},
#ifdef WIMAX_16D_2004
{
&hf_dcd_size_cqich_id,
{
"Size of CQICH-ID Field", "wmx.dcd.size_cqich_id",
FT_UINT8, BASE_DEC, VALS(vals_dcd_size_of_cqich_id), 0x00, "", HFILL
}
},
#endif
{
&hf_dcd_channel_switch_frame_nr,
{
"Channel Switch Frame Number", "wmx.dcd.switch_frame",
FT_UINT24, BASE_DEC, NULL, 0x00, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_52_time_to_trigger_duration,
{
"Time to Trigger Duration", "wmx.dcd.time_trigger_duration",
FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_ms), 0x0, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_543_trigger_averaging_duration,
{
"Trigger Averaging Duration", "wmx.dcd.trigger_averaging_duration",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_542_trigger_value,
{
"Trigger Value", "wmx.dcd.trigger_value",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{
&hf_dcd_ttg,
{
"TTG", "wmx.dcd.ttg",
FT_UINT16, BASE_HEX|BASE_UNIT_STRING, UNS(&wimax_units_ps), 0x00, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_541_type_function_action,
{
"Type/Function/Action", "wmx.dcd.type_function_action",
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_541_action,
{
"Action", "wmx.dcd.type_function_action.action",
FT_UINT8, BASE_HEX, VALS(vals_dcd_action), 0x7, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_541_function,
{
"Function", "wmx.dcd.type_function_action.function",
FT_UINT8, BASE_HEX, VALS(vals_dcd_function), 0x38, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_541_type,
{
"Type", "wmx.dcd.type_function_action.type",
FT_UINT8, BASE_HEX, VALS(vals_dcd_type), 0xC0, NULL, HFILL
}
},
{
&hf_dcd_unknown_type,
{
"Unknown DCD Type", "wmx.dcd.unknown_tlv_value",
FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
}
}
};
/* Setup protocol subtree array */
static int *ett[] =
{
&ett_mac_mgmt_msg_dcd_decoder,
};
proto_mac_mgmt_msg_dcd_decoder = proto_register_protocol (
"WiMax DCD Messages", /* name */
"WiMax DCD", /* short name */
"wmx.dcd" /* abbrev */
);
proto_register_field_array(proto_mac_mgmt_msg_dcd_decoder, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
dcd_handle = register_dissector("mac_mgmt_msg_dcd_handler", dissect_mac_mgmt_msg_dcd_decoder, proto_mac_mgmt_msg_dcd_decoder);
}
void proto_reg_handoff_mac_mgmt_msg_dcd(void)
{
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DCD, dcd_handle);
}
/*
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 8
* tab-width: 8
* indent-tabs-mode: t
* End:
*
* vi: set shiftwidth=8 tabstop=8 noexpandtab:
* :indentSize=8:tabSize=8:noTabs=false:
*/
|