1 /* packet-macmgmt.c
2 * Routines for DOCSIS MAC Management Header dissection
3 * Routines for Upstream Channel Change dissection
4 * Routines for Ranging Message dissection
5 * Routines for Registration Message dissection
6 * Routines for Baseline Privacy Key Management Message dissection
7 * Routines for Dynamic Service Addition Message dissection
8 * Routines for Dynamic Service Change Request dissection
9 * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org>
10 *
11 * Routines for Type 2 UCD Message dissection
12 * Copyright 2015, Adrian Simionov <daniel.simionov@gmail.com>
13 * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org>
14 *
15 * Routines for Sync Message dissection
16 * Routines for REG-REQ-MP dissection
17 * Copyright 2007, Bruno Verstuyft <bruno.verstuyft@excentis.com>
18 *
19 * Routines for DOCSIS 3.1 OFDM Channel Descriptor dissection.
20 * Routines for DOCSIS 3.1 Downstream Profile Descriptor dissection.
21 * Routines for Type 51 UCD - DOCSIS 3.1 only - Message dissection
22 * Copyright 2016, Bruno Verstuyft <bruno.verstuyft@excentis.com>
23 *
24 * Routines for DCC Message dissection
25 * Routines for DCD Message dissection
26 * Copyright 2004, Darryl Hymel <darryl.hymel[AT]arrisi.com>
27 *
28 * Routines for Type 29 UCD - DOCSIS 2.0 only - Message dissection
29 * Copyright 2015, Adrian Simionov <daniel.simionov@gmail.com>
30 * Copyright 2003, Brian Wheeler <brian.wheeler[AT]arrisi.com>
31 *
32 * Routines for Intial Ranging Request Message dissection
33 * Copyright 2003, Brian Wheeler <brian.wheeler[AT]arrisi.com>
34 *
35 * Routines for Baseline Privacy Key Management Attributes dissection
36 * Copyright 2017, Adrian Simionov <daniel.simionov@gmail.com>
37 * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org>
38 *
39 * Routines for MDD Message dissection
40 * Copyright 2014, Adrian Simionov <adrian.simionov@arrisi.com>
41 * Copyright 2007, Bruno Verstuyft <bruno.verstuyft@excentis.com>
42 *
43 * Routines for DOCSIS 3.0 Bonded Intial Ranging Request Message dissection.
44 * Copyright 2009, Geoffrey Kimball <gekimbal[AT]cisco.com>
45 *
46 * Routines for Type 35 UCD - DOCSIS 3.0 only - Message dissection
47 * Copyright 2015, Adrian Simionov <daniel.simionov@gmail.com>
48 *
49 * Routines for DOCSIS 3.0 Dynamic Bonding Change Message dissection.
50 * Routines for DOCSIS 3.0 DOCSIS Path Verify Message dissection.
51 * Routines for DOCSIS 3.0 CM Control Message dissection.
52 * Copyright 2010, Guido Reismueller <g.reismueller[AT]avm.de>
53 *
54 * Wireshark - Network traffic analyzer
55 * By Gerald Combs <gerald@wireshark.org>
56 * Copyright 1998 Gerald Combs
57 *
58 * SPDX-License-Identifier: GPL-2.0-or-later
59 */
60
61 #include "config.h"
62
63 #include <epan/packet.h>
64 #include <epan/expert.h>
65 #include <wsutil/utf8_entities.h>
66 #include "packet-docsis-tlv.h"
67 #include <epan/reassemble.h>
68 #include <epan/proto_data.h>
69
70 void proto_register_docsis_mgmt(void);
71 void proto_reg_handoff_docsis_mgmt(void);
72
73 #define MGT_SYNC 1
74 #define MGT_UCD 2
75 #define MGT_MAP 3
76 #define MGT_RNG_REQ 4
77 #define MGT_RNG_RSP 5
78 #define MGT_REG_REQ 6
79 #define MGT_REG_RSP 7
80 #define MGT_UCC_REQ 8
81 #define MGT_UCC_RSP 9
82 #define MGT_TRI_TCD 10
83 #define MGT_TRI_TSI 11
84 #define MGT_BPKM_REQ 12
85 #define MGT_BPKM_RSP 13
86 #define MGT_REG_ACK 14
87 #define MGT_DSA_REQ 15
88 #define MGT_DSA_RSP 16
89 #define MGT_DSA_ACK 17
90 #define MGT_DSC_REQ 18
91 #define MGT_DSC_RSP 19
92 #define MGT_DSC_ACK 20
93 #define MGT_DSD_REQ 21
94 #define MGT_DSD_RSP 22
95 #define MGT_DCC_REQ 23
96 #define MGT_DCC_RSP 24
97 #define MGT_DCC_ACK 25
98 #define MGT_DCI_REQ 26
99 #define MGT_DCI_RSP 27
100 #define MGT_UP_DIS 28
101 #define MGT_TYPE29UCD 29
102 #define MGT_INIT_RNG_REQ 30
103 #define MGT_TEST_REQ 31
104 #define MGT_DS_CH_DESC 32
105 #define MGT_MDD 33
106 #define MGT_B_INIT_RNG_REQ 34
107 #define MGT_TYPE35UCD 35
108 #define MGT_DBC_REQ 36
109 #define MGT_DBC_RSP 37
110 #define MGT_DBC_ACK 38
111 #define MGT_DPV_REQ 39
112 #define MGT_DPV_RSP 40
113 #define MGT_CM_STATUS 41
114 #define MGT_CM_CTRL_REQ 42
115 #define MGT_CM_CTRL_RSP 43
116 #define MGT_REG_REQ_MP 44
117 #define MGT_REG_RSP_MP 45
118 #define MGT_EM_REQ 46
119 #define MGT_EM_RSP 47
120 #define MGT_CM_STATUS_ACK 48
121 #define MGT_OCD 49
122 #define MGT_DPD 50
123 #define MGT_TYPE51UCD 51
124 #define MGT_ODS_REQ 52
125 #define MGT_ODS_RSP 53
126 #define MGT_OPT_REQ 54
127 #define MGT_OPT_RSP 55
128 #define MGT_OPT_ACK 56
129 #define MGT_DPT_REQ 57
130 #define MGT_DPT_RSP 58
131 #define MGT_DPT_ACK 59
132 #define MGT_DPT_INFO 60
133 #define MGT_RBA_SW 61
134
135 #define UCD_SYMBOL_RATE 1
136 #define UCD_FREQUENCY 2
137 #define UCD_PREAMBLE 3
138 #define UCD_BURST_DESCR 4
139 #define UCD_BURST_DESCR5 5
140 #define UCD_EXT_PREAMBLE 6
141 #define UCD_SCDMA_MODE_ENABLED 7
142 #define UCD_SCDMA_SPREADING_INTERVAL 8
143 #define UCD_SCDMA_CODES_PER_MINI_SLOT 9
144 #define UCD_SCDMA_ACTIVE_CODES 10
145 #define UCD_SCDMA_CODE_HOPPING_SEED 11
146 #define UCD_SCDMA_US_RATIO_NUM 12
147 #define UCD_SCDMA_US_RATIO_DENOM 13
148 #define UCD_SCDMA_TIMESTAMP_SNAPSHOT 14
149 #define UCD_MAINTAIN_POWER_SPECTRAL_DENSITY 15
150 #define UCD_RANGING_REQUIRED 16
151 #define UCD_MAX_SCHEDULED_CODES 17
152 #define UCD_RANGING_HOLD_OFF_PRIORITY_FIELD 18
153 #define UCD_RANGING_CHANNEL_CLASS_ID 19
154 #define UCD_SCDMA_SELECTION_ACTIVE_CODES_AND_CODE_HOPPING 20
155 #define UCD_SCDMA_SELECTION_STRING_FOR_ACTIVE_CODES 21
156 #define UCD_HIGHER_UCD_FOR_SAME_UCID 22
157 #define UCD_BURST_DESCR23 23
158 #define UCD_CHANGE_IND_BITMASK 24
159 #define UCD_OFDMA_TIMESTAMP_SNAPSHOT 25
160 #define UCD_OFDMA_CYCLIC_PREFIX_SIZE 26
161 #define UCD_OFDMA_ROLLOFF_PERIOD_SIZE 27
162 #define UCD_SUBCARRIER_SPACING 28
163 #define UCD_CENTER_FREQ_SUBC_0 29
164 #define UCD_SUBC_EXCL_BAND 30
165 #define UCD_UNUSED_SUBC_SPEC 31
166 #define UCD_SYMB_IN_OFDMA_FRAME 32
167 #define UCD_RAND_SEED 33
168
169 #define UCD_MODULATION 1
170 #define UCD_DIFF_ENCODING 2
171 #define UCD_PREAMBLE_LEN 3
172 #define UCD_PREAMBLE_VAL_OFF 4
173 #define UCD_FEC 5
174 #define UCD_FEC_CODEWORD 6
175 #define UCD_SCRAMBLER_SEED 7
176 #define UCD_MAX_BURST 8
177 #define UCD_GUARD_TIME 9
178 #define UCD_LAST_CW_LEN 10
179 #define UCD_SCRAMBLER_ONOFF 11
180 #define UCD_RS_INT_DEPTH 12
181 #define UCD_RS_INT_BLOCK 13
182 #define UCD_PREAMBLE_TYPE 14
183 #define UCD_SCMDA_SCRAMBLER_ONOFF 15
184 #define UCD_SCDMA_CODES_PER_SUBFRAME 16
185 #define UCD_SCDMA_FRAMER_INT_STEP_SIZE 17
186 #define UCD_TCM_ENABLED 18
187 #define UCD_SUBC_INIT_RANG 19
188 #define UCD_SUBC_FINE_RANG 20
189 #define UCD_OFDMA_PROFILE 21
190 #define UCD_OFDMA_IR_POWER_CONTROL 22
191
192 #define IUC_REQUEST 1
193 #define IUC_REQ_DATA 2
194 #define IUC_INIT_MAINT 3
195 #define IUC_STATION_MAINT 4
196 #define IUC_SHORT_DATA_GRANT 5
197 #define IUC_LONG_DATA_GRANT 6
198 #define IUC_NULL_IE 7
199 #define IUC_DATA_ACK 8
200 #define IUC_ADV_PHY_SHORT_DATA_GRANT 9
201 #define IUC_ADV_PHY_LONG_DATA_GRANT 10
202 #define IUC_ADV_PHY_UGS 11
203 #define IUC_DATA_PROFILE_IUC12 12
204 #define IUC_DATA_PROFILE_IUC13 13
205 #define IUC_RESERVED14 14
206 #define IUC_EXPANSION 15
207
208 #define MAP_v1 1
209 #define MAP_v5 5
210
211 #define RNGRSP_TIMING 1
212 #define RNGRSP_PWR_LEVEL_ADJ 2
213 #define RNGRSP_OFFSET_FREQ_ADJ 3
214 #define RNGRSP_TRANSMIT_EQ_ADJ 4
215 #define RNGRSP_RANGING_STATUS 5
216 #define RNGRSP_DOWN_FREQ_OVER 6
217 #define RNGRSP_UP_CHID_OVER 7
218 #define RNGRSP_TRANSMIT_EQ_SET 9
219 #define RNGRSP_T4_TIMEOUT_MULTIPLIER 13
220 #define RNGRSP_DYNAMIC_RANGE_WINDOW_UPPER_EDGE 14
221 #define RNGRSP_TRANSMIT_EQ_ADJUST_OFDMA_CHANNELS 15
222 #define RNGRSP_TRANSMIT_EQ_SET_OFDMA_CHANNELS 16
223 #define RNGRSP_COMMANDED_POWER 17
224
225 /* Commanded Power Sub-TLVs */
226 #define RNGRSP_COMMANDED_POWER_DYNAMIC_RANGE_WINDOW 1
227 #define RNGRSP_COMMANDED_POWER_UCID_AND_POWER_LEVEL_LIST 2
228
229
230
231 /* BPKM Attributes defined in:
232 * http://www.cablemodem.com/downloads/specs/SP-BPI+_I10-030730.pdf
233 */
234 #define BPKM_RESERVED 0
235 #define BPKM_SERIAL_NUM 1
236 #define BPKM_MANUFACTURER_ID 2
237 #define BPKM_MAC_ADDR 3
238 #define BPKM_RSA_PUB_KEY 4
239 #define BPKM_CM_ID 5
240 #define BPKM_DISPLAY_STR 6
241 #define BPKM_AUTH_KEY 7
242 #define BPKM_TEK 8
243 #define BPKM_KEY_LIFETIME 9
244 #define BPKM_KEY_SEQ_NUM 10
245 #define BPKM_HMAC_DIGEST 11
246 #define BPKM_SAID 12
247 #define BPKM_TEK_PARAM 13
248 #define BPKM_OBSOLETED 14
249 #define BPKM_CBC_IV 15
250 #define BPKM_ERROR_CODE 16
251 #define BPKM_CA_CERT 17
252 #define BPKM_CM_CERT 18
253 #define BPKM_SEC_CAPABILITIES 19
254 #define BPKM_CRYPTO_SUITE 20
255 #define BPKM_CRYPTO_SUITE_LIST 21
256 #define BPKM_BPI_VERSION 22
257 #define BPKM_SA_DESCRIPTOR 23
258 #define BPKM_SA_TYPE 24
259 #define BPKM_SA_QUERY 25
260 #define BPKM_SA_QUERY_TYPE 26
261 #define BPKM_IP_ADDRESS 27
262 #define BPKM_DNLD_PARAMS 28
263 #define BPKM_VENDOR_DEFINED 127
264
265 #define DCCREQ_UP_CHAN_ID 1
266 #define DCCREQ_DS_PARAMS 2
267 #define DCCREQ_INIT_TECH 3
268 #define DCCREQ_UCD_SUB 4
269 #define DCCREQ_SAID_SUB 6
270 #define DCCREQ_SF_SUB 7
271 #define DCCREQ_CMTS_MAC_ADDR 8
272 #define DCCREQ_KEY_SEQ_NUM 31
273 #define DCCREQ_HMAC_DIGEST 27
274
275 /* Define Downstrean Parameters subtypes
276 * These are subtype of DCCREQ_DS_PARAMS (2)
277 */
278
279 #define DCCREQ_DS_FREQ 1
280 #define DCCREQ_DS_MOD_TYPE 2
281 #define DCCREQ_DS_SYM_RATE 3
282 #define DCCREQ_DS_INTLV_DEPTH 4
283 #define DCCREQ_DS_CHAN_ID 5
284 #define DCCREQ_DS_SYNC_SUB 6
285 #define DCCREQ_DS_OFDM_BLOCK_FREQ 7
286
287 /* Define Service Flow Substitution subtypes
288 * These are subtypes of DCCREQ_SF_SUB (7)
289 */
290 #define DCCREQ_SF_SFID 1
291 #define DCCREQ_SF_SID 2
292 #define DCCREQ_SF_UNSOL_GRANT_TREF 5
293
294 #define DCCRSP_CM_JUMP_TIME 1
295 #define DCCRSP_KEY_SEQ_NUM 31
296 #define DCCRSP_HMAC_DIGEST 27
297
298 /* Define DCC-RSP CM Jump Time subtypes
299 * These are subtype of DCCRSP_CM_JUMP_TIME (1)
300 */
301 #define DCCRSP_CM_JUMP_TIME_LENGTH 1
302 #define DCCRSP_CM_JUMP_TIME_START 2
303
304 #define DCCACK_KEY_SEQ_NUM 31
305 #define DCCACK_HMAC_DIGEST 27
306
307 #define DCD_DOWN_CLASSIFIER 23
308 #define DCD_DSG_RULE 50
309 #define DCD_DSG_CONFIG 51
310
311 /* Define Downstrean Classifier subtypes
312 * These are subtype of DCD_DOWN_CLASSIFIER (23)
313 */
314
315 #define DCD_CFR_ID 2
316 #define DCD_CFR_RULE_PRI 5
317 #define DCD_CFR_IP_CLASSIFIER 9
318
319 /* Define IP Classifier sub-subtypes
320 * These are subtypes of DCD_CFR_IP_CLASSIFIER (23.9)
321 */
322 #define DCD_CFR_IP_SOURCE_ADDR 3
323 #define DCD_CFR_IP_SOURCE_MASK 4
324 #define DCD_CFR_IP_DEST_ADDR 5
325 #define DCD_CFR_IP_DEST_MASK 6
326 #define DCD_CFR_TCPUDP_SRCPORT_START 7
327 #define DCD_CFR_TCPUDP_SRCPORT_END 8
328 #define DCD_CFR_TCPUDP_DSTPORT_START 9
329 #define DCD_CFR_TCPUDP_DSTPORT_END 10
330
331 /* Define DSG Rule subtypes
332 * These are subtype of DCD_DSG_RULE (50)
333 */
334
335 #define DCD_RULE_ID 1
336 #define DCD_RULE_PRI 2
337 #define DCD_RULE_UCID_RNG 3
338 #define DCD_RULE_CLIENT_ID 4
339 #define DCD_RULE_TUNL_ADDR 5
340 #define DCD_RULE_CFR_ID 6
341 #define DCD_RULE_VENDOR_SPEC 43
342 /* Define DSG Rule Client ID sub-subtypes
343 * These are subtypes of DCD_RULE_CLIENT_ID (50.4)
344 */
345 #define DCD_CLID_BCAST_ID 1
346 #define DCD_CLID_KNOWN_MAC_ADDR 2
347 #define DCD_CLID_CA_SYS_ID 3
348 #define DCD_CLID_APP_ID 4
349
350 /* Define DSG Configuration subtypes
351 * These are subtype of DCD_DSG_CONFIG (51)
352 */
353
354 #define DCD_CFG_CHAN_LST 1
355 #define DCD_CFG_TDSG1 2
356 #define DCD_CFG_TDSG2 3
357 #define DCD_CFG_TDSG3 4
358 #define DCD_CFG_TDSG4 5
359 #define DCD_CFG_VENDOR_SPEC 43
360
361 /* EM TLVs
362 *
363 */
364 #define EM_HOLDOFF_TIMER 1
365
366 #define DOWNSTREAM_ACTIVE_CHANNEL_LIST 1
367 #define MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP 2
368 #define DOWNSTREAM_AMBIGUITY_RESOLUTION_FREQUENCY_LIST 3
369 #define RECEIVE_CHANNEL_PROFILE_REPORTING_CONTROL 4
370 #define IP_INITIALIZATION_PARAMETERS 5
371 #define EARLY_AUTHENTICATION_AND_ENCRYPTION 6
372 #define UPSTREAM_ACTIVE_CHANNEL_LIST 7
373 #define UPSTREAM_AMBIGUITY_RESOLUTION_CHANNEL_LIST 8
374 #define UPSTREAM_FREQUENCY_RANGE 9
375 #define SYMBOL_CLOCK_LOCKING_INDICATOR 10
376 #define CM_STATUS_EVENT_CONTROL 11
377 #define UPSTREAM_TRANSMIT_POWER_REPORTING 12
378 #define DSG_DA_TO_DSID_ASSOCIATION_ENTRY 13
379 #define CM_STATUS_EVENT_ENABLE_NON_CHANNEL_SPECIFIC_EVENTS 15
380 #define EXTENDED_UPSTREAM_TRANSMIT_POWER_SUPPORT 16
381 #define CMTS_DOCSIS_VERSION 17
382 #define CM_PERIODIC_MAINTENANCE_TIMEOUT_INDICATOR 18
383 #define DLS_BROADCAST_AND_MULTICAST_DELIVERY_METHOD 19
384 #define CM_STATUS_EVENT_ENABLE_FOR_DOCSIS_3_1_EVENTS 20
385 #define DIPLEXER_BAND_EDGE 21
386 #define FULL_DUPLEX_DESCRIPTOR 22
387
388
389 /* Downstream Active Channel List */
390 #define DOWNSTREAM_ACTIVE_CHANNEL_LIST_CHANNEL_ID 1
391 #define DOWNSTREAM_ACTIVE_CHANNEL_LIST_FREQUENCY 2
392 #define DOWNSTREAM_ACTIVE_CHANNEL_LIST_MODULATION_ORDER_ANNEX 3
393 #define DOWNSTREAM_ACTIVE_CHANNEL_LIST_PRIMARY_CAPABLE 4
394 #define DOWNSTREAM_ACTIVE_CHANNEL_LIST_CM_STATUS_EVENT_ENABLE_BITMASK 5
395 #define DOWNSTREAM_ACTIVE_CHANNEL_LIST_MAP_UCD_TRANSPORT_INDICATOR 6
396 #define DOWNSTREAM_ACTIVE_CHANNEL_LIST_OFDM_PLC_PARAMETERS 7
397 #define DOWNSTREAM_ACTIVE_CHANNEL_LIST_FDX_SUB_BAND_ID 8
398
399 /* MAC Domain Downstream Service Group */
400 #define MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP_MD_DS_SG_IDENTIFIER 1
401 #define MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP_CHANNEL_IDS 2
402
403 /* Modulation Orders */
404 #define QAM64 0
405 #define QAM256 1
406
407 /* Annexes */
408 #define J83_ANNEX_A 0
409 #define J83_ANNEX_B 1
410 #define J83_ANNEX_C 2
411
412 /* Primary Capable */
413 #define NOT_PRIMARY_CAPABLE 0
414 #define PRIMARY_CAPABLE 1
415 #define FDX_DOWNSTREAM_CHANNEL 2
416
417 /* Can carry MAP and UCD */
418 #define CANNOT_CARRY_MAP_UCD 0
419 #define CAN_CARRY_MAP_UCD 1
420
421 /* Receive Channel Profile Reporting Control */
422 #define RCP_CENTER_FREQUENCY_SPACING 1
423 #define VERBOSE_RCP_REPORTING 2
424 #define FRAGMENTED_RCP_TRANSMISSION 3
425
426 /* Frequency spacing */
427 #define ASSUME_6MHZ_CENTER_FREQUENCY_SPACING 0
428 #define ASSUME_8MHZ_CENTER_FREQUENCY_SPACING 1
429
430 /* Verbose RCP reporting */
431 #define RCP_NO_VERBOSE_REPORTING 0
432 #define RCP_VERBOSE_REPORTING 1
433
434 /* Sub-TLVs for IP Initialization Parameters */
435 #define IP_PROVISIONING_MODE 1
436 #define PRE_REGISTRATION_DSID 2
437
438 /* IP Provisioning Modes */
439 #define IPv4_ONLY 0
440 #define IPv6_ONLY 1
441 #define IP_ALTERNATE 2
442 #define DUAL_STACK 3
443
444 /* Early authentication and encryption */
445 #define EAE_DISABLED 0
446 #define EAE_ENABLED 1
447
448 /* Upstream Active Channel List */
449 #define UPSTREAM_ACTIVE_CHANNEL_LIST_UPSTREAM_CHANNEL_ID 1
450 #define UPSTREAM_ACTIVE_CHANNEL_LIST_CM_STATUS_EVENT_ENABLE_BITMASK 2
451 #define UPSTREAM_ACTIVE_CHANNEL_LIST_UPSTREAM_CHANNEL_PRIORITY 3
452 #define UPSTREAM_ACTIVE_CHANNEL_LIST_DSCHIDS_MAPS_UCDS 4
453 #define UPSTREAM_ACTIVE_CHANNEL_LIST_FDX_UPSTREAM_CHANNEL 5
454 #define UPSTREAM_ACTIVE_CHANNEL_LIST_FDX_SUBBAND_ID 6
455
456 /* Upstream Frequency Range */
457 #define STANDARD_UPSTREAM_FREQUENCY_RANGE 0
458 #define EXTENDED_UPSTREAM_FREQUENCY_RANGE 1
459
460 /* Symbol Clock Locking Indicator */
461 #define NOT_LOCKED_TO_MASTER_CLOCK 0
462 #define LOCKED_TO_MASTER_CLOCK 1
463
464 /* CM-STATUS Event Control */
465 #define EVENT_TYPE_CODE 1
466 #define MAXIMUM_EVENT_HOLDOFF_TIMER 2
467 #define MAXIMUM_NUMBER_OF_REPORTS_PER_EVENT 3
468
469 /* CM-STATUS Events */
470 #define SECONDARY_CHANNEL_MDD_TIMEOUT 1
471 #define QAM_FEC_LOCK_FAILURE 2
472 #define SEQUENCE_OUT_OF_RANGE 3
473 #define MDD_RECOVERY 4
474 #define QAM_FEC_LOCK_RECOVERY 5
475 #define T4_TIMEOUT 6
476 #define T3_RETRIES_EXCEEDED 7
477 #define SUCCESFUL_RANGING_AFTER_T3_RETRIES_EXCEEDED 8
478 #define CM_OPERATING_ON_BATTERY_BACKUP 9
479 #define CM_RETURNED_TO_AC_POWER 10
480
481 /* Upstream Transmit Power Reporting */
482 #define CM_DOESNT_REPORT_TRANSMIT_POWER 0
483 #define CM_REPORTS_TRANSMIT_POWER 1
484
485 /* DSG DA to DSID association entry */
486 #define DSG_DA_TO_DSID_ASSOCIATION_DA 1
487 #define DSG_DA_TO_DSID_ASSOCIATION_DSID 2
488
489 /* CMTS DOCSIS VERSION */
490 #define CMTS_MAJOR_DOCSIS_VERSION 1
491 #define CMTS_MINOR_DOCSIS_VERSION 2
492
493 /* Define Tukey raised cosine window */
494 #define TUKEY_0TS 0
495 #define TUKEY_64TS 1
496 #define TUKEY_128TS 2
497 #define TUKEY_192TS 3
498 #define TUKEY_256TS 4
499
500 /* Define Cyclic prefix */
501 #define CYCLIC_PREFIX_192_TS 0
502 #define CYCLIC_PREFIX_256_TS 1
503 #define CYCLIC_PREFIX_512_TS 2
504 #define CYCLIC_PREFIX_768_TS 3
505 #define CYCLIC_PREFIX_1024_TS 4
506
507 /* Define Sub carrier spacing */
508 #define SPACING_25KHZ 0
509 #define SPACING_50KHZ 1
510
511 #define SEC_CH_MDD_TIMEOUT 1
512 #define QAM_FEC_LOCK_FAILURE 2
513 #define SEQ_OUT_OF_RANGE 3
514 #define SEC_CH_MDD_RECOVERY 4
515 #define QAM_FEC_LOCK_RECOVERY 5
516 #define T4_TIMEOUT 6
517 #define T3_RETRIES_EXCEEDED 7
518 #define SUCCESS_RANGING_AFTER_T3_RETRIES_EXCEEDED 8
519 #define CM_ON_BATTERY 9
520 #define CM_ON_AC_POWER 10
521 #define MAC_REMOVAL_EVENT 11
522 #define DS_OFDM_PROFILE_FAILURE 16
523 #define PRIMARY_DOWNSTREAM_CHANGE 17
524 #define DPD_MISMATCH 18
525 #define NCP_PROFILE_FAILURE 20
526 #define PLC_FAILURE 21
527 #define NCP_PROFILE_RECOVERY 22
528 #define PLC_RECOVERY 23
529 #define OFDM_PROFILE_RECOVERY 24
530 #define OFDMA_PROFILE_FAILURE 25
531 #define MAP_STORAGE_OVERFLOW_INDICATOR 26
532 #define MAP_STORAGE_ALMOST_FULL_INDICATOR 27
533
534 #define STATUS_EVENT 1
535
536 #define EVENT_DESCR 2
537 #define EVENT_DS_CH_ID 4
538 #define EVENT_US_CH_ID 5
539 #define EVENT_DSID 6
540 #define EVENT_MAC_ADDRESS 7
541 #define EVENT_DS_OFDM_PROFILE_ID 8
542 #define EVENT_US_OFDMA_PROFILE_ID 9
543
544 #define CM_CTRL_MUTE 1
545 #define CM_CTRL_MUTE_TIMEOUT 2
546 #define CM_CTRL_REINIT 3
547 #define CM_CTRL_DISABLE_FWD 4
548 #define CM_CTRL_DS_EVENT 5
549 #define CM_CTRL_US_EVENT 6
550 #define CM_CTRL_EVENT 7
551
552 #define DS_EVENT_CH_ID 1
553 #define DS_EVENT_MASK 2
554
555 #define US_EVENT_CH_ID 1
556 #define US_EVENT_MASK 2
557
558 #define DISCRETE_FOURIER_TRANSFORM_SIZE 0
559 #define CYCLIC_PREFIX 1
560 #define ROLL_OFF 2
561 #define OFDM_SPECTRUM_LOCATION 3
562 #define TIME_INTERLEAVING_DEPTH 4
563 #define SUBCARRIER_ASSIGNMENT_RANGE_LIST 5
564 #define PRIMARY_CAPABILITY_INDICATOR 6
565 #define SUBCARRIER_ASSIGNMENT_VECTOR 6
566
567 #define SUBCARRIER_ASSIGNMENT_RANGE_CONT 0
568 #define SUBCARRIER_ASSIGNMENT_RANGE_SKIPBY1 1
569 #define SUBCARRIER_ASSIGNMENT_LIST 2
570
571 #define OPT_REQ_REQ_STAT 1
572 #define OPT_REQ_RXMER_THRESH_PARAMS 2
573 #define OPT_REQ_RXMER_THRESH_PARAMS_MODULATION_ORDER 1
574
575 #define OPT_RSP_RXMER_AND_SNR_MARGIN_DATA 1
576 #define OPT_RSP_RXMER_PER_SUBCARRIER 1
577 #define OPT_RSP_SNR_MARGIN 4
578
579 #define DIPLEXER_US_UPPER_BAND_EDGE 1
580 #define DIPLEXER_DS_LOWER_BAND_EDGE 2
581 #define DIPLEXER_DS_UPPER_BAND_EDGE 3
582
583 #define FDX_ALLOCATED_SPECTRUM 1
584 #define FDX_TOTAL_NUMBER_OF_SUB_BANDS 2
585 #define FDX_SUB_BAND_WIDTH 3
586 #define FDX_SUB_BAND_DESCRIPTOR 4
587
588 #define FDX_SUB_BAND_ID 1
589 #define FDX_SUB_BAND_OFFSET 2
590
591 #define KEY_MGMT_VERSION 0
592 #define KEY_MGMT_MULTIPART 1
593
594 static int proto_docsis_mgmt = -1;
595 static int proto_docsis_sync = -1;
596 static int proto_docsis_ucd = -1;
597 static int proto_docsis_map_v1 = -1;
598 static int proto_docsis_map_v5 = -1;
599 static int proto_docsis_rngreq = -1;
600 static int proto_docsis_rngrsp = -1;
601 static int proto_docsis_regreq = -1;
602 static int proto_docsis_regrsp = -1;
603 static int proto_docsis_uccreq = -1;
604 static int proto_docsis_uccrsp = -1;
605 static int proto_docsis_bpkmreq = -1;
606 static int proto_docsis_bpkmrsp = -1;
607 static int proto_docsis_regack = -1;
608 static int proto_docsis_dsareq = -1;
609 static int proto_docsis_dsarsp = -1;
610 static int proto_docsis_dsaack = -1;
611 static int proto_docsis_dscreq = -1;
612 static int proto_docsis_dscrsp = -1;
613 static int proto_docsis_dscack = -1;
614 static int proto_docsis_dsdreq = -1;
615 static int proto_docsis_dsdrsp = -1;
616 static int proto_docsis_dccreq = -1;
617 static int proto_docsis_dccrsp = -1;
618 static int proto_docsis_dccack = -1;
619 static int proto_docsis_type29ucd = -1;
620 static int proto_docsis_intrngreq = -1;
621 static int proto_docsis_dcd = -1;
622 static int proto_docsis_mdd = -1;
623 static int proto_docsis_bintrngreq = -1;
624 static int proto_docsis_type35ucd = -1;
625 static int proto_docsis_dbcreq = -1;
626 static int proto_docsis_dbcrsp = -1;
627 static int proto_docsis_dbcack = -1;
628 static int proto_docsis_dpvreq = -1;
629 static int proto_docsis_dpvrsp = -1;
630 static int proto_docsis_cmstatus = -1;
631 static int proto_docsis_cmstatusack = -1;
632 static int proto_docsis_cmctrlreq = -1;
633 static int proto_docsis_cmctrlrsp = -1;
634 static int proto_docsis_regreqmp = -1;
635 static int proto_docsis_regrspmp = -1;
636 static int proto_docsis_emreq = -1;
637 static int proto_docsis_emrsp = -1;
638 static int proto_docsis_ocd = -1;
639 static int proto_docsis_dpd = -1;
640 static int proto_docsis_type51ucd = -1;
641 static int proto_docsis_optreq = -1;
642 static int proto_docsis_optrsp = -1;
643 static int proto_docsis_optack = -1;
644 static int proto_docsis_rba = -1;
645
646 static int hf_docsis_sync_cmts_timestamp = -1;
647
648 static int hf_docsis_ucd_config_ch_cnt = -1;
649 static int hf_docsis_ucd_mini_slot_size = -1;
650 static int hf_docsis_ucd_type = -1;
651 static int hf_docsis_ucd_length = -1;
652 static int hf_docsis_ucd_burst_type = -1;
653 static int hf_docsis_ucd_burst_length = -1;
654 static int hf_docsis_ucd_symbol_rate = -1;
655 static int hf_docsis_ucd_frequency = -1;
656 static int hf_docsis_ucd_preamble_pat = -1;
657 static int hf_docsis_ucd_ext_preamble_pat = -1;
658 static int hf_docsis_ucd_scdma_mode_enabled = -1;
659 static int hf_docsis_ucd_scdma_spreading_interval = -1;
660 static int hf_docsis_ucd_scdma_codes_per_mini_slot = -1;
661 static int hf_docsis_ucd_scdma_active_codes = -1;
662 static int hf_docsis_ucd_scdma_code_hopping_seed = -1;
663 static int hf_docsis_ucd_scdma_us_ratio_num = -1;
664 static int hf_docsis_ucd_scdma_us_ratio_denom = -1;
665 static int hf_docsis_ucd_scdma_timestamp_snapshot = -1;
666 static int hf_docsis_ucd_maintain_power_spectral_density = -1;
667 static int hf_docsis_ucd_ranging_required = -1;
668 static int hf_docsis_ucd_max_scheduled_codes = -1;
669 static int hf_docsis_ucd_rnghoff_cm = -1;
670 static int hf_docsis_ucd_rnghoff_erouter = -1;
671 static int hf_docsis_ucd_rnghoff_emta = -1;
672 static int hf_docsis_ucd_rnghoff_estb = -1;
673 static int hf_docsis_ucd_rnghoff_rsvd = -1;
674 static int hf_docsis_ucd_rnghoff_id_ext = -1;
675 static int hf_docsis_ucd_chan_class_id_cm = -1;
676 static int hf_docsis_ucd_chan_class_id_erouter = -1;
677 static int hf_docsis_ucd_chan_class_id_emta = -1;
678 static int hf_docsis_ucd_chan_class_id_estb = -1;
679 static int hf_docsis_ucd_chan_class_id_rsvd = -1;
680 static int hf_docsis_ucd_chan_class_id_id_ext = -1;
681 static int hf_docsis_ucd_scdma_scrambler_onoff = -1;
682 static int hf_docsis_ucd_scdma_codes_per_subframe = -1;
683 static int hf_docsis_ucd_scdma_framer_int_step_size = -1;
684 static int hf_docsis_ucd_tcm_enabled = -1;
685 static int hf_docsis_ucd_active_code_hopping = -1;
686 static int hf_docsis_ucd_higher_ucd_for_same_ucid = -1;
687 static int hf_docsis_ucd_higher_ucd_for_same_ucid_resv = -1;
688 static int hf_docsis_ucd_scdma_selection_active_codes = -1;
689 static int hf_docsis_ucd_iuc = -1;
690 static int hf_docsis_ucd_change_ind_bitmask_subc_excl_band = -1;
691 static int hf_docsis_ucd_change_ind_bitmask_unused_subc = -1;
692 static int hf_docsis_ucd_change_ind_bitmask_other_subc = -1;
693 static int hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc5 = -1;
694 static int hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc6 = -1;
695 static int hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc9 = -1;
696 static int hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc10 = -1;
697 static int hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc11 = -1;
698 static int hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc12 = -1;
699 static int hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc13 = -1;
700 static int hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc3_or_4 = -1;
701 static int hf_docsis_ucd_change_ind_bitmask_reserved = -1;
702 static int hf_docsis_ucd_ofdma_timestamp_snapshot = -1;
703 static int hf_docsis_ucd_ofdma_timestamp_snapshot_reserved = -1;
704 static int hf_docsis_ucd_ofdma_timestamp_snapshot_d30timestamp = -1;
705 static int hf_docsis_ucd_ofdma_timestamp_snapshot_4msbits_of_div20 = -1;
706 static int hf_docsis_ucd_ofdma_timestamp_snapshot_minislot_count = -1;
707 static int hf_docsis_ucd_ofdma_cyclic_prefix_size = -1;
708 static int hf_docsis_ucd_ofdma_rolloff_period_size = -1;
709 static int hf_docsis_ucd_subc_spacing = -1;
710 static int hf_docsis_ucd_cent_freq_subc0 = -1;
711 static int hf_docsis_ucd_subcarrier_range = -1;
712 static int hf_docsis_ucd_symb_ofdma_frame = -1;
713 static int hf_docsis_ucd_rand_seed = -1;
714
715 static int hf_docsis_burst_mod_type = -1;
716 static int hf_docsis_burst_diff_encoding = -1;
717 static int hf_docsis_burst_preamble_len = -1;
718 static int hf_docsis_burst_preamble_val_off = -1;
719 static int hf_docsis_burst_fec = -1;
720 static int hf_docsis_burst_fec_codeword = -1;
721 static int hf_docsis_burst_scrambler_seed = -1;
722 static int hf_docsis_burst_max_burst = -1;
723 static int hf_docsis_burst_guard_time = -1;
724 static int hf_docsis_burst_last_cw_len = -1;
725 static int hf_docsis_burst_scrambler_onoff = -1;
726 static int hf_docsis_rs_int_depth = -1;
727 static int hf_docsis_rs_int_block = -1;
728 static int hf_docsis_preamble_type = -1;
729 static int hf_docsis_subc_init_rang = -1;
730 static int hf_docsis_subc_fine_rang = -1;
731 static int hf_docsis_ofdma_prof_mod_order = -1;
732 static int hf_docsis_ofdma_prof_pilot_pattern = -1;
733 static int hf_docsis_ofdma_prof_num_add_minislots = -1;
734 static int hf_docsis_ofdma_ir_pow_ctrl_start_pow = -1;
735 static int hf_docsis_ofdma_ir_pow_ctrl_step_size = -1;
736
737 static int hf_docsis_map_ucd_count = -1;
738 static int hf_docsis_map_numie = -1;
739 static int hf_docsis_map_numie_v5 = -1;
740 static int hf_docsis_map_alloc_start = -1;
741 static int hf_docsis_map_ack_time = -1;
742 static int hf_docsis_map_rng_start = -1;
743 static int hf_docsis_map_rng_end = -1;
744 static int hf_docsis_map_data_start = -1;
745 static int hf_docsis_map_data_end = -1;
746 static int hf_docsis_map_ie = -1;
747 static int hf_docsis_map_probe_ie = -1;
748
749 static int hf_docsis_map_rsvd = -1;
750 static int hf_docsis_map_rsvd_v5 = -1;
751 static int hf_docsis_map_cat = -1;
752
753 static int hf_docsis_map_sid = -1;
754 static int hf_docsis_map_iuc = -1;
755 static int hf_docsis_map_offset = -1;
756 static int hf_docsis_map_mer = -1;
757 static int hf_docsis_map_pw = -1;
758 static int hf_docsis_map_eq = -1;
759 static int hf_docsis_map_st = -1;
760 static int hf_docsis_map_probe_frame = -1;
761 static int hf_docsis_map_symbol_in_frame = -1;
762 static int hf_docsis_map_start_subc = -1;
763 static int hf_docsis_map_subc_skip = -1;
764
765
766 static int hf_docsis_rngreq_sid_field_bit15 = -1;
767 static int hf_docsis_rngreq_sid_field_bit14 = -1;
768 static int hf_docsis_rngreq_sid_field_bit15_14 = -1;
769 static int hf_docsis_rngreq_sid = -1;
770 static int hf_docsis_rngreq_pend_compl = -1;
771
772 static int hf_docsis_rngrsp_type = -1;
773 static int hf_docsis_rngrsp_length = -1;
774 static int hf_docsis_rngrsp_sid = -1;
775 static int hf_docsis_rngrsp_timing_adj = -1;
776 static int hf_docsis_rngrsp_power_adj = -1;
777 static int hf_docsis_rngrsp_freq_adj = -1;
778 static int hf_docsis_rngrsp_xmit_eq_adj = -1;
779 static int hf_docsis_rngrsp_ranging_status = -1;
780 static int hf_docsis_rngrsp_down_freq_over = -1;
781 static int hf_docsis_rngrsp_upstream_ch_over = -1;
782 static int hf_docsis_rngrsp_xmit_eq_set = -1;
783 static int hf_docsis_rngrsp_rngrsp_t4_timeout_multiplier = -1;
784 static int hf_docsis_rngrsp_dynamic_range_window_upper_edge = -1;
785 static int hf_docsis_rngrsp_tlv_unknown = -1;
786 static int hf_docsis_rngrsp_trans_eq_data = -1;
787 static int hf_docsis_rngrsp_trans_eq_enc_scdma_tdma_main_tap_location = -1;
788 static int hf_docsis_rngrsp_trans_eq_enc_scdma_tdma_number_of_forward_taps_per_symbol = -1;
789 static int hf_docsis_rngrsp_trans_eq_enc_scdma_tdma_number_of_forward_taps_n = -1;
790 static int hf_docsis_rngrsp_trans_eq_enc_scdma_tdma_reserved = -1;
791 static int hf_docsis_rngrsp_trans_eq_enc_lowest_subc = -1;
792 static int hf_docsis_rngrsp_trans_eq_enc_highest_subc = -1;
793 static int hf_docsis_rngrsp_trans_eq_enc_coef_real = -1;
794 static int hf_docsis_rngrsp_trans_eq_enc_coef_imag = -1;
795 static int hf_docsis_rngrsp_commanded_power_data = -1;
796 static int hf_docsis_rngrsp_commanded_power_dynamic_range_window = -1;
797 static int hf_docsis_rngrsp_commanded_power_ucid = -1;
798 static int hf_docsis_rngrsp_commanded_power_trans_pow_lvl = -1;
799
800
801 static int hf_docsis_regreq_sid = -1;
802 static int hf_docsis_regrsp_sid = -1;
803 static int hf_docsis_regrsp_response = -1;
804
805 static int hf_docsis_bpkm_code = -1;
806 static int hf_docsis_bpkm_length = -1;
807 static int hf_docsis_bpkm_ident = -1;
808 static int hf_docsis_bpkmattr = -1;
809 static int hf_docsis_bpkmattr_serial_num = -1;
810 static int hf_docsis_bpkmattr_manf_id = -1;
811 static int hf_docsis_bpkmattr_mac_addr = -1;
812 static int hf_docsis_bpkmattr_rsa_pub_key = -1;
813 static int hf_docsis_bpkmattr_cm_id = -1;
814 static int hf_docsis_bpkmattr_display_str = -1;
815 static int hf_docsis_bpkmattr_auth_key = -1;
816 static int hf_docsis_bpkmattr_tek = -1;
817 static int hf_docsis_bpkmattr_key_life = -1;
818 static int hf_docsis_bpkmattr_key_seq = -1;
819 static int hf_docsis_bpkmattr_hmac_digest = -1;
820 static int hf_docsis_bpkmattr_said = -1;
821 static int hf_docsis_bpkmattr_tek_params = -1;
822 static int hf_docsis_bpkmattr_cbc_iv = -1;
823 static int hf_docsis_bpkmattr_error_code = -1;
824 static int hf_docsis_bpkmattr_vendor_def = -1;
825 static int hf_docsis_bpkmattr_ca_cert = -1;
826 static int hf_docsis_bpkmattr_cm_cert = -1;
827 static int hf_docsis_bpkmattr_security_cap = -1;
828 static int hf_docsis_bpkmattr_crypto_suite = -1;
829 static int hf_docsis_bpkmattr_crypto_suite_list = -1;
830 static int hf_docsis_bpkmattr_bpi_version = -1;
831 static int hf_docsis_bpkmattr_sa_descr = -1;
832 static int hf_docsis_bpkmattr_sa_type = -1;
833 static int hf_docsis_bpkmattr_sa_query = -1;
834 static int hf_docsis_bpkmattr_sa_query_type = -1;
835 static int hf_docsis_bpkmattr_ip_address = -1;
836 static int hf_docsis_bpkmattr_download_param = -1;
837 static int hf_docsis_bpkmattr_type = -1;
838 static int hf_docsis_bpkmattr_length = -1;
839
840 static int hf_docsis_regack_sid = -1;
841 static int hf_docsis_regack_response = -1;
842
843 static int hf_docsis_dsarsp_response = -1;
844 static int hf_docsis_dsaack_response = -1;
845
846 static int hf_docsis_dscrsp_response = -1;
847 static int hf_docsis_dscack_response = -1;
848
849 static int hf_docsis_dsdreq_rsvd = -1;
850 static int hf_docsis_dsdreq_sfid = -1;
851
852 static int hf_docsis_dsdrsp_confcode = -1;
853 static int hf_docsis_dsdrsp_rsvd = -1;
854
855 static int hf_docsis_dccreq_type = -1;
856 static int hf_docsis_dccreq_length = -1;
857 static int hf_docsis_dccreq_tran_id = -1;
858 static int hf_docsis_dccreq_up_chan_id = -1;
859 static int hf_docsis_dcc_ds_params_subtype = -1;
860 static int hf_docsis_dcc_ds_params_length = -1;
861 static int hf_docsis_dccreq_ds_freq = -1;
862 static int hf_docsis_dccreq_ds_mod_type = -1;
863 static int hf_docsis_dccreq_ds_sym_rate = -1;
864 static int hf_docsis_dccreq_ds_intlv_depth_i = -1;
865 static int hf_docsis_dccreq_ds_intlv_depth_j = -1;
866 static int hf_docsis_dccreq_ds_chan_id = -1;
867 static int hf_docsis_dccreq_ds_sync_sub = -1;
868 static int hf_docsis_dccreq_ds_ofdm_block_freq = -1;
869 static int hf_docsis_dccreq_init_tech = -1;
870 static int hf_docsis_dccreq_ucd_sub = -1;
871 static int hf_docsis_dccreq_said_sub_cur = -1;
872 static int hf_docsis_dccreq_said_sub_new = -1;
873 static int hf_docsis_dcc_sf_sub_subtype = -1;
874 static int hf_docsis_dcc_sf_sub_length = -1;
875 static int hf_docsis_dccreq_sf_sfid_cur = -1;
876 static int hf_docsis_dccreq_sf_sfid_new = -1;
877 static int hf_docsis_dccreq_sf_sid_cur = -1;
878 static int hf_docsis_dccreq_sf_sid_new = -1;
879 static int hf_docsis_dccreq_sf_unsol_grant_tref = -1;
880 static int hf_docsis_dccreq_cmts_mac_addr = -1;
881 static int hf_docsis_dccreq_key_seq_num = -1;
882 static int hf_docsis_dccreq_hmac_digest = -1;
883 static int hf_docsis_dccrsp_conf_code = -1;
884 static int hf_docsis_dccrsp_type = -1;
885 static int hf_docsis_dccrsp_length = -1;
886 static int hf_docsis_dcc_cm_jump_subtype = -1;
887 static int hf_docsis_dcc_cm_jump_length = -1;
888 static int hf_docsis_dccrsp_cm_jump_time_length = -1;
889 static int hf_docsis_dccrsp_cm_jump_time_start = -1;
890 static int hf_docsis_dccrsp_key_seq_num = -1;
891 static int hf_docsis_dccrsp_hmac_digest = -1;
892 static int hf_docsis_dccack_type = -1;
893 static int hf_docsis_dccack_length = -1;
894 static int hf_docsis_dccack_key_seq_num = -1;
895 static int hf_docsis_dccack_hmac_digest = -1;
896
897 static int hf_docsis_intrngreq_sid = -1;
898
899 static int hf_docsis_dcd_config_ch_cnt = -1;
900 static int hf_docsis_dcd_num_of_frag = -1;
901 static int hf_docsis_dcd_frag_sequence_num = -1;
902 static int hf_docsis_dcd_type = -1;
903 static int hf_docsis_dcd_length = -1;
904 static int hf_docsis_dcd_down_classifier_subtype = -1;
905 static int hf_docsis_dcd_down_classifier_length = -1;
906 static int hf_docsis_dcd_cfr_id = -1;
907 static int hf_docsis_dcd_cfr_rule_pri = -1;
908 static int hf_docsis_dcd_cfr_ip_subtype = -1;
909 static int hf_docsis_dcd_cfr_ip_length = -1;
910 static int hf_docsis_dcd_cfr_ip_source_addr = -1;
911 static int hf_docsis_dcd_cfr_ip_source_mask = -1;
912 static int hf_docsis_dcd_cfr_ip_dest_addr = -1;
913 static int hf_docsis_dcd_cfr_ip_dest_mask = -1;
914 static int hf_docsis_dcd_cfr_tcpudp_srcport_start = -1;
915 static int hf_docsis_dcd_cfr_tcpudp_srcport_end = -1;
916 static int hf_docsis_dcd_cfr_tcpudp_dstport_start = -1;
917 static int hf_docsis_dcd_cfr_tcpudp_dstport_end = -1;
918 static int hf_docsis_dcd_rule_id = -1;
919 static int hf_docsis_dcd_rule_pri = -1;
920 static int hf_docsis_dcd_rule_ucid_list = -1;
921 static int hf_docsis_dcd_clid_subtype = -1;
922 static int hf_docsis_dcd_clid_length = -1;
923 static int hf_docsis_dcd_clid_bcast_id = -1;
924 static int hf_docsis_dcd_clid_known_mac_addr = -1;
925 static int hf_docsis_dcd_clid_ca_sys_id = -1;
926 static int hf_docsis_dcd_clid_app_id = -1;
927 static int hf_docsis_dcd_dsg_rule_subtype = -1;
928 static int hf_docsis_dcd_dsg_rule_length = -1;
929 static int hf_docsis_dcd_rule_tunl_addr = -1;
930 static int hf_docsis_dcd_rule_cfr_id = -1;
931 static int hf_docsis_dcd_rule_vendor_spec = -1;
932 static int hf_docsis_dcd_cfg_subtype = -1;
933 static int hf_docsis_dcd_cfg_length = -1;
934 static int hf_docsis_dcd_cfg_chan = -1;
935 static int hf_docsis_dcd_cfg_tdsg1 = -1;
936 static int hf_docsis_dcd_cfg_tdsg2 = -1;
937 static int hf_docsis_dcd_cfg_tdsg3 = -1;
938 static int hf_docsis_dcd_cfg_tdsg4 = -1;
939 static int hf_docsis_dcd_cfg_vendor_spec = -1;
940
941 static int hf_docsis_mdd_ccc = -1;
942 static int hf_docsis_mdd_number_of_fragments = -1;
943 static int hf_docsis_mdd_fragment_sequence_number = -1;
944 static int hf_docsis_mdd_current_channel_dcid = -1;
945 static int hf_docsis_mdd_ds_active_channel_list_subtype = -1;
946 static int hf_docsis_mdd_ds_active_channel_list_length = -1;
947 static int hf_docsis_mdd_downstream_active_channel_list_channel_id = -1;
948 static int hf_docsis_mdd_downstream_active_channel_list_frequency = -1;
949 static int hf_docsis_mdd_downstream_active_channel_list_annex = -1;
950 static int hf_docsis_mdd_downstream_active_channel_list_modulation_order = -1;
951 static int hf_docsis_mdd_downstream_active_channel_list_primary_capable = -1;
952 static int hf_docsis_mdd_downstream_active_channel_list_map_ucd_transport_indicator = -1;
953 static int hf_docsis_mdd_cm_status_event_enable_bitmask = -1;
954 static int hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_timeout = -1;
955 static int hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_failure = -1;
956 static int hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_recovery = -1;
957 static int hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_recovery = -1;
958 static int hf_docsis_mdd_ofdm_plc_parameters = -1;
959 static int hf_docsis_mdd_ofdm_plc_parameters_tukey_raised_cosine_window = -1;
960 static int hf_docsis_mdd_ofdm_plc_parameters_cyclic_prefix = -1;
961 static int hf_docsis_mdd_ofdm_plc_parameters_sub_carrier_spacing = -1;
962 static int hf_docsis_mdd_up_active_channel_list_subtype = -1;
963 static int hf_docsis_mdd_up_active_channel_list_length = -1;
964 static int hf_docsis_mdd_cm_status_event_enable_bitmask_t4_timeout = -1;
965 static int hf_docsis_mdd_cm_status_event_enable_bitmask_t3_retries_exceeded = -1;
966 static int hf_docsis_mdd_cm_status_event_enable_bitmask_successful_ranging_after_t3_retries_exceeded = -1;
967 static int hf_docsis_mdd_ds_service_group_subtype = -1;
968 static int hf_docsis_mdd_ds_service_group_length = -1;
969 static int hf_docsis_mdd_mac_domain_downstream_service_group_md_ds_sg_identifier = -1;
970 static int hf_docsis_mdd_mac_domain_downstream_service_group_channel_id = -1;
971 static int hf_docsis_mdd_type = -1;
972 static int hf_docsis_mdd_length = -1;
973 static int hf_docsis_mdd_downstream_ambiguity_resolution_frequency = -1;
974 static int hf_docsis_mdd_channel_profile_reporting_control_subtype = -1;
975 static int hf_docsis_mdd_channel_profile_reporting_control_length = -1;
976 static int hf_docsis_mdd_rcp_center_frequency_spacing = -1;
977 static int hf_docsis_mdd_verbose_rcp_reporting = -1;
978 static int hf_docsis_mdd_fragmented_rcp_transmission = -1;
979 static int hf_docsis_mdd_ip_init_param_subtype = -1;
980 static int hf_docsis_mdd_ip_init_param_length = -1;
981 static int hf_docsis_mdd_ip_provisioning_mode = -1;
982 static int hf_docsis_mdd_pre_registration_dsid = -1;
983 static int hf_docsis_mdd_early_authentication_and_encryption = -1;
984 static int hf_docsis_mdd_upstream_active_channel_list_upstream_channel_id = -1;
985 static int hf_docsis_mdd_upstream_active_channel_list_upstream_channel_priority = -1;
986 static int hf_docsis_mdd_upstream_active_channel_list_dschids_maps_ucds = -1;
987 static int hf_docsis_mdd_upstream_active_channel_list_dschids_maps_ucds_dschid = -1;
988 static int hf_docsis_mdd_upstream_active_channel_list_fdx_upstream_channel = -1;
989 static int hf_docsis_mdd_upstream_active_channel_list_fdx_subband_id = -1;
990 static int hf_docsis_mdd_upstream_ambiguity_resolution_channel_list_channel_id = -1;
991 static int hf_docsis_mdd_upstream_frequency_range = -1;
992 static int hf_docsis_mdd_symbol_clock_locking_indicator = -1;
993 static int hf_docsis_mdd_cm_status_event_control_subtype = -1;
994 static int hf_docsis_mdd_cm_status_event_control_length = -1;
995 static int hf_docsis_mdd_event_type = -1;
996 static int hf_docsis_mdd_maximum_event_holdoff_timer = -1;
997 static int hf_docsis_mdd_maximum_number_of_reports_per_event = -1;
998 static int hf_docsis_mdd_upstream_transmit_power_reporting = -1;
999 static int hf_docsis_mdd_dsg_da_to_dsid_subtype = -1;
1000 static int hf_docsis_mdd_dsg_da_to_dsid_length = -1;
1001 static int hf_docsis_mdd_dsg_da_to_dsid_association_da = -1;
1002 static int hf_docsis_mdd_dsg_da_to_dsid_association_dsid = -1;
1003 static int hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events = -1;
1004 static int hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_sequence_out_of_range = -1;
1005 static int hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_operating_on_battery_backup = -1;
1006 static int hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_returned_to_ac_power = -1;
1007 static int hf_docsis_mdd_extended_upstream_transmit_power_support = -1;
1008
1009 static int hf_docsis_mdd_cmts_major_docsis_version = -1;
1010 static int hf_docsis_mdd_cmts_minor_docsis_version = -1;
1011
1012 static int hf_docsis_mdd_cm_periodic_maintenance_timeout_indicator = -1;
1013 static int hf_docsis_mdd_dls_broadcast_and_multicast_delivery_method = -1;
1014 static int hf_docsis_mdd_cm_status_event_d31_ofdm_prof_fail = -1;
1015 static int hf_docsis_mdd_cm_status_event_d31_prim_down_chan_change = -1;
1016 static int hf_docsis_mdd_cm_status_event_d31_dpd_mismatch = -1;
1017 static int hf_docsis_mdd_cm_status_event_d31_deprecated = -1;
1018 static int hf_docsis_mdd_cm_status_event_d31_ncp_prof_fail = -1;
1019 static int hf_docsis_mdd_cm_status_event_d31_loss_fec_plc = -1;
1020 static int hf_docsis_mdd_cm_status_event_d31_ncp_prof_recover = -1;
1021 static int hf_docsis_mdd_cm_status_event_d31_fec_recover_on_plc = -1;
1022 static int hf_docsis_mdd_cm_status_event_d31_fec_recover_on_ofdm_prof = -1;
1023 static int hf_docsis_mdd_cm_status_event_d31_ofdma_prof_fail = -1;
1024 static int hf_docsis_mdd_cm_status_event_d31_map_stor_overflow_ind = -1;
1025 static int hf_docsis_mdd_cm_status_event_d31_ofdm_map_stor_almost_full_ind = -1;
1026 static int hf_docsis_mdd_cm_status_event_d31_reserved = -1;
1027
1028 static int hf_docsis_mdd_diplexer_band_edge = -1;
1029 static int hf_docsis_mdd_diplexer_band_edge_length = -1;
1030 static int hf_docsis_mdd_diplexer_us_upper_band_edge = -1;
1031 static int hf_docsis_mdd_diplexer_ds_lower_band_edge = -1;
1032 static int hf_docsis_mdd_diplexer_ds_upper_band_edge = -1;
1033
1034 static int hf_docsis_mdd_full_duplex_descriptor = -1;
1035 static int hf_docsis_mdd_full_duplex_descriptor_length = -1;
1036 static int hf_docsis_mdd_full_duplex_allocated_spectrum = -1;
1037 static int hf_docsis_mdd_full_duplex_total_number_of_sub_bands = -1;
1038 static int hf_docsis_mdd_full_duplex_sub_band_width = -1;
1039 static int hf_docsis_mdd_full_duplex_sub_band_descriptor = -1;
1040 static int hf_docsis_mdd_full_duplex_sub_band_descriptor_length = -1;
1041 static int hf_docsis_mdd_full_duplex_sub_band_id = -1;
1042 static int hf_docsis_mdd_full_duplex_sub_band_offset = -1;
1043
1044 static int hf_docsis_bintrngreq_mddsgid = -1;
1045 static int hf_docsis_bintrngreq_capflags = -1;
1046 static int hf_docsis_bintrngreq_capflags_frag = -1;
1047 static int hf_docsis_bintrngreq_capflags_encrypt = -1;
1048
1049 static int hf_docsis_dbcreq_number_of_fragments = -1;
1050 static int hf_docsis_dbcreq_fragment_sequence_number = -1;
1051
1052 static int hf_docsis_dbcrsp_conf_code = -1;
1053
1054 static int hf_docsis_dpv_flags = -1;
1055 static int hf_docsis_dpv_us_sf = -1;
1056 static int hf_docsis_dpv_n = -1;
1057 static int hf_docsis_dpv_start = -1;
1058 static int hf_docsis_dpv_end = -1;
1059 static int hf_docsis_dpv_ts_start = -1;
1060 static int hf_docsis_dpv_ts_end = -1;
1061
1062 static int hf_docsis_cmstatus_e_t_mdd_t = -1;
1063 static int hf_docsis_cmstatus_e_t_qfl_f = -1;
1064 static int hf_docsis_cmstatus_e_t_s_o = -1;
1065 static int hf_docsis_cmstatus_e_t_mdd_r = -1;
1066 static int hf_docsis_cmstatus_e_t_qfl_r = -1;
1067 static int hf_docsis_cmstatus_e_t_t4_t = -1;
1068 static int hf_docsis_cmstatus_e_t_t3_e = -1;
1069 static int hf_docsis_cmstatus_e_t_rng_s = -1;
1070 static int hf_docsis_cmstatus_e_t_cm_b = -1;
1071 static int hf_docsis_cmstatus_e_t_cm_a = -1;
1072 static int hf_docsis_cmstatus_e_t_mac_removal = -1;
1073 static int hf_docsis_cmstatus_e_t_ds_ofdm_profile_failure = -1;
1074 static int hf_docsis_cmstatus_e_t_prim_ds_change = -1;
1075 static int hf_docsis_cmstatus_e_t_dpd_mismatch = -1;
1076 static int hf_docsis_cmstatus_e_t_ncp_profile_failure = -1;
1077 static int hf_docsis_cmstatus_e_t_plc_failure = -1;
1078 static int hf_docsis_cmstatus_e_t_ncp_profile_recovery =-1;
1079 static int hf_docsis_cmstatus_e_t_plc_recovery = -1;
1080 static int hf_docsis_cmstatus_e_t_ofdm_profile_recovery = -1;
1081 static int hf_docsis_cmstatus_e_t_ofdma_profile_failure = -1;
1082 static int hf_docsis_cmstatus_e_t_map_storage_overflow_indicator = -1;
1083 static int hf_docsis_cmstatus_e_t_map_storage_almost_full_indicator = -1;
1084 static int hf_docsis_cmstatus_e_t_unknown = -1;
1085 static int hf_docsis_cmstatus_status_event_ds_ch_id = -1;
1086 static int hf_docsis_cmstatus_status_event_us_ch_id = -1;
1087 static int hf_docsis_cmstatus_status_event_dsid = -1;
1088 static int hf_docsis_cmstatus_status_event_mac_address = -1;
1089 static int hf_docsis_cmstatus_status_event_ds_ofdm_profile_id = -1;
1090 static int hf_docsis_cmstatus_status_event_us_ofdma_profile_id = -1;
1091 static int hf_docsis_cmstatus_status_event_descr = -1;
1092 static int hf_docsis_cmstatus_tlv_data = -1;
1093 static int hf_docsis_cmstatus_type = -1;
1094 static int hf_docsis_cmstatus_length = -1;
1095 static int hf_docsis_cmstatus_status_event_tlv_data = -1;
1096 static int hf_docsis_cmstatus_status_event_type = -1;
1097 static int hf_docsis_cmstatus_status_event_length = -1;
1098
1099 static int hf_docsis_cmctrl_tlv_mute = -1;
1100 static int hf_docsis_cmctrl_tlv_mute_timeout = -1;
1101 static int hf_docsis_cmctrl_tlv_reinit = -1;
1102 static int hf_docsis_cmctrl_tlv_disable_fwd = -1;
1103 static int hf_docsis_cmctrl_tlv_ds_event = -1;
1104 static int hf_docsis_cmctrl_tlv_us_event = -1;
1105 static int hf_docsis_cmctrl_tlv_event = -1;
1106 static int hf_docsis_cmctrlreq_tlv_data = -1;
1107 static int hf_docsis_cmctrlreq_type = -1;
1108 static int hf_docsis_cmctrlreq_length = -1;
1109 static int hf_docsis_cmctrlreq_us_type = -1;
1110 static int hf_docsis_cmctrlreq_us_length = -1;
1111 static int hf_docsis_cmctrl_us_event_ch_id = -1;
1112 static int hf_docsis_cmctrl_us_event_mask = -1;
1113 static int hf_docsis_cmctrl_ds_type = -1;
1114 static int hf_docsis_cmctrl_ds_length = -1;
1115 static int hf_docsis_cmctrl_ds_event_ch_id = -1;
1116 static int hf_docsis_cmctrl_ds_event_mask = -1;
1117
1118 static int hf_docsis_regreqmp_sid = -1;
1119 static int hf_docsis_regreqmp_number_of_fragments = -1;
1120 static int hf_docsis_regreqmp_fragment_sequence_number = -1;
1121 static int hf_docsis_regrspmp_sid = -1;
1122 static int hf_docsis_regrspmp_response = -1;
1123 static int hf_docsis_regrspmp_number_of_fragments = -1;
1124 static int hf_docsis_regrspmp_fragment_sequence_number = -1;
1125
1126 static int hf_docsis_emrsp_tlv_data = -1;
1127 static int hf_docsis_emrsp_tlv_type = -1;
1128 static int hf_docsis_emrsp_tlv_length = -1;
1129 static int hf_docsis_emrsp_tlv_holdoff_timer = -1;
1130 static int hf_docsis_emreq_req_power_mode = -1;
1131 static int hf_docsis_emreq_reserved = -1;
1132 static int hf_docsis_emrsp_rsp_code = -1;
1133 static int hf_docsis_emrsp_reserved = -1;
1134 static int hf_docsis_emrsp_tlv_unknown = -1;
1135
1136 static int hf_docsis_ocd_tlv_unknown = -1;
1137 static int hf_docsis_ocd_ccc = -1;
1138 static int hf_docsis_ocd_tlv_four_trans_size = -1;
1139 static int hf_docsis_ocd_tlv_cycl_pref = -1;
1140 static int hf_docsis_ocd_tlv_roll_off = -1;
1141 static int hf_docsis_ocd_tlv_ofdm_spec_loc = -1;
1142 static int hf_docsis_ocd_tlv_time_int_depth = -1;
1143 static int hf_docsis_ocd_tlv_prim_cap_ind = -1;
1144 static int hf_docsis_ocd_tlv_subc_assign_type = -1;
1145 static int hf_docsis_ocd_tlv_subc_assign_value = -1;
1146 static int hf_docsis_ocd_subc_assign_subc_type = -1;
1147 static int hf_docsis_ocd_subc_assign_range = -1;
1148 static int hf_docsis_ocd_subc_assign_index = -1;
1149 static int hf_docsis_ocd_tlv_data = -1;
1150 static int hf_docsis_ocd_type = -1;
1151 static int hf_docsis_ocd_length = -1;
1152
1153 static int hf_docsis_dpd_tlv_unknown = -1;
1154 static int hf_docsis_dpd_prof_id = -1;
1155 static int hf_docsis_dpd_ccc = -1;
1156 static int hf_docsis_dpd_tlv_subc_assign_type = -1;
1157 static int hf_docsis_dpd_tlv_subc_assign_value = -1;
1158 static int hf_docsis_dpd_subc_assign_range = -1;
1159 static int hf_docsis_dpd_tlv_subc_assign_reserved = -1;
1160 static int hf_docsis_dpd_tlv_subc_assign_modulation = -1;
1161 static int hf_docsis_dpd_subc_assign_index = -1;
1162 static int hf_docsis_dpd_tlv_subc_assign_vector_oddness = -1;
1163 static int hf_docsis_dpd_tlv_subc_assign_vector_reserved = -1;
1164 static int hf_docsis_dpd_tlv_subc_assign_vector_subc_start = -1;
1165 static int hf_docsis_dpd_tlv_subc_assign_vector_modulation_odd = -1;
1166 static int hf_docsis_dpd_tlv_subc_assign_vector_modulation_even = -1;
1167 static int hf_docsis_dpd_tlv_data = -1;
1168 static int hf_docsis_dpd_type = -1;
1169 static int hf_docsis_dpd_length = -1;
1170
1171 static int hf_docsis_optreq_tlv_unknown = -1;
1172 static int hf_docsis_optreq_prof_id = -1;
1173 static int hf_docsis_optreq_opcode = -1;
1174 static int hf_docsis_optreq_reserved = -1;
1175 static int hf_docsis_optreq_tlv_data = -1;
1176 static int hf_docsis_optreq_type = -1;
1177 static int hf_docsis_optreq_length = -1;
1178 static int hf_docsis_optreq_reqstat_rxmer_stat_subc = -1;
1179 static int hf_docsis_optreq_reqstat_rxmer_subc_threshold_comp = -1;
1180 static int hf_docsis_optreq_reqstat_snr_marg_cand_prof = -1;
1181 static int hf_docsis_optreq_reqstat_codew_stat_cand_prof = -1;
1182 static int hf_docsis_optreq_reqstat_codew_thresh_comp_cand_prof = -1;
1183 static int hf_docsis_optreq_reqstat_ncp_field_stat = -1;
1184 static int hf_docsis_optreq_reqstat_ncp_crc_thresh_comp = -1;
1185 static int hf_docsis_optreq_reqstat_reserved = -1;
1186 static int hf_docsis_optreq_tlv_xrmer_thresh_data = -1;
1187 static int hf_docsis_optreq_xmer_thresh_params_type = -1;
1188 static int hf_docsis_optreq_xmer_thresh_params_length = -1;
1189 static int hf_docsis_optreq_tlv_xrmer_thresh_data_mod_order = -1;
1190
1191 static int hf_docsis_optrsp_tlv_unknown = -1;
1192 static int hf_docsis_optrsp_prof_id = -1;
1193 static int hf_docsis_optrsp_reserved = -1;
1194 static int hf_docsis_optrsp_status = -1;
1195 static int hf_docsis_optrsp_tlv_data = -1;
1196 static int hf_docsis_optrsp_type = -1;
1197 static int hf_docsis_optrsp_length = -1;
1198 static int hf_docsis_optrsp_tlv_xrmer_snr_margin_data = -1;
1199 static int hf_docsis_optrsp_xmer_snr_margin_type = -1;
1200 static int hf_docsis_optrsp_xmer_snr_margin_length = -1;
1201 static int hf_docsis_optrsp_tlv_xrmer_snr_margin_data_rxmer_subc = -1;
1202 static int hf_docsis_optrsp_tlv_rxmer_snr_margin_data_snr_margin = -1;
1203
1204 static int hf_docsis_optack_prof_id = -1;
1205 static int hf_docsis_optack_reserved = -1;
1206
1207 static int hf_docsis_rba_tg_id = -1;
1208 static int hf_docsis_rba_ccc = -1;
1209 static int hf_docsis_rba_dcid = -1;
1210 static int hf_docsis_rba_control_byte_bitmask = -1;
1211 static int hf_docsis_rba_resource_block_change_bit = -1;
1212 static int hf_docsis_rba_expiration_time_valid_bit = -1;
1213 static int hf_docsis_rba_control_byte_bitmask_rsvd = -1;
1214 static int hf_docsis_rba_rba_time = -1;
1215 static int hf_docsis_rba_rba_expiration_time = -1;
1216 static int hf_docsis_rba_number_of_subbands = -1;
1217 static int hf_docsis_rba_subband_direction = -1;
1218
1219 static int hf_docsis_mgt_upstream_chid = -1;
1220 static int hf_docsis_mgt_down_chid = -1;
1221 static int hf_docsis_mgt_tranid = -1;
1222 static int hf_docsis_mgt_dst_addr = -1;
1223 static int hf_docsis_mgt_src_addr = -1;
1224 static int hf_docsis_mgt_msg_len = -1;
1225 static int hf_docsis_mgt_dsap = -1;
1226 static int hf_docsis_mgt_ssap = -1;
1227 static int hf_docsis_mgt_30_transmit_power = -1;
1228 static int hf_docsis_mgt_31_transmit_power = -1;
1229 static int hf_docsis_mgt_control = -1;
1230 static int hf_docsis_mgt_version = -1;
1231 static int hf_docsis_mgt_type = -1;
1232 static int hf_docsis_mgt_rsvd = -1;
1233 static int hf_docsis_mgt_multipart = -1;
1234 static int hf_docsis_mgt_multipart_number_of_fragments = -1;
1235 static int hf_docsis_mgt_multipart_fragment_sequence_number = -1;
1236
1237 static int hf_docsis_tlv_fragments = -1;
1238 static int hf_docsis_tlv_fragment = -1;
1239 static int hf_docsis_tlv_fragment_overlap = -1;
1240 static int hf_docsis_tlv_fragment_overlap_conflict = -1;
1241 static int hf_docsis_tlv_fragment_multiple_tails = -1;
1242 static int hf_docsis_tlv_fragment_too_long_fragment = -1;
1243 static int hf_docsis_tlv_fragment_error = -1;
1244 static int hf_docsis_tlv_fragment_count = -1;
1245 static int hf_docsis_tlv_reassembled_in = -1;
1246 static int hf_docsis_tlv_reassembled_length = -1;
1247 static int hf_docsis_tlv_reassembled_data = -1;
1248
1249 static int hf_docsis_tlv_reassembled = -1;
1250
1251 static gint ett_docsis_sync = -1;
1252
1253 static gint ett_docsis_ucd = -1;
1254 static gint ett_docsis_tlv = -1;
1255 static gint ett_docsis_burst_tlv = -1;
1256
1257 static gint ett_docsis_map = -1;
1258 static gint ett_docsis_map_ie = -1;
1259 static gint ett_docsis_map_probe_ie = -1;
1260
1261
1262 static gint ett_docsis_rngreq = -1;
1263
1264 static gint ett_docsis_rngrsp = -1;
1265 static gint ett_docsis_rngrsptlv = -1;
1266 static gint ett_docsis_rngrsp_tlv_transmit_equalization_encodings = -1;
1267 static gint ett_docsis_rngrsp_tlv_transmit_equalization_encodings_coef = -1;
1268 static gint ett_docsis_rngrsp_tlv_commanded_power_subtlv = -1;
1269 static gint ett_docsis_rngrsp_tlv_commanded_power = -1;
1270
1271
1272 static gint ett_docsis_regreq = -1;
1273 static gint ett_docsis_regrsp = -1;
1274
1275 static gint ett_docsis_emreq = -1;
1276 static gint ett_docsis_emrsp = -1;
1277 static gint ett_docsis_emrsp_tlv = -1;
1278 static gint ett_docsis_emrsp_tlvtlv = -1;
1279
1280 static gint ett_docsis_uccreq = -1;
1281 static gint ett_docsis_uccrsp = -1;
1282
1283 static gint ett_docsis_bpkmreq = -1;
1284 static gint ett_docsis_bpkmrsp = -1;
1285 static gint ett_docsis_bpkmattr = -1;
1286 static gint ett_docsis_bpkmattr_cmid = -1;
1287 static gint ett_docsis_bpkmattr_scap = -1;
1288 static gint ett_docsis_bpkmattr_tekp = -1;
1289 static gint ett_docsis_bpkmattr_sadsc = -1;
1290 static gint ett_docsis_bpkmattr_saqry = -1;
1291 static gint ett_docsis_bpkmattr_dnld = -1;
1292 static gint ett_docsis_bpkmattrtlv = -1;
1293
1294 static gint ett_docsis_regack = -1;
1295
1296 static gint ett_docsis_dsareq = -1;
1297 static gint ett_docsis_dsarsp = -1;
1298 static gint ett_docsis_dsaack = -1;
1299
1300 static gint ett_docsis_dscreq = -1;
1301 static gint ett_docsis_dscrsp = -1;
1302 static gint ett_docsis_dscack = -1;
1303
1304 static gint ett_docsis_dsdreq = -1;
1305 static gint ett_docsis_dsdrsp = -1;
1306
1307 static gint ett_docsis_dccreq = -1;
1308 static gint ett_docsis_dccreq_tlv = -1;
1309 static gint ett_docsis_dccreq_ds_params = -1;
1310 static gint ett_docsis_dccreq_sf_sub = -1;
1311 static gint ett_docsis_dccrsp = -1;
1312 static gint ett_docsis_dccrsp_cm_jump_time = -1;
1313 static gint ett_docsis_dccrsp_tlv = -1;
1314 static gint ett_docsis_dccack = -1;
1315 static gint ett_docsis_dccack_tlv = -1;
1316
1317 static gint ett_docsis_intrngreq = -1;
1318
1319 static gint ett_docsis_dcd = -1;
1320 static gint ett_docsis_dcd_cfr = -1;
1321 static gint ett_docsis_dcd_cfr_ip = -1;
1322 static gint ett_docsis_dcd_rule = -1;
1323 static gint ett_docsis_dcd_clid = -1;
1324 static gint ett_docsis_dcd_cfg = -1;
1325 static gint ett_docsis_dcd_tlv = -1;
1326
1327 static gint ett_docsis_mdd = -1;
1328 static gint ett_tlv = -1;
1329 static gint ett_sub_tlv = -1;
1330 static gint ett_docsis_mdd_cm_status_ev_en_for_docsis31 = -1;
1331 static gint ett_docsis_mdd_ds_active_channel_list = -1;
1332 static gint ett_docsis_mdd_ds_service_group = -1;
1333 static gint ett_docsis_mdd_channel_profile_reporting_control = -1;
1334 static gint ett_docsis_mdd_ip_init_param = -1;
1335 static gint ett_docsis_mdd_up_active_channel_list = -1;
1336 static gint ett_docsis_mdd_upstream_active_channel_list_dschids_maps_ucds_dschids = -1;
1337 static gint ett_docsis_mdd_cm_status_event_control = -1;
1338 static gint ett_docsis_mdd_dsg_da_to_dsid = -1;
1339 static gint ett_docsis_mdd_diplexer_band_edge = -1;
1340 static gint ett_docsis_mdd_full_duplex_descriptor = -1;
1341 static gint ett_docsis_mdd_full_duplex_sub_band_descriptor = -1;
1342
1343 static gint ett_docsis_bintrngreq = -1;
1344
1345 static gint ett_docsis_dbcreq = -1;
1346 static gint ett_docsis_dbcrsp = -1;
1347 static gint ett_docsis_dbcack = -1;
1348
1349 static gint ett_docsis_dpvreq = -1;
1350 static gint ett_docsis_dpvrsp = -1;
1351
1352 static gint ett_docsis_cmstatus = -1;
1353 static gint ett_docsis_cmstatus_tlv = -1;
1354 static gint ett_docsis_cmstatus_tlvtlv = -1;
1355 static gint ett_docsis_cmstatus_status_event_tlv = -1;
1356 static gint ett_docsis_cmstatus_status_event_tlvtlv = -1;
1357
1358 static gint ett_docsis_cmstatusack = -1;
1359
1360 static gint ett_docsis_cmctrlreq = -1;
1361 static gint ett_docsis_cmctrlreq_tlv = -1;
1362 static gint ett_docsis_cmctrlreq_tlvtlv = -1;
1363 static gint ett_docsis_cmctrl_tlv_us_event = -1;
1364 static gint ett_docsis_cmctrl_tlv_ds_event = -1;
1365 static gint ett_docsis_cmctrlrsp = -1;
1366
1367 static gint ett_docsis_regreqmp = -1;
1368 static gint ett_docsis_regrspmp = -1;
1369
1370 static gint ett_docsis_ocd = -1;
1371 static gint ett_docsis_ocd_tlv = -1;
1372 static gint ett_docsis_ocd_tlvtlv = -1;
1373
1374 static gint ett_docsis_dpd = -1;
1375 static gint ett_docsis_dpd_tlv = -1;
1376 static gint ett_docsis_dpd_tlvtlv = -1;
1377 static gint ett_docsis_dpd_tlv_subcarrier_assignment = -1;
1378 static gint ett_docsis_dpd_tlv_subcarrier_assignment_vector = -1;
1379
1380 static gint ett_docsis_optreq = -1;
1381 static gint ett_docsis_optreq_tlv = -1;
1382 static gint ett_docsis_optreq_tlvtlv = -1;
1383 static gint ett_docsis_optreq_tlv_rxmer_thresh_params = -1;
1384 static gint ett_docsis_optreq_tlv_rxmer_thresh_params_tlv = -1;
1385
1386 static gint ett_docsis_optrsp = -1;
1387 static gint ett_docsis_optrsp_tlv = -1;
1388 static gint ett_docsis_optrsp_tlvtlv = -1;
1389 static gint ett_docsis_optrsp_tlv_rxmer_snr_margin_data = -1;
1390 static gint ett_docsis_optrsp_tlv_rxmer_snr_margin_tlv =-1;
1391
1392 static gint ett_docsis_optack = -1;
1393
1394 static gint ett_docsis_rba = -1;
1395 static gint ett_docsis_rba_control_byte = -1;
1396
1397 static gint ett_docsis_mgmt = -1;
1398 static gint ett_mgmt_pay = -1;
1399
1400 static gint ett_docsis_tlv_fragments = -1;
1401 static gint ett_docsis_tlv_fragment = -1;
1402 static gint ett_docsis_tlv_reassembled = -1;
1403
1404 static expert_field ei_docsis_mgmt_tlvlen_bad = EI_INIT;
1405 static expert_field ei_docsis_mgmt_tlvtype_unknown = EI_INIT;
1406 static expert_field ei_docsis_mgmt_version_unknown = EI_INIT;
1407
1408 static dissector_table_t docsis_mgmt_dissector_table;
1409 static dissector_handle_t docsis_tlv_handle;
1410 static dissector_handle_t docsis_ucd_handle;
1411
1412 static const value_string channel_tlv_vals[] = {
1413 {UCD_SYMBOL_RATE, "Symbol Rate"},
1414 {UCD_FREQUENCY, "Frequency"},
1415 {UCD_PREAMBLE, "Preamble Pattern"},
1416 {UCD_BURST_DESCR, "Burst Descriptor Type 4"},
1417 {UCD_BURST_DESCR5, "Burst Descriptor Type 5"},
1418 {UCD_EXT_PREAMBLE, "Extended Preamble Pattern"},
1419 {UCD_SCDMA_MODE_ENABLED, "S-CDMA Mode Enabled"},
1420 {UCD_SCDMA_SPREADING_INTERVAL, "S-CDMA Spreading Intervals per Frame"},
1421 {UCD_SCDMA_CODES_PER_MINI_SLOT, "S-CDMA Codes per Mini-slot"},
1422 {UCD_SCDMA_ACTIVE_CODES, "S-CDMA Number of Active Codes"},
1423 {UCD_SCDMA_CODE_HOPPING_SEED, "S-CDMA Code Hopping Seed"},
1424 {UCD_SCDMA_US_RATIO_NUM, "S-CDMA US ratio numerator M"},
1425 {UCD_SCDMA_US_RATIO_DENOM, "S-CDMA US ratio denominator N"},
1426 {UCD_SCDMA_TIMESTAMP_SNAPSHOT, "S-CDMA Timestamp Snapshot"},
1427 {UCD_MAINTAIN_POWER_SPECTRAL_DENSITY, "Maintain Power Spectral Density"},
1428 {UCD_RANGING_REQUIRED, "Ranging Required"},
1429 {UCD_MAX_SCHEDULED_CODES, "S-CDMA Maximum Scheduled Codes"},
1430 {UCD_RANGING_HOLD_OFF_PRIORITY_FIELD, "Ranging Hold-Off Priority Field"},
1431 {UCD_RANGING_CHANNEL_CLASS_ID, "Ranging Channel Class ID"},
1432 {UCD_SCDMA_SELECTION_ACTIVE_CODES_AND_CODE_HOPPING, "S-CDMA Selection Mode for Active Codes and Code Hopping"},
1433 {UCD_SCDMA_SELECTION_STRING_FOR_ACTIVE_CODES, "S-CDMA Selection String for Active Codes"},
1434 {UCD_HIGHER_UCD_FOR_SAME_UCID, "Higher UCD for the same UCID present bitmap"},
1435 {UCD_BURST_DESCR23, "Burst Descriptor Type 23"},
1436 {UCD_CHANGE_IND_BITMASK, "UCD Change Indicator Bitmask"},
1437 {UCD_OFDMA_TIMESTAMP_SNAPSHOT, "OFDMA Timestamp Snapshot"},
1438 {UCD_OFDMA_CYCLIC_PREFIX_SIZE, "OFDMA Cyclic Prefix Size"},
1439 {UCD_OFDMA_ROLLOFF_PERIOD_SIZE, "OFDMA Rolloff Period Size"},
1440 {UCD_SUBCARRIER_SPACING, "Subcarrier Spacing"},
1441 {UCD_CENTER_FREQ_SUBC_0, "Center Frequency of Subcarrier 0"},
1442 {UCD_SUBC_EXCL_BAND, "Subcarrier Exclusion Band"},
1443 {UCD_UNUSED_SUBC_SPEC, "Unused Subcarrier Specification"},
1444 {UCD_SYMB_IN_OFDMA_FRAME, "Symbols in OFDMA frame"},
1445 {UCD_RAND_SEED, "Randomization Seed"},
1446 {0, NULL}
1447 };
1448
1449 static const value_string burst_tlv_vals[] = {
1450 {UCD_MODULATION, "Modulation Type"},
1451 {UCD_DIFF_ENCODING, "Differential Encoding"},
1452 {UCD_PREAMBLE_LEN, "Preamble Length"},
1453 {UCD_PREAMBLE_VAL_OFF, "Preamble Value Offset"},
1454 {UCD_FEC, "FEC Error Correction (T)"},
1455 {UCD_FEC_CODEWORD, "FEC Codeword Information Bytes (k)"},
1456 {UCD_SCRAMBLER_SEED, "Scrambler Seed"},
1457 {UCD_MAX_BURST, "Maximum Burst Size"},
1458 {UCD_GUARD_TIME, "Guard Time Size"},
1459 {UCD_LAST_CW_LEN, "Last Codeword Length"},
1460 {UCD_SCRAMBLER_ONOFF, "Scrambler on/off"},
1461 {UCD_RS_INT_DEPTH, "R-S Interleaver Depth (Ir)"},
1462 {UCD_RS_INT_BLOCK, "R-S Interleaver Block Size (Br)"},
1463 {UCD_PREAMBLE_TYPE, "Preamble Type"},
1464 {UCD_SCMDA_SCRAMBLER_ONOFF, "S-CDMA Spreader on/off"},
1465 {UCD_SCDMA_CODES_PER_SUBFRAME, "S-CDMA Codes per Subframe"},
1466 {UCD_SCDMA_FRAMER_INT_STEP_SIZE, "S-CDMA Framer Interleaving Step Size"},
1467 {UCD_TCM_ENABLED, "TCM Encoding"},
1468 {UCD_SUBC_INIT_RANG, "Subcarriers (Nir) Initial Ranging"},
1469 {UCD_SUBC_FINE_RANG, "Subcarriers (Nfr) Fine Ranging"},
1470 {UCD_OFDMA_PROFILE, "OFDMA Profile"},
1471 {UCD_OFDMA_IR_POWER_CONTROL, "OFDMA Power Control (Ir)"},
1472 {0, NULL}
1473 };
1474
1475 static const value_string mgmt_type_vals[] = {
1476 {MGT_SYNC, "Timing Synchronisation"},
1477 {MGT_UCD, "Upstream Channel Descriptor"},
1478 {MGT_TYPE29UCD, "Upstream Channel Descriptor Type 29"},
1479 {MGT_TYPE35UCD, "Upstream Channel Descriptor Type 35"},
1480 {MGT_MAP, "Upstream Bandwidth Allocation"},
1481 {MGT_RNG_REQ, "Ranging Request"},
1482 {MGT_RNG_RSP, "Ranging Response"},
1483 {MGT_REG_REQ, "Registration Request"},
1484 {MGT_REG_RSP, "Registration Response"},
1485 {MGT_UCC_REQ, "Upstream Channel Change Request"},
1486 {MGT_UCC_RSP, "Upstream Channel Change Response"},
1487 {MGT_TRI_TCD, "Telephony Channel Descriptor"},
1488 {MGT_TRI_TSI, "Termination System Information"},
1489 {MGT_BPKM_REQ, "Privacy Key Management Request"},
1490 {MGT_BPKM_RSP, "Privacy Key Management Response"},
1491 {MGT_REG_ACK, "Registration Acknowledge"},
1492 {MGT_DSA_REQ, "Dynamic Service Addition Request"},
1493 {MGT_DSA_RSP, "Dynamic Service Addition Response"},
1494 {MGT_DSA_ACK, "Dynamic Service Addition Acknowledge"},
1495 {MGT_DSC_REQ, "Dynamic Service Change Request"},
1496 {MGT_DSC_RSP, "Dynamic Service Change Response"},
1497 {MGT_DSC_ACK, "Dynamic Service Change Acknowledge"},
1498 {MGT_DSD_REQ, "Dynamic Service Delete Request"},
1499 {MGT_DSD_RSP, "Dynamic Service Delete Response"},
1500 {MGT_DCC_REQ, "Dynamic Channel Change Request"},
1501 {MGT_DCC_RSP, "Dynamic Channel Change Response"},
1502 {MGT_DCC_ACK, "Dynamic Channel Change Acknowledge"},
1503 {MGT_DCI_REQ, "Device Class Identification Request"},
1504 {MGT_DCI_RSP, "Device Class Identification Response"},
1505 {MGT_UP_DIS, "Upstream Channel Disable"},
1506 {MGT_INIT_RNG_REQ, "Initial Ranging Request"},
1507 {MGT_TEST_REQ, "Test Request Message"},
1508 {MGT_DS_CH_DESC, "Downstream Channel Descriptor"},
1509 {MGT_MDD, "MAC Domain Descriptor"},
1510 {MGT_B_INIT_RNG_REQ, "Bonded Initial Ranging Request"},
1511 {MGT_DBC_REQ, "Dynamic Bonding Change Request"},
1512 {MGT_DBC_RSP, "Dynamic Bonding Change Response"},
1513 {MGT_DBC_ACK, "Dynamic Bonding Change Acknowledge"},
1514 {MGT_DPV_REQ, "DOCSIS Path Verify Request"},
1515 {MGT_DPV_RSP, "DOCSIS Path Verify Response"},
1516 {MGT_CM_STATUS, "CM Status Report"},
1517 {MGT_CM_CTRL_REQ, "CM Control Request"},
1518 {MGT_CM_CTRL_RSP, "CM Control Response"},
1519 {MGT_REG_REQ_MP, "Multipart Registration Request"},
1520 {MGT_REG_RSP_MP, "Multipart Registration Response"},
1521 {MGT_EM_REQ, "Energy Management Request"},
1522 {MGT_EM_RSP, "Energy Management Response"},
1523 {MGT_CM_STATUS_ACK, "Status Report Acknowledge"},
1524 {MGT_OCD, "OFDM Channel Descriptor"},
1525 {MGT_DPD, "Downstream Profile Descriptor"},
1526 {MGT_TYPE51UCD, "Upstream Channel Descriptor Type 51"},
1527 {MGT_ODS_REQ, "ODS-REQ"},
1528 {MGT_ODS_RSP, "ODS-RSP"},
1529 {MGT_OPT_REQ, "OFDM Downstream Profile Test Request"},
1530 {MGT_OPT_RSP, "OFDM Downstream Profile Test Response"},
1531 {MGT_OPT_ACK, "OFDM Downstream Profile Test Acknowledge"},
1532 {MGT_OPT_ACK, "OFDM Downstream Profile Test Acknowledge"},
1533 {MGT_DPT_REQ, "DOCSIS Time Protocol Request"},
1534 {MGT_DPT_RSP, "DOCSIS Time Protocol Response"},
1535 {MGT_DPT_ACK, "DOCSIS Time Protocol Acknowledge"},
1536 {MGT_DPT_INFO, "DOCSIS Time Protocol Information"},
1537 {MGT_RBA_SW, "DOCSIS Resource Block Assignment"},
1538 {0, NULL}
1539 };
1540
1541 static const value_string on_off_vals[] = {
1542 {1, "On"},
1543 {2, "Off"},
1544 {0, NULL}
1545 };
1546
1547 static const value_string inhibit_allow_vals[] = {
1548 {0, "Inhibit Initial Ranging"},
1549 {1, "Ranging Allowed"},
1550 {0, NULL},
1551 };
1552
1553 static const value_string mod_vals[] = {
1554 {1, "QPSK"},
1555 {2, "16-QAM"},
1556 {3, "8-QAM"},
1557 {4, "32-QAM"},
1558 {5, "64-QAM"},
1559 {6, "128-QAM (SCDMA-only)"},
1560 {7, "Reserved for C-DOCSIS"},
1561 {0, NULL}
1562 };
1563
1564 static const value_string iuc_vals[] = {
1565 {IUC_REQUEST, "Request"},
1566 {IUC_REQ_DATA, "REQ/Data"},
1567 {IUC_INIT_MAINT, "Initial Maintenance"},
1568 {IUC_STATION_MAINT, "Station Maintenance"},
1569 {IUC_SHORT_DATA_GRANT, "Short Data Grant"},
1570 {IUC_LONG_DATA_GRANT, "Long Data Grant"},
1571 {IUC_NULL_IE, "NULL IE"},
1572 {IUC_DATA_ACK, "Data Ack"},
1573 {IUC_ADV_PHY_SHORT_DATA_GRANT, "Advanced Phy Short Data Grant"},
1574 {IUC_ADV_PHY_LONG_DATA_GRANT, "Advanced Phy Long Data Grant"},
1575 {IUC_ADV_PHY_UGS, "Advanced Phy UGS"},
1576 {IUC_DATA_PROFILE_IUC12, "Data Profile IUC12"},
1577 {IUC_DATA_PROFILE_IUC13, "Data Profile IUC13"},
1578 {IUC_RESERVED14, "Reserved"},
1579 {IUC_EXPANSION, "Expanded IUC"},
1580 {0, NULL}
1581 };
1582
1583 static const true_false_string mer_vals = {"measure RxMER at the CMTS on this probe", "do not measure RxMER at the CMTS on this probe"};
1584
1585 static const true_false_string pw_vals = {"transmit using alternate power setting specified by the Start Subc field.", "transmit using normal power settings"};
1586
1587 static const true_false_string eq_vals = {"equalizer disabled", "equalizer enabled"};
1588
1589 static const true_false_string st_vals = {"stagger", "no stagger"};
1590
1591 static const value_string last_cw_len_vals[] = {
1592 {1, "Fixed"},
1593 {2, "Shortened"},
1594 {0, NULL}
1595 };
1596
1597 static const value_string ranging_req_vals[] = {
1598 {0, "No ranging required"},
1599 {1, "Unicast initial ranging required"},
1600 {2, "Broadcast initial ranging required"},
1601 {0, NULL}
1602 };
1603
1604 static const value_string rng_stat_vals[] = {
1605 {1, "Continue"},
1606 {2, "Abort"},
1607 {3, "Success"},
1608 {0, NULL}
1609 };
1610
1611 static void
two_compl_frac(char * buf,gint16 value)1612 two_compl_frac(
1613 char *buf,
1614 gint16 value)
1615 {
1616 gint16 frac = value;
1617
1618
1619 g_snprintf(buf, ITEM_LABEL_LENGTH,
1620 "%f",
1621 frac/16384.0);
1622 }
1623
1624 static const value_string rngrsp_tlv_vals[] = {
1625 {RNGRSP_TIMING, "Timing Adjust (6.25us/64)"},
1626 {RNGRSP_PWR_LEVEL_ADJ, "Power Level Adjust (0.25dB units)"},
1627 {RNGRSP_OFFSET_FREQ_ADJ, "Offset Freq Adjust (Hz)"},
1628 {RNGRSP_TRANSMIT_EQ_ADJ, "Transmit Equalization Adjust"},
1629 {RNGRSP_RANGING_STATUS, "Ranging Status"},
1630 {RNGRSP_DOWN_FREQ_OVER, "Downstream Frequency Override (Hz)"},
1631 {RNGRSP_UP_CHID_OVER, "Upstream Channel ID Override"},
1632 {RNGRSP_TRANSMIT_EQ_SET, "Transmit Equalization Set"},
1633 {RNGRSP_T4_TIMEOUT_MULTIPLIER, "T4 Timeout Multiplier"},
1634 {RNGRSP_DYNAMIC_RANGE_WINDOW_UPPER_EDGE, "Dynamic Range Window Upper Edge"},
1635 {RNGRSP_TRANSMIT_EQ_ADJUST_OFDMA_CHANNELS, "Transmit Equalization Adjust for OFDMA Channels"},
1636 {RNGRSP_TRANSMIT_EQ_SET_OFDMA_CHANNELS, "Transmit Equalization Set for OFDMA Channels"},
1637 {RNGRSP_COMMANDED_POWER, "Commanded Power"},
1638 {0, NULL}
1639 };
1640
1641
1642 static const value_string rngrsp_tlv_commanded_power_subtlv_vals[] = {
1643 {RNGRSP_COMMANDED_POWER_DYNAMIC_RANGE_WINDOW, "Dynamic Range Window"},
1644 {RNGRSP_COMMANDED_POWER_UCID_AND_POWER_LEVEL_LIST, "List of Upstream Channel IDs and Corresponding Transmit Power Levels"},
1645 {0, NULL}
1646 };
1647
1648 static const value_string code_field_vals[] = {
1649 { 0, "Reserved"},
1650 { 1, "Reserved"},
1651 { 2, "Reserved"},
1652 { 3, "Reserved"},
1653 { 4, "Auth Request"},
1654 { 5, "Auth Reply"},
1655 { 6, "Auth Reject"},
1656 { 7, "Key Request"},
1657 { 8, "Key Reply"},
1658 { 9, "Key Reject"},
1659 {10, "Auth Invalid"},
1660 {11, "TEK Invalid"},
1661 {12, "Authent Info"},
1662 {13, "Map Request"},
1663 {14, "Map Reply"},
1664 {15, "Map Reject"},
1665 {0, NULL},
1666 };
1667
1668 static const value_string ds_mod_type_vals[] = {
1669 {0 , "64 QAM"},
1670 {1 , "256 QAM"},
1671 {0, NULL}
1672 };
1673
1674 static const value_string ds_sym_rate_vals[] = {
1675 {0 , "5.056941 Msym/sec"},
1676 {1 , "5.360537 Msym/sec"},
1677 {2 , "6.952 Msym/sec"},
1678 {0, NULL}
1679 };
1680 static const value_string init_tech_vals[] = {
1681 {0 , "Reinitialize MAC"},
1682 {1 , "Broadcast Init RNG on new chanbefore normal op"},
1683 {2 , "Unicast RNG on new chan before normal op"},
1684 {3 , "Either Unicast or broadcast RNG on new chan before normal op"},
1685 {4 , "Use new chan directly without re-init or RNG"},
1686 {0, NULL}
1687 };
1688
1689 static const value_string dcc_tlv_vals[] = {
1690 {DCCREQ_UP_CHAN_ID, "Up Channel ID"},
1691 {DCCREQ_DS_PARAMS, "Downstream Params Encodings"},
1692 {DCCREQ_INIT_TECH, "Initialization Technique"},
1693 {DCCREQ_UCD_SUB, "UCD Substitution"},
1694 {DCCREQ_SAID_SUB, "SAID Sub"},
1695 {DCCREQ_SF_SUB, "Service Flow Substitution Encodings"},
1696 {DCCREQ_CMTS_MAC_ADDR, "CMTS MAC Address"},
1697 {DCCREQ_KEY_SEQ_NUM, "Auth Key Sequence Number"},
1698 {DCCREQ_HMAC_DIGEST, "HMAC-DigestNumber"},
1699 {0, NULL}
1700 };
1701
1702 static const value_string ds_param_subtlv_vals[] = {
1703 {DCCREQ_DS_FREQ, "Frequency"},
1704 {DCCREQ_DS_MOD_TYPE, "Modulation Type"},
1705 {DCCREQ_DS_SYM_RATE, "Symbol Rate"},
1706 {DCCREQ_DS_INTLV_DEPTH, "Interleaver Depth"},
1707 {DCCREQ_DS_CHAN_ID, "Downstream Channel ID"},
1708 {DCCREQ_DS_SYNC_SUB, "SYNC Substitution"},
1709 {DCCREQ_DS_OFDM_BLOCK_FREQ, "OFDM Block Frequency"},
1710 {0, NULL}
1711 };
1712
1713 static const value_string sf_sub_subtlv_vals[] = {
1714 {DCCREQ_SF_SFID, "SFID"},
1715 {DCCREQ_SF_SID, "SID"},
1716 {DCCREQ_SF_UNSOL_GRANT_TREF, "Unsolicited Grant Time Reference"},
1717 {0, NULL}
1718 };
1719
1720 static const value_string dccrsp_tlv_vals[] = {
1721 {DCCRSP_CM_JUMP_TIME, "CM Jump Time Encodings"},
1722 {DCCRSP_KEY_SEQ_NUM, "Auth Key Sequence Number"},
1723 {DCCRSP_HMAC_DIGEST, "HMAC-Digest Number"},
1724 {0, NULL}
1725 };
1726
1727 static const value_string cm_jump_subtlv_vals[] = {
1728 {DCCRSP_CM_JUMP_TIME_LENGTH, "Length of Jump"},
1729 {DCCRSP_CM_JUMP_TIME_START, "Start Time of Jump"},
1730 {0, NULL}
1731 };
1732
1733 static const value_string dccack_tlv_vals[] = {
1734 {DCCACK_HMAC_DIGEST, "HMAC-DigestNumber"},
1735 {DCCACK_KEY_SEQ_NUM, "Auth Key Sequence Number"},
1736 {0, NULL}
1737 };
1738
1739 static const value_string max_scheduled_codes_vals[] = {
1740 {1, "Enabled"},
1741 {2, "Disabled"},
1742 {0, NULL}
1743 };
1744
1745 static const value_string dcd_tlv_vals[] = {
1746 {DCD_DOWN_CLASSIFIER, "DCD_CFR Encodings"},
1747 {DCD_DSG_RULE, "DCD DSG Rule Encodings"},
1748 {DCD_DSG_CONFIG, "DCD DSG Config Encodings"},
1749 {0, NULL}
1750 };
1751
1752 static const value_string dcd_down_classifier_vals[] = {
1753 {DCD_CFR_ID, "Downstream Classifier ID"},
1754 {DCD_CFR_RULE_PRI, "Downstream Classifier Rule Priority"},
1755 {DCD_CFR_IP_CLASSIFIER, "DCD_CFR_IP Encodings"},
1756 {0, NULL}
1757 };
1758
1759 static const value_string dcd_dsg_rule_vals[] = {
1760 {DCD_RULE_ID, "DSG Rule ID"},
1761 {DCD_RULE_PRI, "DSG Rule Priority"},
1762 {DCD_RULE_UCID_RNG, "DSG Rule UCID Range"},
1763 {DCD_RULE_CLIENT_ID, "DCD Rule ClientID Encodings"},
1764 {DCD_RULE_TUNL_ADDR, "DSG Rule Tunnel MAC Address"},
1765 {DCD_RULE_CFR_ID, "DSG Rule Classifier ID"},
1766 {DCD_RULE_VENDOR_SPEC, "DSG Rule Vendor Specific Parameters"},
1767 {0, NULL}
1768 };
1769
1770 static const value_string dcd_clid_vals[] = {
1771 {DCD_CLID_BCAST_ID, "DSG Rule Client ID Broadcast ID"},
1772 {DCD_CLID_KNOWN_MAC_ADDR, "DSG Rule Client ID Known MAC Address"},
1773 {DCD_CLID_CA_SYS_ID, "DSG Rule Client ID CA System ID"},
1774 {DCD_CLID_APP_ID, "DSG Rule Client ID Application ID"},
1775 {0, NULL}
1776 };
1777
1778 static const value_string dcd_cfr_ip_vals[] = {
1779 {DCD_CFR_IP_SOURCE_ADDR, "Downstream Classifier IP Source Address"},
1780 {DCD_CFR_IP_SOURCE_MASK, "Downstream Classifier IP Source Mask"},
1781 {DCD_CFR_IP_DEST_ADDR, "Downstream Classifier IP Destination Address"},
1782 {DCD_CFR_IP_DEST_MASK, "Downstream Classifier IP Destination Mask"},
1783 {DCD_CFR_TCPUDP_SRCPORT_START, "Downstream Classifier IP TCP/UDP Source Port Start"},
1784 {DCD_CFR_TCPUDP_SRCPORT_END, "Downstream Classifier IP TCP/UDP Source Port End"},
1785 {DCD_CFR_TCPUDP_DSTPORT_START, "Downstream Classifier IP TCP/UDP Destination Port Start"},
1786 {DCD_CFR_TCPUDP_DSTPORT_END, "Downstream Classifier IP TCP/UDP Destination Port End"},
1787 {0, NULL}
1788 };
1789
1790 static const value_string dcd_cfg_vals[] = {
1791 {DCD_CFG_CHAN_LST, "DSG Configuration Channel"},
1792 {DCD_CFG_TDSG1, "DSG Initialization Timeout (Tdsg1)"},
1793 {DCD_CFG_TDSG2, "DSG Initialization Timeout (Tdsg2)"},
1794 {DCD_CFG_TDSG3, "DSG Initialization Timeout (Tdsg3)"},
1795 {DCD_CFG_TDSG4, "DSG Initialization Timeout (Tdsg4)"},
1796 {DCD_CFG_VENDOR_SPEC, "DSG Configuration Vendor Specific Parameters"},
1797 {0, NULL}
1798 };
1799
1800 static const value_string J83_annex_vals[] = {
1801 {J83_ANNEX_A, "J.83 Annex A"},
1802 {J83_ANNEX_B, "J.83 Annex B"},
1803 {J83_ANNEX_C, "J.83 Annex C"},
1804 {0, NULL}
1805 };
1806
1807 static const value_string modulation_order_vals[] = {
1808 {QAM64, "64-QAM"},
1809 {QAM256, "256-QAM"},
1810 {0, NULL}
1811 };
1812
1813 static const value_string primary_capable_vals[] = {
1814 {NOT_PRIMARY_CAPABLE, "Channel is not primary-capable"},
1815 {PRIMARY_CAPABLE, "Channel is primary-capable"},
1816 {FDX_DOWNSTREAM_CHANNEL, "FDX downstream channel"},
1817 {0, NULL}
1818 };
1819
1820 static const value_string map_ucd_transport_indicator_vals[] = {
1821 {CANNOT_CARRY_MAP_UCD, "Channel cannot carry MAPs and UCDs for the MAC domain for which the MDD is sent"},
1822 {CAN_CARRY_MAP_UCD, "Channel can carry MAPs and UCDs for the MAC domain for which the MDD is sent"},
1823 {0, NULL}
1824 };
1825
1826 static const value_string tukey_raised_cosine_vals[] = {
1827 {TUKEY_0TS, "0 "UTF8_MICRO_SIGN"s (0 * Ts)"},
1828 {TUKEY_64TS, "0.3125 "UTF8_MICRO_SIGN"s (64 * Ts)"},
1829 {TUKEY_128TS, "0.625 "UTF8_MICRO_SIGN"s (128 * Ts)"},
1830 {TUKEY_192TS, "0.9375 "UTF8_MICRO_SIGN"s (192 * Ts)"},
1831 {TUKEY_256TS, "1.25 "UTF8_MICRO_SIGN"s (256 * Ts)"},
1832 {0, NULL}
1833 };
1834
1835 static const value_string cyclic_prefix_vals[] = {
1836 {CYCLIC_PREFIX_192_TS, "0.9375 "UTF8_MICRO_SIGN"s (192 * Ts)"},
1837 {CYCLIC_PREFIX_256_TS, "1.25 "UTF8_MICRO_SIGN"s (256 * Ts)"},
1838 {CYCLIC_PREFIX_512_TS, "2.5 "UTF8_MICRO_SIGN"s (512 * Ts) 3"},
1839 {CYCLIC_PREFIX_768_TS, "3.75 "UTF8_MICRO_SIGN"s (768 * Ts)"},
1840 {CYCLIC_PREFIX_1024_TS, "5 "UTF8_MICRO_SIGN"s (1024 * Ts)"},
1841 {0, NULL}
1842 };
1843
1844 static const value_string spacing_vals[] = {
1845 {SPACING_25KHZ, "25kHz"},
1846 {SPACING_50KHZ, "50kHz"},
1847 {0, NULL}
1848 };
1849
1850 static const value_string bpkmattr_tlv_vals[] = {
1851 {BPKM_RESERVED, "Reserved"},
1852 {BPKM_SERIAL_NUM, "Serial Number"},
1853 {BPKM_MANUFACTURER_ID, "Manufacturer ID"},
1854 {BPKM_MAC_ADDR, "MAC Address"},
1855 {BPKM_RSA_PUB_KEY, "RSA Public Key"},
1856 {BPKM_CM_ID, "CM Identification"},
1857 {BPKM_DISPLAY_STR, "Display String"},
1858 {BPKM_AUTH_KEY, "Auth Key"},
1859 {BPKM_TEK, "Traffic Encryption Key"},
1860 {BPKM_KEY_LIFETIME, "Key Lifetime"},
1861 {BPKM_KEY_SEQ_NUM, "Key Sequence Number"},
1862 {BPKM_HMAC_DIGEST, "HMAC Digest"},
1863 {BPKM_SAID, "SAID"},
1864 {BPKM_TEK_PARAM, "TEK Parameters"},
1865 {BPKM_OBSOLETED, "Obsoleted"},
1866 {BPKM_CBC_IV, "CBC IV"},
1867 {BPKM_ERROR_CODE, "Error Code"},
1868 {BPKM_CA_CERT, "CA Certificate"},
1869 {BPKM_CM_CERT, "CM Certificate"},
1870 {BPKM_SEC_CAPABILITIES, "Security Capabilities"},
1871 {BPKM_CRYPTO_SUITE, "Cryptographic Suite"},
1872 {BPKM_CRYPTO_SUITE_LIST, "Cryptographic Suite List"},
1873 {BPKM_BPI_VERSION, "BPI Version"},
1874 {BPKM_SA_DESCRIPTOR, "SA Descriptor"},
1875 {BPKM_SA_TYPE, "SA Type"},
1876 {BPKM_SA_QUERY, "SA Query"},
1877 {BPKM_SA_QUERY_TYPE, "SA Query Type"},
1878 {BPKM_IP_ADDRESS, "IP Address"},
1879 {BPKM_DNLD_PARAMS, "Download Parameters"},
1880 {BPKM_VENDOR_DEFINED, "Vendor Defined"},
1881 {0, NULL}
1882 };
1883
1884 static const value_string error_code_vals[] = {
1885 {0, "No Information"},
1886 {1, "Unauthorized CM"},
1887 {2, "Unauthorized SAID"},
1888 {3, "Unsolicited"},
1889 {4, "Invalid Key Sequence Number"},
1890 {5, "Message (Key Request) authentication failure"},
1891 {6, "Permanent Authorization Failure"},
1892 {7, "Not authorized for requested downstream traffic flow"},
1893 {8, "Downstream traffic flow not mapped to SAID"},
1894 {9, "Time of day not acquired"},
1895 {10, "EAE Disabled"},
1896 {0, NULL},
1897 };
1898
1899 static const value_string crypto_suite_attr_vals[] = {
1900 {0x0100, "CBC-Mode 56-bit DES, no data authentication"},
1901 {0x0200, "CBC-Mode 40-bit DES, no data authentication"},
1902 {0x0300, "CBC-Mode 128-bit AES, no data authentication"},
1903 {0, NULL},
1904 };
1905
1906 static const value_string bpi_ver_vals[] = {
1907 {0, "Reserved"},
1908 {1, "BPI+"},
1909 {0, NULL},
1910 };
1911
1912 static const value_string mdd_tlv_vals[] = {
1913 {DOWNSTREAM_ACTIVE_CHANNEL_LIST, "Downstream Active Channel List"},
1914 {MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP, "MAC Domain Downstream Service Group"},
1915 {DOWNSTREAM_AMBIGUITY_RESOLUTION_FREQUENCY_LIST, "Downstream Ambiguity Resolution Frequency List "},
1916 {RECEIVE_CHANNEL_PROFILE_REPORTING_CONTROL , "Receive Channel Profile Reporting Control"},
1917 {IP_INITIALIZATION_PARAMETERS , "IP Initialization Parameters"},
1918 {EARLY_AUTHENTICATION_AND_ENCRYPTION , "Early Authentication and Encryption"},
1919 {UPSTREAM_ACTIVE_CHANNEL_LIST , "Upstream Active Channel List"},
1920 {UPSTREAM_AMBIGUITY_RESOLUTION_CHANNEL_LIST , "Upstream Ambiguity Resolution Channel List"},
1921 {UPSTREAM_FREQUENCY_RANGE , "Upstream Frequency Range"},
1922 {SYMBOL_CLOCK_LOCKING_INDICATOR , "Symbol Clock Locking Indicator"},
1923 {CM_STATUS_EVENT_CONTROL , "CM-STATUS Event Control"},
1924 {UPSTREAM_TRANSMIT_POWER_REPORTING , "Upstream Transmit Power Reporting"},
1925 {DSG_DA_TO_DSID_ASSOCIATION_ENTRY , "DSG DA-to-DSID Association Entry"},
1926 {CM_STATUS_EVENT_ENABLE_NON_CHANNEL_SPECIFIC_EVENTS , "CM-STATUS Event Enable for Non-Channel-Specific-Events"},
1927 {EXTENDED_UPSTREAM_TRANSMIT_POWER_SUPPORT , "Extended Upstream Transmit Power Support"},
1928 {CMTS_DOCSIS_VERSION , "CMTS DOCSIS Version"},
1929 {CM_PERIODIC_MAINTENANCE_TIMEOUT_INDICATOR , "CM Periodic Maintenance Timeout Indicator"},
1930 {DLS_BROADCAST_AND_MULTICAST_DELIVERY_METHOD , "DLS Broadcast and Multicast Delivery Method"},
1931 {CM_STATUS_EVENT_ENABLE_FOR_DOCSIS_3_1_EVENTS , "CM-STATUS Event Enable for DOCSIS 3.1 Specific Events"},
1932 {DIPLEXER_BAND_EDGE , "Diplexer Band Edge"},
1933 {FULL_DUPLEX_DESCRIPTOR , "Full Duplex Descriptor"},
1934 {0, NULL}
1935 };
1936
1937
1938 static const value_string rcp_center_frequency_spacing_vals[] = {
1939 {ASSUME_6MHZ_CENTER_FREQUENCY_SPACING , "CM MUST report only Receive Channel Profiles assuming 6 MHz center frequency spacing"},
1940 {ASSUME_8MHZ_CENTER_FREQUENCY_SPACING , "CM MUST report only Receive Channel Profiles assuming 8 MHz center frequency spacing"},
1941 {0, NULL}
1942 };
1943
1944 static const value_string verbose_rcp_reporting_vals[] = {
1945 {RCP_NO_VERBOSE_REPORTING , "CM MUST NOT provide verbose reporting of all its Receive Channel Profile(s) (both standard profiles and manufacturers profiles)."},
1946 {RCP_VERBOSE_REPORTING , "CM MUST provide verbose reporting of Receive Channel Profile(s) (both standard profiles and manufacturers profiles)."},
1947 {0, NULL}
1948 };
1949
1950 static const value_string fragmented_rcp_transmission_vals[] = {
1951 {1, "CM optionally transmits Receive Channel Profile (s) requiring fragmentation (RCPs in excess of 255 bytes) in addition to those that do not."},
1952 {0, NULL}
1953 };
1954
1955 static const value_string ip_provisioning_mode_vals[] = {
1956 {IPv4_ONLY , "IPv4 Only"},
1957 {IPv6_ONLY , "IPv6 Only"},
1958 {IP_ALTERNATE, "Alternate"},
1959 {DUAL_STACK , "Dual Stack"},
1960 {0, NULL}
1961 };
1962
1963 static const value_string eae_vals[] = {
1964 {EAE_DISABLED , "early authentication and encryption disabled"},
1965 {EAE_ENABLED , "early authentication and encryption enabled"},
1966 {0, NULL}
1967 };
1968
1969 static const value_string upstream_frequency_range_vals[] = {
1970 {STANDARD_UPSTREAM_FREQUENCY_RANGE, "Standard Upstream Frequency Range"},
1971 {EXTENDED_UPSTREAM_FREQUENCY_RANGE, "Extended Upstream Frequency Range"},
1972 {0, NULL}
1973 };
1974
1975 static const value_string symbol_clock_locking_indicator_vals[] = {
1976 {NOT_LOCKED_TO_MASTER_CLOCK, "Symbol Clock is not locked to Master Clock"},
1977 {LOCKED_TO_MASTER_CLOCK, "Symbol Clock is locked to Master Clock"},
1978 {0, NULL}
1979 };
1980
1981 static const value_string symbol_cm_status_event_vals[] = {
1982 {SECONDARY_CHANNEL_MDD_TIMEOUT, "Secondary Channel MDD timeout"},
1983 {QAM_FEC_LOCK_FAILURE, "Qam FEC Lock Failure"},
1984 {SEQUENCE_OUT_OF_RANGE, "Sequence out of Range"},
1985 {MDD_RECOVERY, "MDD Recovery"},
1986 {QAM_FEC_LOCK_RECOVERY, "Qam FEC Lock Recovery"},
1987 {T4_TIMEOUT, "T4 Timeout"},
1988 {T3_RETRIES_EXCEEDED, "T3 Retries Exceeded"},
1989 {SUCCESFUL_RANGING_AFTER_T3_RETRIES_EXCEEDED, "Successful ranging after T3 Retries Exceeded"},
1990 {CM_OPERATING_ON_BATTERY_BACKUP, "CM Operating on Battery Backup"},
1991 {CM_RETURNED_TO_AC_POWER, "CM Returned to AC Power"},
1992 {0, NULL}
1993 };
1994
1995 static const value_string upstream_transmit_power_reporting_vals[] = {
1996 {CM_DOESNT_REPORT_TRANSMIT_POWER, "CM does not report transmit power in RNG-REQ, INIT-RNG-REQ, and B-INIT-RNG-REQ messages"},
1997 {CM_REPORTS_TRANSMIT_POWER, "CM reports transmit power in RNG-REQ, INIT-RNG-REQ, and B-INIT-RNG-REQ messages"},
1998 {0, NULL}
1999 };
2000
2001 static const value_string cm_periodic_maintenance_timeout_indicator_vals[] = {
2002 {0, "use Unicast Ranging opportunity"},
2003 {1, "use Probe opportunity"},
2004 {2, "use Unicast Ranging or Probe opportunity"},
2005 {0, NULL}
2006 };
2007
2008 static const value_string dls_broadcast_and_multicast_delivery_method_vals[] = {
2009 {1, "delayed selected multicast method"},
2010 {2, "selectively replicated multicast method"},
2011 {0, NULL}
2012 };
2013
2014
2015 static const value_string mdd_ds_active_channel_list_vals[] = {
2016 {DOWNSTREAM_ACTIVE_CHANNEL_LIST_CHANNEL_ID, "Channel ID"},
2017 {DOWNSTREAM_ACTIVE_CHANNEL_LIST_FREQUENCY, "Frequency"},
2018 {DOWNSTREAM_ACTIVE_CHANNEL_LIST_MODULATION_ORDER_ANNEX, "Annex/Modulation Order"},
2019 {DOWNSTREAM_ACTIVE_CHANNEL_LIST_PRIMARY_CAPABLE, "Primary Capable"},
2020 {DOWNSTREAM_ACTIVE_CHANNEL_LIST_CM_STATUS_EVENT_ENABLE_BITMASK, "CM-STATUS Event Enable Bitmask"},
2021 {DOWNSTREAM_ACTIVE_CHANNEL_LIST_MAP_UCD_TRANSPORT_INDICATOR, "MAP and UCD transport indicator"},
2022 {DOWNSTREAM_ACTIVE_CHANNEL_LIST_OFDM_PLC_PARAMETERS, "OFDM PLC Parameters"},
2023 {DOWNSTREAM_ACTIVE_CHANNEL_LIST_FDX_SUB_BAND_ID, "Full Duplex Sub-band ID"},
2024 {0, NULL}
2025 };
2026
2027 static const value_string mdd_ds_service_group_vals[] = {
2028 {MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP_MD_DS_SG_IDENTIFIER, "MD-DS-SG Identifier"},
2029 {MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP_CHANNEL_IDS, "Channel Ids"},
2030 {0, NULL}
2031 };
2032
2033 static const value_string mdd_channel_profile_reporting_control_vals[] = {
2034 {RCP_CENTER_FREQUENCY_SPACING, "RCP Center Frequency Spacing"},
2035 {VERBOSE_RCP_REPORTING, "Verbose RCP reporting"},
2036 {FRAGMENTED_RCP_TRANSMISSION, "Fragmented RCP transmission"},
2037 {0, NULL}
2038 };
2039
2040 static const value_string mdd_ip_init_param_vals[] = {
2041 {IP_PROVISIONING_MODE, "IP Provisioning Mode"},
2042 {PRE_REGISTRATION_DSID, "Pre-registration DSID"},
2043 {0, NULL}
2044 };
2045
2046 static const value_string mdd_up_active_channel_list_vals[] = {
2047 {UPSTREAM_ACTIVE_CHANNEL_LIST_UPSTREAM_CHANNEL_ID, "Upstream Channel ID"},
2048 {UPSTREAM_ACTIVE_CHANNEL_LIST_CM_STATUS_EVENT_ENABLE_BITMASK, "CM-STATUS Event Enable Bitmask"},
2049 {UPSTREAM_ACTIVE_CHANNEL_LIST_UPSTREAM_CHANNEL_PRIORITY, "Upstream Channel Priority"},
2050 {UPSTREAM_ACTIVE_CHANNEL_LIST_DSCHIDS_MAPS_UCDS, "Downstream Channel(s) on which MAPs and UCDs for this Upstream Channel are sent"},
2051 {UPSTREAM_ACTIVE_CHANNEL_LIST_FDX_UPSTREAM_CHANNEL, "FDX Upstream Channel"},
2052 {UPSTREAM_ACTIVE_CHANNEL_LIST_FDX_SUBBAND_ID, "FDX Sub-band ID"},
2053 {0, NULL}
2054 };
2055
2056 static const value_string mdd_cm_status_event_control_vals[] = {
2057 {EVENT_TYPE_CODE, "Event Type"},
2058 {MAXIMUM_EVENT_HOLDOFF_TIMER, "Maximum Event Holdoff Timer"},
2059 {MAXIMUM_NUMBER_OF_REPORTS_PER_EVENT, "Maximum Number of Reports per Event"},
2060 {0, NULL}
2061 };
2062
2063 static const value_string mdd_cm_dsg_da_to_dsid_vals[] = {
2064 {DSG_DA_TO_DSID_ASSOCIATION_DA, "Destination Address"},
2065 {DSG_DA_TO_DSID_ASSOCIATION_DSID, "DSID"},
2066 {0, NULL}
2067 };
2068
2069 static const value_string tlv20_vals[] = {
2070 {0, "Selectable active codes mode 1 enabled and code hopping disabled"},
2071 {1, "Selectable active codes mode 1 enabled and code hopping mode 1 enabled"},
2072 {2, "Selectable active codes mode 2 enabled and code hopping mode 2 enabled"},
2073 {3, "Selectable active codes mode 2 enabled and code hopping disabled"},
2074 {0, NULL}
2075 };
2076
2077 static const value_string mdd_diplexer_band_edge_vals[] = {
2078 {DIPLEXER_US_UPPER_BAND_EDGE, "Diplexer Upstream Upper Band Edge"},
2079 {DIPLEXER_DS_LOWER_BAND_EDGE, "Diplexer Downstream Lower Band Edge"},
2080 {DIPLEXER_DS_UPPER_BAND_EDGE, "Diplexer Downstream Upper Band Edge"},
2081 {0, NULL}
2082 };
2083
2084 static const value_string mdd_diplexer_us_upper_band_edge_vals[] = {
2085 {0, "Upstream Frequency Range up to 42 MHz"},
2086 {1, "Upstream Frequency Range up to 65 MHz"},
2087 {2, "Upstream Frequency Range up to 85 MHz"},
2088 {3, "Upstream Frequency Range up to 117 MHz"},
2089 {4, "Upstream Frequency Range up to 204 MHz"},
2090 {0, NULL}
2091 };
2092
2093 static const value_string mdd_diplexer_ds_lower_band_edge_vals[] = {
2094 {0, "Downstream Frequency Range starting from 108 MHz"},
2095 {1, "Downstream Frequency Range starting from 258 MHz"},
2096 {0, NULL}
2097 };
2098
2099 static const value_string mdd_diplexer_ds_upper_band_edge_vals[] = {
2100 {0, "Downstream Frequency Range up to 1218 MHz"},
2101 {1, "Downstream Frequency Range up to 1794 MHz"},
2102 {2, "Downstream Frequency Range up to 1002 MHz"},
2103 {0, NULL}
2104 };
2105
2106 static const value_string mdd_full_duplex_descriptor_vals[] = {
2107 {FDX_ALLOCATED_SPECTRUM, "Full Duplex Allocated Spectrum"},
2108 {FDX_TOTAL_NUMBER_OF_SUB_BANDS, "Total number of sub-bands"},
2109 {FDX_SUB_BAND_WIDTH, "Full Duplex Sub-band Width"},
2110 {FDX_SUB_BAND_DESCRIPTOR, "Full Duplex Sub-band Descriptor"},
2111 {0, NULL}
2112 };
2113
2114 static const value_string mdd_full_duplex_allocated_spectrum_vals[] = {
2115 {0, "96 MHz"},
2116 {1, "192 MHz"},
2117 {2, "288 MHz"},
2118 {3, "384 MHz"},
2119 {4, "576 MHz"},
2120 {0, NULL}
2121 };
2122
2123 static const value_string mdd_full_duplex_sub_band_width_vals[] = {
2124 {0, "96 MHz"},
2125 {1, "192 MHz"},
2126 {0, NULL}
2127 };
2128
2129 static const value_string mdd_full_duplex_sub_band_vals[] = {
2130 {FDX_SUB_BAND_ID, "Full Duplex Sub-band ID"},
2131 {FDX_SUB_BAND_OFFSET, "Full Duplex Sub-band Offset"},
2132 {0, NULL}
2133 };
2134
2135 static const value_string cmstatus_tlv_vals[] = {
2136 {STATUS_EVENT, "Status Event"},
2137 {0, NULL}
2138 };
2139
2140 static const value_string cmstatus_status_event_tlv_vals[] = {
2141 {EVENT_DS_CH_ID, "Downstream Channel ID"},
2142 {EVENT_US_CH_ID, "Upstream Channel ID"},
2143 {EVENT_DSID, "DSID"},
2144 {EVENT_DESCR, "Description"},
2145 {EVENT_MAC_ADDRESS, "MAC Address"},
2146 {EVENT_DS_OFDM_PROFILE_ID, "Downstream OFDM Profile ID"},
2147 {EVENT_US_OFDMA_PROFILE_ID, "Upstream OFDMA Profile ID"},
2148 {0, NULL}
2149 };
2150
2151 static const value_string cmctrlreq_tlv_vals[] = {
2152 {CM_CTRL_MUTE, "Upstream Channel RF Mute"},
2153 {CM_CTRL_MUTE_TIMEOUT, "RF Mute Timeout Interval"},
2154 {CM_CTRL_REINIT, "CM Reinitialize"},
2155 {CM_CTRL_DISABLE_FWD, "Disable Forwarding"},
2156 {CM_CTRL_DS_EVENT, "Override Downstream Events"},
2157 {CM_CTRL_US_EVENT, "Override Upstream Events"},
2158 {CM_CTRL_EVENT, "Override Non-Channel-Specific Events"},
2159 {0, NULL}
2160 };
2161
2162 static const value_string cmctrlreq_us_tlv_vals[] = {
2163 {US_EVENT_CH_ID, "Upstream Channel ID"},
2164 {US_EVENT_MASK, "Upstream Status Event Enable Bitmask"},
2165 {0, NULL}
2166 };
2167
2168 static const value_string cmctrlreq_ds_tlv_vals[] = {
2169 {DS_EVENT_CH_ID, "Downstream Channel ID"},
2170 {DS_EVENT_MASK, "Downstream Status Event Enable Bitmask"},
2171 {0, NULL}
2172 };
2173
2174 static const value_string emrsp_tlv_vals[] = {
2175 {EM_HOLDOFF_TIMER, "Hold-Off Timer"},
2176 {0, NULL}
2177 };
2178
2179 static const value_string emreq_req_power_mode_vals[] = {
2180 {0, "Normal Operation"},
2181 {1, "Energy Management 1x1 Mode"},
2182 {2, "DOCSIS Light Sleep Mode"},
2183 {0, NULL}
2184 };
2185
2186 static const value_string emrsp_rsp_code_vals[] = {
2187 {0, "OK"},
2188 {1, "Reject Temporary"},
2189 {2, "Reject Permanent, Requested Low Power Mode(s) Not Supported"},
2190 {3, "Reject Permanent, Requested Low Power Mode(s) Disabled"},
2191 {4, "Reject Permanent, Other"},
2192 {0, NULL}
2193 };
2194
2195 static const value_string docsis_ocd_subc_assign_type_str[] = {
2196 {0, "range, continuous"},
2197 {1, "range, skip by 1"},
2198 {2, "list"},
2199 {3, "reserved"},
2200 {0, NULL}
2201 };
2202
2203 static const value_string docsis_ocd_subc_assign_value_str[] = {
2204 {0, "specific value"},
2205 {1, "default value"},
2206 {0, NULL}
2207 };
2208
2209 static const value_string docsis_ocd_subc_assign_subc_type_str[] = {
2210 {1, "continuous pilot"},
2211 {16, "excluded subcarriers"},
2212 {20, "PLC, 16-QAM"},
2213 {0, NULL}
2214 };
2215
2216 static const value_string docsis_ocd_four_trans_size[] = {
2217 {0, "4096 subcarriers at 50 kHz spacing"},
2218 {1, "8192 subcarriers at 25 kHz spacing"},
2219 {0, NULL}
2220 };
2221
2222 static const value_string docsis_ocd_cyc_prefix[] = {
2223 {0, "0.9375 "UTF8_MICRO_SIGN"s with 192 samples"},
2224 {1, "1.25 "UTF8_MICRO_SIGN"s with 256 samples"},
2225 {2, "2.5 "UTF8_MICRO_SIGN"s with 512 samples"},
2226 {3, "3.75 "UTF8_MICRO_SIGN"s with 768 samples"},
2227 {4, "5.0 "UTF8_MICRO_SIGN"s with 1024 samples"},
2228 {0, NULL}
2229 };
2230
2231 static const value_string docsis_ocd_roll_off[] = {
2232 {0, "0 "UTF8_MICRO_SIGN"s with 0 samples"},
2233 {1, "0.3125 "UTF8_MICRO_SIGN"s with 64 samples"},
2234 {2, "0.625 "UTF8_MICRO_SIGN"s with 128 samples"},
2235 {3, "0.9375 "UTF8_MICRO_SIGN"s with 192 samples"},
2236 {4, "1.25 "UTF8_MICRO_SIGN"s with 256 samples"},
2237 {0, NULL}
2238 };
2239
2240 static const value_string docsis_ocd_prim_cap_ind_str[] = {
2241 {0, "channel is not primary capable"},
2242 {1, "channel is primary capable"},
2243 {0, NULL}
2244 };
2245
2246 static const value_string ocd_tlv_vals[] = {
2247 {DISCRETE_FOURIER_TRANSFORM_SIZE, "Discrete Fourier Transform Size"},
2248 {CYCLIC_PREFIX, "Cyclic Prefix"},
2249 {ROLL_OFF, "Roll Off"},
2250 {OFDM_SPECTRUM_LOCATION, "OFDM Spectrum Location"},
2251 {TIME_INTERLEAVING_DEPTH, "Time Interleaving Depth"},
2252 {SUBCARRIER_ASSIGNMENT_RANGE_LIST, "Subcarrier Assignment Range/List"},
2253 {PRIMARY_CAPABILITY_INDICATOR, "Primary Capable Indicator"},
2254 {0, NULL}
2255 };
2256
2257 static const value_string docsis_dpd_subc_assign_type_str[] = {
2258 {0, "range, continuous"},
2259 {1, "range, skip by 1"},
2260 {2, "list"},
2261 {3, "reserved"},
2262 {0, NULL}
2263 };
2264
2265 static const value_string docsis_dpd_subc_assign_value_str[] = {
2266 {0, "specific value"},
2267 {1, "default value"},
2268 {0, NULL}
2269 };
2270
2271 static const value_string docsis_dpd_subc_assign_modulation_str[] = {
2272 {0, "zero-bit loaded"},
2273 {1, "reserved"},
2274 {2, "QPSK (for NCP profile only)"},
2275 {3, "reserved"},
2276 {4, "16-QAM"},
2277 {5, "reserved"},
2278 {6, "64-QAM"},
2279 {7, "128-QAM"},
2280 {8, "256-QAM"},
2281 {9, "512-QAM"},
2282 {10, "1024-QAM"},
2283 {11, "2048-QAM"},
2284 {12, "4096-QAM"},
2285 {13, "8192-QAM"},
2286 {14, "16384-QAM"},
2287 {15, "reserved"},
2288 {0, NULL}
2289 };
2290
2291 static const value_string docsis_dpd_tlv_subc_assign_vector_oddness_str[] = {
2292 {0, "N is even"},
2293 {1, "N is odd"},
2294 {0, NULL}
2295 };
2296
2297 static const value_string docsis_dpd_tlv_subc_assign_vector_modulation_str[] = {
2298 {0, "zero-bit loaded"},
2299 {1, "continuous pilot"},
2300 {2, "QPSK (for NCP profile only)"},
2301 {3, "reserved"},
2302 {4, "16-QAM"},
2303 {5, "reserved"},
2304 {6, "64-QAM"},
2305 {7, "128-QAM"},
2306 {8, "256-QAM"},
2307 {9, "512-QAM"},
2308 {10, "1024-QAM"},
2309 {11, "2048-QAM"},
2310 {12, "4096-QAM"},
2311 {13, "8192-QAM"},
2312 {14, "16384-QAM"},
2313 {15, "reserved"},
2314 {0, NULL}
2315 };
2316
2317 static const value_string dpd_tlv_vals[] = {
2318 {SUBCARRIER_ASSIGNMENT_RANGE_LIST, "Subcarrier Assignment Range/List"},
2319 {SUBCARRIER_ASSIGNMENT_VECTOR, "Subcarrier Assignment Vector"},
2320 {0, NULL}
2321 };
2322
2323 static const value_string ofdma_cyclic_prefix_size_vals[] = {
2324 {1, "96 samples"},
2325 {2, "128 samples"},
2326 {3, "160 samples"},
2327 {4, "192 samples"},
2328 {5, "224 samples"},
2329 {6, "256 samples"},
2330 {7, "288 samples"},
2331 {8, "320 samples"},
2332 {9, "384 samples"},
2333 {10, "512 samples"},
2334 {11, "640 samples"},
2335 {0, NULL}
2336 };
2337
2338 static const value_string ofdma_rolloff_period_size_vals[] = {
2339 {1, "0 samples"},
2340 {2, "32 samples"},
2341 {3, "64 samples"},
2342 {4, "96 samples"},
2343 {5, "128 samples"},
2344 {6, "160 samples"},
2345 {7, "192 samples"},
2346 {8, "224 samples"},
2347 {0, NULL}
2348 };
2349
2350 static const value_string subc_spacing_vals[] = {
2351 {1, "25 kHz (corresponds to 4096 subcarriers and 16 subcarriers per minislot)"},
2352 {2, "50 kHz (corresponds to 2048 subcarriers and 8 subcarriers per minislot)"},
2353 {0, NULL}
2354 };
2355
2356 static const value_string ofdma_prof_mod_order[] = {
2357 {0, "no bit-loading"},
2358 {1, "BPSK"},
2359 {2, "QPSK"},
2360 {3, "8-QAM"},
2361 {4, "16-QAM"},
2362 {5, "32-QAM"},
2363 {6, "64-QAM"},
2364 {7, "128-QAM"},
2365 {8, "256-QAM"},
2366 {9, "512-QAM"},
2367 {10, "1024-QAM"},
2368 {11, "2048-QAM"},
2369 {12, "4096-QAM"},
2370 {0, NULL}
2371 };
2372
2373 static const value_string profile_id_vals[] = {
2374 {0, "Profile A"},
2375 {1, "Profile B"},
2376 {2, "Profile C"},
2377 {3, "Profile D"},
2378 {4, "Profile E"},
2379 {5, "Profile F"},
2380 {6, "Profile G"},
2381 {7, "Profile H"},
2382 {8, "Profile I"},
2383 {9, "Profile J"},
2384 {10, "Profile K"},
2385 {11, "Profile L"},
2386 {12, "Profile M"},
2387 {13, "Profile N"},
2388 {14, "Profile O"},
2389 {15, "Profile P"},
2390 {254, "Profile for RxMER statistics only"},
2391 {255, "NCP Profile"},
2392 {0, NULL}
2393 };
2394
2395 static const value_string opt_opcode_vals[] = {
2396 {1, "Start"},
2397 {2, "Abort"},
2398 {0, NULL}
2399 };
2400
2401 static const value_string opt_status_vals[] = {
2402 {1, "Testing"},
2403 {2, "Profile already testing from another request"},
2404 {3, "No free profile resource on CM"},
2405 {4, "Maximum duration expired"},
2406 {5, "Aborted"},
2407 {6, "Complete"},
2408 {7, "Profile already assigned to the CM"},
2409 {0, NULL}
2410 };
2411
2412 static const value_string optreq_tlv_vals[] = {
2413 {OPT_REQ_REQ_STAT, "Requested Statistics"},
2414 {OPT_REQ_RXMER_THRESH_PARAMS, "RxMER Thresholding Parameters"},
2415 {0, NULL}
2416 };
2417
2418 static const value_string optreq_tlv_rxmer_thresh_params_vals[] = {
2419 {OPT_REQ_RXMER_THRESH_PARAMS_MODULATION_ORDER, "Modulation Order"},
2420 {0, NULL}
2421 };
2422
2423 static const value_string opreq_tlv_rxmer_thresh_params_mod_order[] = {
2424 {0, "reserved"},
2425 {1, "reserved"},
2426 {2, "QPSK"},
2427 {3, "reserved"},
2428 {4, "16-QAM"},
2429 {5, "reserved"},
2430 {6, "64-QAM"},
2431 {7, "128-QAM"},
2432 {8, "256-QAM"},
2433 {9, "512-QAM"},
2434 {10, "1024-QAM"},
2435 {11, "2048-QAM"},
2436 {12, "4096-QAM"},
2437 {13, "8192-QAM"},
2438 {14, "16384-QAM"},
2439 {15, "reserved"},
2440 {0, NULL}
2441 };
2442
2443 static const value_string optrsp_tlv_vals [] = {
2444 {OPT_RSP_RXMER_AND_SNR_MARGIN_DATA, "RxMER and SNR Margin Data"},
2445 {0, NULL}
2446 };
2447
2448 static const value_string optrsp_tlv_rxmer_snr_margin_vals [] = {
2449 {OPT_RSP_RXMER_PER_SUBCARRIER, "RxMER per Subcarrier"},
2450 {0, NULL}
2451 };
2452
2453 static const value_string sid_field_bit15_14_vals [] = {
2454 {0, "No error condition"},
2455 {1, "Power Adjustment not applied"},
2456 {2, "The current value for Pr is more than 3dB below the top of the dynamic range window for all channels"},
2457 {3, "Maximum Scheduled Codes Unnecessary"},
2458 {0, NULL}
2459 };
2460
2461 static const value_string rba_subband_direction_vals [] = {
2462 {0, "Direction of this sub-band is downstream"},
2463 {1, "Direction of this sub-band is upstream"},
2464 {2, "Direction of this sub-band is undefined for this RBA"},
2465 {0, NULL}
2466 };
2467
2468
2469 static const true_false_string tfs_ucd_change_ind_vals = {"Changes", "No changes"};
2470
2471 static const true_false_string tfs_allow_inhibit = { "Inhibit Initial Ranging", "Ranging Allowed" };
2472 static const true_false_string type35ucd_tfs_present_not_present = { "UCD35 is present for this UCID",
2473 "UCD35 is not present for this UCID" };
2474
2475 static const true_false_string sid_field_bit15_tfs = {
2476 "The commanded power level P1.6r_n is higher than the value corresponding to the top of the DRW.",
2477 "The commanded power level P1.6r_n is not higher than the value corresponding to the top of the DRW."
2478 };
2479
2480 static const true_false_string sid_field_bit14_tfs = {
2481 "The commanded power level P1.6r_n is in excess of 6 dB below the value corresponding to the top of the DRW.",
2482 "The commanded power level P1.6r_n is not in excess of 6 dB below the value corresponding to the top of the DRW."
2483 };
2484
2485 static const value_string unique_unlimited[] = {
2486 { 0, "Unlimited" },
2487 {0, NULL}
2488 };
2489
2490 static const unit_name_string local_units_hz = { "Hz", NULL };
2491
2492 static void
ofdma_ir_pow_ctrl_start_pow(char * buf,guint32 value)2493 ofdma_ir_pow_ctrl_start_pow(char *buf, guint32 value)
2494 {
2495 g_snprintf(buf, ITEM_LABEL_LENGTH, "%f dBmV/1.6MHz", value/4.0);
2496 }
2497
2498 static void
ofdma_ir_pow_ctrl_step_size(char * buf,guint32 value)2499 ofdma_ir_pow_ctrl_step_size(char *buf, guint32 value)
2500 {
2501 g_snprintf(buf, ITEM_LABEL_LENGTH, "%f dB", value/4.0);
2502 }
2503
2504 static void
fourth_db(char * buf,guint32 value)2505 fourth_db(char *buf, guint32 value)
2506 {
2507 g_snprintf(buf, ITEM_LABEL_LENGTH, "%f dB", value/4.0);
2508 }
2509
2510 static void
subc_assign_range(char * buf,guint32 value)2511 subc_assign_range(char *buf, guint32 value)
2512 {
2513 g_snprintf(buf, ITEM_LABEL_LENGTH, "%u - %u", value >> 16, value &0xFFFF);
2514 }
2515
2516 static void
multipart_number_of_fragments(char * buf,guint32 value)2517 multipart_number_of_fragments(char *buf, guint32 value)
2518 {
2519 g_snprintf(buf, ITEM_LABEL_LENGTH, "%u (Actual Number of Fragments: %u)", value, value + 1);
2520 }
2521
2522 static reassembly_table docsis_tlv_reassembly_table;
2523 static reassembly_table docsis_opt_tlv_reassembly_table;
2524 static reassembly_table docsis_rngrsp_tlv_reassembly_table;
2525
2526 static const fragment_items docsis_tlv_frag_items = {
2527 &ett_docsis_tlv_fragment,
2528 &ett_docsis_tlv_fragments,
2529 &hf_docsis_tlv_fragments,
2530 &hf_docsis_tlv_fragment,
2531 &hf_docsis_tlv_fragment_overlap,
2532 &hf_docsis_tlv_fragment_overlap_conflict,
2533 &hf_docsis_tlv_fragment_multiple_tails,
2534 &hf_docsis_tlv_fragment_too_long_fragment,
2535 &hf_docsis_tlv_fragment_error,
2536 &hf_docsis_tlv_fragment_count,
2537 &hf_docsis_tlv_reassembled_in,
2538 &hf_docsis_tlv_reassembled_length,
2539 &hf_docsis_tlv_reassembled_data,
2540 "TLV fragments"
2541 };
2542
2543
2544 static int
dissect_sync(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)2545 dissect_sync (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
2546 {
2547 proto_item *it;
2548 proto_tree *sync_tree;
2549
2550 col_set_str(pinfo->cinfo, COL_INFO, "Sync Message");
2551
2552 it = proto_tree_add_item(tree, proto_docsis_sync, tvb, 0, -1, ENC_NA);
2553 sync_tree = proto_item_add_subtree (it, ett_docsis_sync);
2554
2555 proto_tree_add_item (sync_tree, hf_docsis_sync_cmts_timestamp, tvb, 0, 4, ENC_BIG_ENDIAN);
2556
2557 return tvb_captured_length(tvb);
2558 }
2559
2560 static void
dissect_ucd_burst_descr(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,proto_item * item,int pos,guint16 len)2561 dissect_ucd_burst_descr(tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree, proto_item * item, int pos, guint16 len)
2562 {
2563 int tlvpos, endtlvpos;
2564 guint8 tlvtype;
2565 guint32 i, tlvlen;
2566 proto_tree *burst_tree;
2567 proto_item *burst_item, *burst_len_item;
2568 guint iuc;
2569
2570 tlvpos = pos;
2571 endtlvpos = tlvpos + len;
2572 proto_tree_add_item_ret_uint (tree, hf_docsis_ucd_iuc, tvb, tlvpos++, 1, ENC_BIG_ENDIAN, &iuc);
2573 proto_item_append_text(item, ": IUC %d (%s)", iuc, val_to_str(iuc,iuc_vals, "Unknown IUC"));
2574 while (tlvpos < endtlvpos)
2575 {
2576 tlvtype = tvb_get_guint8 (tvb, tlvpos);
2577 burst_tree = proto_tree_add_subtree (tree, tvb, tlvpos, -1,
2578 ett_docsis_burst_tlv, &burst_item,
2579 val_to_str(tlvtype, burst_tlv_vals,
2580 "Unknown TLV (%u)"));
2581 proto_tree_add_uint (burst_tree, hf_docsis_ucd_burst_type, tvb, tlvpos++, 1, tlvtype);
2582 burst_len_item = proto_tree_add_item_ret_uint (burst_tree, hf_docsis_ucd_burst_length, tvb, tlvpos++, 1, ENC_NA, &tlvlen);
2583 proto_item_set_len(burst_item, tlvlen + 2);
2584 switch (tlvtype)
2585 {
2586 case UCD_MODULATION:
2587 if (tlvlen == 1)
2588 {
2589 proto_tree_add_item (burst_tree, hf_docsis_burst_mod_type, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2590 }
2591 else
2592 {
2593 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2594 }
2595 break;
2596 case UCD_DIFF_ENCODING:
2597 if (tlvlen == 1)
2598 {
2599 proto_tree_add_item (burst_tree, hf_docsis_burst_diff_encoding, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2600 }
2601 else
2602 {
2603 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2604 }
2605 break;
2606 case UCD_PREAMBLE_LEN:
2607 if (tlvlen == 2)
2608 {
2609 proto_tree_add_item (burst_tree, hf_docsis_burst_preamble_len, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2610 }
2611 else
2612 {
2613 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2614 }
2615 break;
2616 case UCD_PREAMBLE_VAL_OFF:
2617 if (tlvlen == 2)
2618 {
2619 proto_tree_add_item (burst_tree, hf_docsis_burst_preamble_val_off, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2620 }
2621 else
2622 {
2623 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2624 }
2625 break;
2626 case UCD_FEC:
2627 if (tlvlen == 1)
2628 {
2629 proto_tree_add_item (burst_tree, hf_docsis_burst_fec, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2630 }
2631 else
2632 {
2633 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2634 }
2635 break;
2636 case UCD_FEC_CODEWORD:
2637 if (tlvlen == 1)
2638 {
2639 proto_tree_add_item (burst_tree, hf_docsis_burst_fec_codeword, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2640 }
2641 else
2642 {
2643 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2644 }
2645 break;
2646 case UCD_SCRAMBLER_SEED:
2647 if (tlvlen == 2)
2648 {
2649 proto_tree_add_item (burst_tree, hf_docsis_burst_scrambler_seed, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2650 }
2651 else
2652 {
2653 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2654 }
2655 break;
2656 case UCD_MAX_BURST:
2657 if (tlvlen == 1)
2658 {
2659 proto_tree_add_item (burst_tree, hf_docsis_burst_max_burst, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2660 }
2661 else
2662 {
2663 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2664 }
2665 break;
2666 case UCD_GUARD_TIME:
2667 if (tlvlen == 1)
2668 {
2669 proto_tree_add_item (burst_tree, hf_docsis_burst_guard_time, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2670 }
2671 else
2672 {
2673 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2674 }
2675 break;
2676 case UCD_LAST_CW_LEN:
2677 if (tlvlen == 1)
2678 {
2679 proto_tree_add_item (burst_tree, hf_docsis_burst_last_cw_len, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2680 }
2681 else
2682 {
2683 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2684 }
2685 break;
2686 case UCD_SCRAMBLER_ONOFF:
2687 if (tlvlen == 1)
2688 {
2689 proto_tree_add_item (burst_tree, hf_docsis_burst_scrambler_onoff, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2690 }
2691 else
2692 {
2693 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2694 }
2695 break;
2696 case UCD_RS_INT_DEPTH:
2697 if (tlvlen == 1)
2698 {
2699 proto_tree_add_item (burst_tree, hf_docsis_rs_int_depth, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2700 }
2701 else
2702 {
2703 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2704 }
2705 break;
2706 case UCD_RS_INT_BLOCK:
2707 if (tlvlen == 2)
2708 {
2709 proto_tree_add_item (burst_tree, hf_docsis_rs_int_block, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2710 }
2711 else
2712 {
2713 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2714 }
2715 break;
2716 case UCD_PREAMBLE_TYPE:
2717 if (tlvlen == 1)
2718 {
2719 proto_tree_add_item (burst_tree, hf_docsis_preamble_type, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2720 }
2721 else
2722 {
2723 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2724 }
2725 break;
2726 case UCD_SCMDA_SCRAMBLER_ONOFF:
2727 if (tlvlen == 1)
2728 {
2729 proto_tree_add_item (burst_tree, hf_docsis_ucd_scdma_scrambler_onoff, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2730 }
2731 else
2732 {
2733 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2734 }
2735 break;
2736 case UCD_SCDMA_CODES_PER_SUBFRAME:
2737 if (tlvlen == 1)
2738 {
2739 proto_tree_add_item (burst_tree, hf_docsis_ucd_scdma_codes_per_subframe, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2740 }
2741 else
2742 {
2743 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2744 }
2745 break;
2746 case UCD_SCDMA_FRAMER_INT_STEP_SIZE:
2747 if (tlvlen == 1)
2748 {
2749 proto_tree_add_item (burst_tree, hf_docsis_ucd_scdma_framer_int_step_size, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2750 }
2751 else
2752 {
2753 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2754 }
2755 break;
2756 case UCD_TCM_ENABLED:
2757 if (tlvlen == 1)
2758 {
2759 proto_tree_add_item (burst_tree, hf_docsis_ucd_tcm_enabled, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2760 }
2761 else
2762 {
2763 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2764 }
2765 break;
2766 case UCD_SUBC_INIT_RANG:
2767 if (tlvlen == 2)
2768 {
2769 proto_tree_add_item (burst_tree, hf_docsis_subc_init_rang, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2770 }
2771 else
2772 {
2773 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2774 }
2775 break;
2776 case UCD_SUBC_FINE_RANG:
2777 if (tlvlen == 2)
2778 {
2779 proto_tree_add_item (burst_tree, hf_docsis_subc_fine_rang, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2780 }
2781 else
2782 {
2783 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2784 }
2785 break;
2786 case UCD_OFDMA_PROFILE:
2787 if ((tlvlen % 2) == 0)
2788 {
2789 for(i =0; i < tlvlen; i+=2) {
2790 proto_tree_add_item (burst_tree, hf_docsis_ofdma_prof_mod_order, tvb, tlvpos + i, 1, ENC_BIG_ENDIAN);
2791 proto_tree_add_item (burst_tree, hf_docsis_ofdma_prof_pilot_pattern, tvb, tlvpos + i, 1, ENC_BIG_ENDIAN);
2792 proto_tree_add_item (burst_tree, hf_docsis_ofdma_prof_num_add_minislots, tvb, tlvpos + i + 1, 1, ENC_BIG_ENDIAN);
2793 }
2794 }
2795 else
2796 {
2797 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u (even length expected)", tlvlen);
2798 }
2799 break;
2800 case UCD_OFDMA_IR_POWER_CONTROL:
2801 if (tlvlen == 2)
2802 {
2803 proto_tree_add_item (burst_tree, hf_docsis_ofdma_ir_pow_ctrl_start_pow, tvb, tlvpos, tlvlen, ENC_BIG_ENDIAN);
2804 proto_tree_add_item (burst_tree, hf_docsis_ofdma_ir_pow_ctrl_step_size, tvb, tlvpos + 1, tlvlen, ENC_BIG_ENDIAN);
2805 }
2806 else
2807 {
2808 expert_add_info_format(pinfo, burst_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
2809 }
2810 break;
2811
2812 } /* switch(tlvtype) */
2813
2814 tlvpos += tlvlen;
2815 } /* while (tlvpos < endtlvpos) */
2816
2817 }
2818
2819 static int
dissect_any_ucd(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,int proto_id,int type_number)2820 dissect_any_ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, int proto_id, int type_number)
2821 {
2822 int pos;
2823 guint32 i, upchid, length;
2824 guint8 type, symrate;
2825 proto_tree *ucd_tree, *tlv_tree;
2826 proto_item *ucd_item, *tlv_item, *tlv_len_item;
2827
2828 ucd_item = proto_tree_add_item(tree, proto_id, tvb, 0, -1, ENC_NA);
2829 ucd_tree = proto_item_add_subtree (ucd_item, ett_docsis_ucd);
2830 proto_tree_add_item_ret_uint (ucd_tree, hf_docsis_mgt_upstream_chid, tvb, 0, 1, ENC_BIG_ENDIAN, &upchid);
2831 proto_tree_add_item (ucd_tree, hf_docsis_ucd_config_ch_cnt, tvb, 1, 1, ENC_BIG_ENDIAN);
2832 proto_tree_add_item (ucd_tree, hf_docsis_ucd_mini_slot_size, tvb, 2, 1, ENC_BIG_ENDIAN);
2833 proto_tree_add_item (ucd_tree, hf_docsis_mgt_down_chid, tvb, 3, 1, ENC_BIG_ENDIAN);
2834
2835 /* if the upstream Channel ID is 0 then this is for Telephony Return) */
2836 if (upchid > 0)
2837 col_add_fstr (pinfo->cinfo, COL_INFO,
2838 "Type %d UCD Message: Channel ID = %u (U%u)", type_number, upchid,
2839 upchid - 1);
2840 else
2841 col_add_fstr (pinfo->cinfo, COL_INFO,
2842 "Type %d UCD Message: Channel ID = %u (Telephony Return)",
2843 type_number, upchid);
2844
2845 pos = 4;
2846 while (tvb_reported_length_remaining(tvb, pos) > 0)
2847 {
2848 type = tvb_get_guint8 (tvb, pos);
2849 tlv_tree = proto_tree_add_subtree(ucd_tree, tvb, pos, -1,
2850 ett_docsis_tlv, &tlv_item,
2851 val_to_str(type, channel_tlv_vals,
2852 "Unknown TLV (%u)"));
2853 proto_tree_add_uint (tlv_tree, hf_docsis_ucd_type, tvb, pos, 1, type);
2854 pos++;
2855 tlv_len_item = proto_tree_add_item_ret_uint (tlv_tree, hf_docsis_ucd_length, tvb, pos, 1, ENC_NA, &length);
2856 pos++;
2857 proto_item_set_len(tlv_item, length + 2);
2858
2859 switch (type)
2860 {
2861 case UCD_SYMBOL_RATE:
2862 if (length == 1)
2863 {
2864 symrate = tvb_get_guint8 (tvb, pos);
2865 proto_tree_add_uint (tlv_tree, hf_docsis_ucd_symbol_rate, tvb, pos, length, symrate * 160);
2866 }
2867 else
2868 {
2869 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
2870 }
2871 break;
2872 case UCD_FREQUENCY:
2873 if (length == 4)
2874 {
2875 proto_tree_add_item (tlv_tree, hf_docsis_ucd_frequency, tvb, pos, length, ENC_BIG_ENDIAN);
2876 }
2877 else
2878 {
2879 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
2880 }
2881 break;
2882 case UCD_PREAMBLE:
2883 proto_tree_add_item (tlv_tree, hf_docsis_ucd_preamble_pat, tvb, pos, length, ENC_NA);
2884 break;
2885 case UCD_BURST_DESCR:
2886 case UCD_BURST_DESCR5: /* DOCSIS 2.0 Upstream Channel Descriptor */
2887 case UCD_BURST_DESCR23:
2888 dissect_ucd_burst_descr(tvb, pinfo, tlv_tree, tlv_item, pos, length);
2889 break;
2890 case UCD_EXT_PREAMBLE:
2891 proto_tree_add_item (tlv_tree, hf_docsis_ucd_ext_preamble_pat, tvb, pos, length, ENC_NA);
2892 break;
2893 case UCD_SCDMA_MODE_ENABLED:
2894 if (length == 1)
2895 {
2896 proto_tree_add_item (tlv_tree, hf_docsis_ucd_scdma_mode_enabled, tvb, pos, length, ENC_BIG_ENDIAN);
2897 }
2898 else
2899 {
2900 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
2901 }
2902 break;
2903 case UCD_SCDMA_SPREADING_INTERVAL:
2904 if (length == 1)
2905 {
2906 proto_tree_add_item (tlv_tree, hf_docsis_ucd_scdma_spreading_interval, tvb, pos, length, ENC_NA);
2907 }
2908 else
2909 {
2910 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
2911 }
2912 break;
2913 case UCD_SCDMA_CODES_PER_MINI_SLOT:
2914 if (length == 1)
2915 {
2916 proto_tree_add_item (tlv_tree, hf_docsis_ucd_scdma_codes_per_mini_slot, tvb, pos, length, ENC_NA);
2917 }
2918 else
2919 {
2920 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
2921 }
2922 break;
2923 case UCD_SCDMA_ACTIVE_CODES:
2924 if (length == 1)
2925 {
2926 proto_tree_add_item (tlv_tree, hf_docsis_ucd_scdma_active_codes, tvb, pos, length, ENC_NA);
2927 }
2928 else
2929 {
2930 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
2931 }
2932 break;
2933 case UCD_SCDMA_CODE_HOPPING_SEED:
2934 if (length == 2)
2935 {
2936 proto_tree_add_item (tlv_tree, hf_docsis_ucd_scdma_code_hopping_seed, tvb, pos, length, ENC_NA);
2937 }
2938 else
2939 {
2940 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
2941 }
2942 break;
2943 case UCD_SCDMA_US_RATIO_NUM:
2944 if (length == 2)
2945 {
2946 proto_tree_add_item (tlv_tree, hf_docsis_ucd_scdma_us_ratio_num, tvb, pos, length, ENC_NA);
2947 }
2948 else
2949 {
2950 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
2951 }
2952 break;
2953 case UCD_SCDMA_US_RATIO_DENOM:
2954 if (length == 2)
2955 {
2956 proto_tree_add_item (tlv_tree, hf_docsis_ucd_scdma_us_ratio_denom, tvb, pos, length, ENC_NA);
2957 }
2958 else
2959 {
2960 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
2961 }
2962 break;
2963 case UCD_SCDMA_TIMESTAMP_SNAPSHOT:
2964 if (length == 9)
2965 {
2966 proto_tree_add_item (tlv_tree, hf_docsis_ucd_scdma_timestamp_snapshot, tvb, pos, length, ENC_NA);
2967 }
2968 else
2969 {
2970 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
2971 }
2972 break;
2973 case UCD_MAINTAIN_POWER_SPECTRAL_DENSITY:
2974 if (length == 1)
2975 {
2976 proto_tree_add_item (tlv_tree, hf_docsis_ucd_maintain_power_spectral_density, tvb, pos, length, ENC_BIG_ENDIAN);
2977 }
2978 else
2979 {
2980 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
2981 }
2982 break;
2983 case UCD_RANGING_REQUIRED:
2984 if (length == 1)
2985 {
2986 proto_tree_add_item (tlv_tree, hf_docsis_ucd_ranging_required, tvb, pos, length, ENC_BIG_ENDIAN);
2987 }
2988 else
2989 {
2990 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
2991 }
2992 break;
2993 case UCD_MAX_SCHEDULED_CODES:
2994 if (length == 1)
2995 {
2996 proto_tree_add_item (tlv_tree, hf_docsis_ucd_max_scheduled_codes, tvb, pos, length, ENC_NA);
2997 }
2998 else
2999 {
3000 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3001 }
3002 break;
3003 case UCD_RANGING_HOLD_OFF_PRIORITY_FIELD:
3004 if (length == 4)
3005 {
3006 static int * const ucd_rnghoff[] = {
3007 &hf_docsis_ucd_rnghoff_cm,
3008 &hf_docsis_ucd_rnghoff_erouter,
3009 &hf_docsis_ucd_rnghoff_emta,
3010 &hf_docsis_ucd_rnghoff_estb,
3011 &hf_docsis_ucd_rnghoff_rsvd,
3012 &hf_docsis_ucd_rnghoff_id_ext,
3013 NULL
3014 };
3015
3016 proto_tree_add_bitmask_list(tlv_tree, tvb, pos, length, ucd_rnghoff, ENC_BIG_ENDIAN);
3017 }
3018 else
3019 {
3020 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3021 }
3022 break;
3023 case UCD_RANGING_CHANNEL_CLASS_ID:
3024 if (length == 4)
3025 {
3026 static int * const ucd_chan_class_id[] = {
3027 &hf_docsis_ucd_chan_class_id_cm,
3028 &hf_docsis_ucd_chan_class_id_erouter,
3029 &hf_docsis_ucd_chan_class_id_emta,
3030 &hf_docsis_ucd_chan_class_id_estb,
3031 &hf_docsis_ucd_chan_class_id_rsvd,
3032 &hf_docsis_ucd_chan_class_id_id_ext,
3033 NULL
3034 };
3035
3036 proto_tree_add_bitmask_list(tlv_tree, tvb, pos, length, ucd_chan_class_id, ENC_BIG_ENDIAN);
3037 }
3038 else
3039 {
3040 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3041 }
3042 break;
3043 case UCD_SCDMA_SELECTION_ACTIVE_CODES_AND_CODE_HOPPING:
3044 if (length == 1)
3045 {
3046 proto_tree_add_item (tlv_tree, hf_docsis_ucd_active_code_hopping, tvb, pos, length, ENC_NA);
3047 }
3048 else
3049 {
3050 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3051 }
3052 break;
3053 case UCD_SCDMA_SELECTION_STRING_FOR_ACTIVE_CODES:
3054 if (length == 16)
3055 {
3056 proto_tree_add_item (tlv_tree, hf_docsis_ucd_scdma_selection_active_codes, tvb, pos, length, ENC_NA);
3057 }
3058 else
3059 {
3060 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3061 }
3062 break;
3063 case UCD_HIGHER_UCD_FOR_SAME_UCID:
3064 if (length == 1)
3065 {
3066 proto_tree_add_item (tlv_tree, hf_docsis_ucd_higher_ucd_for_same_ucid, tvb, pos, length, ENC_NA);
3067 proto_tree_add_item (tlv_tree, hf_docsis_ucd_higher_ucd_for_same_ucid_resv, tvb, pos, length, ENC_BIG_ENDIAN);
3068 }
3069 else
3070 {
3071 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3072 }
3073 break;
3074 case UCD_CHANGE_IND_BITMASK:
3075 if (length == 2)
3076 {
3077 proto_tree_add_item (tlv_tree, hf_docsis_ucd_change_ind_bitmask_subc_excl_band, tvb, pos + 1, 1, ENC_NA);
3078 proto_tree_add_item (tlv_tree, hf_docsis_ucd_change_ind_bitmask_unused_subc, tvb, pos + 1, 1, ENC_NA);
3079 proto_tree_add_item (tlv_tree, hf_docsis_ucd_change_ind_bitmask_other_subc, tvb, pos + 1, 1, ENC_NA);
3080 proto_tree_add_item (tlv_tree, hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc5, tvb, pos + 1, 1, ENC_NA);
3081 proto_tree_add_item (tlv_tree, hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc6, tvb, pos + 1, 1, ENC_NA);
3082 proto_tree_add_item (tlv_tree, hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc9, tvb, pos + 1, 1, ENC_NA);
3083 proto_tree_add_item (tlv_tree, hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc10, tvb, pos + 1, 1, ENC_NA);
3084 proto_tree_add_item (tlv_tree, hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc11, tvb, pos + 1, 1, ENC_NA);
3085 proto_tree_add_item (tlv_tree, hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc12, tvb, pos, 1, ENC_NA);
3086 proto_tree_add_item (tlv_tree, hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc13, tvb, pos, 1, ENC_NA);
3087 proto_tree_add_item (tlv_tree, hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc3_or_4, tvb, pos, 1, ENC_NA);
3088 proto_tree_add_item (tlv_tree, hf_docsis_ucd_change_ind_bitmask_reserved, tvb, pos, 1, ENC_NA);
3089 }
3090 else
3091 {
3092 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3093 }
3094 break;
3095 case UCD_OFDMA_TIMESTAMP_SNAPSHOT:
3096 if (length == 9)
3097 {
3098 static int* const timestamp_snapshot_parts[] = {
3099 &hf_docsis_ucd_ofdma_timestamp_snapshot_reserved,
3100 &hf_docsis_ucd_ofdma_timestamp_snapshot_d30timestamp,
3101 &hf_docsis_ucd_ofdma_timestamp_snapshot_4msbits_of_div20,
3102 NULL
3103 };
3104 proto_tree_add_item (tlv_tree, hf_docsis_ucd_ofdma_timestamp_snapshot, tvb, pos, length, ENC_NA);
3105 proto_tree_add_bitmask_list(tlv_tree, tvb, pos, 5, timestamp_snapshot_parts, ENC_BIG_ENDIAN);
3106 proto_tree_add_item (tlv_tree, hf_docsis_ucd_ofdma_timestamp_snapshot_minislot_count, tvb, pos+5, length-5, ENC_NA);
3107 }
3108 else
3109 {
3110 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3111 }
3112 break;
3113 case UCD_OFDMA_CYCLIC_PREFIX_SIZE:
3114 if (length == 1)
3115 {
3116 proto_tree_add_item (tlv_tree, hf_docsis_ucd_ofdma_cyclic_prefix_size, tvb, pos, length, ENC_NA);
3117 }
3118 else
3119 {
3120 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3121 }
3122 break;
3123 case UCD_OFDMA_ROLLOFF_PERIOD_SIZE:
3124 if (length == 1)
3125 {
3126 proto_tree_add_item (tlv_tree, hf_docsis_ucd_ofdma_rolloff_period_size, tvb, pos, length, ENC_NA);
3127 }
3128 else
3129 {
3130 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3131 }
3132 break;
3133 case UCD_SUBCARRIER_SPACING:
3134 if (length == 1)
3135 {
3136 proto_tree_add_item (tlv_tree, hf_docsis_ucd_subc_spacing, tvb, pos, length, ENC_NA);
3137 }
3138 else
3139 {
3140 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3141 }
3142 break;
3143 case UCD_CENTER_FREQ_SUBC_0:
3144 if (length == 4)
3145 {
3146 proto_tree_add_item (tlv_tree, hf_docsis_ucd_cent_freq_subc0, tvb, pos, length, ENC_NA);
3147 }
3148 else
3149 {
3150 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3151 }
3152 break;
3153 case UCD_SUBC_EXCL_BAND:
3154 if ((length % 4) == 0)
3155 {
3156 for(i = 0; i < length; i+=4) {
3157 proto_tree_add_item (tlv_tree, hf_docsis_ucd_subcarrier_range, tvb, pos+i, 4, ENC_NA);
3158 }
3159 }
3160 else
3161 {
3162 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3163 }
3164 break;
3165 case UCD_UNUSED_SUBC_SPEC:
3166 if ((length % 4) == 0)
3167 {
3168 for(i = 0; i < length; i+=4) {
3169 proto_tree_add_item (tlv_tree, hf_docsis_ucd_subcarrier_range, tvb, pos+i, 4, ENC_NA);
3170 }
3171 }
3172 else
3173 {
3174 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3175 }
3176 break;
3177 case UCD_SYMB_IN_OFDMA_FRAME:
3178 if (length == 1)
3179 {
3180 proto_tree_add_item (tlv_tree, hf_docsis_ucd_symb_ofdma_frame, tvb, pos, length, ENC_NA);
3181 }
3182 else
3183 {
3184 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3185 }
3186 break;
3187 case UCD_RAND_SEED:
3188 if (length == 3)
3189 {
3190 proto_tree_add_item (tlv_tree, hf_docsis_ucd_rand_seed, tvb, pos, length, ENC_NA);
3191 }
3192 else
3193 {
3194 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3195 }
3196 break;
3197 } /* switch(type) */
3198 pos += length;
3199 } /* tvb_reported_length_remaining(tvb, pos) > 0 */
3200
3201 return tvb_captured_length(tvb);
3202 }
3203
3204 static int
dissect_ucd(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)3205 dissect_ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
3206 {
3207 return dissect_any_ucd(tvb, pinfo, tree, proto_docsis_ucd, MGT_UCD);
3208 }
3209
3210 static int
dissect_any_map(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,guint8 version,void * data _U_)3211 dissect_any_map (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, guint8 version, void* data _U_)
3212 {
3213 guint32 i, numie, upchid, ucd_count, cat = 0;
3214 int pos;
3215 proto_item *it;
3216 proto_tree *map_tree;
3217 static int * const ies[] = {
3218 &hf_docsis_map_sid,
3219 &hf_docsis_map_iuc,
3220 &hf_docsis_map_offset,
3221 NULL
3222 };
3223
3224 static int * const probe_ies[] = {
3225 &hf_docsis_map_sid,
3226 &hf_docsis_map_mer,
3227 &hf_docsis_map_pw,
3228 &hf_docsis_map_eq,
3229 &hf_docsis_map_st,
3230 &hf_docsis_map_probe_frame,
3231 &hf_docsis_map_symbol_in_frame,
3232 &hf_docsis_map_start_subc,
3233 &hf_docsis_map_subc_skip,
3234 NULL
3235 };
3236
3237 switch (version) {
3238 case 1:
3239 it = proto_tree_add_item(tree, proto_docsis_map_v1, tvb, 0, -1, ENC_NA);
3240 break;
3241 case 5:
3242 it = proto_tree_add_item(tree, proto_docsis_map_v5, tvb, 0, -1, ENC_NA);
3243 break;
3244 default:
3245 it = proto_tree_add_item(tree, proto_docsis_map_v1, tvb, 0, -1, ENC_NA);
3246 expert_add_info_format(pinfo, it, &ei_docsis_mgmt_version_unknown, "Unknown MAP MAC Management version: %u", version);
3247 return tvb_captured_length(tvb);
3248 }
3249
3250 map_tree = proto_item_add_subtree (it, ett_docsis_map);
3251
3252 proto_tree_add_item_ret_uint (map_tree, hf_docsis_mgt_upstream_chid, tvb, 0, 1, ENC_BIG_ENDIAN, &upchid);
3253 proto_tree_add_item_ret_uint (map_tree, hf_docsis_map_ucd_count, tvb, 1, 1, ENC_BIG_ENDIAN, &ucd_count);
3254 switch (version) {
3255 case 1:
3256 proto_tree_add_item_ret_uint (map_tree, hf_docsis_map_numie, tvb, 2, 1, ENC_BIG_ENDIAN, &numie);
3257 proto_tree_add_item (map_tree, hf_docsis_map_rsvd, tvb, 3, 1, ENC_BIG_ENDIAN);
3258 break;
3259 case 5:
3260 proto_tree_add_item_ret_uint (map_tree, hf_docsis_map_numie_v5, tvb, 2, 2, ENC_BIG_ENDIAN, &numie);
3261 proto_tree_add_item (map_tree, hf_docsis_map_rsvd_v5, tvb, 3, 1, ENC_BIG_ENDIAN);
3262 proto_tree_add_item_ret_uint (map_tree, hf_docsis_map_cat, tvb, 3, 1, ENC_BIG_ENDIAN, &cat);
3263 break;
3264 default:
3265 it = proto_tree_add_item(tree, proto_docsis_map_v1, tvb, 0, -1, ENC_NA);
3266 expert_add_info_format(pinfo, it, &ei_docsis_mgmt_version_unknown, "Unknown MAP MAC Management version: %u", version);
3267 return tvb_captured_length(tvb);
3268 }
3269
3270 if (upchid > 0)
3271 col_add_fstr (pinfo->cinfo, COL_INFO,
3272 "Map Message: Version: %d, Channel ID = %u (U%u), UCD Count = %u, # IE's = %u",
3273 version, upchid, upchid - 1, ucd_count, numie);
3274 else
3275 col_add_fstr (pinfo->cinfo, COL_INFO,
3276 "Map Message: Version: %d, Channel ID = %u (Telephony Return), UCD Count = %u, # IE's = %u",
3277 version, upchid, ucd_count, numie);
3278
3279 proto_tree_add_item (map_tree, hf_docsis_map_alloc_start, tvb, 4, 4, ENC_BIG_ENDIAN);
3280 if (cat == 0) {
3281 proto_tree_add_item (map_tree, hf_docsis_map_ack_time, tvb, 8, 4, ENC_BIG_ENDIAN);
3282 proto_tree_add_item (map_tree, hf_docsis_map_rng_start, tvb, 12, 1, ENC_BIG_ENDIAN);
3283 proto_tree_add_item (map_tree, hf_docsis_map_rng_end, tvb, 13, 1, ENC_BIG_ENDIAN);
3284 proto_tree_add_item (map_tree, hf_docsis_map_data_start, tvb, 14, 1, ENC_BIG_ENDIAN);
3285 proto_tree_add_item (map_tree, hf_docsis_map_data_end, tvb, 15, 1, ENC_BIG_ENDIAN);
3286
3287 pos = 16;
3288 for (i = 0; i < numie; i++)
3289 {
3290 proto_tree_add_bitmask_with_flags(map_tree, tvb, pos, hf_docsis_map_ie, ett_docsis_map_ie, ies, ENC_BIG_ENDIAN, BMT_NO_FLAGS);
3291 pos = pos + 4;
3292 }
3293 }
3294 if (cat == 1) {
3295 pos = 8;
3296 for (i = 0; i < numie; i++)
3297 {
3298 proto_tree_add_bitmask_with_flags(map_tree, tvb, pos, hf_docsis_map_probe_ie, ett_docsis_map_probe_ie, probe_ies, ENC_BIG_ENDIAN, BMT_NO_FLAGS);
3299 pos = pos + 4;
3300 }
3301 }
3302
3303 return tvb_captured_length(tvb);
3304 }
3305
3306
dissect_map_v1(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)3307 static int dissect_map_v1 (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_) {
3308 return dissect_any_map(tvb, pinfo, tree, MAP_v1, data);
3309 }
3310
dissect_map_v5(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)3311 static int dissect_map_v5 (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_) {
3312 return dissect_any_map(tvb, pinfo, tree, MAP_v5, data);
3313 }
3314
3315 static int
dissect_rngreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)3316 dissect_rngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
3317 {
3318 proto_item *it;
3319 proto_tree *rngreq_tree;
3320 guint32 sid;
3321 guint8 version;
3322
3323 it = proto_tree_add_item(tree, proto_docsis_rngreq, tvb, 0, -1, ENC_NA);
3324 rngreq_tree = proto_item_add_subtree (it, ett_docsis_rngreq);
3325
3326 version = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_docsis_mgmt, KEY_MGMT_VERSION));
3327 if (version == 1) {
3328 proto_tree_add_item (rngreq_tree, hf_docsis_rngreq_sid_field_bit15_14, tvb, 0, 1, ENC_BIG_ENDIAN);
3329 }
3330 if (version == 5) {
3331 //RNG-REQ sent to 3.1 CMTS
3332 proto_tree_add_item (rngreq_tree, hf_docsis_rngreq_sid_field_bit15, tvb, 0, 1, ENC_BIG_ENDIAN);
3333 proto_tree_add_item (rngreq_tree, hf_docsis_rngreq_sid_field_bit14, tvb, 0, 1, ENC_BIG_ENDIAN);
3334 }
3335 proto_tree_add_item_ret_uint (rngreq_tree, hf_docsis_rngreq_sid, tvb, 0, 2, ENC_BIG_ENDIAN, &sid);
3336
3337 if (sid > 0)
3338 col_add_fstr (pinfo->cinfo, COL_INFO, "Ranging Request: SID = %u",
3339 sid);
3340 else
3341 col_set_str(pinfo->cinfo, COL_INFO, "Initial Ranging Request SID = 0");
3342
3343 proto_tree_add_item (rngreq_tree, hf_docsis_mgt_down_chid, tvb, 2, 1, ENC_BIG_ENDIAN);
3344 proto_tree_add_item (rngreq_tree, hf_docsis_rngreq_pend_compl, tvb, 3, 1, ENC_BIG_ENDIAN);
3345
3346 return tvb_captured_length(tvb);
3347 }
3348
3349 static void
dissect_rngrsp_transmit_equalization_encodings_scdma_tdma(tvbuff_t * tvb,proto_item * it,guint start,guint16 len)3350 dissect_rngrsp_transmit_equalization_encodings_scdma_tdma(tvbuff_t * tvb, proto_item * it, guint start, guint16 len)
3351 {
3352 guint16 i;
3353 proto_tree *transmit_equalization_encodings_tree, *coef_tree;
3354
3355 transmit_equalization_encodings_tree = proto_item_add_subtree (it, ett_docsis_rngrsp_tlv_transmit_equalization_encodings);
3356
3357 proto_tree_add_item (transmit_equalization_encodings_tree, hf_docsis_rngrsp_trans_eq_enc_scdma_tdma_main_tap_location, tvb, start, 1, ENC_BIG_ENDIAN);
3358 proto_tree_add_item (transmit_equalization_encodings_tree, hf_docsis_rngrsp_trans_eq_enc_scdma_tdma_number_of_forward_taps_per_symbol, tvb, start + 1, 1, ENC_BIG_ENDIAN);
3359 proto_tree_add_item (transmit_equalization_encodings_tree, hf_docsis_rngrsp_trans_eq_enc_scdma_tdma_number_of_forward_taps_n, tvb, start + 2, 1, ENC_BIG_ENDIAN);
3360 proto_tree_add_item (transmit_equalization_encodings_tree, hf_docsis_rngrsp_trans_eq_enc_scdma_tdma_reserved, tvb, start + 3, 1, ENC_BIG_ENDIAN);
3361
3362 for(i=4; i < len; i+=4) {
3363 gint real, imag;
3364 coef_tree = proto_tree_add_subtree_format (transmit_equalization_encodings_tree, tvb, start + i, 4, ett_docsis_rngrsp_tlv_transmit_equalization_encodings_coef, NULL, "Tap %d: ", i/4);
3365 proto_tree_add_item_ret_int (coef_tree, hf_docsis_rngrsp_trans_eq_enc_coef_real, tvb, start + i, 2, ENC_BIG_ENDIAN, &real);
3366 proto_tree_add_item_ret_int (coef_tree, hf_docsis_rngrsp_trans_eq_enc_coef_imag, tvb, start + i + 2, 2, ENC_BIG_ENDIAN, &imag);
3367 proto_item_append_text(coef_tree, "real: %f, imag: %f", (gint16) real/16384.0, (gint16) imag/16384.0);
3368 }
3369 }
3370
3371 static void
dissect_rngrsp_transmit_equalization_encodings_ofdma(tvbuff_t * tvb,proto_tree * tree,guint start,guint16 len)3372 dissect_rngrsp_transmit_equalization_encodings_ofdma(tvbuff_t * tvb, proto_tree * tree, guint start, guint16 len)
3373 {
3374 guint16 i;
3375 proto_item *it;
3376 proto_tree *transmit_equalization_encodings_tree, *coef_tree;
3377 guint lowest_subc;
3378
3379 it = proto_tree_add_item(tree, hf_docsis_rngrsp_trans_eq_data, tvb, start, len, ENC_NA);
3380 transmit_equalization_encodings_tree = proto_item_add_subtree (it, ett_docsis_rngrsp_tlv_transmit_equalization_encodings);
3381
3382 proto_tree_add_item_ret_uint (transmit_equalization_encodings_tree, hf_docsis_rngrsp_trans_eq_enc_lowest_subc, tvb, start, 3, ENC_BIG_ENDIAN, &lowest_subc);
3383 proto_tree_add_item (transmit_equalization_encodings_tree, hf_docsis_rngrsp_trans_eq_enc_highest_subc, tvb, start, 3, ENC_BIG_ENDIAN);
3384 for(i=3; i < len; i+=4) {
3385 gint real, imag;
3386 coef_tree = proto_tree_add_subtree_format (transmit_equalization_encodings_tree, tvb, start + i, 4, ett_docsis_rngrsp_tlv_transmit_equalization_encodings_coef, NULL, "Subcarrier %d: ", lowest_subc + (i-3)/4);
3387 proto_tree_add_item_ret_int (coef_tree, hf_docsis_rngrsp_trans_eq_enc_coef_real, tvb, start + i, 2, ENC_BIG_ENDIAN, &real);
3388 proto_tree_add_item_ret_int (coef_tree, hf_docsis_rngrsp_trans_eq_enc_coef_imag, tvb, start + i + 2, 2, ENC_BIG_ENDIAN, &imag);
3389 proto_item_append_text(coef_tree, "real: %f, imag: %f", (gint16) real/16384.0, (gint16) imag/16384.0);
3390 }
3391 }
3392
3393 static void
dissect_rngrsp_commanded_power(tvbuff_t * tvb,proto_tree * tree,guint8 start,guint16 len)3394 dissect_rngrsp_commanded_power(tvbuff_t * tvb, proto_tree * tree, guint8 start, guint16 len)
3395 {
3396 guint16 pos;
3397 guint16 i;
3398 guint8 tlvtype, tlvlen;
3399 proto_item *it;
3400 proto_tree *commanded_power_tree;
3401 proto_tree *commanded_power_subtlv_tree;
3402 proto_item *rngrsptlv_commanded_power_subtlv;
3403
3404
3405 it = proto_tree_add_item(tree, hf_docsis_rngrsp_commanded_power_data, tvb, start-2, len+2, ENC_NA);
3406 commanded_power_tree = proto_item_add_subtree (it, ett_docsis_rngrsp_tlv_commanded_power);
3407
3408
3409 pos = start;
3410 while (pos < start + len)
3411 {
3412 tlvtype = tvb_get_guint8 (tvb, pos);
3413 commanded_power_subtlv_tree = proto_tree_add_subtree(commanded_power_tree, tvb, pos, -1,
3414 ett_docsis_rngrsp_tlv_commanded_power_subtlv, &rngrsptlv_commanded_power_subtlv,
3415 val_to_str(tlvtype, rngrsp_tlv_commanded_power_subtlv_vals,
3416 "Unknown TLV (%u)"));
3417 pos++;
3418 tlvlen = tvb_get_guint8 (tvb, pos);
3419 pos++;
3420
3421 switch (tlvtype)
3422 {
3423 case RNGRSP_COMMANDED_POWER_DYNAMIC_RANGE_WINDOW:
3424 if (tlvlen == 1)
3425 {
3426 proto_tree_add_item (commanded_power_subtlv_tree,
3427 hf_docsis_rngrsp_commanded_power_dynamic_range_window, tvb, pos,
3428 tlvlen, ENC_BIG_ENDIAN);
3429 }
3430 break;
3431 case RNGRSP_COMMANDED_POWER_UCID_AND_POWER_LEVEL_LIST:
3432 if ((tlvlen %3)== 0)
3433 {
3434 for(i=0; i < tlvlen; i+=3)
3435 {
3436 proto_tree_add_item (commanded_power_subtlv_tree,
3437 hf_docsis_rngrsp_commanded_power_ucid, tvb, pos + i,
3438 1, ENC_BIG_ENDIAN);
3439 proto_tree_add_item (commanded_power_subtlv_tree,
3440 hf_docsis_rngrsp_commanded_power_trans_pow_lvl, tvb, pos + i +1,
3441 2, ENC_BIG_ENDIAN);
3442 }
3443 }
3444 break;
3445 }
3446 pos += tlvlen;
3447 }
3448 }
3449
3450 static void
dissect_rngrsp_tlv(tvbuff_t * tvb,packet_info * pinfo,proto_tree * rngrsp_tree)3451 dissect_rngrsp_tlv (tvbuff_t * tvb, packet_info * pinfo, proto_tree * rngrsp_tree)
3452 {
3453 proto_item *rngrsptlv_item, *it;
3454 proto_tree *rngrsptlv_tree;
3455 guint pos = 0;
3456 guint tlvlen;
3457 guint8 tlvtype;
3458
3459
3460 while (tvb_reported_length_remaining(tvb, pos) > 0)
3461 {
3462 tlvtype = tvb_get_guint8 (tvb, pos);
3463 rngrsptlv_tree = proto_tree_add_subtree(rngrsp_tree, tvb, pos, -1,
3464 ett_docsis_rngrsptlv, &rngrsptlv_item,
3465 val_to_str(tlvtype, rngrsp_tlv_vals,
3466 "Unknown TLV (%u)"));
3467 proto_tree_add_uint (rngrsptlv_tree, hf_docsis_rngrsp_type, tvb, pos, 1, tlvtype);
3468 pos++;
3469 tlvlen = tvb_get_guint8 (tvb, pos);
3470 if (tlvtype == RNGRSP_TRANSMIT_EQ_ADJUST_OFDMA_CHANNELS || tlvtype == RNGRSP_TRANSMIT_EQ_SET_OFDMA_CHANNELS) {
3471 proto_tree_add_item_ret_uint (rngrsptlv_tree, hf_docsis_rngrsp_length, tvb, pos, 2, ENC_NA, &tlvlen);
3472 pos += 2;
3473 } else {
3474 proto_tree_add_item_ret_uint (rngrsptlv_tree, hf_docsis_rngrsp_length, tvb, pos, 1, ENC_NA, &tlvlen);
3475 pos++;
3476 }
3477 proto_item_set_len(rngrsptlv_item, tlvlen + 2);
3478 switch (tlvtype)
3479 {
3480 case RNGRSP_TIMING:
3481 if (tlvlen == 4)
3482 {
3483 proto_tree_add_item (rngrsptlv_tree, hf_docsis_rngrsp_timing_adj, tvb, pos, tlvlen, ENC_BIG_ENDIAN);
3484 }
3485 break;
3486 case RNGRSP_PWR_LEVEL_ADJ:
3487 if (tlvlen == 1)
3488 {
3489 proto_tree_add_item (rngrsptlv_tree, hf_docsis_rngrsp_power_adj, tvb, pos, tlvlen, ENC_NA);
3490 }
3491 break;
3492 case RNGRSP_OFFSET_FREQ_ADJ:
3493 if (tlvlen == 2)
3494 {
3495 proto_tree_add_item (rngrsptlv_tree, hf_docsis_rngrsp_freq_adj, tvb, pos, tlvlen, ENC_BIG_ENDIAN);
3496 }
3497 break;
3498 case RNGRSP_TRANSMIT_EQ_ADJ:
3499 it = proto_tree_add_item (rngrsptlv_tree, hf_docsis_rngrsp_xmit_eq_adj, tvb, pos, tlvlen, ENC_NA);
3500 dissect_rngrsp_transmit_equalization_encodings_scdma_tdma(tvb, it, pos, tlvlen);
3501 break;
3502 case RNGRSP_RANGING_STATUS:
3503 if (tlvlen == 1)
3504 {
3505 proto_tree_add_item (rngrsptlv_tree, hf_docsis_rngrsp_ranging_status, tvb, pos, tlvlen, ENC_BIG_ENDIAN);
3506 }
3507 break;
3508 case RNGRSP_DOWN_FREQ_OVER:
3509 if (tlvlen == 4)
3510 {
3511 proto_tree_add_item (rngrsptlv_tree, hf_docsis_rngrsp_down_freq_over, tvb, pos, tlvlen, ENC_BIG_ENDIAN);
3512 }
3513 break;
3514 case RNGRSP_UP_CHID_OVER:
3515 if (tlvlen == 1)
3516 {
3517 proto_tree_add_item (rngrsptlv_tree, hf_docsis_rngrsp_upstream_ch_over, tvb, pos, tlvlen, ENC_BIG_ENDIAN);
3518 }
3519 break;
3520 case RNGRSP_TRANSMIT_EQ_SET:
3521 it = proto_tree_add_item (rngrsptlv_tree, hf_docsis_rngrsp_xmit_eq_set, tvb, pos, tlvlen, ENC_NA);
3522 dissect_rngrsp_transmit_equalization_encodings_scdma_tdma(tvb, it, pos, tlvlen);
3523 break;
3524 case RNGRSP_T4_TIMEOUT_MULTIPLIER:
3525 if (tlvlen == 1)
3526 proto_tree_add_item (rngrsptlv_tree, hf_docsis_rngrsp_rngrsp_t4_timeout_multiplier, tvb, pos, tlvlen, ENC_BIG_ENDIAN);
3527 else
3528 {
3529 expert_add_info_format(pinfo, rngrsptlv_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
3530 }
3531 break;
3532 case RNGRSP_DYNAMIC_RANGE_WINDOW_UPPER_EDGE:
3533 if (tlvlen == 1)
3534 proto_tree_add_item (rngrsptlv_tree, hf_docsis_rngrsp_dynamic_range_window_upper_edge, tvb, pos, tlvlen, ENC_BIG_ENDIAN);
3535 else
3536 {
3537 expert_add_info_format(pinfo, rngrsptlv_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", tlvlen);
3538 }
3539 break;
3540 case RNGRSP_TRANSMIT_EQ_ADJUST_OFDMA_CHANNELS:
3541 dissect_rngrsp_transmit_equalization_encodings_ofdma(tvb, rngrsptlv_tree, pos, tlvlen);
3542 break;
3543 case RNGRSP_TRANSMIT_EQ_SET_OFDMA_CHANNELS:
3544 dissect_rngrsp_transmit_equalization_encodings_ofdma(tvb, rngrsptlv_tree, pos, tlvlen);
3545 break;
3546 case RNGRSP_COMMANDED_POWER:
3547 dissect_rngrsp_commanded_power(tvb, rngrsptlv_tree, pos, tlvlen);
3548 break;
3549
3550 default:
3551 proto_tree_add_item (rngrsp_tree, hf_docsis_rngrsp_tlv_unknown, tvb, pos, tlvlen, ENC_NA);
3552 } /* switch(tlvtype) */
3553 pos += tlvlen;
3554 } /* while (tvb_reported_length_remaining(tvb, pos) > 0) */
3555 }
3556
3557 static int
dissect_rngrsp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)3558 dissect_rngrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
3559 {
3560 proto_item *it;
3561 proto_tree *rngrsp_tree;
3562 tvbuff_t *tlv_tvb = NULL;
3563 guint32 sid, upchid;
3564 address save_src, save_dst;
3565 guint version, multipart, number_of_fragments, fragment_sequence_number;
3566
3567
3568 it = proto_tree_add_item(tree, proto_docsis_rngrsp, tvb, 0, -1, ENC_NA);
3569 rngrsp_tree = proto_item_add_subtree (it, ett_docsis_rngrsp);
3570
3571 proto_tree_add_item_ret_uint (rngrsp_tree, hf_docsis_rngrsp_sid, tvb, 0, 2, ENC_BIG_ENDIAN, &sid);
3572 proto_tree_add_item_ret_uint (rngrsp_tree, hf_docsis_mgt_upstream_chid, tvb, 2, 1, ENC_BIG_ENDIAN, &upchid);
3573
3574 if (upchid > 0)
3575 col_add_fstr (pinfo->cinfo, COL_INFO,
3576 "Ranging Response: SID = %u, Upstream Channel = %u (U%u)",
3577 sid, upchid, upchid - 1);
3578 else
3579 col_add_fstr (pinfo->cinfo, COL_INFO,
3580 "Ranging Response: SID = %u, Telephony Return", sid);
3581
3582
3583 version = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_docsis_mgmt, KEY_MGMT_VERSION));
3584 if (version > 4) {
3585 multipart = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_docsis_mgmt, KEY_MGMT_MULTIPART));
3586 } else {
3587 multipart = 0;
3588 }
3589
3590 /* Reassemble TLVs */
3591 if (tvb_reported_length_remaining(tvb, 3) > 0) {
3592 if (version > 4 && multipart) {
3593 /* Fragmented data */
3594 number_of_fragments = (multipart >> 4);
3595 fragment_sequence_number = (multipart & 0x0F);
3596
3597 /* DOCSIS MAC management messages do not have network (IP) address. Use link (MAC) address instead. Same workflow as in wimax. */
3598 /* Save address pointers. */
3599 copy_address_shallow(&save_src, &pinfo->src);
3600 copy_address_shallow(&save_dst, &pinfo->dst);
3601 /* Use dl_src and dl_dst in defragmentation. */
3602 copy_address_shallow(&pinfo->src, &pinfo->dl_src);
3603 copy_address_shallow(&pinfo->dst, &pinfo->dl_dst);
3604
3605 fragment_head* fh = fragment_add_seq_check(&docsis_rngrsp_tlv_reassembly_table, tvb, 3, pinfo, sid, NULL,
3606 fragment_sequence_number,
3607 tvb_reported_length_remaining(tvb, 3),
3608 (fragment_sequence_number != number_of_fragments));
3609
3610 /* Restore address pointers. */
3611 copy_address_shallow(&pinfo->src, &save_src);
3612 copy_address_shallow(&pinfo->dst, &save_dst);
3613
3614 if (fh) {
3615 tlv_tvb = process_reassembled_data(tvb, 3, pinfo, "Reassembled RNGRSP TLV", fh, &docsis_tlv_frag_items,
3616 NULL, rngrsp_tree);
3617
3618 if (tlv_tvb && tvb_reported_length(tlv_tvb) > 0) {
3619 dissect_rngrsp_tlv(tlv_tvb, pinfo, rngrsp_tree);
3620 }
3621 }
3622 } else { /* version > 4 && multipart */
3623 tlv_tvb = tvb_new_subset_remaining (tvb, 3);
3624 dissect_rngrsp_tlv(tlv_tvb, pinfo, rngrsp_tree);
3625 }
3626 }
3627
3628 return tvb_captured_length(tvb);
3629 }
3630
3631 static int
dissect_regreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)3632 dissect_regreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
3633 {
3634 proto_item *it;
3635 proto_tree *regreq_tree;
3636 guint32 sid;
3637 tvbuff_t *next_tvb;
3638
3639 it = proto_tree_add_item(tree, proto_docsis_regreq, tvb, 0, -1, ENC_NA);
3640 regreq_tree = proto_item_add_subtree (it, ett_docsis_regreq);
3641
3642 proto_tree_add_item_ret_uint (regreq_tree, hf_docsis_regreq_sid, tvb, 0, 2, ENC_BIG_ENDIAN, &sid);
3643
3644 col_add_fstr (pinfo->cinfo, COL_INFO, "Registration Request SID = %u", sid);
3645
3646 /* Call Dissector for Appendix C TlV's */
3647 next_tvb = tvb_new_subset_remaining (tvb, 2);
3648 call_dissector (docsis_tlv_handle, next_tvb, pinfo, regreq_tree);
3649 return tvb_captured_length(tvb);
3650 }
3651
3652 static int
dissect_regrsp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)3653 dissect_regrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
3654 {
3655 proto_item *it;
3656 proto_tree *regrsp_tree;
3657 guint32 sid, response;
3658 tvbuff_t *next_tvb;
3659
3660 it = proto_tree_add_item(tree, proto_docsis_regrsp, tvb, 0, -1, ENC_NA);
3661 regrsp_tree = proto_item_add_subtree (it, ett_docsis_regrsp);
3662 proto_tree_add_item_ret_uint (regrsp_tree, hf_docsis_regrsp_sid, tvb, 0, 2, ENC_BIG_ENDIAN, &sid);
3663 proto_tree_add_item_ret_uint (regrsp_tree, hf_docsis_regrsp_response, tvb, 2, 1, ENC_BIG_ENDIAN, &response);
3664
3665 col_add_fstr (pinfo->cinfo, COL_INFO,
3666 "Registration Response SID = %u (%s)", sid,
3667 val_to_str_ext (response, &docsis_conf_code_ext, "%d"));
3668
3669 /* Call Dissector for Appendix C TLVs */
3670 next_tvb = tvb_new_subset_remaining (tvb, 3);
3671 call_dissector (docsis_tlv_handle, next_tvb, pinfo, regrsp_tree);
3672 return tvb_captured_length(tvb);
3673 }
3674
3675 static int
dissect_uccreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)3676 dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
3677 {
3678 proto_item *it;
3679 proto_tree *uccreq_tree;
3680 guint32 chid;
3681
3682 it = proto_tree_add_item (tree, proto_docsis_uccreq, tvb, 0, -1, ENC_NA);
3683 uccreq_tree = proto_item_add_subtree (it, ett_docsis_uccreq);
3684
3685 proto_tree_add_item_ret_uint (uccreq_tree, hf_docsis_mgt_upstream_chid, tvb, 0, 1, ENC_BIG_ENDIAN, &chid);
3686
3687 col_add_fstr (pinfo->cinfo, COL_INFO,
3688 "Upstream Channel Change request: Channel ID = %u (U%u)",
3689 chid, (chid > 0 ? chid - 1 : chid));
3690
3691 return tvb_captured_length(tvb);
3692 }
3693
3694 static int
dissect_uccrsp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)3695 dissect_uccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
3696 {
3697 proto_item *it;
3698 proto_tree *uccrsp_tree;
3699 guint32 chid;
3700
3701 it = proto_tree_add_item(tree, proto_docsis_uccrsp, tvb, 0, -1, ENC_NA);
3702 uccrsp_tree = proto_item_add_subtree (it, ett_docsis_uccrsp);
3703
3704 proto_tree_add_item_ret_uint (uccrsp_tree, hf_docsis_mgt_upstream_chid, tvb, 0, 1, ENC_BIG_ENDIAN, &chid);
3705
3706 col_add_fstr (pinfo->cinfo, COL_INFO,
3707 "Upstream Channel Change response: Channel ID = %u (U%u)",
3708 chid, (chid > 0 ? chid - 1 : chid));
3709
3710 return tvb_captured_length(tvb);
3711 }
3712
3713 /* The dissect_attrs() function does the actual work to dissect the
3714 * attributes. It's called recursively, to dissect embedded attributes
3715 */
3716 static void
dissect_attrs(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree)3717 dissect_attrs (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
3718 {
3719 guint8 type;
3720 guint32 length;
3721 int pos = 0;
3722 gint total_len;
3723 proto_tree *attr_tree, *attr_subtree;
3724 proto_item *ti, *tlv_item, *tlv_len_item;
3725 tvbuff_t *attr_tvb;
3726
3727 total_len = tvb_reported_length_remaining (tvb, 0);
3728 while (pos < total_len)
3729 {
3730 type = tvb_get_guint8 (tvb, pos);
3731 attr_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
3732 ett_docsis_bpkmattrtlv, &tlv_item,
3733 val_to_str(type, bpkmattr_tlv_vals,
3734 "Unknown TLV (%u)"));
3735 proto_tree_add_uint (attr_tree, hf_docsis_bpkmattr_type, tvb, pos, 1, type);
3736 pos++;
3737 tlv_len_item = proto_tree_add_item_ret_uint (attr_tree, hf_docsis_bpkmattr_length,
3738 tvb, pos, 2, ENC_BIG_ENDIAN, &length);
3739 pos += 2;
3740 proto_item_set_len(tlv_item, length + 2);
3741
3742 switch (type)
3743 {
3744 case BPKM_RESERVED:
3745 break;
3746 case BPKM_SERIAL_NUM:
3747 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_serial_num, tvb, pos, length, ENC_ASCII|ENC_NA);
3748 break;
3749 case BPKM_MANUFACTURER_ID:
3750 if (length == 3)
3751 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_manf_id, tvb, pos, length, ENC_NA);
3752 else
3753 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3754 break;
3755 case BPKM_MAC_ADDR:
3756 if (length == 6)
3757 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_mac_addr, tvb, pos, length, ENC_NA);
3758 else
3759 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3760 break;
3761 case BPKM_RSA_PUB_KEY:
3762 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_rsa_pub_key, tvb, pos, length, ENC_NA);
3763 break;
3764 case BPKM_CM_ID:
3765 ti = proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_cm_id, tvb, pos, length, ENC_NA);
3766 attr_subtree = proto_item_add_subtree(ti, ett_docsis_bpkmattr_cmid);
3767 attr_tvb = tvb_new_subset_length (tvb, pos, length);
3768 dissect_attrs (attr_tvb, pinfo, attr_subtree);
3769 break;
3770 case BPKM_DISPLAY_STR:
3771 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_display_str, tvb, pos, length, ENC_ASCII|ENC_NA);
3772 break;
3773 case BPKM_AUTH_KEY:
3774 if ((length == 96) || (length == 128) || (length == 256))
3775 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_auth_key, tvb, pos, length, ENC_NA);
3776 else
3777 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3778 break;
3779 case BPKM_TEK:
3780 if (length == 8 || length == 16)
3781 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_tek, tvb, pos, length, ENC_NA);
3782 else
3783 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3784 break;
3785 case BPKM_KEY_LIFETIME:
3786 if (length == 4)
3787 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_key_life, tvb, pos, length, ENC_BIG_ENDIAN);
3788 else
3789 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3790 break;
3791 case BPKM_KEY_SEQ_NUM:
3792 if (length == 1)
3793 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_key_seq, tvb, pos, length, ENC_BIG_ENDIAN);
3794 else
3795 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3796 break;
3797 case BPKM_HMAC_DIGEST:
3798 if (length == 20)
3799 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_hmac_digest, tvb, pos, length, ENC_NA);
3800 else
3801 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3802 break;
3803 case BPKM_SAID:
3804 if (length == 2)
3805 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_said, tvb, pos, length, ENC_BIG_ENDIAN);
3806 else
3807 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3808 break;
3809 case BPKM_TEK_PARAM:
3810 ti = proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_tek_params, tvb, pos, length, ENC_NA);
3811 attr_subtree = proto_item_add_subtree(ti, ett_docsis_bpkmattr_tekp);
3812 attr_tvb = tvb_new_subset_length (tvb, pos, length);
3813 dissect_attrs (attr_tvb, pinfo, attr_subtree);
3814 break;
3815 case BPKM_OBSOLETED:
3816 break;
3817 case BPKM_CBC_IV:
3818 if (length == 8 || length == 16)
3819 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_cbc_iv, tvb, pos, length, ENC_NA);
3820 else
3821 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3822 break;
3823 case BPKM_ERROR_CODE:
3824 if (length == 1)
3825 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_error_code, tvb, pos, length, ENC_BIG_ENDIAN);
3826 else
3827 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3828 break;
3829 case BPKM_CA_CERT:
3830 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_ca_cert, tvb, pos, length, ENC_NA);
3831 break;
3832 case BPKM_CM_CERT:
3833 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_cm_cert, tvb, pos, length, ENC_NA);
3834 break;
3835 case BPKM_SEC_CAPABILITIES:
3836 ti = proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_security_cap, tvb, pos, length, ENC_NA);
3837 attr_subtree = proto_item_add_subtree(ti, ett_docsis_bpkmattr_scap);
3838 attr_tvb = tvb_new_subset_length (tvb, pos, length);
3839 dissect_attrs (attr_tvb, pinfo, attr_subtree);
3840 break;
3841 case BPKM_CRYPTO_SUITE:
3842 if (length == 2)
3843 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_crypto_suite, tvb, pos, length, ENC_BIG_ENDIAN);
3844 else
3845 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3846 break;
3847 case BPKM_CRYPTO_SUITE_LIST:
3848 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_crypto_suite_list, tvb, pos, length, ENC_NA);
3849 break;
3850 case BPKM_BPI_VERSION:
3851 if (length == 1)
3852 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_bpi_version, tvb, pos, length, ENC_BIG_ENDIAN);
3853 else
3854 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3855 break;
3856 case BPKM_SA_DESCRIPTOR:
3857 ti = proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_sa_descr, tvb, pos, length, ENC_NA);
3858 attr_subtree = proto_item_add_subtree(ti, ett_docsis_bpkmattr_sadsc);
3859 attr_tvb = tvb_new_subset_length (tvb, pos, length);
3860 dissect_attrs (attr_tvb, pinfo, attr_subtree);
3861 break;
3862 case BPKM_SA_TYPE:
3863 if (length == 1)
3864 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_sa_type, tvb, pos, length, ENC_BIG_ENDIAN);
3865 else
3866 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3867 break;
3868 case BPKM_SA_QUERY:
3869 ti = proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_sa_query, tvb, pos, length, ENC_NA);
3870 attr_subtree = proto_item_add_subtree(ti, ett_docsis_bpkmattr_saqry);
3871 attr_tvb = tvb_new_subset_length (tvb, pos, length);
3872 dissect_attrs (attr_tvb, pinfo, attr_subtree);
3873 break;
3874 case BPKM_SA_QUERY_TYPE:
3875 if (length == 1)
3876 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_sa_query_type, tvb, pos, length, ENC_BIG_ENDIAN);
3877 else
3878 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3879 break;
3880 case BPKM_IP_ADDRESS:
3881 if (length == 4)
3882 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_ip_address, tvb, pos, length, ENC_BIG_ENDIAN);
3883 else
3884 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
3885 break;
3886 case BPKM_VENDOR_DEFINED:
3887 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_vendor_def, tvb, pos, length, ENC_NA);
3888 break;
3889 case BPKM_DNLD_PARAMS:
3890 ti = proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_download_param, tvb, pos, length, ENC_NA);
3891 attr_subtree = proto_item_add_subtree(ti, ett_docsis_bpkmattr_dnld);
3892 attr_tvb = tvb_new_subset_length (tvb, pos, length);
3893 dissect_attrs (attr_tvb, pinfo, attr_subtree);
3894 break;
3895 default:
3896 proto_tree_add_item (attr_tree, hf_docsis_bpkmattr_vendor_def, tvb, pos, length, ENC_NA);
3897 break;
3898 }
3899
3900 pos += length; /* switch */
3901 } /* while */
3902 }
3903
3904 static int
dissect_bpkmreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)3905 dissect_bpkmreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
3906 {
3907 proto_item *it;
3908 proto_tree *bpkmreq_tree, *bpkmattr_tree;
3909 guint32 code;
3910 tvbuff_t *attrs_tvb;
3911
3912 it = proto_tree_add_item(tree, proto_docsis_bpkmreq, tvb, 0, -1, ENC_NA);
3913 bpkmreq_tree = proto_item_add_subtree (it, ett_docsis_bpkmreq);
3914 proto_tree_add_item_ret_uint (bpkmreq_tree, hf_docsis_bpkm_code, tvb, 0, 1,
3915 ENC_BIG_ENDIAN, &code);
3916
3917 col_add_fstr (pinfo->cinfo, COL_INFO, "BPKM Request (%s)",
3918 val_to_str (code, code_field_vals, "%d"));
3919
3920 proto_tree_add_item (bpkmreq_tree, hf_docsis_bpkm_ident, tvb, 1, 1, ENC_BIG_ENDIAN);
3921 proto_tree_add_item (bpkmreq_tree, hf_docsis_bpkm_length, tvb, 2, 2, ENC_BIG_ENDIAN);
3922 it = proto_tree_add_item(bpkmreq_tree, hf_docsis_bpkmattr, tvb, 4, tvb_reported_length_remaining(tvb, 4), ENC_NA);
3923 bpkmattr_tree = proto_item_add_subtree (it, ett_docsis_bpkmattr);
3924
3925 attrs_tvb = tvb_new_subset_remaining (tvb, 4);
3926 dissect_attrs(attrs_tvb, pinfo, bpkmattr_tree);
3927 return tvb_captured_length(tvb);
3928 }
3929
3930 static int
dissect_bpkmrsp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)3931 dissect_bpkmrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
3932 {
3933 proto_item *it;
3934 proto_tree *bpkmrsp_tree, *bpkmattr_tree;
3935 guint32 code;
3936 tvbuff_t *attrs_tvb;
3937
3938 it = proto_tree_add_item(tree, proto_docsis_bpkmrsp, tvb, 0, -1, ENC_NA);
3939 bpkmrsp_tree = proto_item_add_subtree (it, ett_docsis_bpkmrsp);
3940
3941 proto_tree_add_item_ret_uint (bpkmrsp_tree, hf_docsis_bpkm_code, tvb, 0, 1, ENC_BIG_ENDIAN, &code);
3942
3943 col_add_fstr (pinfo->cinfo, COL_INFO, "BPKM Response (%s)",
3944 val_to_str (code, code_field_vals, "Unknown code %u"));
3945
3946 proto_tree_add_item (bpkmrsp_tree, hf_docsis_bpkm_ident, tvb, 1, 1, ENC_BIG_ENDIAN);
3947 proto_tree_add_item (bpkmrsp_tree, hf_docsis_bpkm_length, tvb, 2, 2, ENC_BIG_ENDIAN);
3948 it = proto_tree_add_item(bpkmrsp_tree, hf_docsis_bpkmattr, tvb, 4, tvb_reported_length_remaining(tvb, 4), ENC_NA);
3949 bpkmattr_tree = proto_item_add_subtree (it, ett_docsis_bpkmattr);
3950
3951 attrs_tvb = tvb_new_subset_remaining (tvb, 4);
3952 dissect_attrs(attrs_tvb, pinfo, bpkmattr_tree);
3953 return tvb_captured_length(tvb);
3954 }
3955
3956 static int
dissect_regack(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)3957 dissect_regack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
3958 {
3959 proto_item *it;
3960 proto_tree *regack_tree;
3961 guint32 sid, response;
3962 tvbuff_t *next_tvb;
3963
3964 it = proto_tree_add_item (tree, proto_docsis_regack, tvb, 0, -1, ENC_NA);
3965 regack_tree = proto_item_add_subtree (it, ett_docsis_regack);
3966
3967 proto_tree_add_item_ret_uint (regack_tree, hf_docsis_regack_sid, tvb, 0, 2, ENC_BIG_ENDIAN, &sid);
3968 proto_tree_add_item_ret_uint (regack_tree, hf_docsis_regack_response, tvb, 2, 1, ENC_BIG_ENDIAN, &response);
3969
3970 col_add_fstr (pinfo->cinfo, COL_INFO,
3971 "Registration Acknowledge SID = %u (%s)", sid,
3972 val_to_str_ext (response, &docsis_conf_code_ext, "%d"));
3973
3974 /* Call Dissector for Appendix C TLVs */
3975 if(tvb_reported_length_remaining(tvb, 3) > 0 )
3976 {
3977 next_tvb = tvb_new_subset_remaining (tvb, 3);
3978 call_dissector (docsis_tlv_handle, next_tvb, pinfo, regack_tree);
3979 }
3980
3981 return tvb_captured_length(tvb);
3982 }
3983
3984 static int
dissect_dsareq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)3985 dissect_dsareq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
3986 {
3987 proto_item *it;
3988 proto_tree *dsareq_tree;
3989 guint32 transid;
3990 tvbuff_t *next_tvb;
3991
3992 it = proto_tree_add_item(tree, proto_docsis_dsareq, tvb, 0, -1, ENC_NA);
3993 dsareq_tree = proto_item_add_subtree (it, ett_docsis_dsareq);
3994
3995 proto_tree_add_item_ret_uint (dsareq_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
3996
3997 col_add_fstr (pinfo->cinfo, COL_INFO,
3998 "Dynamic Service Addition Request: Transaction ID = %u", transid);
3999
4000 /* Call Dissector for Appendix C TLVs */
4001 next_tvb = tvb_new_subset_remaining (tvb, 2);
4002 call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsareq_tree);
4003 return tvb_captured_length(tvb);
4004 }
4005
4006 static int
dissect_dsarsp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)4007 dissect_dsarsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
4008 {
4009 proto_item *it;
4010 proto_tree *dsarsp_tree;
4011 guint32 transid, response;
4012 tvbuff_t *next_tvb;
4013
4014 it = proto_tree_add_item (tree, proto_docsis_dsarsp, tvb, 0, -1, ENC_NA);
4015 dsarsp_tree = proto_item_add_subtree (it, ett_docsis_dsarsp);
4016 proto_tree_add_item_ret_uint (dsarsp_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
4017 proto_tree_add_item_ret_uint (dsarsp_tree, hf_docsis_dsarsp_response, tvb, 2, 1, ENC_BIG_ENDIAN, &response);
4018
4019 col_add_fstr (pinfo->cinfo, COL_INFO,
4020 "Dynamic Service Add Response ID = %u (%s)", transid,
4021 val_to_str_ext (response, &docsis_conf_code_ext, "%d"));
4022
4023 /* Call dissector for Appendix C TLVs */
4024 next_tvb = tvb_new_subset_remaining (tvb, 3);
4025 call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsarsp_tree);
4026 return tvb_captured_length(tvb);
4027 }
4028
4029 static int
dissect_dsaack(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)4030 dissect_dsaack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
4031 {
4032 proto_item *it;
4033 proto_tree *dsaack_tree;
4034 guint32 transid, response;
4035 tvbuff_t *next_tvb;
4036
4037 it = proto_tree_add_item (tree, proto_docsis_dsaack, tvb, 0, -1, ENC_NA);
4038 dsaack_tree = proto_item_add_subtree (it, ett_docsis_dsaack);
4039 proto_tree_add_item_ret_uint (dsaack_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
4040 proto_tree_add_item_ret_uint (dsaack_tree, hf_docsis_dsaack_response, tvb, 2, 1, ENC_BIG_ENDIAN, &response);
4041
4042 col_add_fstr (pinfo->cinfo, COL_INFO,
4043 "Dynamic Service Add Acknowledge: Transaction ID = %u (%s)", transid,
4044 val_to_str_ext (response, &docsis_conf_code_ext, "%d"));
4045
4046 /* Call Dissector for Appendix C TLVs */
4047 next_tvb = tvb_new_subset_remaining (tvb, 3);
4048 call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsaack_tree);
4049 return tvb_captured_length(tvb);
4050 }
4051
4052 static int
dissect_dscreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)4053 dissect_dscreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
4054 {
4055 proto_item *it;
4056 proto_tree *dscreq_tree;
4057 guint32 transid;
4058 tvbuff_t *next_tvb;
4059
4060 it = proto_tree_add_item (tree, proto_docsis_dscreq, tvb, 0, -1, ENC_NA);
4061 dscreq_tree = proto_item_add_subtree (it, ett_docsis_dscreq);
4062
4063 proto_tree_add_item_ret_uint (dscreq_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
4064
4065 col_add_fstr (pinfo->cinfo, COL_INFO,
4066 "Dynamic Service Change Request: Transaction ID = %u", transid);
4067
4068 /* Call dissector for Appendix C TLVs */
4069 next_tvb = tvb_new_subset_remaining (tvb, 2);
4070 call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscreq_tree);
4071 return tvb_captured_length(tvb);
4072 }
4073
4074 static int
dissect_dscrsp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)4075 dissect_dscrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
4076 {
4077 proto_item *it;
4078 proto_tree *dscrsp_tree;
4079 guint32 transid, response;
4080 tvbuff_t *next_tvb;
4081
4082 it = proto_tree_add_item(tree, proto_docsis_dscrsp, tvb, 0, -1, ENC_NA);
4083 dscrsp_tree = proto_item_add_subtree (it, ett_docsis_dscrsp);
4084 proto_tree_add_item_ret_uint (dscrsp_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
4085 proto_tree_add_item_ret_uint (dscrsp_tree, hf_docsis_dscrsp_response, tvb, 2, 1, ENC_BIG_ENDIAN, &response);
4086
4087 col_add_fstr (pinfo->cinfo, COL_INFO,
4088 "Dynamic Service Change Response: Transaction ID = %u (%s)", transid,
4089 val_to_str_ext (response, &docsis_conf_code_ext, "%d"));
4090
4091 /* Call Dissector for Appendix C TLVs */
4092 next_tvb = tvb_new_subset_remaining (tvb, 3);
4093 call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscrsp_tree);
4094 return tvb_captured_length(tvb);
4095 }
4096
4097 static int
dissect_dscack(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)4098 dissect_dscack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
4099 {
4100 proto_item *it;
4101 proto_tree *dscack_tree;
4102 guint32 transid, response;
4103 tvbuff_t *next_tvb;
4104
4105 it = proto_tree_add_item(tree, proto_docsis_dscack, tvb, 0, -1, ENC_NA);
4106 dscack_tree = proto_item_add_subtree (it, ett_docsis_dscack);
4107
4108 proto_tree_add_item_ret_uint (dscack_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
4109 proto_tree_add_item_ret_uint (dscack_tree, hf_docsis_dscack_response, tvb, 2, 1, ENC_BIG_ENDIAN, &response);
4110
4111 col_add_fstr (pinfo->cinfo, COL_INFO,
4112 "Dynamic Service Change Acknowledge: Transaction ID = %u (%s)", transid,
4113 val_to_str_ext (response, &docsis_conf_code_ext, "%d"));
4114
4115 /* Call Dissector for Appendix C TLVs */
4116 next_tvb = tvb_new_subset_remaining (tvb, 3);
4117 call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscack_tree);
4118 return tvb_captured_length(tvb);
4119 }
4120
4121 static int
dissect_dsdreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)4122 dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
4123 {
4124 proto_item *it;
4125 proto_tree *dsdreq_tree;
4126 guint32 transid;
4127 tvbuff_t *next_tvb;
4128
4129 it = proto_tree_add_item (tree, proto_docsis_dsdreq, tvb, 0, -1, ENC_NA);
4130 dsdreq_tree = proto_item_add_subtree (it, ett_docsis_dsdreq);
4131
4132 proto_tree_add_item_ret_uint (dsdreq_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
4133
4134 col_add_fstr (pinfo->cinfo, COL_INFO,
4135 "Dynamic Service Delete Request: Transaction ID = %u", transid);
4136
4137 proto_tree_add_item (dsdreq_tree, hf_docsis_dsdreq_rsvd, tvb, 2, 2, ENC_BIG_ENDIAN);
4138 proto_tree_add_item (dsdreq_tree, hf_docsis_dsdreq_sfid, tvb, 4, 4, ENC_BIG_ENDIAN);
4139
4140 /* Call Dissector for Appendix C TLVs */
4141 next_tvb = tvb_new_subset_remaining (tvb, 8);
4142 call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsdreq_tree);
4143 return tvb_captured_length(tvb);
4144 }
4145
4146 static int
dissect_dsdrsp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)4147 dissect_dsdrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
4148 {
4149 proto_item *it;
4150 proto_tree *dsdrsp_tree;
4151 guint32 tranid, confcode;
4152
4153 it = proto_tree_add_item(tree, proto_docsis_dsdrsp, tvb, 0, -1, ENC_NA);
4154 dsdrsp_tree = proto_item_add_subtree (it, ett_docsis_dsdrsp);
4155 proto_tree_add_item_ret_uint (dsdrsp_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &tranid);
4156 proto_tree_add_item_ret_uint (dsdrsp_tree, hf_docsis_dsdrsp_confcode, tvb, 2, 1, ENC_BIG_ENDIAN, &confcode);
4157 proto_tree_add_item (dsdrsp_tree, hf_docsis_dsdrsp_rsvd, tvb, 3, 1, ENC_BIG_ENDIAN);
4158
4159 col_add_fstr (pinfo->cinfo, COL_INFO,
4160 "Dynamic Service Delete Response: Transaction ID = %u (%s)",
4161 tranid, val_to_str_ext (confcode, &docsis_conf_code_ext, "%d"));
4162
4163 return tvb_captured_length(tvb);
4164 }
4165
4166 static void
dissect_dccreq_ds_params(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,int start,guint16 len)4167 dissect_dccreq_ds_params (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree, int start, guint16 len)
4168 {
4169 guint8 type;
4170 guint32 length;
4171 proto_tree *dcc_tree;
4172 proto_item *dcc_item, *tlv_len_item;
4173 int pos;
4174
4175 pos = start;
4176 while ( pos < ( start + len) )
4177 {
4178 type = tvb_get_guint8 (tvb, pos);
4179 dcc_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
4180 ett_docsis_dccreq_ds_params, &dcc_item,
4181 val_to_str(type, ds_param_subtlv_vals,
4182 "Unknown TLV (%u)"));
4183 proto_tree_add_uint (dcc_tree, hf_docsis_dcc_ds_params_subtype, tvb, pos, 1, type);
4184 pos++;
4185 tlv_len_item = proto_tree_add_item_ret_uint (dcc_tree, hf_docsis_dcc_ds_params_length, tvb, pos, 1, ENC_NA, &length);
4186 pos++;
4187 proto_item_set_len(dcc_item, length + 2);
4188
4189 switch (type)
4190 {
4191 case DCCREQ_DS_FREQ:
4192 if (length == 4)
4193 {
4194 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_freq, tvb, pos, length, ENC_BIG_ENDIAN);
4195 }
4196 else
4197 {
4198 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4199 }
4200 break;
4201 case DCCREQ_DS_MOD_TYPE:
4202 if (length == 1)
4203 {
4204 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_mod_type, tvb, pos, length, ENC_BIG_ENDIAN);
4205 }
4206 else
4207 {
4208 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4209 }
4210 break;
4211 case DCCREQ_DS_SYM_RATE:
4212 if (length == 1)
4213 {
4214 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_sym_rate, tvb, pos, length, ENC_BIG_ENDIAN);
4215 }
4216 else
4217 {
4218 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4219 }
4220 break;
4221 case DCCREQ_DS_INTLV_DEPTH:
4222 if (length == 2)
4223 {
4224 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_intlv_depth_i, tvb, pos, 1, ENC_BIG_ENDIAN);
4225 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_intlv_depth_j, tvb, pos + 1, 1, ENC_BIG_ENDIAN);
4226 }
4227 else
4228 {
4229 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4230 }
4231 break;
4232 case DCCREQ_DS_CHAN_ID:
4233 if (length == 1)
4234 {
4235 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_chan_id, tvb, pos, length, ENC_BIG_ENDIAN);
4236 }
4237 else
4238 {
4239 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4240 }
4241 break;
4242 case DCCREQ_DS_SYNC_SUB:
4243 if (length == 1)
4244 {
4245 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_sync_sub, tvb, pos, length, ENC_BIG_ENDIAN);
4246 }
4247 else
4248 {
4249 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4250 }
4251 break;
4252 case DCCREQ_DS_OFDM_BLOCK_FREQ:
4253 if (length == 4)
4254 {
4255 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_ofdm_block_freq, tvb, pos, length, ENC_BIG_ENDIAN);
4256 }
4257 else
4258 {
4259 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4260 }
4261 break;
4262 }
4263
4264 pos += length;
4265 }
4266 }
4267
4268 static void
dissect_dccreq_sf_sub(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,int start,guint16 len)4269 dissect_dccreq_sf_sub (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree, int start, guint16 len)
4270 {
4271 guint8 type;
4272 guint32 length;
4273 proto_tree *dcc_tree;
4274 proto_item *dcc_item, *tlv_len_item;
4275 int pos;
4276
4277 pos = start;
4278 while ( pos < ( start + len) )
4279 {
4280 type = tvb_get_guint8 (tvb, pos);
4281 dcc_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
4282 ett_docsis_dccreq_sf_sub, &dcc_item,
4283 val_to_str(type, sf_sub_subtlv_vals,
4284 "Unknown TLV (%u)"));
4285 proto_tree_add_uint (dcc_tree, hf_docsis_dcc_sf_sub_subtype, tvb, pos, 1, type);
4286 pos++;
4287 tlv_len_item = proto_tree_add_item_ret_uint (dcc_tree, hf_docsis_dcc_sf_sub_length, tvb, pos, 1, ENC_NA, &length);
4288 pos++;
4289 proto_item_set_len(dcc_item, length + 2);
4290
4291 switch (type)
4292 {
4293 case DCCREQ_SF_SFID:
4294 if (length == 8)
4295 {
4296 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_sfid_cur, tvb, pos, 4, ENC_BIG_ENDIAN);
4297 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_sfid_new, tvb, pos + 4, 4, ENC_BIG_ENDIAN);
4298 }
4299 else
4300 {
4301 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4302 }
4303 break;
4304 case DCCREQ_SF_SID:
4305 if (length == 4)
4306 {
4307 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_sid_cur, tvb, pos, 2, ENC_BIG_ENDIAN);
4308 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_sid_new, tvb, pos + 2, 2, ENC_BIG_ENDIAN);
4309 }
4310 else
4311 {
4312 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4313 }
4314 break;
4315 case DCCREQ_SF_UNSOL_GRANT_TREF:
4316 if (length == 4)
4317 {
4318 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_unsol_grant_tref, tvb, pos, length, ENC_BIG_ENDIAN);
4319 }
4320 else
4321 {
4322 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4323 }
4324 break;
4325 }
4326
4327 pos += length;
4328 }
4329 }
4330
4331 static int
dissect_dccreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)4332 dissect_dccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
4333 {
4334 guint16 pos;
4335 guint8 type;
4336 guint32 length;
4337 proto_tree *dcc_tree, *tlv_tree;
4338 proto_item *dcc_item, *tlv_item, *tlv_len_item;
4339
4340 col_set_str(pinfo->cinfo, COL_INFO, "DCC-REQ Message");
4341
4342 dcc_item = proto_tree_add_item (tree, proto_docsis_dccreq, tvb, 0, -1, ENC_NA);
4343 dcc_tree = proto_item_add_subtree (dcc_item, ett_docsis_dccreq);
4344
4345 proto_tree_add_item (dcc_tree, hf_docsis_dccreq_tran_id, tvb, 0, 2, ENC_BIG_ENDIAN);
4346
4347 pos = 2;
4348 while (tvb_reported_length_remaining(tvb, pos) > 0)
4349 {
4350 type = tvb_get_guint8 (tvb, pos);
4351 tlv_tree = proto_tree_add_subtree(dcc_tree, tvb, pos, -1,
4352 ett_docsis_dccreq_tlv, &tlv_item,
4353 val_to_str(type, dcc_tlv_vals,
4354 "Unknown TLV (%u)"));
4355 proto_tree_add_uint (tlv_tree, hf_docsis_dccreq_type, tvb, pos, 1, type);
4356 pos++;
4357 tlv_len_item = proto_tree_add_item_ret_uint (tlv_tree, hf_docsis_dccreq_length, tvb, pos, 1, ENC_NA, &length);
4358 pos++;
4359 proto_item_set_len(tlv_item, length + 2);
4360
4361 switch (type)
4362 {
4363 case DCCREQ_UP_CHAN_ID:
4364 if (length == 1)
4365 {
4366 proto_tree_add_item (tlv_tree, hf_docsis_dccreq_up_chan_id, tvb, pos, length, ENC_BIG_ENDIAN);
4367 }
4368 else
4369 {
4370 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4371 }
4372 break;
4373 case DCCREQ_DS_PARAMS:
4374 dissect_dccreq_ds_params (tvb, pinfo, tlv_tree, pos, length);
4375 break;
4376 case DCCREQ_INIT_TECH:
4377 if (length == 1)
4378 {
4379 proto_tree_add_item (tlv_tree, hf_docsis_dccreq_init_tech, tvb, pos, length, ENC_BIG_ENDIAN);
4380 }
4381 else
4382 {
4383 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4384 }
4385 break;
4386 case DCCREQ_UCD_SUB:
4387 proto_tree_add_item (tlv_tree, hf_docsis_dccreq_ucd_sub, tvb, pos, length, ENC_NA);
4388 break;
4389 case DCCREQ_SAID_SUB:
4390 if (length == 4)
4391 {
4392 proto_tree_add_item (tlv_tree, hf_docsis_dccreq_said_sub_cur, tvb, pos, 2, ENC_BIG_ENDIAN);
4393 proto_tree_add_item (tlv_tree, hf_docsis_dccreq_said_sub_new, tvb, pos + 2, 2, ENC_BIG_ENDIAN);
4394 }
4395 else
4396 {
4397 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4398 }
4399 break;
4400 case DCCREQ_SF_SUB:
4401 dissect_dccreq_sf_sub (tvb, pinfo, tlv_tree, pos, length );
4402 break;
4403 case DCCREQ_CMTS_MAC_ADDR:
4404 if (length == 6)
4405 {
4406 proto_tree_add_item (tlv_tree, hf_docsis_dccreq_cmts_mac_addr, tvb, pos, length, ENC_NA);
4407 }
4408 else
4409 {
4410 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4411 }
4412 break;
4413 case DCCREQ_KEY_SEQ_NUM:
4414 if (length == 1)
4415 {
4416 proto_tree_add_item (tlv_tree, hf_docsis_dccreq_key_seq_num, tvb, pos, length, ENC_BIG_ENDIAN);
4417 }
4418 else
4419 {
4420 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4421 }
4422 break;
4423 case DCCREQ_HMAC_DIGEST:
4424 if (length == 20)
4425 {
4426 proto_tree_add_item (tlv_tree, hf_docsis_dccreq_hmac_digest, tvb, pos, length, ENC_NA);
4427 }
4428 else
4429 {
4430 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4431 }
4432 break;
4433 } /* switch(type) */
4434 pos += length;
4435 } /* (tvb_reported_length_remaining(tvb, pos) > 0) */
4436 return tvb_captured_length(tvb);
4437 }
4438
4439 static void
dissect_dccrsp_cm_jump_time(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,int start,guint16 len)4440 dissect_dccrsp_cm_jump_time (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree, int start, guint16 len)
4441 {
4442 guint8 type;
4443 guint32 length;
4444 proto_tree *dcc_tree;
4445 proto_item *dcc_item, *tlv_len_item;
4446 int pos;
4447
4448 pos = start;
4449 while ( pos < ( start + len) )
4450 {
4451 type = tvb_get_guint8 (tvb, pos);
4452 dcc_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
4453 ett_docsis_dccrsp_cm_jump_time, &dcc_item,
4454 val_to_str(type, cm_jump_subtlv_vals,
4455 "Unknown TLV (%u)"));
4456 proto_tree_add_uint (dcc_tree, hf_docsis_dcc_cm_jump_subtype, tvb, pos, 1, type);
4457 pos++;
4458 tlv_len_item = proto_tree_add_item_ret_uint (dcc_tree, hf_docsis_dcc_cm_jump_length, tvb, pos, 1, ENC_NA, &length);
4459 pos++;
4460 proto_item_set_len(dcc_item, length + 2);
4461
4462 switch (type)
4463 {
4464 case DCCRSP_CM_JUMP_TIME_LENGTH:
4465 if (length == 4)
4466 {
4467 proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_cm_jump_time_length, tvb, pos, length, ENC_BIG_ENDIAN);
4468 }
4469 else
4470 {
4471 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4472 }
4473 break;
4474 case DCCRSP_CM_JUMP_TIME_START:
4475 if (length == 8)
4476 {
4477 proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_cm_jump_time_start, tvb, pos, length, ENC_BIG_ENDIAN);
4478 }
4479 else
4480 {
4481 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4482 }
4483 break;
4484 }
4485
4486 pos += length;
4487 }
4488 }
4489
4490 static int
dissect_dccrsp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)4491 dissect_dccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
4492 {
4493 guint16 pos;
4494 guint8 type;
4495 guint32 length;
4496 proto_tree *dcc_tree, *tlv_tree;
4497 proto_item *dcc_item, *tlv_item, *tlv_len_item;
4498
4499 col_set_str(pinfo->cinfo, COL_INFO, "DCC-RSP Message");
4500
4501 dcc_item = proto_tree_add_item (tree, proto_docsis_dccrsp, tvb, 0, -1, ENC_NA);
4502 dcc_tree = proto_item_add_subtree (dcc_item, ett_docsis_dccrsp);
4503 proto_tree_add_item (dcc_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN);
4504 proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_conf_code, tvb, 2, 1, ENC_BIG_ENDIAN);
4505
4506 pos = 3;
4507 while (tvb_reported_length_remaining(tvb, pos) > 0)
4508 {
4509 type = tvb_get_guint8 (tvb, pos);
4510 tlv_tree = proto_tree_add_subtree(dcc_tree, tvb, pos, -1,
4511 ett_docsis_dccrsp_tlv, &tlv_item,
4512 val_to_str(type, dccrsp_tlv_vals,
4513 "Unknown TLV (%u)"));
4514 proto_tree_add_uint (tlv_tree, hf_docsis_dccrsp_type, tvb, pos, 1, type);
4515 pos++;
4516 tlv_len_item = proto_tree_add_item_ret_uint (tlv_tree, hf_docsis_dccrsp_length, tvb, pos, 1, ENC_NA, &length);
4517 pos++;
4518 proto_item_set_len(tlv_item, length + 2);
4519
4520 switch (type)
4521 {
4522 case DCCRSP_CM_JUMP_TIME:
4523 dissect_dccrsp_cm_jump_time (tvb, pinfo, tlv_tree, pos, length );
4524 break;
4525 case DCCRSP_KEY_SEQ_NUM:
4526 if (length == 1)
4527 {
4528 proto_tree_add_item (tlv_tree, hf_docsis_dccrsp_key_seq_num, tvb, pos, length, ENC_BIG_ENDIAN);
4529 }
4530 else
4531 {
4532 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4533 }
4534 break;
4535 case DCCRSP_HMAC_DIGEST:
4536 if (length == 20)
4537 {
4538 proto_tree_add_item (tlv_tree, hf_docsis_dccrsp_hmac_digest, tvb, pos, length, ENC_NA);
4539 }
4540 else
4541 {
4542 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4543 }
4544 break;
4545 } /* switch(type) */
4546
4547 pos += length;
4548 } /* while (tvb_reported_length_remaining(tvb, pos) > 0) */
4549
4550 return tvb_captured_length(tvb);
4551 }
4552
4553 static int
dissect_dccack(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)4554 dissect_dccack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
4555 {
4556 guint16 pos;
4557 guint8 type;
4558 guint32 length;
4559 proto_tree *dcc_tree, *tlv_tree;
4560 proto_item *dcc_item, *tlv_item, *tlv_len_item;
4561
4562 col_set_str(pinfo->cinfo, COL_INFO, "DCC-ACK Message");
4563
4564 dcc_item = proto_tree_add_item(tree, proto_docsis_dccack, tvb, 0, -1, ENC_NA);
4565 dcc_tree = proto_item_add_subtree (dcc_item, ett_docsis_dccack);
4566 proto_tree_add_item (dcc_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN);
4567
4568 pos = 2;
4569 while (tvb_reported_length_remaining(tvb, pos) > 0)
4570 {
4571 type = tvb_get_guint8 (tvb, pos);
4572 tlv_tree = proto_tree_add_subtree(dcc_tree, tvb, pos, -1,
4573 ett_docsis_dccack_tlv, &tlv_item,
4574 val_to_str(type, dccack_tlv_vals,
4575 "Unknown TLV (%u)"));
4576 proto_tree_add_uint (tlv_tree, hf_docsis_dccack_type, tvb, pos, 1, type);
4577 pos++;
4578 tlv_len_item = proto_tree_add_item_ret_uint (tlv_tree, hf_docsis_dccack_length, tvb, pos, 1, ENC_NA, &length);
4579 pos++;
4580 proto_item_set_len(tlv_item, length + 2);
4581
4582 switch (type)
4583 {
4584 case DCCACK_KEY_SEQ_NUM:
4585 if (length == 1)
4586 {
4587 proto_tree_add_item (tlv_tree, hf_docsis_dccack_key_seq_num, tvb, pos, length, ENC_BIG_ENDIAN);
4588 }
4589 else
4590 {
4591 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4592 }
4593 break;
4594 case DCCACK_HMAC_DIGEST:
4595 if (length == 20)
4596 {
4597 proto_tree_add_item (tlv_tree, hf_docsis_dccack_hmac_digest, tvb, pos, length, ENC_NA);
4598 }
4599 else
4600 {
4601 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4602 }
4603 break;
4604 } /* switch(type) */
4605
4606 pos += length;
4607 } /* while (tvb_reported_length_remaining(tvb, pos) > 0) */
4608
4609 return tvb_captured_length(tvb);
4610 }
4611
4612 static int
dissect_type29ucd(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)4613 dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
4614 {
4615 return dissect_any_ucd(tvb, pinfo, tree, proto_docsis_type29ucd, MGT_TYPE29UCD);
4616 }
4617
4618 static int
dissect_intrngreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)4619 dissect_intrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
4620 {
4621 proto_item *intrngreq_item;
4622 proto_tree *intrngreq_tree;
4623 guint32 sid;
4624
4625 intrngreq_item = proto_tree_add_item(tree, proto_docsis_intrngreq, tvb, 0, -1, ENC_NA);
4626 intrngreq_tree = proto_item_add_subtree (intrngreq_item, ett_docsis_intrngreq);
4627
4628 proto_tree_add_item_ret_uint (intrngreq_tree, hf_docsis_intrngreq_sid, tvb, 0, 2, ENC_BIG_ENDIAN, &sid);
4629 col_add_fstr (pinfo->cinfo, COL_INFO, "Initial Ranging Request: SID = %u",sid);
4630
4631 proto_tree_add_item (intrngreq_tree, hf_docsis_mgt_down_chid, tvb, 2, 1, ENC_BIG_ENDIAN);
4632 proto_tree_add_item (intrngreq_tree, hf_docsis_mgt_upstream_chid, tvb, 3, 1, ENC_BIG_ENDIAN);
4633
4634 return tvb_captured_length(tvb);
4635 }
4636
4637 static void
dissect_dcd_dsg_cfg(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,int start,guint16 len)4638 dissect_dcd_dsg_cfg (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree, int start, guint16 len)
4639 {
4640 guint8 type;
4641 guint32 length;
4642 proto_tree *dcd_tree;
4643 proto_tree *dcd_item, *tlv_len_item;
4644 int pos;
4645
4646 pos = start;
4647 while ( pos < ( start + len) )
4648 {
4649 type = tvb_get_guint8 (tvb, pos);
4650 dcd_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
4651 ett_docsis_dcd_cfg, &dcd_item,
4652 val_to_str(type, dcd_cfg_vals,
4653 "Unknown TLV (%u)"));
4654 proto_tree_add_uint (dcd_tree, hf_docsis_dcd_cfg_subtype, tvb, pos, 1, type);
4655 pos++;
4656 tlv_len_item = proto_tree_add_item_ret_uint (dcd_tree, hf_docsis_dcd_cfg_length, tvb, pos, 1, ENC_NA, &length);
4657 pos++;
4658 proto_item_set_len(dcd_item, length + 2);
4659
4660 switch (type)
4661 {
4662 case DCD_CFG_CHAN_LST:
4663 if (length == 4)
4664 {
4665 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_chan, tvb, pos, length, ENC_BIG_ENDIAN);
4666 }
4667 else
4668 {
4669 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4670 }
4671 break;
4672 case DCD_CFG_TDSG1:
4673 if (length == 2)
4674 {
4675 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg1, tvb, pos, length, ENC_BIG_ENDIAN);
4676 }
4677 else
4678 {
4679 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4680 }
4681 break;
4682 case DCD_CFG_TDSG2:
4683 if (length == 2)
4684 {
4685 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg2, tvb, pos, length, ENC_BIG_ENDIAN);
4686 }
4687 else
4688 {
4689 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4690 }
4691 break;
4692 case DCD_CFG_TDSG3:
4693 if (length == 2)
4694 {
4695 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg3, tvb, pos, length, ENC_BIG_ENDIAN);
4696 }
4697 else
4698 {
4699 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4700 }
4701 break;
4702 case DCD_CFG_TDSG4:
4703 if (length == 2)
4704 {
4705 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg4, tvb, pos, length, ENC_BIG_ENDIAN);
4706 }
4707 else
4708 {
4709 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4710 }
4711 break;
4712 case DCD_CFG_VENDOR_SPEC:
4713 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_vendor_spec, tvb, pos, length, ENC_NA);
4714 break;
4715
4716 }
4717
4718 pos += length;
4719 }
4720 }
4721
4722 static void
dissect_dcd_down_classifier_ip(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,int start,guint16 len)4723 dissect_dcd_down_classifier_ip (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree, int start, guint16 len)
4724 {
4725 guint8 type;
4726 guint32 length;
4727 proto_tree *dcd_tree;
4728 proto_tree *dcd_item, *tlv_len_item;
4729 int pos;
4730
4731 pos = start;
4732 while ( pos < ( start + len) )
4733 {
4734 type = tvb_get_guint8 (tvb, pos);
4735 dcd_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
4736 ett_docsis_dcd_cfr_ip, &dcd_item,
4737 val_to_str(type, dcd_cfr_ip_vals,
4738 "Unknown TLV (%u)"));
4739 proto_tree_add_uint (dcd_tree, hf_docsis_dcd_cfr_ip_subtype, tvb, pos, 1, type);
4740 pos++;
4741 tlv_len_item = proto_tree_add_item_ret_uint (dcd_tree, hf_docsis_dcd_cfr_ip_length, tvb, pos, 1, ENC_NA, &length);
4742 pos++;
4743 proto_item_set_len(dcd_item, length + 2);
4744
4745 switch (type)
4746 {
4747 case DCD_CFR_IP_SOURCE_ADDR:
4748 if (length == 4)
4749 {
4750 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_ip_source_addr, tvb, pos, length, ENC_BIG_ENDIAN);
4751 }
4752 else
4753 {
4754 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4755 }
4756 break;
4757 case DCD_CFR_IP_SOURCE_MASK:
4758 if (length == 4)
4759 {
4760 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_ip_source_mask, tvb, pos, length, ENC_BIG_ENDIAN);
4761 }
4762 else
4763 {
4764 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4765 }
4766 break;
4767 case DCD_CFR_IP_DEST_ADDR:
4768 if (length == 4)
4769 {
4770 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_ip_dest_addr, tvb, pos, length, ENC_BIG_ENDIAN);
4771 }
4772 else
4773 {
4774 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4775 }
4776 break;
4777 case DCD_CFR_IP_DEST_MASK:
4778 if (length == 4)
4779 {
4780 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_ip_dest_mask, tvb, pos, length, ENC_BIG_ENDIAN);
4781 }
4782 else
4783 {
4784 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4785 }
4786 break;
4787 case DCD_CFR_TCPUDP_SRCPORT_START:
4788 if (length == 2)
4789 {
4790 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_tcpudp_srcport_start, tvb, pos, length, ENC_BIG_ENDIAN);
4791 }
4792 else
4793 {
4794 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4795 }
4796 break;
4797 case DCD_CFR_TCPUDP_SRCPORT_END:
4798 if (length == 2)
4799 {
4800 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_tcpudp_srcport_end, tvb, pos, length, ENC_BIG_ENDIAN);
4801 }
4802 else
4803 {
4804 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4805 }
4806 break;
4807 case DCD_CFR_TCPUDP_DSTPORT_START:
4808 if (length == 2)
4809 {
4810 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_tcpudp_dstport_start, tvb, pos, length, ENC_BIG_ENDIAN);
4811 }
4812 else
4813 {
4814 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4815 }
4816 break;
4817 case DCD_CFR_TCPUDP_DSTPORT_END:
4818 if (length == 2)
4819 {
4820 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_tcpudp_dstport_end, tvb, pos, length, ENC_BIG_ENDIAN);
4821 }
4822 else
4823 {
4824 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4825 }
4826 break;
4827 }
4828
4829 pos += length;
4830 }
4831 }
4832
4833 static void
dissect_dcd_clid(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,int start,guint16 len)4834 dissect_dcd_clid (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree, int start, guint16 len)
4835 {
4836 guint8 type;
4837 guint32 length;
4838 proto_tree *dcd_tree;
4839 proto_tree *dcd_item, *tlv_len_item;
4840 int pos;
4841
4842 pos = start;
4843 while ( pos < ( start + len) )
4844 {
4845 type = tvb_get_guint8 (tvb, pos);
4846 dcd_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
4847 ett_docsis_dcd_clid, &dcd_item,
4848 val_to_str(type, dcd_clid_vals,
4849 "Unknown TLV (%u)"));
4850 proto_tree_add_uint (dcd_tree, hf_docsis_dcd_clid_subtype, tvb, pos, 1, type);
4851 pos++;
4852 tlv_len_item = proto_tree_add_item_ret_uint (dcd_tree, hf_docsis_dcd_clid_length, tvb, pos, 1, ENC_NA, &length);
4853 pos++;
4854 proto_item_set_len(dcd_item, length + 2);
4855
4856 switch (type)
4857 {
4858 case DCD_CLID_BCAST_ID:
4859 if (length == 2)
4860 {
4861 proto_tree_add_item(dcd_tree, hf_docsis_dcd_clid_bcast_id, tvb, pos, length, ENC_BIG_ENDIAN);
4862 }
4863 else
4864 {
4865 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4866 }
4867 break;
4868 case DCD_CLID_KNOWN_MAC_ADDR:
4869 if (length == 6)
4870 {
4871 proto_tree_add_item (dcd_tree, hf_docsis_dcd_clid_known_mac_addr, tvb, pos, length, ENC_NA);
4872 }
4873 else
4874 {
4875 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4876 }
4877 break;
4878 case DCD_CLID_CA_SYS_ID:
4879 if (length == 2)
4880 {
4881 proto_tree_add_item (dcd_tree, hf_docsis_dcd_clid_ca_sys_id, tvb, pos, length, ENC_BIG_ENDIAN);
4882 }
4883 else
4884 {
4885 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4886 }
4887 break;
4888 case DCD_CLID_APP_ID:
4889 if (length == 2)
4890 {
4891 proto_tree_add_item (dcd_tree, hf_docsis_dcd_clid_app_id, tvb, pos, length, ENC_BIG_ENDIAN);
4892 }
4893 else
4894 {
4895 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4896 }
4897 break;
4898 }
4899
4900 pos += length;
4901 }
4902 }
4903
4904 static void
dissect_dcd_dsg_rule(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,int start,guint16 len)4905 dissect_dcd_dsg_rule (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree, int start, guint16 len)
4906 {
4907 guint8 type;
4908 guint32 length;
4909 proto_tree *dcd_tree;
4910 proto_tree *dcd_item, *tlv_len_item;
4911 int pos;
4912
4913 pos = start;
4914 while ( pos < ( start + len) )
4915 {
4916 type = tvb_get_guint8 (tvb, pos);
4917 dcd_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
4918 ett_docsis_dcd_rule, &dcd_item,
4919 val_to_str(type, dcd_dsg_rule_vals,
4920 "Unknown TLV (%u)"));
4921 proto_tree_add_uint (dcd_tree, hf_docsis_dcd_dsg_rule_subtype, tvb, pos, 1, type);
4922 pos++;
4923 tlv_len_item = proto_tree_add_item_ret_uint (dcd_tree, hf_docsis_dcd_dsg_rule_length, tvb, pos, 1, ENC_NA, &length);
4924 pos++;
4925 proto_item_set_len(dcd_item, length + 2);
4926
4927 switch (type)
4928 {
4929 case DCD_RULE_ID:
4930 if (length == 1)
4931 {
4932 proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_id, tvb, pos, length, ENC_BIG_ENDIAN);
4933 }
4934 else
4935 {
4936 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4937 }
4938 break;
4939 case DCD_RULE_PRI:
4940 if (length == 1)
4941 {
4942 proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_pri, tvb, pos, length, ENC_BIG_ENDIAN);
4943 }
4944 else
4945 {
4946 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4947 }
4948 break;
4949 case DCD_RULE_UCID_RNG:
4950 proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_ucid_list, tvb, pos, length, ENC_NA);
4951 break;
4952 case DCD_RULE_CLIENT_ID:
4953 dissect_dcd_clid (tvb, pinfo, dcd_tree, pos, length );
4954 break;
4955 case DCD_RULE_TUNL_ADDR:
4956 if (length == 6)
4957 {
4958 proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_tunl_addr, tvb, pos, length, ENC_NA);
4959 }
4960 else
4961 {
4962 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4963 }
4964 break;
4965 case DCD_RULE_CFR_ID:
4966 if (length == 2)
4967 {
4968 proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_cfr_id, tvb, pos, length, ENC_BIG_ENDIAN);
4969 }
4970 else
4971 {
4972 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
4973 }
4974 break;
4975 case DCD_RULE_VENDOR_SPEC:
4976 proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_vendor_spec, tvb, pos, length, ENC_NA);
4977 break;
4978
4979 }
4980
4981 pos += length;
4982 }
4983 }
4984
4985 static void
dissect_dcd_down_classifier(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,int start,guint16 len)4986 dissect_dcd_down_classifier (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree, int start, guint16 len)
4987 {
4988 guint8 type;
4989 guint32 length;
4990 proto_tree *dcd_tree;
4991 proto_tree *dcd_item, *tlv_len_item;
4992 int pos;
4993
4994 pos = start;
4995 while ( pos < ( start + len) )
4996 {
4997 type = tvb_get_guint8 (tvb, pos);
4998 dcd_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
4999 ett_docsis_dcd_cfr, &dcd_item,
5000 val_to_str(type, dcd_down_classifier_vals,
5001 "Unknown TLV (%u)"));
5002 proto_tree_add_uint (dcd_tree, hf_docsis_dcd_down_classifier_subtype, tvb, pos, 1, type);
5003 pos++;
5004 tlv_len_item = proto_tree_add_item_ret_uint (dcd_tree, hf_docsis_dcd_down_classifier_length, tvb, pos, 1, ENC_NA, &length);
5005 pos++;
5006 proto_item_set_len(dcd_item, length + 2);
5007
5008 switch (type)
5009 {
5010 case DCD_CFR_ID:
5011 if (length == 2)
5012 {
5013 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_id, tvb, pos, length, ENC_BIG_ENDIAN);
5014 }
5015 else
5016 {
5017 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
5018 }
5019 break;
5020 case DCD_CFR_RULE_PRI:
5021 if (length == 1)
5022 {
5023 proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_rule_pri, tvb, pos, length, ENC_BIG_ENDIAN);
5024 }
5025 else
5026 {
5027 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
5028 }
5029 break;
5030 case DCD_CFR_IP_CLASSIFIER:
5031 dissect_dcd_down_classifier_ip (tvb , pinfo , dcd_tree , pos , length );
5032 break;
5033 }
5034
5035 pos += length;
5036 }
5037 }
5038
5039 static int
dissect_dcd(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)5040 dissect_dcd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
5041 {
5042 guint16 pos;
5043 guint8 type;
5044 guint32 length;
5045 proto_tree *dcd_tree, *tlv_tree;
5046 proto_item *dcd_item, *tlv_item;
5047
5048 col_set_str(pinfo->cinfo, COL_INFO, "DCD Message: ");
5049
5050 dcd_item = proto_tree_add_item(tree, proto_docsis_dcd, tvb, 0, -1, ENC_NA);
5051 dcd_tree = proto_item_add_subtree (dcd_item, ett_docsis_dcd);
5052 proto_tree_add_item (dcd_tree, hf_docsis_dcd_config_ch_cnt, tvb, 0, 1, ENC_BIG_ENDIAN);
5053 proto_tree_add_item (dcd_tree, hf_docsis_dcd_num_of_frag, tvb, 1, 1, ENC_BIG_ENDIAN);
5054 proto_tree_add_item (dcd_tree, hf_docsis_dcd_frag_sequence_num, tvb, 2, 1, ENC_BIG_ENDIAN);
5055
5056 pos = 3;
5057 while (tvb_reported_length_remaining(tvb, pos) > 0)
5058 {
5059 type = tvb_get_guint8 (tvb, pos);
5060 tlv_tree = proto_tree_add_subtree(dcd_tree, tvb, pos, -1,
5061 ett_docsis_dcd_tlv, &tlv_item,
5062 val_to_str(type, dcd_tlv_vals,
5063 "Unknown TLV (%u)"));
5064 proto_tree_add_uint (tlv_tree, hf_docsis_dcd_type, tvb, pos, 1, type);
5065 pos++;
5066 proto_tree_add_item_ret_uint (tlv_tree, hf_docsis_dcd_length, tvb, pos, 1, ENC_NA, &length);
5067 pos++;
5068 proto_item_set_len(tlv_item, length + 2);
5069
5070 switch (type)
5071 {
5072 case DCD_DOWN_CLASSIFIER:
5073 dissect_dcd_down_classifier (tvb, pinfo, tlv_tree, pos, length);
5074 break;
5075 case DCD_DSG_RULE:
5076 dissect_dcd_dsg_rule (tvb, pinfo, tlv_tree, pos, length);
5077 break;
5078 case DCD_DSG_CONFIG:
5079 dissect_dcd_dsg_cfg (tvb, pinfo, tlv_tree, pos, length);
5080 break;
5081 } /* switch(type) */
5082
5083 pos += length;
5084 } /* while (tvb_reported_length_remaining(tvb, pos) > 0) */
5085
5086 return tvb_captured_length(tvb);
5087 }
5088
5089 static void
dissect_mdd_ds_active_channel_list(tvbuff_t * tvb,packet_info * pinfo _U_,proto_tree * tree,int start,guint16 len)5090 dissect_mdd_ds_active_channel_list(tvbuff_t * tvb, packet_info* pinfo _U_, proto_tree * tree, int start, guint16 len)
5091 {
5092 guint8 type;
5093 guint32 length;
5094 proto_tree *mdd_tree;
5095 proto_item *mdd_item;
5096 int pos;
5097 static int * const order_annex[] = {
5098 &hf_docsis_mdd_downstream_active_channel_list_modulation_order,
5099 &hf_docsis_mdd_downstream_active_channel_list_annex,
5100 NULL
5101 };
5102 static int * const cm_status_event[] = {
5103 &hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_timeout,
5104 &hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_failure,
5105 &hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_recovery,
5106 &hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_recovery,
5107 NULL
5108 };
5109 static int * const ofdm_plc_parameters[] = {
5110 &hf_docsis_mdd_ofdm_plc_parameters_tukey_raised_cosine_window,
5111 &hf_docsis_mdd_ofdm_plc_parameters_cyclic_prefix,
5112 &hf_docsis_mdd_ofdm_plc_parameters_sub_carrier_spacing,
5113 NULL
5114 };
5115
5116 pos = start;
5117 while ( pos < ( start + len) )
5118 {
5119 type = tvb_get_guint8 (tvb, pos);
5120 mdd_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
5121 ett_docsis_mdd_ds_active_channel_list, &mdd_item,
5122 val_to_str(type, mdd_ds_active_channel_list_vals,
5123 "Unknown TLV (%u)"));
5124 proto_tree_add_uint (mdd_tree, hf_docsis_mdd_ds_active_channel_list_subtype, tvb, pos, 1, type);
5125 pos++;
5126 proto_tree_add_item_ret_uint (mdd_tree, hf_docsis_mdd_ds_active_channel_list_length, tvb, pos, 1, ENC_NA, &length);
5127 pos++;
5128 proto_item_set_len(mdd_item, length + 2);
5129
5130 switch(type)
5131 {
5132 case DOWNSTREAM_ACTIVE_CHANNEL_LIST_CHANNEL_ID:
5133 proto_tree_add_item (mdd_tree, hf_docsis_mdd_downstream_active_channel_list_channel_id, tvb, pos, 1, ENC_BIG_ENDIAN);
5134 break;
5135 case DOWNSTREAM_ACTIVE_CHANNEL_LIST_FREQUENCY:
5136 proto_tree_add_item (mdd_tree, hf_docsis_mdd_downstream_active_channel_list_frequency, tvb, pos, 4, ENC_BIG_ENDIAN);
5137 break;
5138 case DOWNSTREAM_ACTIVE_CHANNEL_LIST_MODULATION_ORDER_ANNEX:
5139 proto_tree_add_bitmask_list(mdd_tree, tvb, pos, 1, order_annex, ENC_BIG_ENDIAN);
5140 break;
5141 case DOWNSTREAM_ACTIVE_CHANNEL_LIST_PRIMARY_CAPABLE:
5142 proto_tree_add_item (mdd_tree, hf_docsis_mdd_downstream_active_channel_list_primary_capable, tvb, pos, 1, ENC_BIG_ENDIAN);
5143 break;
5144 case DOWNSTREAM_ACTIVE_CHANNEL_LIST_CM_STATUS_EVENT_ENABLE_BITMASK:
5145 proto_tree_add_bitmask(mdd_tree, tvb, pos, hf_docsis_mdd_cm_status_event_enable_bitmask, ett_sub_tlv, cm_status_event, ENC_BIG_ENDIAN);
5146 break;
5147 case DOWNSTREAM_ACTIVE_CHANNEL_LIST_MAP_UCD_TRANSPORT_INDICATOR:
5148 proto_tree_add_item (mdd_tree, hf_docsis_mdd_downstream_active_channel_list_map_ucd_transport_indicator, tvb, pos, 1, ENC_BIG_ENDIAN);
5149 break;
5150 case DOWNSTREAM_ACTIVE_CHANNEL_LIST_OFDM_PLC_PARAMETERS:
5151 proto_tree_add_bitmask(mdd_tree, tvb, pos, hf_docsis_mdd_ofdm_plc_parameters, ett_sub_tlv, ofdm_plc_parameters, ENC_BIG_ENDIAN);
5152 break;
5153 case DOWNSTREAM_ACTIVE_CHANNEL_LIST_FDX_SUB_BAND_ID:
5154 proto_tree_add_item (mdd_tree, hf_docsis_mdd_full_duplex_sub_band_id, tvb, pos, 1, ENC_BIG_ENDIAN);
5155 break;
5156 }
5157
5158 pos += length;
5159 }
5160 }
5161
5162 static void
dissect_mdd_ds_service_group(tvbuff_t * tvb,packet_info * pinfo _U_,proto_tree * tree,int start,guint16 len)5163 dissect_mdd_ds_service_group(tvbuff_t * tvb, packet_info* pinfo _U_, proto_tree * tree, int start, guint16 len)
5164 {
5165 guint8 type;
5166 guint32 i, length;
5167 proto_tree *mdd_tree;
5168 proto_item *mdd_item;
5169 int pos;
5170
5171 pos = start;
5172 while ( pos < ( start + len) )
5173 {
5174 type = tvb_get_guint8 (tvb, pos);
5175 mdd_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
5176 ett_docsis_mdd_ds_service_group, &mdd_item,
5177 val_to_str(type, mdd_ds_service_group_vals,
5178 "Unknown TLV (%u)"));
5179 proto_tree_add_uint (mdd_tree, hf_docsis_mdd_ds_service_group_subtype, tvb, pos, 1, type);
5180 pos++;
5181 proto_tree_add_item_ret_uint (mdd_tree, hf_docsis_mdd_ds_service_group_length, tvb, pos, 1, ENC_NA, &length);
5182 pos++;
5183 proto_item_set_len(mdd_item, length + 2);
5184
5185 switch(type)
5186 {
5187 case MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP_MD_DS_SG_IDENTIFIER:
5188 proto_tree_add_item (mdd_tree, hf_docsis_mdd_mac_domain_downstream_service_group_md_ds_sg_identifier, tvb, pos, 1, ENC_BIG_ENDIAN);
5189 break;
5190 case MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP_CHANNEL_IDS:
5191 for (i = 0; i < length; i++) {
5192 proto_tree_add_item (mdd_tree, hf_docsis_mdd_mac_domain_downstream_service_group_channel_id, tvb, pos + i , 1, ENC_BIG_ENDIAN);
5193 }
5194 break;
5195 }
5196
5197 pos += length;
5198 }
5199 }
5200
5201 static void
dissect_mdd_channel_profile_reporting_control(tvbuff_t * tvb,packet_info * pinfo _U_,proto_tree * tree,int start,guint16 len)5202 dissect_mdd_channel_profile_reporting_control(tvbuff_t * tvb, packet_info* pinfo _U_, proto_tree * tree, int start, guint16 len)
5203 {
5204 guint8 type;
5205 guint32 length;
5206 proto_tree *mdd_tree;
5207 proto_item *mdd_item;
5208 int pos;
5209
5210 pos = start;
5211 while ( pos < ( start + len) )
5212 {
5213 type = tvb_get_guint8 (tvb, pos);
5214 mdd_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
5215 ett_docsis_mdd_channel_profile_reporting_control, &mdd_item,
5216 val_to_str(type, mdd_channel_profile_reporting_control_vals,
5217 "Unknown TLV (%u)"));
5218 proto_tree_add_uint (mdd_tree, hf_docsis_mdd_channel_profile_reporting_control_subtype, tvb, pos, 1, type);
5219 pos++;
5220 proto_tree_add_item_ret_uint (mdd_tree, hf_docsis_mdd_channel_profile_reporting_control_length, tvb, pos, 1, ENC_NA, &length);
5221 pos++;
5222 proto_item_set_len(mdd_item, length + 2);
5223
5224 switch(type)
5225 {
5226 case RCP_CENTER_FREQUENCY_SPACING:
5227 proto_tree_add_item (mdd_tree, hf_docsis_mdd_rcp_center_frequency_spacing, tvb, pos, 1, ENC_BIG_ENDIAN);
5228 break;
5229 case VERBOSE_RCP_REPORTING:
5230 proto_tree_add_item (mdd_tree, hf_docsis_mdd_verbose_rcp_reporting, tvb, pos, 1, ENC_BIG_ENDIAN);
5231 break;
5232 case FRAGMENTED_RCP_TRANSMISSION:
5233 proto_tree_add_item (mdd_tree, hf_docsis_mdd_fragmented_rcp_transmission, tvb, pos, 1, ENC_BIG_ENDIAN);
5234 break;
5235 }
5236
5237 pos += length;
5238 }
5239 }
5240
5241 static void
dissect_mdd_ip_init_param(tvbuff_t * tvb,packet_info * pinfo _U_,proto_tree * tree,int start,guint16 len)5242 dissect_mdd_ip_init_param(tvbuff_t * tvb, packet_info* pinfo _U_, proto_tree * tree, int start, guint16 len)
5243 {
5244 guint8 type;
5245 guint32 length;
5246 proto_tree *mdd_tree;
5247 proto_item *mdd_item;
5248 int pos;
5249
5250 pos = start;
5251 while ( pos < ( start + len) )
5252 {
5253 type = tvb_get_guint8 (tvb, pos);
5254 mdd_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
5255 ett_docsis_mdd_ip_init_param, &mdd_item,
5256 val_to_str(type, mdd_ip_init_param_vals,
5257 "Unknown TLV (%u)"));
5258 proto_tree_add_uint (mdd_tree, hf_docsis_mdd_ip_init_param_subtype, tvb, pos, 1, type);
5259 pos++;
5260 proto_tree_add_item_ret_uint (mdd_tree, hf_docsis_mdd_ip_init_param_length, tvb, pos, 1, ENC_NA, &length);
5261 pos++;
5262 proto_item_set_len(mdd_item, length + 2);
5263
5264 switch(type)
5265 {
5266 case IP_PROVISIONING_MODE:
5267 proto_tree_add_item (mdd_tree, hf_docsis_mdd_ip_provisioning_mode, tvb, pos, 1, ENC_BIG_ENDIAN);
5268 break;
5269 case PRE_REGISTRATION_DSID:
5270 proto_tree_add_item (mdd_tree, hf_docsis_mdd_pre_registration_dsid, tvb, pos, 3, ENC_BIG_ENDIAN);
5271 break;
5272 }
5273
5274 pos += length;
5275 }
5276 }
5277
5278 static void
dissect_mdd_upstream_active_channel_list_dschids_maps_ucds(tvbuff_t * tvb,proto_tree * tree,guint start,guint16 len)5279 dissect_mdd_upstream_active_channel_list_dschids_maps_ucds(tvbuff_t * tvb, proto_tree * tree, guint start, guint16 len)
5280 {
5281 guint16 i;
5282 proto_item *it;
5283 proto_tree *dschid_tree;
5284
5285 it = proto_tree_add_item (tree, hf_docsis_mdd_upstream_active_channel_list_dschids_maps_ucds, tvb, start, len, ENC_NA);
5286 dschid_tree = proto_item_add_subtree (it, ett_docsis_mdd_upstream_active_channel_list_dschids_maps_ucds_dschids);
5287
5288 for(i = 0; i< len; ++i)
5289 {
5290 proto_tree_add_item (dschid_tree, hf_docsis_mdd_upstream_active_channel_list_dschids_maps_ucds_dschid, tvb, start + i, 1, ENC_BIG_ENDIAN);
5291 }
5292 }
5293
5294 static void
dissect_mdd_upstream_active_channel_list(tvbuff_t * tvb,packet_info * pinfo _U_,proto_tree * tree,int start,guint16 len)5295 dissect_mdd_upstream_active_channel_list(tvbuff_t * tvb, packet_info* pinfo _U_, proto_tree * tree, int start, guint16 len)
5296 {
5297 guint8 type;
5298 guint32 length;
5299 proto_tree *mdd_tree;
5300 proto_item *mdd_item;
5301 int pos;
5302 static int * const cm_status_event[] = {
5303 &hf_docsis_mdd_cm_status_event_enable_bitmask_t4_timeout,
5304 &hf_docsis_mdd_cm_status_event_enable_bitmask_t3_retries_exceeded,
5305 &hf_docsis_mdd_cm_status_event_enable_bitmask_successful_ranging_after_t3_retries_exceeded,
5306 NULL
5307 };
5308
5309 pos = start;
5310 while ( pos < ( start + len) )
5311 {
5312 type = tvb_get_guint8 (tvb, pos);
5313 mdd_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
5314 ett_docsis_mdd_up_active_channel_list, &mdd_item,
5315 val_to_str(type, mdd_up_active_channel_list_vals,
5316 "Unknown TLV (%u)"));
5317 proto_tree_add_uint (mdd_tree, hf_docsis_mdd_up_active_channel_list_subtype, tvb, pos, 1, type);
5318 pos++;
5319 proto_tree_add_item_ret_uint (mdd_tree, hf_docsis_mdd_up_active_channel_list_length, tvb, pos, 1, ENC_NA, &length);
5320 pos++;
5321 proto_item_set_len(mdd_item, length + 2);
5322
5323 switch(type)
5324 {
5325 case UPSTREAM_ACTIVE_CHANNEL_LIST_UPSTREAM_CHANNEL_ID:
5326 proto_tree_add_item (mdd_tree, hf_docsis_mdd_upstream_active_channel_list_upstream_channel_id, tvb, pos, 1, ENC_BIG_ENDIAN);
5327 break;
5328 case UPSTREAM_ACTIVE_CHANNEL_LIST_CM_STATUS_EVENT_ENABLE_BITMASK:
5329 proto_tree_add_bitmask(mdd_tree, tvb, pos, hf_docsis_mdd_cm_status_event_enable_bitmask, ett_sub_tlv, cm_status_event, ENC_BIG_ENDIAN);
5330 break;
5331 case UPSTREAM_ACTIVE_CHANNEL_LIST_UPSTREAM_CHANNEL_PRIORITY:
5332 proto_tree_add_item (mdd_tree, hf_docsis_mdd_upstream_active_channel_list_upstream_channel_priority, tvb, pos, 1, ENC_BIG_ENDIAN);
5333 break;
5334 case UPSTREAM_ACTIVE_CHANNEL_LIST_DSCHIDS_MAPS_UCDS:
5335 dissect_mdd_upstream_active_channel_list_dschids_maps_ucds(tvb, mdd_tree, pos, length);
5336 break;
5337 case UPSTREAM_ACTIVE_CHANNEL_LIST_FDX_UPSTREAM_CHANNEL:
5338 proto_tree_add_item (mdd_tree, hf_docsis_mdd_upstream_active_channel_list_fdx_upstream_channel, tvb, pos, 1, ENC_BIG_ENDIAN);
5339 break;
5340 case UPSTREAM_ACTIVE_CHANNEL_LIST_FDX_SUBBAND_ID:
5341 proto_tree_add_item (mdd_tree, hf_docsis_mdd_upstream_active_channel_list_fdx_subband_id, tvb, pos, 1, ENC_BIG_ENDIAN);
5342 break;
5343 }
5344
5345 pos += length;
5346 }
5347 }
5348
5349 static void
dissect_mdd_cm_status_event_control(tvbuff_t * tvb,packet_info * pinfo _U_,proto_tree * tree,int start,guint16 len)5350 dissect_mdd_cm_status_event_control(tvbuff_t * tvb, packet_info* pinfo _U_, proto_tree * tree, int start, guint16 len)
5351 {
5352 guint8 type;
5353 guint32 length, timer;
5354 proto_tree *mdd_tree;
5355 proto_item *mdd_item, *text_item;
5356 int pos;
5357
5358 pos = start;
5359 while ( pos < ( start + len) )
5360 {
5361 type = tvb_get_guint8 (tvb, pos);
5362 mdd_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
5363 ett_docsis_mdd_cm_status_event_control, &mdd_item,
5364 val_to_str(type, mdd_cm_status_event_control_vals,
5365 "Unknown TLV (%u)"));
5366 proto_tree_add_uint (mdd_tree, hf_docsis_mdd_cm_status_event_control_subtype, tvb, pos, 1, type);
5367 pos++;
5368 proto_tree_add_item_ret_uint (mdd_tree, hf_docsis_mdd_cm_status_event_control_length, tvb, pos, 1, ENC_NA, &length);
5369 pos++;
5370 proto_item_set_len(mdd_item, length + 2);
5371
5372 switch(type)
5373 {
5374 case EVENT_TYPE_CODE:
5375 proto_tree_add_item (mdd_tree, hf_docsis_mdd_event_type, tvb, pos, 1, ENC_BIG_ENDIAN);
5376 break;
5377 case MAXIMUM_EVENT_HOLDOFF_TIMER:
5378 text_item = proto_tree_add_item_ret_uint (mdd_tree, hf_docsis_mdd_maximum_event_holdoff_timer, tvb, pos, 2, ENC_BIG_ENDIAN, &timer);
5379 proto_item_append_text(text_item, " (%d ms)", timer * 20);
5380 break;
5381 case MAXIMUM_NUMBER_OF_REPORTS_PER_EVENT:
5382 proto_tree_add_item (mdd_tree, hf_docsis_mdd_maximum_number_of_reports_per_event, tvb, pos, 1, ENC_BIG_ENDIAN);
5383 break;
5384 }
5385
5386 pos += length;
5387 }
5388 }
5389
5390 static void
dissect_mdd_dsg_da_to_dsid(tvbuff_t * tvb,packet_info * pinfo _U_,proto_tree * tree,int start,guint16 len)5391 dissect_mdd_dsg_da_to_dsid(tvbuff_t * tvb, packet_info* pinfo _U_, proto_tree * tree, int start, guint16 len)
5392 {
5393 guint8 type;
5394 guint32 length;
5395 proto_tree *mdd_tree;
5396 proto_item *mdd_item;
5397 int pos;
5398
5399 pos = start;
5400 while ( pos < ( start + len) )
5401 {
5402 type = tvb_get_guint8 (tvb, pos);
5403 mdd_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
5404 ett_docsis_mdd_dsg_da_to_dsid, &mdd_item,
5405 val_to_str(type, mdd_cm_dsg_da_to_dsid_vals,
5406 "Unknown TLV (%u)"));
5407 proto_tree_add_uint (mdd_tree, hf_docsis_mdd_dsg_da_to_dsid_subtype, tvb, pos, 1, type);
5408 pos++;
5409 proto_tree_add_item_ret_uint (mdd_tree, hf_docsis_mdd_dsg_da_to_dsid_length, tvb, pos, 1, ENC_NA, &length);
5410 pos++;
5411 proto_item_set_len(mdd_item, length + 2);
5412
5413 switch(type)
5414 {
5415 case DSG_DA_TO_DSID_ASSOCIATION_DA:
5416 proto_tree_add_item (mdd_tree, hf_docsis_mdd_dsg_da_to_dsid_association_da, tvb, pos, 6, ENC_NA);
5417 break;
5418 case DSG_DA_TO_DSID_ASSOCIATION_DSID:
5419 proto_tree_add_item (mdd_tree, hf_docsis_mdd_dsg_da_to_dsid_association_dsid, tvb, pos, 3, ENC_BIG_ENDIAN);
5420 break;
5421 }
5422
5423 pos += length;
5424 }
5425 }
5426
5427 static void
dissect_mdd_diplexer_band_edge(tvbuff_t * tvb,packet_info * pinfo _U_,proto_tree * tree,int start,guint16 len)5428 dissect_mdd_diplexer_band_edge(tvbuff_t * tvb, packet_info* pinfo _U_, proto_tree * tree, int start, guint16 len)
5429 {
5430 guint8 type;
5431 guint32 length;
5432 proto_tree *mdd_tree;
5433 proto_item *mdd_item;
5434 int pos;
5435
5436 pos = start;
5437 while ( pos < ( start + len) )
5438 {
5439 type = tvb_get_guint8 (tvb, pos);
5440 mdd_tree = proto_tree_add_subtree(tree, tvb, pos, 1,
5441 ett_docsis_mdd_diplexer_band_edge, &mdd_item,
5442 val_to_str(type, mdd_diplexer_band_edge_vals,
5443 "Unknown TLV (%u)"));
5444 proto_tree_add_uint (mdd_tree, hf_docsis_mdd_diplexer_band_edge, tvb, pos, 1, type);
5445 pos++;
5446 proto_tree_add_item_ret_uint (mdd_tree, hf_docsis_mdd_diplexer_band_edge_length, tvb, pos, 1, ENC_BIG_ENDIAN, &length);
5447 pos++;
5448 proto_item_set_len(mdd_item, length + 2);
5449
5450 if (length == 1)
5451 {
5452 switch(type)
5453 {
5454 case DIPLEXER_US_UPPER_BAND_EDGE:
5455 proto_tree_add_item (mdd_tree, hf_docsis_mdd_diplexer_us_upper_band_edge, tvb, pos, length, ENC_BIG_ENDIAN);
5456 break;
5457 case DIPLEXER_DS_LOWER_BAND_EDGE:
5458 proto_tree_add_item (mdd_tree, hf_docsis_mdd_diplexer_ds_lower_band_edge, tvb, pos, length, ENC_BIG_ENDIAN);
5459 break;
5460 case DIPLEXER_DS_UPPER_BAND_EDGE:
5461 proto_tree_add_item (mdd_tree, hf_docsis_mdd_diplexer_ds_upper_band_edge, tvb, pos, length, ENC_BIG_ENDIAN);
5462 break;
5463 default:
5464 expert_add_info_format(pinfo, mdd_item, &ei_docsis_mgmt_tlvtype_unknown, "Unknown Diplexer Band Edge TLV type: %u", type);
5465 break;
5466 }
5467 } else
5468 {
5469 expert_add_info_format(pinfo, mdd_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
5470 break;
5471 }
5472 pos += length;
5473 }
5474 }
5475
5476 static void
dissect_mdd_full_duplex_descriptor(tvbuff_t * tvb,packet_info * pinfo _U_,proto_tree * tree,int start,guint16 len)5477 dissect_mdd_full_duplex_descriptor(tvbuff_t * tvb, packet_info* pinfo _U_, proto_tree * tree, int start, guint16 len)
5478 {
5479 guint8 type;
5480 guint8 subtype;
5481 guint32 length;
5482 guint32 sublength;
5483 proto_tree *mdd_tree;
5484 proto_tree *fdx_sub_band_tree;
5485 proto_item *mdd_item;
5486 proto_item *fdx_sub_band_item;
5487 proto_item *fdx_sub_band_offset_item;
5488 int pos;
5489 guint subpos;
5490 guint32 sub_band_offset;
5491
5492 pos = start;
5493 while ( pos < ( start + len) )
5494 {
5495 type = tvb_get_guint8 (tvb, pos);
5496 mdd_tree = proto_tree_add_subtree(tree, tvb, pos, 1,
5497 ett_docsis_mdd_full_duplex_descriptor, &mdd_item,
5498 val_to_str(type, mdd_full_duplex_descriptor_vals,
5499 "Unknown TLV (%u)"));
5500 proto_tree_add_uint (mdd_tree, hf_docsis_mdd_full_duplex_descriptor, tvb, pos, 1, type);
5501 pos++;
5502 proto_tree_add_item_ret_uint (mdd_tree, hf_docsis_mdd_full_duplex_descriptor_length, tvb, pos, 1, ENC_BIG_ENDIAN, &length);
5503 pos++;
5504 proto_item_set_len(mdd_item, length + 2);
5505
5506 switch(type)
5507 {
5508 case FDX_ALLOCATED_SPECTRUM:
5509 if (length == 1)
5510 {
5511 proto_tree_add_item (mdd_tree, hf_docsis_mdd_full_duplex_allocated_spectrum, tvb, pos, length, ENC_BIG_ENDIAN);
5512 } else
5513 {
5514 expert_add_info_format(pinfo, mdd_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
5515 }
5516 break;
5517 case FDX_TOTAL_NUMBER_OF_SUB_BANDS:
5518 if (length == 1)
5519 {
5520 proto_tree_add_item (mdd_tree, hf_docsis_mdd_full_duplex_total_number_of_sub_bands, tvb, pos, length, ENC_BIG_ENDIAN);
5521 } else
5522 {
5523 expert_add_info_format(pinfo, mdd_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
5524 }
5525 break;
5526 case FDX_SUB_BAND_WIDTH:
5527 if (length == 1)
5528 {
5529 proto_tree_add_item (mdd_tree, hf_docsis_mdd_full_duplex_sub_band_width, tvb, pos, length, ENC_BIG_ENDIAN);
5530 } else
5531 {
5532 expert_add_info_format(pinfo, mdd_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
5533 }
5534 break;
5535 case FDX_SUB_BAND_DESCRIPTOR:
5536 subpos = pos;
5537 while (subpos < pos + length) {
5538 subtype = tvb_get_guint8 (tvb, subpos);
5539 fdx_sub_band_tree = proto_tree_add_subtree(mdd_tree, tvb, subpos, -1,
5540 ett_docsis_mdd_full_duplex_sub_band_descriptor, &fdx_sub_band_item,
5541 val_to_str(subtype, mdd_full_duplex_sub_band_vals,
5542 "Unknown TLV (%u)"));
5543 proto_tree_add_item (fdx_sub_band_tree, hf_docsis_mdd_full_duplex_sub_band_descriptor, tvb, subpos, 1, ENC_BIG_ENDIAN);
5544 proto_tree_add_item_ret_uint (fdx_sub_band_tree, hf_docsis_mdd_full_duplex_sub_band_descriptor_length, tvb, subpos + 1, 1, ENC_BIG_ENDIAN, &sublength);
5545 proto_item_set_len(fdx_sub_band_item, sublength + 2);
5546 switch(subtype) {
5547 case FDX_SUB_BAND_ID:
5548 if (sublength == 1)
5549 {
5550 proto_tree_add_item (fdx_sub_band_tree, hf_docsis_mdd_full_duplex_sub_band_id, tvb, subpos + 2, sublength, ENC_BIG_ENDIAN);
5551 } else
5552 {
5553 expert_add_info_format(pinfo, fdx_sub_band_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", sublength);
5554 }
5555 break;
5556 case FDX_SUB_BAND_OFFSET:
5557 if (sublength == 2)
5558 {
5559 fdx_sub_band_offset_item = proto_tree_add_item_ret_uint (fdx_sub_band_tree, hf_docsis_mdd_full_duplex_sub_band_offset,
5560 tvb, subpos + 2, sublength, ENC_BIG_ENDIAN, &sub_band_offset);
5561 proto_item_append_text(fdx_sub_band_offset_item, "%s", (sub_band_offset) ? " MHz" : " (108 MHz)");
5562 } else
5563 {
5564 expert_add_info_format(pinfo, fdx_sub_band_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", sublength);
5565 }
5566 break;
5567 default:
5568 expert_add_info_format(pinfo, mdd_item, &ei_docsis_mgmt_tlvtype_unknown, "Unknown Full Duplex Sub-band TLV type: %u", subtype);
5569 break;
5570 }
5571 subpos += sublength + 2;
5572 }
5573 break;
5574 default:
5575 expert_add_info_format(pinfo, mdd_item, &ei_docsis_mgmt_tlvtype_unknown, "Unknown Full Duplex Descriptor TLV type: %u", type);
5576 break;
5577 }
5578 pos += length;
5579 }
5580 }
5581
5582 static int
dissect_mdd(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)5583 dissect_mdd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
5584 {
5585 proto_item *it;
5586 proto_tree *mdd_tree;
5587
5588 int pos;
5589 guint subpos = 0;
5590 guint8 type;
5591 guint32 i, length;
5592 guint8 subtype;
5593 guint32 sublength;
5594
5595 proto_tree *tlv_tree;
5596 proto_item *tlv_item;
5597 static int * const non_channel_events[] = {
5598 &hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_sequence_out_of_range,
5599 &hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_operating_on_battery_backup,
5600 &hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_returned_to_ac_power,
5601 NULL
5602 };
5603
5604 col_set_str(pinfo->cinfo, COL_INFO, "MDD Message:");
5605
5606 it = proto_tree_add_item (tree, proto_docsis_mdd, tvb, 0, -1,ENC_NA);
5607 mdd_tree = proto_item_add_subtree (it, ett_docsis_mdd);
5608
5609 proto_tree_add_item (mdd_tree, hf_docsis_mdd_ccc, tvb, 0, 1, ENC_BIG_ENDIAN);
5610 proto_tree_add_item (mdd_tree, hf_docsis_mdd_number_of_fragments, tvb, 1, 1, ENC_BIG_ENDIAN);
5611 proto_tree_add_item (mdd_tree, hf_docsis_mdd_fragment_sequence_number, tvb, 2, 1, ENC_BIG_ENDIAN);
5612 proto_tree_add_item (mdd_tree, hf_docsis_mdd_current_channel_dcid, tvb, 3, 1, ENC_BIG_ENDIAN);
5613
5614 /* TLVs... */
5615 pos = 4;
5616 while (tvb_reported_length_remaining(tvb, pos) > 0)
5617 {
5618 type = tvb_get_guint8 (tvb, pos);
5619 tlv_tree = proto_tree_add_subtree(mdd_tree, tvb, pos, -1,
5620 ett_tlv, &tlv_item,
5621 val_to_str(type, mdd_tlv_vals,
5622 "Unknown TLV (%u)"));
5623 proto_tree_add_uint (tlv_tree, hf_docsis_mdd_type, tvb, pos, 1, type);
5624 pos++;
5625 proto_tree_add_item_ret_uint (tlv_tree, hf_docsis_mdd_length, tvb, pos, 1, ENC_NA, &length);
5626 pos++;
5627 proto_item_set_len(tlv_item, length + 2);
5628
5629 switch(type)
5630 {
5631 case DOWNSTREAM_ACTIVE_CHANNEL_LIST:
5632 dissect_mdd_ds_active_channel_list(tvb, pinfo, tlv_tree, pos, length );
5633 break;
5634 case MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP:
5635 dissect_mdd_ds_service_group(tvb, pinfo, tlv_tree, pos, length );
5636 break;
5637 case DOWNSTREAM_AMBIGUITY_RESOLUTION_FREQUENCY_LIST:
5638 for (i = 0; i < length; i+=4) {
5639 proto_tree_add_item (tlv_tree, hf_docsis_mdd_downstream_ambiguity_resolution_frequency, tvb, pos + i, 4, ENC_BIG_ENDIAN);
5640 }
5641 break;
5642 case RECEIVE_CHANNEL_PROFILE_REPORTING_CONTROL:
5643 dissect_mdd_channel_profile_reporting_control(tvb, pinfo, tlv_tree, pos, length );
5644 break;
5645 case IP_INITIALIZATION_PARAMETERS:
5646 dissect_mdd_ip_init_param(tvb, pinfo, tlv_tree, pos, length );
5647 break;
5648 case EARLY_AUTHENTICATION_AND_ENCRYPTION:
5649 proto_tree_add_item (tlv_tree, hf_docsis_mdd_early_authentication_and_encryption, tvb, pos, 1, ENC_BIG_ENDIAN);
5650 break;
5651 case UPSTREAM_ACTIVE_CHANNEL_LIST:
5652 dissect_mdd_upstream_active_channel_list(tvb, pinfo, tlv_tree, pos, length );
5653 break;
5654 case UPSTREAM_AMBIGUITY_RESOLUTION_CHANNEL_LIST:
5655 for (i = 0; i < length; i++) {
5656 proto_tree_add_item (tlv_tree, hf_docsis_mdd_upstream_ambiguity_resolution_channel_list_channel_id, tvb, pos + i , 1, ENC_BIG_ENDIAN);
5657 }
5658 break;
5659 case UPSTREAM_FREQUENCY_RANGE:
5660 proto_tree_add_item (tlv_tree, hf_docsis_mdd_upstream_frequency_range, tvb, pos, 1, ENC_BIG_ENDIAN);
5661 break;
5662 case SYMBOL_CLOCK_LOCKING_INDICATOR:
5663 proto_tree_add_item (tlv_tree, hf_docsis_mdd_symbol_clock_locking_indicator, tvb, pos, 1, ENC_BIG_ENDIAN);
5664 break;
5665 case CM_STATUS_EVENT_CONTROL:
5666 dissect_mdd_cm_status_event_control(tvb, pinfo, tlv_tree, pos, length );
5667 break;
5668 case UPSTREAM_TRANSMIT_POWER_REPORTING:
5669 proto_tree_add_item (tlv_tree, hf_docsis_mdd_upstream_transmit_power_reporting, tvb, pos, 1, ENC_BIG_ENDIAN);
5670 break;
5671 case DSG_DA_TO_DSID_ASSOCIATION_ENTRY:
5672 dissect_mdd_dsg_da_to_dsid(tvb, pinfo, tlv_tree, pos, length );
5673 break;
5674 case CM_STATUS_EVENT_ENABLE_NON_CHANNEL_SPECIFIC_EVENTS:
5675 proto_tree_add_bitmask(tlv_tree, tvb, pos, hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events, ett_sub_tlv, non_channel_events, ENC_BIG_ENDIAN);
5676 break;
5677 case EXTENDED_UPSTREAM_TRANSMIT_POWER_SUPPORT:
5678 proto_tree_add_item (tlv_tree, hf_docsis_mdd_extended_upstream_transmit_power_support, tvb, pos, 1, ENC_BIG_ENDIAN);
5679 break;
5680 case CMTS_DOCSIS_VERSION:
5681 subpos = pos;
5682 while (subpos < pos + length + 2) {
5683 subtype = tvb_get_guint8 (tvb, subpos);
5684 sublength = tvb_get_guint8 (tvb, subpos + 1);
5685 switch(subtype) {
5686 case CMTS_MAJOR_DOCSIS_VERSION:
5687 proto_tree_add_item (tlv_tree, hf_docsis_mdd_cmts_major_docsis_version, tvb, subpos + 2, sublength, ENC_NA);
5688 break;
5689 case CMTS_MINOR_DOCSIS_VERSION:
5690 proto_tree_add_item (tlv_tree, hf_docsis_mdd_cmts_minor_docsis_version, tvb, subpos + 2, sublength, ENC_BIG_ENDIAN);
5691 break;
5692 }
5693 subpos += sublength + 2;
5694 }
5695 break;
5696 case CM_PERIODIC_MAINTENANCE_TIMEOUT_INDICATOR:
5697 proto_tree_add_item (tlv_tree, hf_docsis_mdd_cm_periodic_maintenance_timeout_indicator, tvb, pos, length, ENC_BIG_ENDIAN);
5698 break;
5699 case DLS_BROADCAST_AND_MULTICAST_DELIVERY_METHOD:
5700 proto_tree_add_item (tlv_tree, hf_docsis_mdd_dls_broadcast_and_multicast_delivery_method, tvb, pos, length, ENC_BIG_ENDIAN);
5701 break;
5702 case CM_STATUS_EVENT_ENABLE_FOR_DOCSIS_3_1_EVENTS:
5703 if (length == 4) {
5704 static int * const mdd_cm_status_event_d31[] = {
5705 &hf_docsis_mdd_cm_status_event_d31_ofdm_prof_fail,
5706 &hf_docsis_mdd_cm_status_event_d31_prim_down_chan_change,
5707 &hf_docsis_mdd_cm_status_event_d31_dpd_mismatch,
5708 &hf_docsis_mdd_cm_status_event_d31_deprecated,
5709 &hf_docsis_mdd_cm_status_event_d31_ncp_prof_fail,
5710 &hf_docsis_mdd_cm_status_event_d31_loss_fec_plc,
5711 &hf_docsis_mdd_cm_status_event_d31_ncp_prof_recover,
5712 &hf_docsis_mdd_cm_status_event_d31_fec_recover_on_plc,
5713 &hf_docsis_mdd_cm_status_event_d31_fec_recover_on_ofdm_prof,
5714 &hf_docsis_mdd_cm_status_event_d31_ofdma_prof_fail,
5715 &hf_docsis_mdd_cm_status_event_d31_map_stor_overflow_ind,
5716 &hf_docsis_mdd_cm_status_event_d31_ofdm_map_stor_almost_full_ind,
5717 &hf_docsis_mdd_cm_status_event_d31_reserved,
5718 NULL
5719 };
5720 proto_tree_add_bitmask_list(tlv_tree, tvb, pos, length, mdd_cm_status_event_d31, ENC_BIG_ENDIAN);
5721 }
5722 else
5723 {
5724 expert_add_info_format(pinfo, tlv_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
5725 }
5726 break;
5727 case DIPLEXER_BAND_EDGE:
5728 dissect_mdd_diplexer_band_edge(tvb, pinfo, tlv_tree, pos, length );
5729 break;
5730 case FULL_DUPLEX_DESCRIPTOR:
5731 dissect_mdd_full_duplex_descriptor(tvb, pinfo, tlv_tree, pos, length );
5732 break;
5733 }
5734
5735 pos += length;
5736 }
5737
5738 return tvb_captured_length(tvb);
5739 }
5740
5741 static int
dissect_bintrngreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)5742 dissect_bintrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
5743 {
5744 proto_item *bintrngreq_item;
5745 proto_tree *bintrngreq_tree;
5746 guint8 md_ds_sg_id;
5747 guint16 offset = 0;
5748
5749 md_ds_sg_id = tvb_get_guint8 (tvb, 1);
5750
5751 col_add_fstr (pinfo->cinfo, COL_INFO, "Bonded Initial Ranging Request: MD-DS-SG-ID = %u (0x%X)",
5752 md_ds_sg_id, md_ds_sg_id );
5753
5754 bintrngreq_item = proto_tree_add_item(tree, proto_docsis_bintrngreq, tvb, offset, -1, ENC_NA);
5755 bintrngreq_tree = proto_item_add_subtree (bintrngreq_item, ett_docsis_bintrngreq);
5756 proto_tree_add_item (bintrngreq_tree, hf_docsis_bintrngreq_capflags, tvb, offset, 1, ENC_BIG_ENDIAN);
5757 proto_tree_add_item( bintrngreq_tree, hf_docsis_bintrngreq_capflags_frag, tvb, offset, 1, ENC_BIG_ENDIAN );
5758 proto_tree_add_item( bintrngreq_tree, hf_docsis_bintrngreq_capflags_encrypt, tvb, offset, 1, ENC_BIG_ENDIAN );
5759 offset++;
5760 proto_tree_add_item (bintrngreq_tree, hf_docsis_bintrngreq_mddsgid, tvb, offset, 1, ENC_BIG_ENDIAN);
5761 offset++;
5762 proto_tree_add_item (bintrngreq_tree, hf_docsis_mgt_down_chid, tvb, offset, 1, ENC_BIG_ENDIAN);
5763 offset++;
5764 proto_tree_add_item (bintrngreq_tree, hf_docsis_mgt_upstream_chid, tvb, offset, 1, ENC_BIG_ENDIAN);
5765
5766 return tvb_captured_length(tvb);
5767 }
5768
5769 static int
dissect_type35ucd(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)5770 dissect_type35ucd(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
5771 {
5772 return dissect_any_ucd(tvb, pinfo, tree, proto_docsis_type35ucd, MGT_TYPE35UCD);
5773 }
5774
5775 static int
dissect_dbcreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)5776 dissect_dbcreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
5777 {
5778 proto_item *dbcreq_item, *reassembled_item;
5779 proto_tree *dbcreq_tree, *reassembled_tree;
5780 guint32 transid, number_of_fragments, fragment_sequence_number;
5781 tvbuff_t *next_tvb;
5782
5783 dbcreq_item = proto_tree_add_item(tree, proto_docsis_dbcreq, tvb, 0, -1, ENC_NA);
5784 dbcreq_tree = proto_item_add_subtree (dbcreq_item, ett_docsis_dbcreq);
5785 proto_tree_add_item_ret_uint(dbcreq_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
5786 proto_tree_add_item_ret_uint( dbcreq_tree, hf_docsis_dbcreq_number_of_fragments, tvb, 2, 1, ENC_BIG_ENDIAN, &number_of_fragments);
5787 proto_tree_add_item_ret_uint( dbcreq_tree, hf_docsis_dbcreq_fragment_sequence_number, tvb, 3, 1, ENC_BIG_ENDIAN, &fragment_sequence_number);
5788
5789 col_add_fstr (pinfo->cinfo, COL_INFO,
5790 "Dynamic Bonding Change Request: Transaction ID = %u", transid);
5791 col_set_fence(pinfo->cinfo, COL_INFO);
5792
5793 if(number_of_fragments > 1) {
5794 pinfo->fragmented = TRUE;
5795
5796 fragment_head* reassembled_tlv = NULL;
5797 reassembled_tlv = fragment_add_seq_check(&docsis_tlv_reassembly_table,
5798 tvb, 4, pinfo,
5799 transid, NULL, /* ID for fragments belonging together */
5800 fragment_sequence_number -1, /* Sequence number starts at 0 */
5801 tvb_reported_length_remaining(tvb, 4), /* fragment length - to the end */
5802 (fragment_sequence_number != number_of_fragments)); /* More fragments? */
5803
5804 if (reassembled_tlv) {
5805 tvbuff_t *tlv_tvb = NULL;
5806
5807 reassembled_item = proto_tree_add_item(dbcreq_tree, hf_docsis_tlv_reassembled, tvb, 0, -1, ENC_NA);
5808 reassembled_tree = proto_item_add_subtree (reassembled_item, ett_docsis_tlv_reassembled );
5809
5810
5811 tlv_tvb = process_reassembled_data(tvb, 4, pinfo, "Reassembled TLV", reassembled_tlv, &docsis_tlv_frag_items,
5812 NULL, reassembled_tree);
5813
5814 if (tlv_tvb && tvb_reported_length(tlv_tvb) > 0) {
5815 call_dissector (docsis_tlv_handle, tlv_tvb, pinfo, reassembled_tree);
5816 }
5817 }
5818
5819 } else {
5820 /* Call Dissector for Appendix C TLVs */
5821 next_tvb = tvb_new_subset_remaining (tvb, 4);
5822 call_dissector (docsis_tlv_handle, next_tvb, pinfo, dbcreq_tree);
5823 }
5824
5825 return tvb_captured_length(tvb);
5826 }
5827
5828 static int
dissect_dbcrsp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)5829 dissect_dbcrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
5830 {
5831 proto_item *dbcrsp_item;
5832 proto_tree *dbcrsp_tree;
5833 guint32 transid, confcode;
5834 tvbuff_t *next_tvb;
5835
5836 dbcrsp_item = proto_tree_add_item(tree, proto_docsis_dbcrsp, tvb, 0, -1, ENC_NA);
5837 dbcrsp_tree = proto_item_add_subtree (dbcrsp_item, ett_docsis_dbcrsp);
5838 proto_tree_add_item_ret_uint(dbcrsp_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
5839 proto_tree_add_item_ret_uint( dbcrsp_tree, hf_docsis_dbcrsp_conf_code, tvb, 2, 1, ENC_BIG_ENDIAN, &confcode);
5840
5841 col_add_fstr (pinfo->cinfo, COL_INFO,
5842 "Dynamic Bonding Change Response: Transaction ID = %u (%s)", transid,
5843 val_to_str_ext (confcode, &docsis_conf_code_ext, "%d"));
5844
5845 /* Call Dissector for Appendix C TLVs */
5846 next_tvb = tvb_new_subset_remaining (tvb, 3);
5847 call_dissector (docsis_tlv_handle, next_tvb, pinfo, dbcrsp_tree);
5848 return tvb_captured_length(tvb);
5849 }
5850
5851 static int
dissect_dbcack(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)5852 dissect_dbcack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
5853 {
5854 proto_item *dbcack_item;
5855 proto_tree *dbcack_tree = NULL;
5856 guint16 transid;
5857 tvbuff_t *next_tvb;
5858
5859 transid = tvb_get_ntohs (tvb, 0);
5860
5861 col_add_fstr (pinfo->cinfo, COL_INFO,
5862 "Dynamic Bonding Change Acknowledge: Transaction ID = %u", transid);
5863
5864 dbcack_item = proto_tree_add_item(tree, proto_docsis_dbcack, tvb, 0, -1, ENC_NA);
5865 dbcack_tree = proto_item_add_subtree (dbcack_item, ett_docsis_dbcack);
5866 proto_tree_add_item (dbcack_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN);
5867
5868 /* Call Dissector for Appendix C TLVs */
5869 next_tvb = tvb_new_subset_remaining (tvb, 2);
5870 call_dissector (docsis_tlv_handle, next_tvb, pinfo, dbcack_tree);
5871 return tvb_captured_length(tvb);
5872 }
5873
5874 static int
dissect_dpvreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)5875 dissect_dpvreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
5876 {
5877 proto_item *it;
5878 proto_tree *dpvreq_tree;
5879 guint32 transid, dschan;
5880
5881 it = proto_tree_add_item(tree, proto_docsis_dpvreq, tvb, 0, -1, ENC_NA);
5882 dpvreq_tree = proto_item_add_subtree (it, ett_docsis_dpvreq);
5883 proto_tree_add_item_ret_uint (dpvreq_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
5884 proto_tree_add_item_ret_uint (dpvreq_tree, hf_docsis_mgt_down_chid, tvb, 2, 1, ENC_BIG_ENDIAN, &dschan);
5885
5886 col_add_fstr (pinfo->cinfo, COL_INFO,
5887 "DOCSIS Path Verify Request: Transaction ID = %u DS-Ch %d",
5888 transid, dschan);
5889
5890 proto_tree_add_item (dpvreq_tree, hf_docsis_dpv_flags, tvb, 3, 1, ENC_BIG_ENDIAN);
5891 proto_tree_add_item (dpvreq_tree, hf_docsis_dpv_us_sf, tvb, 4, 4, ENC_BIG_ENDIAN);
5892 proto_tree_add_item (dpvreq_tree, hf_docsis_dpv_n, tvb, 8, 2, ENC_BIG_ENDIAN);
5893 proto_tree_add_item (dpvreq_tree, hf_docsis_dpv_start, tvb, 10, 1, ENC_BIG_ENDIAN);
5894 proto_tree_add_item (dpvreq_tree, hf_docsis_dpv_end, tvb, 11, 1, ENC_BIG_ENDIAN);
5895 proto_tree_add_item (dpvreq_tree, hf_docsis_dpv_ts_start, tvb, 12, 4, ENC_BIG_ENDIAN);
5896 proto_tree_add_item (dpvreq_tree, hf_docsis_dpv_ts_end, tvb, 16, 4, ENC_BIG_ENDIAN);
5897
5898 return tvb_captured_length(tvb);
5899 }
5900
5901 static int
dissect_dpvrsp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)5902 dissect_dpvrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
5903 {
5904 proto_item *it;
5905 proto_tree *dpvrsp_tree = NULL;
5906 guint32 transid, dschan;
5907
5908 it = proto_tree_add_item (tree, proto_docsis_dpvrsp, tvb, 0, -1, ENC_NA);
5909 dpvrsp_tree = proto_item_add_subtree (it, ett_docsis_dpvrsp);
5910 proto_tree_add_item_ret_uint (dpvrsp_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
5911 proto_tree_add_item_ret_uint (dpvrsp_tree, hf_docsis_mgt_down_chid, tvb, 2, 1, ENC_BIG_ENDIAN, &dschan);
5912
5913 col_add_fstr (pinfo->cinfo, COL_INFO,
5914 "DOCSIS Path Verify Response: Transaction ID = %u DS-Ch %d",
5915 transid, dschan);
5916
5917 proto_tree_add_item (dpvrsp_tree, hf_docsis_dpv_flags, tvb, 3, 1, ENC_BIG_ENDIAN);
5918 proto_tree_add_item (dpvrsp_tree, hf_docsis_dpv_us_sf, tvb, 4, 4, ENC_BIG_ENDIAN);
5919 proto_tree_add_item (dpvrsp_tree, hf_docsis_dpv_n, tvb, 8, 2, ENC_BIG_ENDIAN);
5920 proto_tree_add_item (dpvrsp_tree, hf_docsis_dpv_start, tvb, 10, 1, ENC_BIG_ENDIAN);
5921 proto_tree_add_item (dpvrsp_tree, hf_docsis_dpv_end, tvb, 11, 1, ENC_BIG_ENDIAN);
5922 proto_tree_add_item (dpvrsp_tree, hf_docsis_dpv_ts_start, tvb, 12, 4, ENC_BIG_ENDIAN);
5923 proto_tree_add_item (dpvrsp_tree, hf_docsis_dpv_ts_end, tvb, 16, 4, ENC_BIG_ENDIAN);
5924
5925 return tvb_captured_length(tvb);
5926 }
5927
5928 static void
dissect_cmstatus_status_event_tlv(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree)5929 dissect_cmstatus_status_event_tlv (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
5930 {
5931 proto_item *it, *tlv_item, *tlv_len_item;
5932 proto_tree *tlv_tree, *tlvtlv_tree;
5933 guint16 pos = 0;
5934 guint8 type;
5935 guint32 length;
5936
5937 it = proto_tree_add_item(tree, hf_docsis_cmstatus_status_event_tlv_data, tvb, 0, tvb_reported_length(tvb), ENC_NA);
5938 tlv_tree = proto_item_add_subtree (it, ett_docsis_cmstatus_status_event_tlv);
5939
5940 while (tvb_reported_length_remaining(tvb, pos) > 0)
5941 {
5942 type = tvb_get_guint8 (tvb, pos);
5943 tlvtlv_tree = proto_tree_add_subtree(tlv_tree, tvb, pos, -1,
5944 ett_docsis_cmstatus_status_event_tlvtlv, &tlv_item,
5945 val_to_str(type, cmstatus_status_event_tlv_vals,
5946 "Unknown Status Event TLV (%u)"));
5947 proto_tree_add_uint (tlvtlv_tree, hf_docsis_cmstatus_status_event_type, tvb, pos, 1, type);
5948 pos++;
5949 tlv_len_item = proto_tree_add_item_ret_uint (tlvtlv_tree, hf_docsis_cmstatus_status_event_length, tvb, pos, 1, ENC_NA, &length);
5950 pos++;
5951 proto_item_set_len(tlv_item, length + 2);
5952
5953 switch (type)
5954 {
5955 case EVENT_DS_CH_ID:
5956 if (length == 1)
5957 {
5958 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmstatus_status_event_ds_ch_id, tvb, pos, 1, ENC_BIG_ENDIAN);
5959 }
5960 else
5961 {
5962 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
5963 }
5964 break;
5965
5966 case EVENT_US_CH_ID:
5967 if (length == 1)
5968 {
5969 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmstatus_status_event_us_ch_id, tvb, pos, 1, ENC_BIG_ENDIAN);
5970 }
5971 else
5972 {
5973 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
5974 }
5975 break;
5976
5977 case EVENT_DSID:
5978 if (length == 3)
5979 {
5980 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmstatus_status_event_dsid, tvb, pos, 3, ENC_BIG_ENDIAN);
5981 }
5982 else
5983 {
5984 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
5985 }
5986 break;
5987
5988 case EVENT_MAC_ADDRESS:
5989 if (length == 6)
5990 {
5991 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmstatus_status_event_mac_address, tvb, pos, 6, ENC_NA);
5992 }
5993 else
5994 {
5995 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
5996 }
5997 break;
5998
5999 case EVENT_DS_OFDM_PROFILE_ID:
6000 if (length == 1)
6001 {
6002 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmstatus_status_event_ds_ofdm_profile_id, tvb, pos, 1, ENC_BIG_ENDIAN);
6003 }
6004 else
6005 {
6006 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6007 }
6008 break;
6009
6010 case EVENT_US_OFDMA_PROFILE_ID:
6011 if (length == 1)
6012 {
6013 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmstatus_status_event_us_ofdma_profile_id, tvb, pos, 1, ENC_BIG_ENDIAN);
6014 }
6015 else
6016 {
6017 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6018 }
6019 break;
6020
6021 case EVENT_DESCR:
6022 if (length >= 1 && length <= 80)
6023 {
6024 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmstatus_status_event_descr, tvb, pos, length, ENC_NA);
6025 }
6026 else
6027 {
6028 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6029 }
6030 break;
6031 } /* switch */
6032 pos += length;
6033 } /* while */
6034 }
6035
6036 static void
dissect_cmstatus_tlv(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree)6037 dissect_cmstatus_tlv (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
6038 {
6039 proto_item *it, *tlv_item;
6040 proto_tree *tlv_tree, *tlvtlv_tree;
6041 guint16 pos = 0;
6042 guint8 type;
6043 guint32 length;
6044 tvbuff_t* next_tvb;
6045
6046 it = proto_tree_add_item(tree, hf_docsis_cmstatus_tlv_data, tvb, 0, tvb_reported_length(tvb), ENC_NA);
6047 tlv_tree = proto_item_add_subtree (it, ett_docsis_cmstatus_tlv);
6048
6049 while (tvb_reported_length_remaining(tvb, pos) > 0)
6050 {
6051 type = tvb_get_guint8 (tvb, pos);
6052 tlvtlv_tree = proto_tree_add_subtree(tlv_tree, tvb, pos, -1,
6053 ett_docsis_cmstatus_tlvtlv, &tlv_item,
6054 val_to_str(type, cmstatus_tlv_vals,
6055 "Unknown TLV (%u)"));
6056 proto_tree_add_uint (tlvtlv_tree, hf_docsis_cmstatus_type, tvb, pos, 1, type);
6057 pos++;
6058 proto_tree_add_item_ret_uint (tlvtlv_tree, hf_docsis_cmstatus_length, tvb, pos, 1, ENC_NA, &length);
6059 pos++;
6060 proto_item_set_len(tlv_item, length + 2);
6061
6062 switch (type)
6063 {
6064 case STATUS_EVENT:
6065 next_tvb = tvb_new_subset_length(tvb, pos, length);
6066 dissect_cmstatus_status_event_tlv (next_tvb, pinfo, tlvtlv_tree);
6067 break;
6068
6069 } /* switch */
6070 pos += length;
6071 } /* while */
6072 }
6073
6074 static void
dissect_cmstatus_common(tvbuff_t * tvb,proto_tree * tree)6075 dissect_cmstatus_common (tvbuff_t * tvb, proto_tree * tree)
6076 {
6077 guint8 event_type;
6078
6079 event_type = tvb_get_guint8 (tvb, 2);
6080 switch (event_type)
6081 {
6082 case SEC_CH_MDD_TIMEOUT:
6083 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_mdd_t, tvb, 2, 1, ENC_BIG_ENDIAN);
6084 break;
6085
6086 case QAM_FEC_LOCK_FAILURE:
6087 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_qfl_f, tvb, 2, 1, ENC_BIG_ENDIAN);
6088 break;
6089
6090 case SEQ_OUT_OF_RANGE:
6091 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_s_o, tvb, 2, 1, ENC_BIG_ENDIAN);
6092 break;
6093
6094 case SEC_CH_MDD_RECOVERY:
6095 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_mdd_r, tvb, 2, 1, ENC_BIG_ENDIAN);
6096 break;
6097
6098 case QAM_FEC_LOCK_RECOVERY:
6099 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_qfl_r, tvb, 2, 1, ENC_BIG_ENDIAN);
6100 break;
6101
6102 case T4_TIMEOUT:
6103 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_t4_t, tvb, 2, 1, ENC_BIG_ENDIAN);
6104 break;
6105
6106 case T3_RETRIES_EXCEEDED:
6107 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_t3_e, tvb, 2, 1, ENC_BIG_ENDIAN);
6108 break;
6109
6110 case SUCCESS_RANGING_AFTER_T3_RETRIES_EXCEEDED:
6111 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_rng_s, tvb, 2, 1, ENC_BIG_ENDIAN);
6112 break;
6113
6114 case CM_ON_BATTERY:
6115 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_cm_b, tvb, 2, 1, ENC_BIG_ENDIAN);
6116 break;
6117
6118 case CM_ON_AC_POWER:
6119 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_cm_a, tvb, 2, 1, ENC_BIG_ENDIAN);
6120 break;
6121
6122 case MAC_REMOVAL_EVENT:
6123 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_mac_removal, tvb, 2, 1, ENC_BIG_ENDIAN);
6124 break;
6125
6126 case DS_OFDM_PROFILE_FAILURE:
6127 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_ds_ofdm_profile_failure, tvb, 2, 1, ENC_BIG_ENDIAN);
6128 break;
6129
6130 case PRIMARY_DOWNSTREAM_CHANGE:
6131 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_prim_ds_change, tvb, 2, 1, ENC_BIG_ENDIAN);
6132 break;
6133
6134 case DPD_MISMATCH:
6135 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_dpd_mismatch, tvb, 2, 1, ENC_BIG_ENDIAN);
6136 break;
6137
6138 case NCP_PROFILE_FAILURE:
6139 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_ncp_profile_failure, tvb, 2, 1, ENC_BIG_ENDIAN);
6140 break;
6141
6142 case PLC_FAILURE:
6143 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_plc_failure, tvb, 2, 1, ENC_BIG_ENDIAN);
6144 break;
6145
6146 case NCP_PROFILE_RECOVERY:
6147 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_ncp_profile_recovery, tvb, 2, 1, ENC_BIG_ENDIAN);
6148 break;
6149
6150 case PLC_RECOVERY:
6151 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_plc_recovery, tvb, 2, 1, ENC_BIG_ENDIAN);
6152 break;
6153
6154 case OFDM_PROFILE_RECOVERY:
6155 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_ofdm_profile_recovery, tvb, 2, 1, ENC_BIG_ENDIAN);
6156 break;
6157
6158 case OFDMA_PROFILE_FAILURE:
6159 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_ofdma_profile_failure, tvb, 2, 1, ENC_BIG_ENDIAN);
6160 break;
6161
6162 case MAP_STORAGE_OVERFLOW_INDICATOR:
6163 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_map_storage_overflow_indicator, tvb, 2, 1, ENC_BIG_ENDIAN);
6164 break;
6165
6166 case MAP_STORAGE_ALMOST_FULL_INDICATOR:
6167 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_map_storage_almost_full_indicator, tvb, 2, 1, ENC_BIG_ENDIAN);
6168 break;
6169
6170 default:
6171 proto_tree_add_item (tree, hf_docsis_cmstatus_e_t_unknown, tvb, 2, 1, ENC_BIG_ENDIAN);
6172 break;
6173 } /* switch */
6174 return;
6175 }
6176
6177 static int
dissect_cmstatus(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)6178 dissect_cmstatus (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
6179 {
6180 proto_item *it;
6181 proto_tree *cmstatus_tree;
6182 guint32 transid;
6183 tvbuff_t* next_tvb;
6184
6185 it = proto_tree_add_item(tree, proto_docsis_cmstatus, tvb, 0, -1, ENC_NA);
6186 cmstatus_tree = proto_item_add_subtree (it, ett_docsis_cmstatus);
6187 proto_tree_add_item_ret_uint (cmstatus_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
6188
6189 col_add_fstr (pinfo->cinfo, COL_INFO, "CM-STATUS Report: Transaction ID = %u", transid);
6190
6191 dissect_cmstatus_common (tvb, cmstatus_tree);
6192
6193 /* Call Dissector TLVs */
6194 next_tvb = tvb_new_subset_remaining(tvb, 3);
6195 dissect_cmstatus_tlv(next_tvb, pinfo, cmstatus_tree);
6196 return tvb_captured_length(tvb);
6197 }
6198
6199 static int
dissect_cmstatusack(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)6200 dissect_cmstatusack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
6201 {
6202 proto_item *it;
6203 proto_tree *cmstatus_tree;
6204 guint32 transid;
6205
6206 it = proto_tree_add_item(tree, proto_docsis_cmstatusack, tvb, 0, -1, ENC_NA);
6207 cmstatus_tree = proto_item_add_subtree (it, ett_docsis_cmstatusack);
6208 proto_tree_add_item_ret_uint (cmstatus_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
6209
6210 col_add_fstr (pinfo->cinfo, COL_INFO, "CM-STATUS Report Acknowledge: Transaction ID = %u", transid);
6211
6212 dissect_cmstatus_common (tvb, cmstatus_tree);
6213
6214 return tvb_captured_length(tvb);
6215 }
6216
6217 static void
dissect_ds_event(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,int start,guint16 len)6218 dissect_ds_event(tvbuff_t * tvb, packet_info* pinfo, proto_tree *tree, int start, guint16 len)
6219 {
6220 guint8 type;
6221 guint32 length;
6222 proto_tree *event_tree;
6223 proto_item *event_item, *tlv_len_item;
6224 int pos = start;
6225
6226 while (pos < (start + len))
6227 {
6228 type = tvb_get_guint8 (tvb, pos);
6229 event_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
6230 ett_docsis_cmctrl_tlv_ds_event, &event_item,
6231 val_to_str(type, cmctrlreq_ds_tlv_vals,
6232 "Unknown TLV (%u)"));
6233 proto_tree_add_uint (event_tree, hf_docsis_cmctrl_ds_type, tvb, pos, 1, type);
6234 pos++;
6235 tlv_len_item = proto_tree_add_item_ret_uint (event_tree, hf_docsis_cmctrl_ds_length, tvb, pos, 1, ENC_NA, &length);
6236 pos++;
6237 proto_item_set_len(event_item, length + 2);
6238
6239 switch (type)
6240 {
6241 case DS_EVENT_CH_ID:
6242 if (length == 1)
6243 {
6244 proto_tree_add_item (event_tree, hf_docsis_cmctrl_ds_event_ch_id, tvb, pos, length, ENC_BIG_ENDIAN);
6245 }
6246 else
6247 {
6248 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6249 }
6250 break;
6251 case DS_EVENT_MASK:
6252 if (length == 2)
6253 {
6254 proto_tree_add_item (event_tree, hf_docsis_cmctrl_ds_event_mask, tvb, pos, length, ENC_NA);
6255 }
6256 else
6257 {
6258 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6259 }
6260 break;
6261 } /* switch */
6262
6263 pos += length;
6264 } /* while */
6265 }
6266
6267 static void
dissect_us_event(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,int start,guint16 len)6268 dissect_us_event(tvbuff_t * tvb, packet_info* pinfo, proto_tree *tree, int start, guint16 len)
6269 {
6270 guint8 type;
6271 guint32 length;
6272 proto_tree *event_tree;
6273 proto_item *event_item, *tlv_len_item;
6274 int pos = start;
6275
6276 while (pos < (start + len))
6277 {
6278 type = tvb_get_guint8 (tvb, pos);
6279 event_tree = proto_tree_add_subtree(tree, tvb, pos, -1,
6280 ett_docsis_cmctrl_tlv_us_event, &event_item,
6281 val_to_str(type, cmctrlreq_us_tlv_vals,
6282 "Unknown TLV (%u)"));
6283 proto_tree_add_uint (event_tree, hf_docsis_cmctrlreq_us_type, tvb, pos, 1, type);
6284 pos++;
6285 tlv_len_item = proto_tree_add_item_ret_uint (event_tree, hf_docsis_cmctrlreq_us_length, tvb, pos, 1, ENC_NA, &length);
6286 pos++;
6287 proto_item_set_len(event_item, length + 2);
6288
6289 switch (type)
6290 {
6291 case US_EVENT_CH_ID:
6292 if (length == 1)
6293 {
6294 proto_tree_add_item (event_tree, hf_docsis_cmctrl_us_event_ch_id, tvb, pos, length, ENC_BIG_ENDIAN);
6295 }
6296 else
6297 {
6298 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6299 }
6300 break;
6301 case US_EVENT_MASK:
6302 if (length == 2)
6303 {
6304 proto_tree_add_item (event_tree, hf_docsis_cmctrl_us_event_mask, tvb, pos, length, ENC_NA);
6305 }
6306 else
6307 {
6308 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6309 }
6310 break;
6311 } /* switch */
6312 pos += length;
6313 } /* while */
6314 }
6315
6316 static void
dissect_cmctrlreq_tlv(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree)6317 dissect_cmctrlreq_tlv(tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
6318 {
6319 proto_item *it, *tlv_item, *tlv_len_item;
6320 proto_tree *tlv_tree, *tlvtlv_tree;
6321 guint16 pos = 0;
6322 guint8 type;
6323 guint32 length;
6324
6325 it = proto_tree_add_item(tree, hf_docsis_cmctrlreq_tlv_data, tvb, 0, tvb_reported_length(tvb), ENC_NA);
6326 tlv_tree = proto_item_add_subtree (it, ett_docsis_cmctrlreq_tlv);
6327
6328 while (tvb_reported_length_remaining(tvb, pos) > 0)
6329 {
6330 type = tvb_get_guint8 (tvb, pos);
6331 length = tvb_get_guint8 (tvb, pos + 1);
6332 tlvtlv_tree = proto_tree_add_subtree(tlv_tree, tvb, pos, length + 2,
6333 ett_docsis_cmctrlreq_tlvtlv, &tlv_item,
6334 val_to_str(type, cmctrlreq_tlv_vals,
6335 "Unknown TLV (%u)"));
6336 proto_tree_add_uint (tlvtlv_tree, hf_docsis_cmctrlreq_type, tvb, pos, 1, type);
6337 pos++;
6338 tlv_len_item = proto_tree_add_item (tlvtlv_tree, hf_docsis_cmctrlreq_length, tvb, pos, 1, ENC_NA);
6339 pos++;
6340 proto_item_set_len(tlv_item, length + 2);
6341
6342 switch (type)
6343 {
6344 case CM_CTRL_MUTE:
6345 if (length == 1)
6346 {
6347 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmctrl_tlv_mute, tvb, pos, length, ENC_BIG_ENDIAN);
6348 }
6349 else
6350 {
6351 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6352 }
6353 break;
6354 case CM_CTRL_MUTE_TIMEOUT:
6355 if (length == 4 || length == 1) /* response TLV always with len 1 */
6356 {
6357 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmctrl_tlv_mute_timeout, tvb, pos, length, ENC_BIG_ENDIAN);
6358 }
6359 else
6360 {
6361 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6362 }
6363 break;
6364 case CM_CTRL_REINIT:
6365 if (length == 1)
6366 {
6367 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmctrl_tlv_reinit, tvb, pos, length, ENC_BIG_ENDIAN);
6368 }
6369 else
6370 {
6371 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6372 }
6373 break;
6374 case CM_CTRL_DISABLE_FWD:
6375 if (length == 1)
6376 {
6377 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmctrl_tlv_disable_fwd, tvb, pos, length, ENC_BIG_ENDIAN);
6378 }
6379 else
6380 {
6381 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6382 }
6383 break;
6384 case CM_CTRL_DS_EVENT:
6385 if (length == 1)
6386 {
6387 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmctrl_tlv_ds_event, tvb, pos, length, ENC_NA);
6388 }
6389 else
6390 {
6391 dissect_ds_event(tvb, pinfo, tlvtlv_tree, pos, length);
6392 }
6393 break;
6394 case CM_CTRL_US_EVENT:
6395 if (length == 1)
6396 {
6397 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmctrl_tlv_us_event, tvb, pos, length, ENC_NA);
6398 }
6399 else
6400 {
6401 dissect_us_event(tvb, pinfo, tlvtlv_tree, pos, length);
6402 }
6403 break;
6404 case CM_CTRL_EVENT:
6405 if (length == 2 || length == 1) /* response TLV always with len 1 */
6406 {
6407 proto_tree_add_item (tlvtlv_tree, hf_docsis_cmctrl_tlv_event, tvb, pos, length, ENC_NA);
6408 }
6409 else
6410 {
6411 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6412 }
6413 break;
6414
6415 } /* switch */
6416
6417 pos += length;
6418 }
6419 }
6420
6421 static int
dissect_cmctrlreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)6422 dissect_cmctrlreq(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
6423 {
6424 proto_item *it;
6425 proto_tree *cmctrlreq_tree;
6426 guint32 transid;
6427 tvbuff_t *next_tvb;
6428
6429 it = proto_tree_add_item (tree, proto_docsis_cmctrlreq, tvb, 0, -1, ENC_NA);
6430 cmctrlreq_tree = proto_item_add_subtree (it, ett_docsis_cmctrlreq);
6431 proto_tree_add_item_ret_uint (cmctrlreq_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
6432
6433 col_add_fstr (pinfo->cinfo, COL_INFO,
6434 "CM Control Request: Transaction ID = %u", transid);
6435
6436 next_tvb = tvb_new_subset_remaining(tvb, 2);
6437 dissect_cmctrlreq_tlv(next_tvb, pinfo, cmctrlreq_tree);
6438 return tvb_captured_length(tvb);
6439 }
6440
6441 static int
dissect_cmctrlrsp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)6442 dissect_cmctrlrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
6443 {
6444 proto_item *it;
6445 proto_tree *cmctrlrsp_tree;
6446 guint32 transid;
6447 tvbuff_t *next_tvb;
6448
6449 it = proto_tree_add_item(tree, proto_docsis_cmctrlrsp, tvb, 0, -1, ENC_NA);
6450 cmctrlrsp_tree = proto_item_add_subtree (it, ett_docsis_cmctrlrsp);
6451 proto_tree_add_item_ret_uint (cmctrlrsp_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &transid);
6452
6453 col_add_fstr (pinfo->cinfo, COL_INFO,
6454 "CM Control Response: Transaction ID = %u", transid);
6455
6456 /* Call Dissector for Appendix C TLVs */
6457 next_tvb = tvb_new_subset_remaining (tvb, 2);
6458 dissect_cmctrlreq_tlv(next_tvb, pinfo, cmctrlrsp_tree);
6459 return tvb_captured_length(tvb);
6460 }
6461
6462 static int
dissect_regreqmp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)6463 dissect_regreqmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
6464 {
6465 proto_item *it;
6466 proto_tree *regreqmp_tree;
6467 tvbuff_t *next_tvb;
6468
6469 col_set_str(pinfo->cinfo, COL_INFO, "REG-REQ-MP Message:");
6470
6471 it = proto_tree_add_item(tree, proto_docsis_regreqmp, tvb, 0, -1, ENC_NA);
6472 regreqmp_tree = proto_item_add_subtree (it, ett_docsis_regreqmp);
6473
6474 proto_tree_add_item (regreqmp_tree, hf_docsis_regreqmp_sid, tvb, 0, 2, ENC_BIG_ENDIAN);
6475 proto_tree_add_item (regreqmp_tree, hf_docsis_regreqmp_number_of_fragments, tvb, 2, 1, ENC_BIG_ENDIAN);
6476 proto_tree_add_item (regreqmp_tree, hf_docsis_regreqmp_fragment_sequence_number, tvb, 3, 1, ENC_BIG_ENDIAN);
6477
6478 /* Call Dissector for Appendix C TLVs */
6479 next_tvb = tvb_new_subset_remaining (tvb, 4);
6480 call_dissector (docsis_tlv_handle, next_tvb, pinfo, regreqmp_tree);
6481 return tvb_captured_length(tvb);
6482 }
6483
6484 static int
dissect_regrspmp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)6485 dissect_regrspmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
6486 {
6487 proto_item *it, *reassembled_item;
6488 proto_tree *regrspmp_tree, *reassembled_tree;
6489 guint sid, number_of_fragments, fragment_sequence_number;
6490
6491 tvbuff_t *next_tvb;
6492
6493 col_set_str(pinfo->cinfo, COL_INFO, "REG-RSP-MP Message");
6494 /* Make sure embedded UCD does not overwrite REGRSPMP info */
6495 col_set_fence(pinfo->cinfo, COL_INFO);
6496
6497 it = proto_tree_add_item(tree, proto_docsis_regrspmp, tvb, 0, -1, ENC_NA);
6498 regrspmp_tree = proto_item_add_subtree (it, ett_docsis_regrspmp);
6499
6500 proto_tree_add_item_ret_uint (regrspmp_tree, hf_docsis_regrspmp_sid, tvb, 0, 2, ENC_BIG_ENDIAN, &sid);
6501 proto_tree_add_item (regrspmp_tree, hf_docsis_regrspmp_response, tvb, 2, 1, ENC_BIG_ENDIAN);
6502 proto_tree_add_item_ret_uint (regrspmp_tree, hf_docsis_regrspmp_number_of_fragments, tvb, 3, 1, ENC_BIG_ENDIAN, &number_of_fragments);
6503 proto_tree_add_item_ret_uint (regrspmp_tree, hf_docsis_regrspmp_fragment_sequence_number, tvb, 4, 1, ENC_BIG_ENDIAN, &fragment_sequence_number);
6504
6505 col_add_fstr(pinfo->cinfo, COL_INFO, " (fragment %d):", fragment_sequence_number);
6506 /* Make sure embedded UCD does not overwrite REGRSPMP info */
6507 col_set_fence(pinfo->cinfo, COL_INFO);
6508
6509 if(number_of_fragments > 1) {
6510 pinfo->fragmented = TRUE;
6511
6512 fragment_head* reassembled_tlv = NULL;
6513 reassembled_tlv = fragment_add_seq_check(&docsis_tlv_reassembly_table,
6514 tvb, 5, pinfo,
6515 sid, NULL, /* ID for fragments belonging together */
6516 fragment_sequence_number -1, /* Sequence number starts at 0 */
6517 tvb_reported_length_remaining(tvb, 5), /* fragment length - to the end */
6518 (fragment_sequence_number != number_of_fragments)); /* More fragments? */
6519
6520 if (reassembled_tlv) {
6521 tvbuff_t *tlv_tvb = NULL;
6522
6523 reassembled_item = proto_tree_add_item(regrspmp_tree, hf_docsis_tlv_reassembled, tvb, 0, -1, ENC_NA);
6524 reassembled_tree = proto_item_add_subtree (reassembled_item, ett_docsis_tlv_reassembled );
6525
6526
6527 tlv_tvb = process_reassembled_data(tvb, 5, pinfo, "Reassembled TLV", reassembled_tlv, &docsis_tlv_frag_items,
6528 NULL, reassembled_tree);
6529
6530 if (tlv_tvb && tvb_reported_length(tlv_tvb) > 0) {
6531 call_dissector (docsis_tlv_handle, tlv_tvb, pinfo, reassembled_tree);
6532 }
6533 }
6534
6535 } else {
6536 /* Call Dissector for Appendix C TLVs */
6537 next_tvb = tvb_new_subset_remaining (tvb, 5);
6538 call_dissector (docsis_tlv_handle, next_tvb, pinfo, regrspmp_tree);
6539 }
6540
6541 return tvb_captured_length(tvb);
6542 }
6543
6544 static void
dissect_emrsp_tlv(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree)6545 dissect_emrsp_tlv (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
6546 {
6547 proto_item *it, *tlv_item;
6548 proto_tree *tlv_tree, *tlvtlv_tree;
6549 guint pos = 0;
6550 guint length;
6551 guint8 type;
6552
6553 it = proto_tree_add_item(tree, hf_docsis_emrsp_tlv_data, tvb, 0, tvb_reported_length(tvb), ENC_NA);
6554 tlv_tree = proto_item_add_subtree (it, ett_docsis_emrsp_tlv);
6555
6556 while (tvb_reported_length_remaining(tvb, pos) > 0)
6557 {
6558 type = tvb_get_guint8 (tvb, pos);
6559 length = tvb_get_guint8 (tvb, pos + 1);
6560 tlvtlv_tree = proto_tree_add_subtree(tlv_tree, tvb, pos, length + 2,
6561 ett_docsis_emrsp_tlvtlv, &tlv_item,
6562 val_to_str(type, emrsp_tlv_vals,
6563 "Unknown TLV (%u)"));
6564 proto_tree_add_item (tlvtlv_tree, hf_docsis_emrsp_tlv_type, tvb, pos, 1, ENC_BIG_ENDIAN);
6565 pos++;
6566 proto_tree_add_item (tlvtlv_tree, hf_docsis_emrsp_tlv_length, tvb, pos, 1, ENC_BIG_ENDIAN);
6567 pos++;
6568
6569
6570 switch (type)
6571 {
6572 case EM_HOLDOFF_TIMER:
6573 proto_tree_add_item (tlvtlv_tree, hf_docsis_emrsp_tlv_holdoff_timer, tvb, pos, length, ENC_BIG_ENDIAN);
6574 break;
6575 default:
6576 proto_tree_add_item (tlvtlv_tree, hf_docsis_emrsp_tlv_unknown, tvb, pos - 2, length+2, ENC_NA);
6577 expert_add_info_format(pinfo, tlv_item, &ei_docsis_mgmt_tlvtype_unknown, "Unknown TLV: %u", type);
6578 break;
6579 } /* switch */
6580 pos += length;
6581 } /* while */
6582 }
6583
6584 static int
dissect_emreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)6585 dissect_emreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
6586 {
6587 proto_item *it;
6588 proto_tree *em_tree;
6589
6590 guint32 trans_id, req_power_mode;
6591
6592 it = proto_tree_add_item(tree, proto_docsis_emreq, tvb, 0, -1, ENC_NA);
6593 em_tree = proto_item_add_subtree (it, ett_docsis_emreq);
6594 proto_tree_add_item_ret_uint (em_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &trans_id);
6595 proto_tree_add_item_ret_uint (em_tree, hf_docsis_emreq_req_power_mode, tvb, 2, 1, ENC_BIG_ENDIAN, &req_power_mode);
6596 proto_tree_add_item (em_tree, hf_docsis_emreq_reserved, tvb, 3, 1, ENC_BIG_ENDIAN);
6597
6598 col_add_fstr (pinfo->cinfo, COL_INFO, "EM-REQ: Transaction ID: %u, Requested Power Mode: %s (%u)", trans_id,
6599 val_to_str(req_power_mode, emreq_req_power_mode_vals, "Unknown Requested Power Mode (%u)"), req_power_mode);
6600
6601 return tvb_captured_length(tvb);
6602 }
6603
6604 static int
dissect_emrsp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)6605 dissect_emrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
6606 {
6607 proto_item *it;
6608 proto_tree *em_tree;
6609 tvbuff_t *next_tvb;
6610
6611 guint32 trans_id, rsp_code;
6612
6613 it = proto_tree_add_item(tree, proto_docsis_emrsp, tvb, 0, -1, ENC_NA);
6614 em_tree = proto_item_add_subtree (it, ett_docsis_emrsp);
6615 proto_tree_add_item_ret_uint (em_tree, hf_docsis_mgt_tranid, tvb, 0, 2, ENC_BIG_ENDIAN, &trans_id);
6616 proto_tree_add_item_ret_uint (em_tree, hf_docsis_emrsp_rsp_code, tvb, 2, 1, ENC_BIG_ENDIAN, &rsp_code);
6617 proto_tree_add_item (em_tree, hf_docsis_emrsp_reserved, tvb, 3, 1, ENC_BIG_ENDIAN);
6618
6619 col_add_fstr (pinfo->cinfo, COL_INFO, "EM-RSP: Transaction ID: %u, Response Code: %s (%u)", trans_id,
6620 val_to_str(rsp_code, emrsp_rsp_code_vals, "Unknown Response Code (%u)"), rsp_code);
6621
6622 /* Call Dissector TLVs */
6623 if(tvb_reported_length_remaining(tvb, 4) > 0 )
6624 {
6625 next_tvb = tvb_new_subset_remaining(tvb, 4);
6626 dissect_emrsp_tlv(next_tvb, pinfo, em_tree);
6627 }
6628
6629 return tvb_captured_length(tvb);
6630 }
6631
6632 static void
dissect_subcarrier_assignment_range_list(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,guint16 pos,guint32 len)6633 dissect_subcarrier_assignment_range_list(tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree, guint16 pos, guint32 len)
6634 {
6635 proto_item* type_item;
6636 guint32 i, subcarrier_assignment_type;
6637
6638 type_item = proto_tree_add_item_ret_uint (tree, hf_docsis_ocd_tlv_subc_assign_type, tvb, pos, 1, ENC_BIG_ENDIAN, &subcarrier_assignment_type);
6639 proto_tree_add_item (tree, hf_docsis_ocd_tlv_subc_assign_value, tvb, pos, 1, ENC_BIG_ENDIAN);
6640 proto_tree_add_item (tree, hf_docsis_ocd_subc_assign_subc_type, tvb, pos, 1, ENC_BIG_ENDIAN);
6641 pos++;
6642
6643 switch (subcarrier_assignment_type) {
6644 case SUBCARRIER_ASSIGNMENT_RANGE_CONT:
6645 case SUBCARRIER_ASSIGNMENT_RANGE_SKIPBY1:
6646 proto_tree_add_item (tree, hf_docsis_ocd_subc_assign_range, tvb, pos, 4, ENC_BIG_ENDIAN);
6647 break;
6648 case SUBCARRIER_ASSIGNMENT_LIST:
6649 for (i = 0; i < len/2; ++i) {
6650 proto_tree_add_item (tree, hf_docsis_ocd_subc_assign_index, tvb, pos, 2, ENC_BIG_ENDIAN);
6651 pos += 2;
6652 }
6653 break;
6654 default:
6655 expert_add_info_format(pinfo, type_item, &ei_docsis_mgmt_tlvtype_unknown, "Unknown subcarrier assignment type %d", subcarrier_assignment_type);
6656 break;
6657 }
6658 }
6659
6660 static void
dissect_ocd_tlv(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree)6661 dissect_ocd_tlv (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
6662 {
6663 proto_item *it, *tlv_item, *tlv_len_item;
6664 proto_tree *tlv_tree, *tlvtlv_tree;
6665 guint16 pos = 0;
6666 guint8 type;
6667 guint32 length;
6668
6669 it = proto_tree_add_item(tree, hf_docsis_ocd_tlv_data, tvb, 0, tvb_reported_length(tvb), ENC_NA);
6670 tlv_tree = proto_item_add_subtree (it, ett_docsis_ocd_tlv);
6671
6672 while (tvb_reported_length_remaining(tvb, pos) > 0)
6673 {
6674 type = tvb_get_guint8 (tvb, pos);
6675 tlvtlv_tree = proto_tree_add_subtree(tlv_tree, tvb, pos, -1,
6676 ett_docsis_ocd_tlvtlv, &tlv_item,
6677 val_to_str(type, ocd_tlv_vals,
6678 "Unknown TLV (%u)"));
6679 proto_tree_add_uint (tlvtlv_tree, hf_docsis_ocd_type, tvb, pos, 1, type);
6680 pos++;
6681 tlv_len_item = proto_tree_add_item_ret_uint (tlvtlv_tree, hf_docsis_ocd_length, tvb, pos, 1, ENC_NA, &length);
6682 pos++;
6683 proto_item_set_len(tlv_item, length + 2);
6684
6685 switch (type)
6686 {
6687 case DISCRETE_FOURIER_TRANSFORM_SIZE:
6688 if (length == 1)
6689 {
6690 proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_four_trans_size, tvb, pos, 1, ENC_BIG_ENDIAN);
6691 }
6692 else
6693 {
6694 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6695 }
6696 break;
6697 case CYCLIC_PREFIX:
6698 if (length == 1)
6699 {
6700 proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_cycl_pref, tvb, pos, 1, ENC_BIG_ENDIAN);
6701 }
6702 else
6703 {
6704 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6705 }
6706 break;
6707 case ROLL_OFF:
6708 if (length == 1)
6709 {
6710 proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_roll_off, tvb, pos, 1, ENC_BIG_ENDIAN);
6711 }
6712 else
6713 {
6714 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6715 }
6716 break;
6717 case OFDM_SPECTRUM_LOCATION:
6718 if (length == 4)
6719 {
6720 proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_ofdm_spec_loc, tvb, pos, 4, ENC_BIG_ENDIAN);
6721 }
6722 else
6723 {
6724 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6725 }
6726 break;
6727 case TIME_INTERLEAVING_DEPTH:
6728 if (length == 1)
6729 {
6730 proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_time_int_depth, tvb, pos, 1, ENC_BIG_ENDIAN);
6731 }
6732 else
6733 {
6734 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6735 }
6736 break;
6737 case SUBCARRIER_ASSIGNMENT_RANGE_LIST:
6738 if (length >= 5)
6739 {
6740 dissect_subcarrier_assignment_range_list(tvb, pinfo, tlvtlv_tree, pos, length);
6741 }
6742 else
6743 {
6744 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6745 }
6746 break;
6747 case PRIMARY_CAPABILITY_INDICATOR:
6748 if (length == 1)
6749 {
6750 proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_prim_cap_ind, tvb, pos, 1, ENC_BIG_ENDIAN);
6751 }
6752 else
6753 {
6754 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6755 }
6756 break;
6757 default:
6758 proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_unknown, tvb, pos - 2, length+2, ENC_NA);
6759 break;
6760 } /* switch */
6761 pos += length;
6762 } /* while */
6763 }
6764
6765 static int
dissect_ocd(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)6766 dissect_ocd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
6767 {
6768 proto_item *it;
6769 proto_tree *ocd_tree;
6770 tvbuff_t *next_tvb;
6771 guint32 downstream_channel_id, configuration_change_count;
6772
6773 it = proto_tree_add_item(tree, proto_docsis_ocd, tvb, 0, -1, ENC_NA);
6774 ocd_tree = proto_item_add_subtree (it, ett_docsis_ocd);
6775
6776 proto_tree_add_item_ret_uint (ocd_tree, hf_docsis_mgt_down_chid, tvb, 0, 1, ENC_BIG_ENDIAN, &downstream_channel_id);
6777 proto_tree_add_item_ret_uint (ocd_tree, hf_docsis_ocd_ccc, tvb, 1, 1, ENC_BIG_ENDIAN, &configuration_change_count);
6778
6779 col_add_fstr (pinfo->cinfo, COL_INFO, "OCD: DS CH ID: %u, CCC: %u", downstream_channel_id, configuration_change_count);
6780
6781 /* Call Dissector TLVs */
6782 next_tvb = tvb_new_subset_remaining(tvb, 2);
6783 dissect_ocd_tlv(next_tvb, pinfo, ocd_tree);
6784
6785 return tvb_captured_length(tvb);
6786 }
6787
6788 static void
dissect_dpd_subcarrier_assignment_range_list(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,guint pos,guint len)6789 dissect_dpd_subcarrier_assignment_range_list(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, guint pos, guint len)
6790 {
6791 guint32 i, subcarrier_assignment_type;
6792 proto_item* type_item;
6793 guint modulation;
6794
6795 type_item = proto_tree_add_item_ret_uint (tree, hf_docsis_dpd_tlv_subc_assign_type, tvb, pos, 1, ENC_BIG_ENDIAN, &subcarrier_assignment_type);
6796 proto_tree_add_item (tree, hf_docsis_dpd_tlv_subc_assign_value, tvb, pos, 1, ENC_BIG_ENDIAN);
6797 proto_tree_add_item (tree, hf_docsis_dpd_tlv_subc_assign_reserved, tvb, pos, 1, ENC_BIG_ENDIAN);
6798 proto_tree_add_item_ret_uint (tree, hf_docsis_dpd_tlv_subc_assign_modulation, tvb, pos, 1, ENC_BIG_ENDIAN, &modulation);
6799 col_append_str(pinfo->cinfo, COL_INFO, val_to_str(modulation, docsis_dpd_subc_assign_modulation_str, "%s"));
6800 pos++;
6801
6802 switch (subcarrier_assignment_type)
6803 {
6804 case SUBCARRIER_ASSIGNMENT_RANGE_CONT:
6805 case SUBCARRIER_ASSIGNMENT_RANGE_SKIPBY1:
6806 proto_tree_add_item (tree, hf_docsis_dpd_subc_assign_range, tvb, pos, 4, ENC_BIG_ENDIAN);
6807 break;
6808 case SUBCARRIER_ASSIGNMENT_LIST:
6809 for (i = 0; i < len/2; ++i) {
6810 proto_tree_add_item (tree, hf_docsis_dpd_subc_assign_index, tvb, pos, 2, ENC_BIG_ENDIAN);
6811 pos += 2;
6812 }
6813 break;
6814 default:
6815 expert_add_info_format(pinfo, type_item, &ei_docsis_mgmt_tlvtype_unknown, "Unknown subcarrier assignment type: %u", subcarrier_assignment_type);
6816 break;
6817 }
6818 }
6819
6820 static void
dissect_dpd_subcarrier_assignment_vector(tvbuff_t * tvb,proto_tree * tree,guint start,guint len)6821 dissect_dpd_subcarrier_assignment_vector(tvbuff_t * tvb, proto_tree * tree, guint start, guint len)
6822 {
6823 guint32 subcarrier_assignment_vector_oddness;
6824 guint vector_index;
6825
6826 proto_tree_add_item_ret_uint (tree, hf_docsis_dpd_tlv_subc_assign_vector_oddness, tvb, start, 1, ENC_BIG_ENDIAN, &subcarrier_assignment_vector_oddness);
6827 proto_tree_add_item (tree, hf_docsis_dpd_tlv_subc_assign_vector_reserved, tvb, start, 1, ENC_BIG_ENDIAN);
6828 proto_tree_add_item (tree, hf_docsis_dpd_tlv_subc_assign_vector_subc_start, tvb, start, 2, ENC_BIG_ENDIAN);
6829
6830 for(vector_index = 0; vector_index < len; ++vector_index)
6831 {
6832 proto_tree_add_item (tree, hf_docsis_dpd_tlv_subc_assign_vector_modulation_odd, tvb, start + 2 + vector_index, 1, ENC_BIG_ENDIAN);
6833 if (!((vector_index == len -1) && subcarrier_assignment_vector_oddness))
6834 {
6835 proto_tree_add_item (tree, hf_docsis_dpd_tlv_subc_assign_vector_modulation_even, tvb, start + 2 + vector_index, 1, ENC_BIG_ENDIAN);
6836 }
6837 }
6838 }
6839
6840
6841 static void
dissect_dpd_tlv(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree)6842 dissect_dpd_tlv (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
6843 {
6844 proto_item *it, *tlv_item, *tlv_len_item;
6845 proto_tree *tlv_tree, *tlvtlv_tree;
6846 guint pos = 0;
6847 guint length;
6848 guint8 type;
6849 guint first_subc_assign_list = 1;
6850
6851 it = proto_tree_add_item(tree, hf_docsis_dpd_tlv_data, tvb, 0, tvb_reported_length(tvb), ENC_NA);
6852 tlv_tree = proto_item_add_subtree (it, ett_docsis_dpd_tlv);
6853
6854 while (tvb_reported_length_remaining(tvb, pos) > 0)
6855 {
6856 type = tvb_get_guint8 (tvb, pos);
6857 if ( type == SUBCARRIER_ASSIGNMENT_VECTOR)
6858 {
6859 /* For this type, length is 2 bytes instead of 1 */
6860 length = tvb_get_ntohs (tvb, pos + 1);
6861 } else {
6862 length = tvb_get_guint8 (tvb, pos + 1);
6863 }
6864
6865 tlvtlv_tree = proto_tree_add_subtree(tlv_tree, tvb, pos, length + 2,
6866 ett_docsis_dpd_tlvtlv, &tlv_item,
6867 val_to_str(type, dpd_tlv_vals,
6868 "Unknown TLV (%u)"));
6869 proto_tree_add_uint (tlvtlv_tree, hf_docsis_dpd_type, tvb, pos, 1, type);
6870 pos++;
6871 if (type == SUBCARRIER_ASSIGNMENT_VECTOR)
6872 {
6873 /* For this type, length is 2 bytes instead of 1 */
6874 tlv_len_item = proto_tree_add_item (tlvtlv_tree, hf_docsis_dpd_length, tvb, pos, 2, ENC_BIG_ENDIAN);
6875 pos += 2;
6876 } else {
6877 tlv_len_item = proto_tree_add_item (tlvtlv_tree, hf_docsis_dpd_length, tvb, pos, 1, ENC_NA);
6878 pos++;
6879 }
6880
6881 switch (type)
6882 {
6883 case SUBCARRIER_ASSIGNMENT_RANGE_LIST:
6884 if (length >= 5)
6885 {
6886 if(first_subc_assign_list) {
6887 col_append_str(pinfo->cinfo, COL_INFO, ", Modulation: ");
6888 first_subc_assign_list = 0;
6889 } else {
6890 col_append_str(pinfo->cinfo, COL_INFO, " | ");
6891 }
6892 dissect_dpd_subcarrier_assignment_range_list(tvb, pinfo, tlvtlv_tree, pos, length);
6893 }
6894 else
6895 {
6896 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6897 }
6898 break;
6899 case SUBCARRIER_ASSIGNMENT_VECTOR:
6900 if (length >=2)
6901 {
6902 dissect_dpd_subcarrier_assignment_vector(tvb, tlvtlv_tree, pos, length);
6903 }
6904 else
6905 {
6906 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6907 }
6908 break;
6909 default:
6910 proto_tree_add_item (tlvtlv_tree, hf_docsis_dpd_tlv_unknown, tvb, pos - 2, length+2, ENC_NA);
6911 expert_add_info_format(pinfo, tlv_item, &ei_docsis_mgmt_tlvtype_unknown, "Unknown TLV: %u", type);
6912 break;
6913 } /* switch */
6914 pos += length;
6915 } /* while */
6916 }
6917
6918 static int
dissect_dpd(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)6919 dissect_dpd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
6920 {
6921 proto_item *it;
6922 proto_tree *dpd_tree;
6923 tvbuff_t *next_tvb;
6924
6925 guint32 downstream_channel_id, profile_identifier, configuration_change_count;
6926
6927 it = proto_tree_add_item(tree, proto_docsis_dpd, tvb, 0, -1, ENC_NA);
6928 dpd_tree = proto_item_add_subtree (it, ett_docsis_dpd);
6929 proto_tree_add_item_ret_uint (dpd_tree, hf_docsis_mgt_down_chid, tvb, 0, 1, ENC_BIG_ENDIAN, &downstream_channel_id);
6930 proto_tree_add_item_ret_uint (dpd_tree, hf_docsis_dpd_prof_id, tvb, 1, 1, ENC_BIG_ENDIAN, &profile_identifier);
6931 proto_tree_add_item_ret_uint (dpd_tree, hf_docsis_dpd_ccc, tvb, 2, 1, ENC_BIG_ENDIAN, &configuration_change_count);
6932
6933 col_add_fstr (pinfo->cinfo, COL_INFO, "DPD: DS CH ID: %u, Profile ID: %u, CCC: %u", downstream_channel_id, profile_identifier, configuration_change_count);
6934
6935 /* Call Dissector TLVs */
6936 next_tvb = tvb_new_subset_remaining(tvb, 3);
6937 dissect_dpd_tlv(next_tvb, pinfo, dpd_tree);
6938
6939 return tvb_captured_length(tvb);
6940 }
6941
6942 static int
dissect_type51ucd(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)6943 dissect_type51ucd(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
6944 {
6945 return dissect_any_ucd(tvb, pinfo, tree, proto_docsis_type51ucd, MGT_TYPE51UCD);
6946 }
6947
6948 static void
dissect_optreq_tlv_rxmer_thresholding_parameters(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree)6949 dissect_optreq_tlv_rxmer_thresholding_parameters (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
6950 {
6951 proto_item *it, *tlv_item, *tlv_len_item;
6952 proto_tree *tlv_tree, *tlvtlv_tree;
6953 guint pos = 0;
6954 guint length;
6955 guint8 type;
6956
6957 it = proto_tree_add_item(tree, hf_docsis_optreq_tlv_xrmer_thresh_data, tvb, 0, tvb_reported_length(tvb), ENC_NA);
6958 tlv_tree = proto_item_add_subtree (it, ett_docsis_optreq_tlv_rxmer_thresh_params);
6959
6960 while (tvb_reported_length_remaining(tvb, pos) > 0)
6961 {
6962 type = tvb_get_guint8 (tvb, pos);
6963 length = tvb_get_guint8 (tvb, pos + 1);
6964 tlvtlv_tree = proto_tree_add_subtree(tlv_tree, tvb, pos, length + 2,
6965 ett_docsis_optreq_tlv_rxmer_thresh_params_tlv, &tlv_item,
6966 val_to_str(type, optreq_tlv_rxmer_thresh_params_vals,
6967 "Unknown TLV (%u)"));
6968 proto_tree_add_uint (tlvtlv_tree, hf_docsis_optreq_xmer_thresh_params_type, tvb, pos, 1, type);
6969 pos++;
6970 tlv_len_item = proto_tree_add_item (tlvtlv_tree, hf_docsis_optreq_xmer_thresh_params_length, tvb, pos, 1, ENC_NA);
6971 pos++;
6972
6973
6974 switch (type)
6975 {
6976 case OPT_REQ_RXMER_THRESH_PARAMS_MODULATION_ORDER:
6977 if (length == 1)
6978 {
6979 proto_tree_add_item(tlvtlv_tree, hf_docsis_optreq_tlv_xrmer_thresh_data_mod_order, tvb, pos, length, ENC_NA);
6980 }
6981 else
6982 {
6983 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
6984 }
6985 break;
6986 default:
6987 proto_tree_add_item (tlvtlv_tree, hf_docsis_optreq_tlv_unknown, tvb, pos - 2, length+2, ENC_NA);
6988 expert_add_info_format(pinfo, tlv_item, &ei_docsis_mgmt_tlvtype_unknown, "Unknown TLV: %u", type);
6989 break;
6990 } /* switch */
6991 pos += length;
6992 } /* while */
6993 }
6994
6995 static void
dissect_optreq_tlv(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree)6996 dissect_optreq_tlv (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
6997 {
6998 proto_item *it, *tlv_item, *tlv_len_item;
6999 proto_tree *tlv_tree, *tlvtlv_tree;
7000 guint pos = 0;
7001 guint length;
7002 guint8 type;
7003 tvbuff_t *next_tvb;
7004
7005 it = proto_tree_add_item(tree, hf_docsis_optreq_tlv_data, tvb, 0, tvb_reported_length(tvb), ENC_NA);
7006 tlv_tree = proto_item_add_subtree (it, ett_docsis_optreq_tlv);
7007
7008 while (tvb_reported_length_remaining(tvb, pos) > 0)
7009 {
7010 type = tvb_get_guint8 (tvb, pos);
7011 length = tvb_get_guint8 (tvb, pos + 1);
7012 tlvtlv_tree = proto_tree_add_subtree(tlv_tree, tvb, pos, length + 2,
7013 ett_docsis_optreq_tlvtlv, &tlv_item,
7014 val_to_str(type, optreq_tlv_vals,
7015 "Unknown TLV (%u)"));
7016 proto_tree_add_uint (tlvtlv_tree, hf_docsis_optreq_type, tvb, pos, 1, type);
7017 pos++;
7018 tlv_len_item = proto_tree_add_item (tlvtlv_tree, hf_docsis_optreq_length, tvb, pos, 1, ENC_NA);
7019 pos++;
7020
7021
7022 switch (type)
7023 {
7024 case OPT_REQ_REQ_STAT:
7025 if (length == 1)
7026 {
7027
7028 static int * const req_stat[] = {
7029 &hf_docsis_optreq_reqstat_rxmer_stat_subc,
7030 &hf_docsis_optreq_reqstat_rxmer_subc_threshold_comp,
7031 &hf_docsis_optreq_reqstat_snr_marg_cand_prof,
7032 &hf_docsis_optreq_reqstat_codew_stat_cand_prof,
7033 &hf_docsis_optreq_reqstat_codew_thresh_comp_cand_prof,
7034 &hf_docsis_optreq_reqstat_ncp_field_stat,
7035 &hf_docsis_optreq_reqstat_ncp_crc_thresh_comp,
7036 &hf_docsis_optreq_reqstat_reserved,
7037 NULL
7038 };
7039
7040 proto_tree_add_bitmask_list(tlvtlv_tree, tvb, pos, length, req_stat, ENC_BIG_ENDIAN);
7041 }
7042 else
7043 {
7044 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
7045 }
7046 break;
7047 case OPT_REQ_RXMER_THRESH_PARAMS:
7048 next_tvb = tvb_new_subset_length(tvb, pos, length);
7049 dissect_optreq_tlv_rxmer_thresholding_parameters(next_tvb, pinfo, tlvtlv_tree);
7050 break;
7051 default:
7052 proto_tree_add_item (tlvtlv_tree, hf_docsis_optreq_tlv_unknown, tvb, pos - 2, length+2, ENC_NA);
7053 expert_add_info_format(pinfo, tlv_item, &ei_docsis_mgmt_tlvtype_unknown, "Unknown TLV: %u", type);
7054 break;
7055 } /* switch */
7056 pos += length;
7057 } /* while */
7058 }
7059
7060 static int
dissect_optreq(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)7061 dissect_optreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
7062 {
7063 proto_item *it;
7064 proto_tree *opt_tree;
7065 tvbuff_t *next_tvb;
7066
7067 guint32 downstream_channel_id, profile_identifier, opcode;
7068
7069 it = proto_tree_add_item(tree, proto_docsis_optreq, tvb, 0, -1, ENC_NA);
7070 opt_tree = proto_item_add_subtree (it, ett_docsis_optreq);
7071 proto_tree_add_item (opt_tree, hf_docsis_optreq_reserved, tvb, 0, 2, ENC_BIG_ENDIAN);
7072 proto_tree_add_item_ret_uint (opt_tree, hf_docsis_mgt_down_chid, tvb, 2, 1, ENC_BIG_ENDIAN, &downstream_channel_id);
7073 proto_tree_add_item_ret_uint (opt_tree, hf_docsis_optreq_prof_id, tvb, 3, 1, ENC_BIG_ENDIAN, &profile_identifier);
7074 proto_tree_add_item_ret_uint (opt_tree, hf_docsis_optreq_opcode, tvb, 4, 1, ENC_BIG_ENDIAN, &opcode);
7075
7076 col_add_fstr (pinfo->cinfo, COL_INFO, "OPT-REQ: DS CH ID: %u, Profile ID: %s (%u), Opcode: %s (%u)", downstream_channel_id,
7077 val_to_str(profile_identifier, profile_id_vals, "Unknown Profile ID (%u)"), profile_identifier,
7078 val_to_str(opcode, opt_opcode_vals, "Unknown Opcode (%u)"), opcode);
7079
7080 /* Call Dissector TLVs */
7081 if(tvb_reported_length_remaining(tvb, 5) > 0 )
7082 {
7083 next_tvb = tvb_new_subset_remaining(tvb, 5);
7084 dissect_optreq_tlv(next_tvb, pinfo, opt_tree);
7085 }
7086
7087 return tvb_reported_length(tvb);
7088 }
7089
7090 static void
dissect_optrsp_tlv_rxmer_and_snr_margin_data(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree)7091 dissect_optrsp_tlv_rxmer_and_snr_margin_data (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
7092 {
7093 proto_item *it, *tlv_item, *tlv_len_item;
7094 proto_tree *tlv_tree, *tlvtlv_tree;
7095 guint pos = 0;
7096 guint length;
7097 guint8 type;
7098 guint number_of_subcarriers = 0;
7099 guint i;
7100
7101 it = proto_tree_add_item(tree, hf_docsis_optrsp_tlv_xrmer_snr_margin_data, tvb, 0, tvb_reported_length(tvb), ENC_NA);
7102 tlv_tree = proto_item_add_subtree (it, ett_docsis_optrsp_tlv_rxmer_snr_margin_data);
7103
7104 while (tvb_reported_length_remaining(tvb, pos) > 0)
7105 {
7106 type = tvb_get_guint8 (tvb, pos);
7107 length = tvb_get_ntohs ( tvb, pos + 1);
7108 tlvtlv_tree = proto_tree_add_subtree(tlv_tree, tvb, pos, length + 2,
7109 ett_docsis_optrsp_tlv_rxmer_snr_margin_tlv, &tlv_item,
7110 val_to_str(type, optrsp_tlv_rxmer_snr_margin_vals,
7111 "Unknown TLV (%u)"));
7112 proto_tree_add_uint (tlvtlv_tree, hf_docsis_optrsp_xmer_snr_margin_type, tvb, pos, 1, type);
7113 pos++;
7114 tlv_len_item = proto_tree_add_item (tlvtlv_tree, hf_docsis_optrsp_xmer_snr_margin_length, tvb, pos, 2, ENC_NA);
7115 pos+=2;
7116
7117
7118 switch (type)
7119 {
7120 case OPT_RSP_RXMER_PER_SUBCARRIER:
7121 if ((guint) tvb_reported_length_remaining(tvb, pos) < length)
7122 {
7123 number_of_subcarriers = tvb_reported_length_remaining(tvb,pos);
7124 } else {
7125 number_of_subcarriers = length;
7126 }
7127 for(i=0; i < number_of_subcarriers;++i)
7128 {
7129 proto_tree_add_item(tlvtlv_tree, hf_docsis_optrsp_tlv_xrmer_snr_margin_data_rxmer_subc, tvb, pos+i, 1, ENC_NA);
7130 }
7131 break;
7132 case OPT_RSP_SNR_MARGIN:
7133 if (length == 1)
7134 {
7135 proto_tree_add_item(tlvtlv_tree, hf_docsis_optrsp_tlv_rxmer_snr_margin_data_snr_margin, tvb, pos, length, ENC_NA);
7136 }
7137 else
7138 {
7139 expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_mgmt_tlvlen_bad, "Wrong TLV length: %u", length);
7140 }
7141 break;
7142 default:
7143 proto_tree_add_item (tlvtlv_tree, hf_docsis_optrsp_tlv_unknown, tvb, pos - 2, length+2, ENC_NA);
7144 expert_add_info_format(pinfo, tlv_item, &ei_docsis_mgmt_tlvtype_unknown, "Unknown TLV: %u", type);
7145 break;
7146 } /* switch */
7147 pos += length;
7148 } /* while */
7149 }
7150
7151 static void
dissect_optrsp_tlv(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree)7152 dissect_optrsp_tlv (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
7153 {
7154 proto_item *it, *tlv_item;
7155 proto_tree *tlv_tree;
7156 guint pos = 0;
7157 guint length;
7158 guint8 type;
7159 tvbuff_t *next_tvb;
7160
7161
7162 it = proto_tree_add_item(tree, hf_docsis_optrsp_tlv_data, tvb, 0, tvb_reported_length(tvb), ENC_NA);
7163 tlv_tree = proto_item_add_subtree (it, ett_docsis_optrsp_tlv);
7164
7165 while (tvb_reported_length_remaining(tvb, pos) > 0)
7166 {
7167 type = tvb_get_guint8 (tvb, pos);
7168 tlv_tree = proto_tree_add_subtree(tlv_tree, tvb, pos, -1,
7169 ett_docsis_optrsp_tlvtlv, &tlv_item,
7170 val_to_str(type, optrsp_tlv_vals,
7171 "Unknown TLV (%u)"));
7172 proto_tree_add_uint (tlv_tree, hf_docsis_optrsp_type, tvb, pos, 1, type);
7173 pos++;
7174 proto_tree_add_item_ret_uint (tlv_tree, hf_docsis_optrsp_length, tvb, pos, 2, ENC_NA, &length);
7175 pos+=2;
7176
7177 switch (type)
7178 {
7179 case OPT_RSP_RXMER_AND_SNR_MARGIN_DATA:
7180 if ((guint) tvb_reported_length_remaining(tvb, pos) < length) {
7181 next_tvb = tvb_new_subset_remaining(tvb, pos);
7182 } else {
7183 next_tvb = tvb_new_subset_length(tvb, pos, length);
7184 }
7185 dissect_optrsp_tlv_rxmer_and_snr_margin_data(next_tvb, pinfo, tlv_tree);
7186 break;
7187 default:
7188 proto_tree_add_item (tlv_tree, hf_docsis_dpd_tlv_unknown, tvb, pos - 2, length+2, ENC_NA);
7189 expert_add_info_format(pinfo, tlv_item, &ei_docsis_mgmt_tlvtype_unknown, "Unknown TLV: %u", type);
7190 break;
7191 } /* switch */
7192 pos += length;
7193 } /* while */
7194 }
7195
7196 static int
dissect_optrsp(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)7197 dissect_optrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
7198 {
7199 proto_item *it;
7200 proto_tree *opt_tree;
7201 address save_src, save_dst;
7202 guint version, multipart, number_of_fragments, fragment_sequence_number;
7203 tvbuff_t *tlv_tvb = NULL;
7204
7205 guint32 downstream_channel_id, profile_identifier, status;
7206
7207 it = proto_tree_add_item(tree, proto_docsis_optrsp, tvb, 0, -1, ENC_NA);
7208 opt_tree = proto_item_add_subtree (it, ett_docsis_optrsp);
7209 proto_tree_add_item (opt_tree, hf_docsis_optrsp_reserved, tvb, 0, 2, ENC_BIG_ENDIAN);
7210 proto_tree_add_item_ret_uint (opt_tree, hf_docsis_mgt_down_chid, tvb, 2, 1, ENC_BIG_ENDIAN, &downstream_channel_id);
7211 proto_tree_add_item_ret_uint (opt_tree, hf_docsis_optrsp_prof_id, tvb, 3, 1, ENC_BIG_ENDIAN, &profile_identifier);
7212 proto_tree_add_item_ret_uint (opt_tree, hf_docsis_optrsp_status, tvb, 4, 1, ENC_BIG_ENDIAN, &status);
7213
7214 col_add_fstr (pinfo->cinfo, COL_INFO, "OPT-RSP: DS CH ID: %u, Profile ID: %s (%u), Status: %s (%u)", downstream_channel_id,
7215 val_to_str(profile_identifier, profile_id_vals, "Unknown Profile ID (%u)"), profile_identifier,
7216 val_to_str(status, opt_status_vals, "Unknown status (%u)"), status);
7217
7218 version = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_docsis_mgmt, KEY_MGMT_VERSION));
7219 if (version > 4) {
7220 multipart = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_docsis_mgmt, KEY_MGMT_MULTIPART));
7221 } else {
7222 multipart = 0;
7223 }
7224
7225 /* Reassemble TLVs */
7226 if (tvb_reported_length_remaining(tvb, 5) > 0) {
7227 if (version > 4 && multipart) {
7228 /* Fragmented data */
7229 number_of_fragments = (multipart >> 4);
7230 fragment_sequence_number = (multipart & 0x0F);
7231
7232 /* DOCSIS MAC management messages do not have network (IP) address. Use link (MAC) address instead. Same workflow as in wimax. */
7233 /* Save address pointers. */
7234 copy_address_shallow(&save_src, &pinfo->src);
7235 copy_address_shallow(&save_dst, &pinfo->dst);
7236 /* Use dl_src and dl_dst in defragmentation. */
7237 copy_address_shallow(&pinfo->src, &pinfo->dl_src);
7238 copy_address_shallow(&pinfo->dst, &pinfo->dl_dst);
7239
7240 fragment_head* fh = fragment_add_seq_check(&docsis_opt_tlv_reassembly_table, tvb, 5, pinfo, downstream_channel_id, NULL,
7241 fragment_sequence_number,
7242 tvb_reported_length_remaining(tvb, 5),
7243 (fragment_sequence_number != number_of_fragments));
7244
7245 /* Restore address pointers. */
7246 copy_address_shallow(&pinfo->src, &save_src);
7247 copy_address_shallow(&pinfo->dst, &save_dst);
7248
7249 if (fh) {
7250 tlv_tvb = process_reassembled_data(tvb, 5, pinfo, "Reassembled OPT TLV", fh, &docsis_tlv_frag_items,
7251 NULL, opt_tree);
7252
7253 if (tlv_tvb && tvb_reported_length(tlv_tvb) > 0) {
7254 dissect_optrsp_tlv(tlv_tvb, pinfo, opt_tree);
7255 }
7256 }
7257 } else { /* version > 4 && multipart */
7258 tlv_tvb = tvb_new_subset_remaining (tvb, 5);
7259 dissect_optrsp_tlv(tlv_tvb, pinfo, opt_tree);
7260 }
7261 }
7262
7263 return tvb_reported_length(tvb);
7264 }
7265
7266 static int
dissect_optack(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)7267 dissect_optack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
7268 {
7269 proto_item *it;
7270 proto_tree *opt_tree;
7271
7272 guint32 downstream_channel_id, profile_identifier;
7273
7274 it = proto_tree_add_item(tree, proto_docsis_optack, tvb, 0, -1, ENC_NA);
7275 opt_tree = proto_item_add_subtree (it, ett_docsis_optack);
7276 proto_tree_add_item (opt_tree, hf_docsis_optack_reserved, tvb, 0, 2, ENC_BIG_ENDIAN);
7277 proto_tree_add_item_ret_uint (opt_tree, hf_docsis_mgt_down_chid, tvb, 2, 1, ENC_BIG_ENDIAN, &downstream_channel_id);
7278 proto_tree_add_item_ret_uint (opt_tree, hf_docsis_optack_prof_id, tvb, 3, 1, ENC_BIG_ENDIAN, &profile_identifier);
7279
7280 col_add_fstr (pinfo->cinfo, COL_INFO, "OPT-ACK: DS CH ID: %u, Profile ID: %s (%u)", downstream_channel_id,
7281 val_to_str(profile_identifier, profile_id_vals, "Unknown Profile ID (%u)"), profile_identifier);
7282
7283 return tvb_captured_length(tvb);
7284 }
7285
7286 static int
dissect_rba(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)7287 dissect_rba (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
7288 {
7289 proto_item *it, *rba_direction_it;
7290 proto_tree *rba_tree;
7291
7292 guint32 tg_id, dcid;
7293 guint32 subband_index, nr_of_subbands;
7294
7295 static int * const rba_control_byte[] = {
7296 &hf_docsis_rba_resource_block_change_bit,
7297 &hf_docsis_rba_expiration_time_valid_bit,
7298 &hf_docsis_rba_control_byte_bitmask_rsvd,
7299 NULL
7300 };
7301
7302 it = proto_tree_add_item(tree, proto_docsis_rba, tvb, 0, -1, ENC_NA);
7303 rba_tree = proto_item_add_subtree (it, ett_docsis_rba);
7304 proto_tree_add_item_ret_uint (rba_tree, hf_docsis_rba_tg_id, tvb, 0, 1, ENC_BIG_ENDIAN, &tg_id);
7305 proto_tree_add_item (rba_tree, hf_docsis_rba_ccc, tvb, 1, 1, ENC_BIG_ENDIAN);
7306 proto_tree_add_item_ret_uint (rba_tree, hf_docsis_rba_dcid, tvb, 2, 1, ENC_BIG_ENDIAN, &dcid);
7307 proto_tree_add_bitmask (rba_tree, tvb, 3, hf_docsis_rba_control_byte_bitmask, ett_docsis_rba_control_byte, rba_control_byte, ENC_BIG_ENDIAN);
7308 proto_tree_add_item (rba_tree, hf_docsis_rba_rba_time, tvb, 4, 4, ENC_BIG_ENDIAN);
7309 proto_tree_add_item (rba_tree, hf_docsis_rba_rba_expiration_time, tvb, 8, 4, ENC_BIG_ENDIAN);
7310 proto_tree_add_item_ret_uint (rba_tree, hf_docsis_rba_number_of_subbands, tvb, 12, 1, ENC_BIG_ENDIAN, &nr_of_subbands);
7311 for (subband_index =0; subband_index < nr_of_subbands; ++subband_index) {
7312 rba_direction_it = proto_tree_add_item (rba_tree, hf_docsis_rba_subband_direction, tvb, 13 + subband_index, 1, ENC_BIG_ENDIAN);
7313 proto_item_prepend_text(rba_direction_it, "Sub-band %d: ", subband_index);
7314 }
7315
7316 col_add_fstr (pinfo->cinfo, COL_INFO, "RBA: TG_ID: %u, DCID: %u", tg_id, dcid);
7317
7318 return tvb_captured_length(tvb);
7319 }
7320
7321 static int
dissect_macmgmt(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * data _U_)7322 dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
7323 {
7324 guint32 type, version, dsap, ssap, msg_len;
7325 proto_item *mgt_hdr_it;
7326 proto_tree *mgt_hdr_tree;
7327 tvbuff_t *payload_tvb;
7328 guint8 multipart;
7329
7330 col_set_str (pinfo->cinfo, COL_PROTOCOL, "DOCSIS MGMT");
7331
7332 col_clear(pinfo->cinfo, COL_INFO);
7333
7334 set_address_tvb (&pinfo->dl_src, AT_ETHER, 6, tvb, 6);
7335 copy_address_shallow(&pinfo->src, &pinfo->dl_src);
7336 set_address_tvb (&pinfo->dl_dst, AT_ETHER, 6, tvb, 0);
7337 copy_address_shallow(&pinfo->dst, &pinfo->dl_dst);
7338
7339 static int * const multipart_field[] = {
7340 &hf_docsis_mgt_multipart_number_of_fragments,
7341 &hf_docsis_mgt_multipart_fragment_sequence_number,
7342 NULL
7343 };
7344
7345 //We need version and type for decoding of ssap and dsap field: in case of RNG-REQ, these fields can contain the Transmit Power Level.
7346 version = tvb_get_guint8 (tvb, 17);
7347 type = tvb_get_guint8 (tvb, 18);
7348 dsap = tvb_get_guint8 (tvb, 14);
7349 ssap = tvb_get_guint8 (tvb, 15);
7350
7351 mgt_hdr_it = proto_tree_add_item (tree, proto_docsis_mgmt, tvb, 0, 20, ENC_NA);
7352 mgt_hdr_tree = proto_item_add_subtree (mgt_hdr_it, ett_docsis_mgmt);
7353 proto_tree_add_item (mgt_hdr_tree, hf_docsis_mgt_dst_addr, tvb, 0, 6, ENC_NA);
7354 proto_tree_add_item (mgt_hdr_tree, hf_docsis_mgt_src_addr, tvb, 6, 6, ENC_NA);
7355 proto_tree_add_item_ret_uint (mgt_hdr_tree, hf_docsis_mgt_msg_len, tvb, 12, 2, ENC_BIG_ENDIAN, &msg_len);
7356
7357 if ( ((type == MGT_RNG_REQ) || type == MGT_B_INIT_RNG_REQ)
7358 && version == 5
7359 && !(ssap==0 && dsap == 0) ) {
7360 //RNG_REQ or BONDED_INIT_RNG_REQ with upstream transmit power reporting, sent to 3.1 CMTS
7361 proto_tree_add_item (mgt_hdr_tree, hf_docsis_mgt_31_transmit_power, tvb, 14, 2, ENC_BIG_ENDIAN);
7362 } else if ( ((type == MGT_RNG_REQ && version == 1) || (type == MGT_B_INIT_RNG_REQ && version == 4))
7363 && ssap != 0 ) {
7364 //RNG_REQ or BONDED_INIT_RNG_REQ with upstream transmit power reporting, sent to 3.0 CMTS
7365 proto_tree_add_item (mgt_hdr_tree, hf_docsis_mgt_dsap, tvb, 14, 1, ENC_BIG_ENDIAN);
7366 proto_tree_add_item (mgt_hdr_tree, hf_docsis_mgt_30_transmit_power, tvb, 15, 1, ENC_BIG_ENDIAN);
7367 } else {
7368 proto_tree_add_item (mgt_hdr_tree, hf_docsis_mgt_dsap, tvb, 14, 1, ENC_BIG_ENDIAN);
7369 proto_tree_add_item (mgt_hdr_tree, hf_docsis_mgt_ssap, tvb, 15, 1, ENC_BIG_ENDIAN);
7370 }
7371
7372 proto_tree_add_item (mgt_hdr_tree, hf_docsis_mgt_control, tvb, 16, 1, ENC_BIG_ENDIAN);
7373 proto_tree_add_item (mgt_hdr_tree, hf_docsis_mgt_version, tvb, 17, 1, ENC_BIG_ENDIAN);
7374 proto_tree_add_item (mgt_hdr_tree, hf_docsis_mgt_type, tvb, 18, 1, ENC_BIG_ENDIAN);
7375
7376 p_add_proto_data(pinfo->pool, pinfo, proto_docsis_mgmt, KEY_MGMT_VERSION, GUINT_TO_POINTER(version));
7377
7378 if (version < 5) {
7379 proto_tree_add_item (mgt_hdr_tree, hf_docsis_mgt_rsvd, tvb, 19, 1, ENC_BIG_ENDIAN);
7380 } else {
7381 proto_tree_add_bitmask(mgt_hdr_tree, tvb, 19, hf_docsis_mgt_multipart, ett_sub_tlv, multipart_field, ENC_BIG_ENDIAN);
7382 multipart = tvb_get_guint8 (tvb, 19);
7383 p_add_proto_data(pinfo->pool, pinfo, proto_docsis_mgmt, KEY_MGMT_MULTIPART, GUINT_TO_POINTER(multipart));
7384 }
7385
7386 /* Code to Call subdissector */
7387 /* sub-dissectors are based on the type field */
7388 payload_tvb = tvb_new_subset_length (tvb, 20, msg_len - 6);
7389
7390 /* Special case: map needs version. Two types of MAPs exist, with some difference in encoding: MAPv1 and MAPv5. See also DOCSIS3.1 MULPI spec */
7391 if (type == MGT_MAP) {
7392 if (!dissector_try_uint(docsis_mgmt_dissector_table, 256*version + type, payload_tvb, pinfo, tree)) {
7393 call_data_dissector(payload_tvb, pinfo, tree);
7394 }
7395 } else {
7396 if (!dissector_try_uint(docsis_mgmt_dissector_table, type, payload_tvb, pinfo, tree)) {
7397 call_data_dissector(payload_tvb, pinfo, tree);
7398 }
7399 }
7400
7401 return tvb_captured_length(tvb);
7402 }
7403
7404 /* Register the protocol with Wireshark */
7405 void
proto_register_docsis_mgmt(void)7406 proto_register_docsis_mgmt (void)
7407 {
7408 static hf_register_info hf[] = {
7409 /* Sync Message */
7410 {&hf_docsis_sync_cmts_timestamp,
7411 {"CMTS Timestamp", "docsis_sync.cmts_timestamp",
7412 FT_UINT32, BASE_DEC, NULL, 0x0,
7413 "Sync CMTS Timestamp", HFILL}
7414 },
7415 /* UCD */
7416 {&hf_docsis_ucd_config_ch_cnt,
7417 {"Config Change Count", "docsis_ucd.confcngcnt",
7418 FT_UINT8, BASE_DEC, NULL, 0x0,
7419 "Configuration Change Count", HFILL}
7420 },
7421 {&hf_docsis_ucd_mini_slot_size,
7422 {"Mini Slot Size (6.25us TimeTicks)", "docsis_ucd.mslotsize",
7423 FT_UINT8, BASE_DEC, NULL, 0x0,
7424 NULL, HFILL}
7425 },
7426 {&hf_docsis_ucd_type,
7427 {"Type", "docsis_ucd.type",
7428 FT_UINT8, BASE_DEC, VALS(channel_tlv_vals), 0x0,
7429 "Channel TLV type", HFILL}
7430 },
7431 {&hf_docsis_ucd_length,
7432 {"Length", "docsis_ucd.length",
7433 FT_UINT8, BASE_DEC, NULL, 0x0,
7434 "Channel TLV length", HFILL}
7435 },
7436 {&hf_docsis_ucd_burst_type,
7437 {"Type", "docsis_ucd.burst.tlvtype",
7438 FT_UINT8, BASE_DEC, VALS(burst_tlv_vals), 0x0,
7439 "Burst TLV type", HFILL}
7440 },
7441 {&hf_docsis_ucd_burst_length,
7442 {"Length", "docsis_ucd.burst.tlvlen",
7443 FT_UINT8, BASE_DEC, NULL, 0x0,
7444 "Burst TLV length", HFILL}
7445 },
7446 {&hf_docsis_ucd_symbol_rate,
7447 {"Symbol Rate (ksym/sec)", "docsis_ucd.symrate",
7448 FT_UINT8, BASE_DEC, NULL, 0x0,
7449 "Symbol Rate", HFILL}
7450 },
7451 {&hf_docsis_ucd_frequency,
7452 {"Frequency (Hz)", "docsis_ucd.freq",
7453 FT_UINT32, BASE_DEC, NULL, 0x0,
7454 "Upstream Center Frequency", HFILL}
7455 },
7456 {&hf_docsis_ucd_preamble_pat,
7457 {"Preamble Pattern", "docsis_ucd.preamble",
7458 FT_BYTES, BASE_NONE, NULL, 0x0,
7459 "Preamble Superstring", HFILL}
7460 },
7461 {&hf_docsis_ucd_ext_preamble_pat,
7462 {"Extended Preamble Pattern", "docsis_ucd.extpreamble",
7463 FT_BYTES, BASE_NONE, NULL, 0x0,
7464 "Extended Preamble Superstring", HFILL}
7465 },
7466 {&hf_docsis_ucd_scdma_mode_enabled,
7467 {"S-CDMA Mode Enabled", "docsis_ucd.scdma",
7468 FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
7469 NULL, HFILL}
7470 },
7471 {&hf_docsis_ucd_scdma_spreading_interval,
7472 {"SCDMA Spreading Interval", "docsis_ucd.scdmaspreadinginterval",
7473 FT_BYTES, BASE_NONE, NULL, 0x0,
7474 NULL, HFILL}
7475 },
7476 {&hf_docsis_ucd_scdma_codes_per_mini_slot,
7477 {"SCDMA Codes per mini slot", "docsis_ucd.scdmacodesperminislot",
7478 FT_BYTES, BASE_NONE, NULL, 0x0,
7479 NULL, HFILL}
7480 },
7481 {&hf_docsis_ucd_scdma_active_codes,
7482 {"SCDMA Active Codes", "docsis_ucd.scdmaactivecodes",
7483 FT_BYTES, BASE_NONE, NULL, 0x0,
7484 NULL, HFILL}
7485 },
7486 {&hf_docsis_ucd_scdma_code_hopping_seed,
7487 {"SCDMA Code Hopping Seed", "docsis_ucd.scdmacodehoppingseed",
7488 FT_BYTES, BASE_NONE, NULL, 0x0,
7489 NULL, HFILL}
7490 },
7491 {&hf_docsis_ucd_scdma_us_ratio_num,
7492 {"SCDMA US Ratio Numerator", "docsis_ucd.scdmausrationum",
7493 FT_BYTES, BASE_NONE, NULL, 0x0,
7494 NULL, HFILL}
7495 },
7496 {&hf_docsis_ucd_scdma_us_ratio_denom,
7497 {"SCDMA US Ratio Denominator", "docsis_ucd.scdmausratiodenom",
7498 FT_BYTES, BASE_NONE, NULL, 0x0,
7499 NULL, HFILL}
7500 },
7501 {&hf_docsis_ucd_scdma_timestamp_snapshot,
7502 {"SCDMA Timestamp Snapshot", "docsis_ucd.scdmatimestamp",
7503 FT_BYTES, BASE_NONE, NULL, 0x0,
7504 NULL, HFILL}
7505 },
7506 {&hf_docsis_ucd_maintain_power_spectral_density,
7507 {"Maintain Power Spectral Density", "docsis_ucd.maintpower",
7508 FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
7509 NULL, HFILL}
7510 },
7511 {&hf_docsis_ucd_ranging_required,
7512 {"Ranging Required", "docsis_ucd.rangingreq",
7513 FT_UINT8, BASE_DEC, VALS (ranging_req_vals), 0x0,
7514 NULL, HFILL}
7515 },
7516 {&hf_docsis_ucd_max_scheduled_codes,
7517 {"S-CDMA Max Scheduled Codes", "docsis_ucd.scdmamaxcodes",
7518 FT_UINT8, BASE_DEC, VALS (max_scheduled_codes_vals), 0x0,
7519 NULL, HFILL}
7520 },
7521 {&hf_docsis_ucd_rnghoff_cm,
7522 {"Ranging Hold-Off (CM)","docsis_ucd.rnghoffcm",
7523 FT_BOOLEAN, 32, TFS(&tfs_allow_inhibit), 0x1,
7524 NULL, HFILL}
7525 },
7526 {&hf_docsis_ucd_rnghoff_erouter,
7527 {"Ranging Hold-Off (eRouter)",
7528 "docsis_ucd.rnghofferouter",
7529 FT_BOOLEAN, 32, TFS(&tfs_allow_inhibit), 0x2,
7530 NULL, HFILL}
7531 },
7532 {&hf_docsis_ucd_rnghoff_emta,
7533 {"Ranging Hold-Off (eMTA or EDVA)",
7534 "docsis_ucd.rnghoffemta",
7535 FT_BOOLEAN, 32, TFS(&tfs_allow_inhibit), 0x4,
7536 NULL, HFILL}
7537 },
7538 {&hf_docsis_ucd_rnghoff_estb,
7539 {"Ranging Hold-Off (DSG/eSTB)",
7540 "docsis_ucd.rnghoffestb",
7541 FT_BOOLEAN, 32, TFS(&tfs_allow_inhibit), 0x8,
7542 NULL, HFILL}
7543 },
7544 {&hf_docsis_ucd_rnghoff_rsvd,
7545 {"Reserved",
7546 "docsis_ucd.rnghoffrsvd",
7547 FT_UINT32, BASE_HEX, NULL, 0xFFF0,
7548 NULL, HFILL}
7549 },
7550 {&hf_docsis_ucd_rnghoff_id_ext,
7551 {"CM Ranging Class ID Extension",
7552 "docsis_ucd.rngidext",
7553 FT_UINT32, BASE_HEX, NULL, 0xFFFF0000,
7554 NULL, HFILL}
7555 },
7556 {&hf_docsis_ucd_chan_class_id_cm,
7557 {"Channel Class ID (CM)","docsis_ucd.classidcm",
7558 FT_UINT32, BASE_DEC, VALS (inhibit_allow_vals), 0x1,
7559 NULL, HFILL}
7560 },
7561 {&hf_docsis_ucd_chan_class_id_erouter,
7562 {"Channel Class ID (eRouter)",
7563 "docsis_ucd.classiderouter",
7564 FT_UINT32, BASE_DEC, VALS (inhibit_allow_vals), 0x2,
7565 NULL, HFILL}
7566 },
7567 {&hf_docsis_ucd_chan_class_id_emta,
7568 {"Channel Class ID (eMTA or EDVA)",
7569 "docsis_ucd.classidemta",
7570 FT_UINT32, BASE_DEC, VALS (inhibit_allow_vals), 0x4,
7571 NULL, HFILL}
7572 },
7573 {&hf_docsis_ucd_chan_class_id_estb,
7574 {"Channel Class ID (DSG/eSTB)",
7575 "docsis_ucd.classidestb",
7576 FT_UINT32, BASE_DEC, VALS (inhibit_allow_vals), 0x8,
7577 NULL, HFILL}
7578 },
7579 {&hf_docsis_ucd_chan_class_id_rsvd,
7580 {"Reserved",
7581 "docsis_ucd.classidrsvd",
7582 FT_UINT32, BASE_HEX, NULL, 0xFFF0,
7583 NULL, HFILL}
7584 },
7585 {&hf_docsis_ucd_chan_class_id_id_ext,
7586 {"CM Ranging Class ID Extension",
7587 "docsis_ucd.classidext",
7588 FT_UINT32, BASE_HEX, NULL, 0xFFFF0000,
7589 NULL, HFILL}
7590 },
7591 {&hf_docsis_ucd_change_ind_bitmask_subc_excl_band,
7592 {"UCD Change Indicator Bitmask: Subcarrier Exclusion Band TLV", "docsis_ucd.burst.ucd_change_ind_bitmask_subc_excl_band",
7593 FT_BOOLEAN, 8, TFS(&tfs_ucd_change_ind_vals), 0x01,
7594 NULL, HFILL}
7595 },
7596 {&hf_docsis_ucd_change_ind_bitmask_unused_subc,
7597 {"UCD Change Indicator Bitmask: Unused Subcarrier Specification TLV", "docsis_ucd.burst.ucd_change_ind_bitmask_unused_subc",
7598 FT_BOOLEAN, 8, TFS(&tfs_ucd_change_ind_vals), 0x02,
7599 NULL, HFILL}
7600 },
7601 {&hf_docsis_ucd_change_ind_bitmask_other_subc,
7602 {"UCD Change Indicator Bitmask: Other than Subcarrier Exclusion Band and Unused Subcarrier Specification TLV", "docsis_ucd.burst.ucd_change_ind_bitmask_other_subc",
7603 FT_BOOLEAN, 8, TFS(&tfs_ucd_change_ind_vals), 0x04,
7604 NULL, HFILL}
7605 },
7606 {&hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc5,
7607 {"UCD Change Indicator Bitmask: Burst Attributes associated with IUC5", "docsis_ucd.burst.ucd_change_ind_bitmask_burst_attr_iuc5",
7608 FT_BOOLEAN, 8, TFS(&tfs_ucd_change_ind_vals), 0x08,
7609 NULL, HFILL}
7610 },
7611 {&hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc6,
7612 {"UCD Change Indicator Bitmask: Burst Attributes associated with IUC6", "docsis_ucd.burst.ucd_change_ind_bitmask_burst_attr_iuc6",
7613 FT_BOOLEAN, 8, TFS(&tfs_ucd_change_ind_vals), 0x10,
7614 NULL, HFILL}
7615 },
7616 {&hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc9,
7617 {"UCD Change Indicator Bitmask: Burst Attributes associated with IUC9", "docsis_ucd.burst.ucd_change_ind_bitmask_burst_attr_iuc9",
7618 FT_BOOLEAN, 8, TFS(&tfs_ucd_change_ind_vals), 0x20,
7619 NULL, HFILL}
7620 },
7621 {&hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc10,
7622 {"UCD Change Indicator Bitmask: Burst Attributes associated with IUC10", "docsis_ucd.burst.ucd_change_ind_bitmask_burst_attr_iuc10",
7623 FT_BOOLEAN, 8, TFS(&tfs_ucd_change_ind_vals), 0x40,
7624 NULL, HFILL}
7625 },
7626 {&hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc11,
7627 {"UCD Change Indicator Bitmask: Burst Attributes associated with IUC11", "docsis_ucd.burst.ucd_change_ind_bitmask_burst_attr_iuc11",
7628 FT_BOOLEAN, 8, TFS(&tfs_ucd_change_ind_vals), 0x80,
7629 NULL, HFILL}
7630 },
7631 {&hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc12,
7632 {"UCD Change Indicator Bitmask: Burst Attributes associated with IUC12", "docsis_ucd.burst.ucd_change_ind_bitmask_burst_attr_iuc12",
7633 FT_BOOLEAN, 8, TFS(&tfs_ucd_change_ind_vals), 0x01,
7634 NULL, HFILL}
7635 },
7636 {&hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc13,
7637 {"UCD Change Indicator Bitmask: Burst Attributes associated with IUC13", "docsis_ucd.burst.ucd_change_ind_bitmask_burst_attr_iuc13",
7638 FT_BOOLEAN, 8, TFS(&tfs_ucd_change_ind_vals), 0x02,
7639 NULL, HFILL}
7640 },
7641 {&hf_docsis_ucd_change_ind_bitmask_burst_attr_iuc3_or_4,
7642 {"UCD Change Indicator Bitmask: Burst Attributes associated with IUC3 or IUC4", "docsis_ucd.burst.ucd_change_ind_bitmask_burst_attr_iuc3_or_4",
7643 FT_BOOLEAN, 8, TFS(&tfs_ucd_change_ind_vals), 0x04,
7644 NULL, HFILL}
7645 },
7646 {&hf_docsis_ucd_change_ind_bitmask_reserved,
7647 {"UCD Change Indicator Bitmask: Reserved", "docsis_ucd.burst.ucd_change_ind_bitmask_reserved",
7648 FT_UINT8, BASE_HEX, NULL, 0xF8,
7649 NULL, HFILL}
7650 },
7651 {&hf_docsis_ucd_ofdma_timestamp_snapshot,
7652 {"OFDMA Timestamp Snapshot", "docsis_ucd.ofdma_timestamp_snapshot",
7653 FT_BYTES, BASE_NONE, NULL, 0x00,
7654 NULL, HFILL}
7655 },
7656 {&hf_docsis_ucd_ofdma_timestamp_snapshot_reserved,
7657 {"OFDMA Timestamp Snapshot - Reserved", "docsis_ucd.ofdma_timestamp_snapshot_reserved",
7658 FT_UINT40, BASE_HEX, NULL, 0xF000000000,
7659 NULL, HFILL}
7660 },
7661 {&hf_docsis_ucd_ofdma_timestamp_snapshot_d30timestamp,
7662 {"OFDMA Timestamp Snapshot - D3.0 timestamp", "docsis_ucd.ofdma_timestamp_snapshot_d30timestamp",
7663 FT_UINT40, BASE_HEX, NULL, 0x0FFFFFFFF0,
7664 NULL, HFILL}
7665 },
7666 {&hf_docsis_ucd_ofdma_timestamp_snapshot_4msbits_of_div20,
7667 {"OFDMA Timestamp Snapshot - 4 Most Significant bits of div20 field", "docsis_ucd.ofdma_timestamp_snapshot_4msbits_of_div20",
7668 FT_UINT40, BASE_HEX, NULL, 0x000000000F,
7669 NULL, HFILL}
7670 },
7671 {&hf_docsis_ucd_ofdma_timestamp_snapshot_minislot_count,
7672 {"OFDMA Timestamp Snapshot - Minislot Count", "docsis_ucd.ofdma_timestamp_snapshot_minislot_count",
7673 FT_UINT32, BASE_HEX, NULL, 0x0,
7674 NULL, HFILL}
7675 },
7676 {&hf_docsis_ucd_ofdma_cyclic_prefix_size,
7677 {"OFDMA Cyclic Prefix Size", "docsis_ucd.ofdma_cyclic_prefix_size",
7678 FT_UINT8, BASE_DEC, VALS(ofdma_cyclic_prefix_size_vals), 0x00,
7679 NULL, HFILL}
7680 },
7681 {&hf_docsis_ucd_ofdma_rolloff_period_size,
7682 {"OFDMA Rolloff Period Size", "docsis_ucd.ofdma_rolloff_period_size",
7683 FT_UINT8, BASE_DEC, VALS(ofdma_rolloff_period_size_vals), 0x00,
7684 NULL, HFILL}
7685 },
7686 {&hf_docsis_ucd_subc_spacing,
7687 {"Subcarrier Spacing", "docsis_ucd.subc_spacing",
7688 FT_UINT8, BASE_DEC, VALS(subc_spacing_vals), 0x00,
7689 NULL, HFILL}
7690 },
7691 {&hf_docsis_ucd_cent_freq_subc0,
7692 {"Center Frequency of Subcarrier 0", "docsis_ucd.cent_freq_subc0",
7693 FT_UINT8, BASE_DEC, NULL, 0x00,
7694 NULL, HFILL}
7695 },
7696 {&hf_docsis_ucd_subcarrier_range,
7697 {"Subcarrier range", "docsis_ucd.subc_range",
7698 FT_UINT32, BASE_CUSTOM, CF_FUNC(subc_assign_range), 0x00,
7699 NULL, HFILL}
7700 },
7701 {&hf_docsis_ucd_symb_ofdma_frame,
7702 {"Symbols in OFDMA frame", "docsis_ucd.symb_ofdma_frame",
7703 FT_UINT8, BASE_DEC, NULL, 0x00,
7704 NULL, HFILL}
7705 },
7706 {&hf_docsis_ucd_rand_seed,
7707 {"Randomization Seed", "docsis_ucd.rand_seed",
7708 FT_BYTES, BASE_NONE, NULL, 0x00,
7709 NULL, HFILL}
7710 },
7711 {&hf_docsis_ucd_iuc,
7712 {"Interval Usage Code", "docsis_ucd.iuc",
7713 FT_UINT8, BASE_DEC, VALS (iuc_vals), 0x0,
7714 NULL, HFILL}
7715 },
7716 {&hf_docsis_burst_mod_type,
7717 {"Modulation Type", "docsis_ucd.burst.modtype",
7718 FT_UINT8, BASE_DEC, VALS (mod_vals), 0x0,
7719 NULL, HFILL}
7720 },
7721 {&hf_docsis_burst_diff_encoding,
7722 {"Differential Encoding", "docsis_ucd.burst.diffenc",
7723 FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
7724 NULL, HFILL}
7725 },
7726 {&hf_docsis_burst_preamble_len,
7727 {"Preamble Length (Bits)", "docsis_ucd.burst.preamble_len",
7728 FT_UINT16, BASE_DEC, NULL, 0x0,
7729 NULL, HFILL}
7730 },
7731 {&hf_docsis_burst_preamble_val_off,
7732 {"Preamble Offset (Bits)", "docsis_ucd.burst.preamble_off",
7733 FT_UINT16, BASE_DEC, NULL, 0x0,
7734 NULL, HFILL}
7735 },
7736 {&hf_docsis_burst_fec,
7737 {"FEC (T)", "docsis_ucd.burst.fec",
7738 FT_UINT8, BASE_DEC, NULL, 0x0,
7739 "FEC (T) Codeword Parity Bits = 2^T", HFILL}
7740 },
7741 {&hf_docsis_burst_fec_codeword,
7742 {"FEC Codeword Info bytes (k)", "docsis_ucd.burst.fec_codeword",
7743 FT_UINT8, BASE_DEC, NULL, 0x0,
7744 NULL, HFILL}
7745 },
7746 {&hf_docsis_burst_scrambler_seed,
7747 {"Scrambler Seed", "docsis_ucd.burst.scrambler_seed",
7748 FT_UINT16, BASE_HEX, NULL, 0x0,
7749 "Burst Descriptor", HFILL}
7750 },
7751 {&hf_docsis_burst_max_burst,
7752 {"Max Burst Size (Minislots)", "docsis_ucd.burst.maxburst",
7753 FT_UINT8, BASE_DEC, NULL, 0x0,
7754 NULL, HFILL}
7755 },
7756 {&hf_docsis_burst_guard_time,
7757 {"Guard Time Size (Symbol Times)", "docsis_ucd.burst.guardtime",
7758 FT_UINT8, BASE_DEC, NULL, 0x0,
7759 "Guard Time Size", HFILL}
7760 },
7761 {&hf_docsis_burst_last_cw_len,
7762 {"Last Codeword Length", "docsis_ucd.burst.last_cw_len",
7763 FT_UINT8, BASE_DEC, VALS (last_cw_len_vals), 0x0,
7764 NULL, HFILL}
7765 },
7766 {&hf_docsis_burst_scrambler_onoff,
7767 {"Scrambler On/Off", "docsis_ucd.burst.scrambleronoff",
7768 FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
7769 NULL, HFILL}
7770 },
7771 {&hf_docsis_rs_int_depth,
7772 {"RS Interleaver Depth", "docsis_ucd.burst.rsintdepth",
7773 FT_UINT8, BASE_DEC, NULL, 0x0,
7774 "R-S Interleaver Depth", HFILL}
7775 },
7776 {&hf_docsis_rs_int_block,
7777 {"RS Interleaver Block Size", "docsis_ucd.burst.rsintblock",
7778 FT_UINT8, BASE_DEC, NULL, 0x0,
7779 "R-S Interleaver Block", HFILL}
7780 },
7781 {&hf_docsis_preamble_type,
7782 {"Preamble Type", "docsis_ucd.burst.preambletype",
7783 FT_UINT8, BASE_DEC, NULL, 0x0,
7784 NULL, HFILL}
7785 },
7786 {&hf_docsis_ucd_scdma_scrambler_onoff,
7787 {"Scrambler On/Off", "docsis_ucd.burst.scdmascrambleronoff",
7788 FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
7789 "SCDMA Scrambler On/Off", HFILL}
7790 },
7791 {&hf_docsis_ucd_scdma_codes_per_subframe,
7792 {"SCDMA Codes per Subframe", "docsis_ucd.burst.scdmacodespersubframe",
7793 FT_UINT8, BASE_DEC, NULL, 0x0,
7794 NULL, HFILL}
7795 },
7796 {&hf_docsis_ucd_scdma_framer_int_step_size,
7797 {"SCDMA Framer Interleaving Step Size", "docsis_ucd.burst.scdmaframerintstepsize",
7798 FT_UINT8, BASE_DEC, NULL, 0x0,
7799 NULL, HFILL}
7800 },
7801 {&hf_docsis_ucd_tcm_enabled,
7802 {"TCM Enabled", "docsis_ucd.burst.tcmenabled",
7803 FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
7804 NULL, HFILL}
7805 },
7806 {&hf_docsis_ucd_active_code_hopping,
7807 {"S-CDMA Selection Mode for Active Codes and Code Hopping", "docsis_ucd.selectcodehop",
7808 FT_UINT8, BASE_DEC, VALS (tlv20_vals), 0x0,
7809 NULL, HFILL}
7810 },
7811 {&hf_docsis_ucd_scdma_selection_active_codes,
7812 {"S-CDMA Selection String for Active Codes", "docsis_ucd.selectcode",
7813 FT_BYTES, BASE_NONE, NULL, 0x0,
7814 NULL, HFILL}
7815 },
7816 {&hf_docsis_ucd_higher_ucd_for_same_ucid,
7817 {"Higher UCD for the same UCID", "docsis_ucd.highucdpresent",
7818 FT_BOOLEAN, 8, TFS(&type35ucd_tfs_present_not_present), 0x1,
7819 NULL, HFILL}
7820 },
7821 {&hf_docsis_ucd_higher_ucd_for_same_ucid_resv,
7822 {"Reserved", "docsis_ucd.highucdresv",
7823 FT_UINT8, BASE_HEX, NULL, 0xFE,
7824 NULL, HFILL}
7825 },
7826 {&hf_docsis_subc_init_rang,
7827 {"Subcarriers (Nir) Initial Ranging", "docsis_ucd.burst.subc_init_rang",
7828 FT_UINT16, BASE_DEC, NULL, 0x0,
7829 NULL, HFILL}
7830 },
7831 {&hf_docsis_subc_fine_rang,
7832 {"Subcarriers (Nfr) Fine Ranging", "docsis_ucd.burst.subc_fine_rang",
7833 FT_UINT16, BASE_DEC, NULL, 0x0,
7834 NULL, HFILL}
7835 },
7836 {&hf_docsis_ofdma_prof_mod_order,
7837 {"OFDMA Profile: modulation", "docsis_ucd.burst.ofma_prof_mod_order",
7838 FT_UINT8, BASE_DEC, VALS(ofdma_prof_mod_order), 0xF0,
7839 NULL, HFILL}
7840 },
7841 {&hf_docsis_ofdma_prof_pilot_pattern,
7842 {"OFDMA Profile: pilot pattern", "docsis_ucd.burst.ofma_prof_pilot_pattern",
7843 FT_UINT8, BASE_DEC, NULL, 0x0F,
7844 NULL, HFILL}
7845 },
7846 {&hf_docsis_ofdma_prof_num_add_minislots,
7847 {"OFDMA Profile: Additional Minislots that have identical bit-loading and pilot pattern index", "docsis_ucd.burst.ofma_prof_add_minislots",
7848 FT_UINT8, BASE_DEC, NULL, 0x00,
7849 NULL, HFILL}
7850 },
7851 {&hf_docsis_ofdma_ir_pow_ctrl_start_pow,
7852 {"OFDMA IR Power Control Starting Power Level", "docsis_ucd.burst.ofma_ir_pow_ctrl_start_pow",
7853 FT_UINT8, BASE_CUSTOM, CF_FUNC(ofdma_ir_pow_ctrl_start_pow), 0x00,
7854 NULL, HFILL}
7855 },
7856 {&hf_docsis_ofdma_ir_pow_ctrl_step_size,
7857 {"OFDMA IR Power Control Step Size", "docsis_ucd.burst.ofma_ir_pow_ctrl_step_size",
7858 FT_UINT8, BASE_CUSTOM, CF_FUNC(ofdma_ir_pow_ctrl_step_size), 0x00,
7859 NULL, HFILL}
7860 },
7861 /* MAP */
7862 {&hf_docsis_map_ucd_count,
7863 {"UCD Count", "docsis_map.ucdcount",
7864 FT_UINT8, BASE_DEC, NULL, 0x0,
7865 "Map UCD Count", HFILL}
7866 },
7867 {&hf_docsis_map_numie,
7868 {"Number of IE's", "docsis_map.numie",
7869 FT_UINT8, BASE_DEC, NULL, 0x0,
7870 "Number of Information Elements", HFILL}
7871 },
7872 {&hf_docsis_map_numie_v5,
7873 {"Number of IE's", "docsis_map.numie",
7874 FT_UINT16, BASE_DEC, NULL, 0xFF80,
7875 "Number of Information Elements", HFILL}
7876 },
7877 {&hf_docsis_map_rsvd_v5,
7878 {"Reserved [0x00]", "docsis_map.rsvd",
7879 FT_UINT8, BASE_HEX, NULL, 0x70,
7880 "Reserved Byte", HFILL}
7881 },
7882 {&hf_docsis_map_cat,
7883 {"CAT", "docsis_map.cat",
7884 FT_UINT8, BASE_HEX, NULL, 0x0F,
7885 NULL, HFILL}
7886 },
7887
7888 {&hf_docsis_map_alloc_start,
7889 {"Alloc Start Time (minislots)", "docsis_map.allocstart",
7890 FT_UINT32, BASE_DEC, NULL, 0x0,
7891 NULL, HFILL}
7892 },
7893 {&hf_docsis_map_ack_time,
7894 {"ACK Time (minislots)", "docsis_map.acktime",
7895 FT_UINT32, BASE_DEC, NULL, 0x0,
7896 NULL, HFILL}
7897 },
7898 {&hf_docsis_map_rng_start,
7899 {"Ranging Backoff Start", "docsis_map.rng_start",
7900 FT_UINT8, BASE_DEC, NULL, 0x0,
7901 NULL, HFILL}
7902 },
7903 {&hf_docsis_map_rng_end,
7904 {"Ranging Backoff End", "docsis_map.rng_end",
7905 FT_UINT8, BASE_DEC, NULL, 0x0,
7906 NULL, HFILL}
7907 },
7908 {&hf_docsis_map_data_start,
7909 {"Data Backoff Start", "docsis_map.data_start",
7910 FT_UINT8, BASE_DEC, NULL, 0x0,
7911 NULL, HFILL}
7912 },
7913 {&hf_docsis_map_data_end,
7914 {"Data Backoff End", "docsis_map.data_end",
7915 FT_UINT8, BASE_DEC, NULL, 0x0,
7916 NULL, HFILL}
7917 },
7918 {&hf_docsis_map_ie,
7919 {"Information Element", "docsis_map.ie",
7920 FT_UINT32, BASE_HEX, NULL, 0x0,
7921 NULL, HFILL}
7922 },
7923 {&hf_docsis_map_probe_ie,
7924 {"Probe Information Element", "docsis_map.probe_ie",
7925 FT_UINT32, BASE_HEX, NULL, 0x0,
7926 NULL, HFILL}
7927 },
7928 {&hf_docsis_map_rsvd,
7929 {"Reserved", "docsis_map.rsvd",
7930 FT_UINT8, BASE_HEX, NULL, 0x0,
7931 "Reserved Byte", HFILL}
7932 },
7933 {&hf_docsis_map_sid,
7934 {"Service Identifier", "docsis_map.sid",
7935 FT_UINT32, BASE_DEC, NULL, 0xFFFC0000,
7936 NULL, HFILL}
7937 },
7938 {&hf_docsis_map_iuc,
7939 {"Interval Usage Code", "docsis_map.iuc",
7940 FT_UINT32, BASE_DEC, VALS(iuc_vals), 0x0003c000,
7941 NULL, HFILL}
7942 },
7943 {&hf_docsis_map_offset,
7944 {"Offset", "docsis_map.offset",
7945 FT_UINT32, BASE_DEC, NULL, 0x00003fff,
7946 NULL, HFILL}
7947 },
7948 {&hf_docsis_map_mer,
7949 {"MER", "docsis_map.mer",
7950 FT_BOOLEAN, 32, TFS(&mer_vals), 0x00020000,
7951 NULL, HFILL}
7952 },
7953 {&hf_docsis_map_pw,
7954 {"PW (Power)", "docsis_map.pw",
7955 FT_BOOLEAN, 32, TFS(&pw_vals), 0x00010000,
7956 NULL, HFILL}
7957 },
7958 {&hf_docsis_map_eq,
7959 {"EQ (TX Equalization)", "docsis_map.eq",
7960 FT_BOOLEAN, 32, TFS(&eq_vals), 0x00008000,
7961 NULL, HFILL}
7962 },
7963 {&hf_docsis_map_st,
7964 {"St (Stagger)", "docsis_map.st",
7965 FT_BOOLEAN, 32, TFS(&st_vals), 0x00004000,
7966 NULL, HFILL}
7967 },
7968 {&hf_docsis_map_probe_frame,
7969 {"Probe Frame", "docsis_map.probe_frame",
7970 FT_UINT32, BASE_DEC, NULL, 0x00003000,
7971 NULL, HFILL}
7972 },
7973 {&hf_docsis_map_symbol_in_frame,
7974 {"Symbol in Frame", "docsis_map.symbol_in_frame",
7975 FT_UINT32, BASE_DEC, NULL, 0x00000fc0,
7976 NULL, HFILL}
7977 },
7978 {&hf_docsis_map_start_subc,
7979 {"Start Subc", "docsis_map.start_subc",
7980 FT_UINT32, BASE_DEC, NULL, 0x00000038,
7981 NULL, HFILL}
7982 },
7983 {&hf_docsis_map_subc_skip,
7984 {"Subc Skip", "docsis_map.subc_skip",
7985 FT_UINT32, BASE_DEC, NULL, 0x00000007,
7986 NULL, HFILL}
7987 },
7988
7989 /* RNG-REQ */
7990 {&hf_docsis_rngreq_sid_field_bit15,
7991 {"SID field bit 15", "docsis_rngreq.sid_field_bit15",
7992 FT_BOOLEAN, 8, TFS(&sid_field_bit15_tfs), 0x80,
7993 NULL, HFILL}
7994 },
7995 {&hf_docsis_rngreq_sid_field_bit14,
7996 {"SID field bit 14", "docsis_rngreq.sid_field_bit14",
7997 FT_BOOLEAN, 8, TFS(&sid_field_bit14_tfs), 0x40,
7998 NULL, HFILL}
7999 },
8000 {&hf_docsis_rngreq_sid_field_bit15_14,
8001 {"SID field bit 15 to 14", "docsis_rngreq.sid_field_bit15_14",
8002 FT_UINT8, BASE_HEX, VALS(sid_field_bit15_14_vals), 0xC0,
8003 NULL, HFILL}
8004 },
8005 {&hf_docsis_rngreq_sid,
8006 {"Service Identifier", "docsis_rngreq.sid",
8007 FT_UINT16, BASE_DEC, NULL, 0x3FFF,
8008 NULL, HFILL}
8009 },
8010 {&hf_docsis_rngreq_pend_compl,
8011 {"Pending Till Complete", "docsis_rngreq.pendcomp",
8012 FT_UINT8, BASE_DEC, NULL, 0x0,
8013 "Upstream Channel ID", HFILL}
8014 },
8015 /* RNG-RSP */
8016 {&hf_docsis_rngrsp_type,
8017 {"Type", "docsis_rngrsp.type",
8018 FT_UINT8, BASE_DEC, VALS(rngrsp_tlv_vals), 0x0,
8019 "TLV Type", HFILL}
8020 },
8021 {&hf_docsis_rngrsp_length,
8022 {"Length", "docsis_rngrsp.length",
8023 FT_UINT8, BASE_DEC, NULL, 0x0,
8024 "TLV Length", HFILL}
8025 },
8026 {&hf_docsis_rngrsp_sid,
8027 {"Service Identifier", "docsis_rngrsp.sid",
8028 FT_UINT16, BASE_DEC, NULL, 0x0,
8029 NULL, HFILL}
8030 },
8031 {&hf_docsis_rngrsp_timing_adj,
8032 {"Timing Adjust (6.25us/64)", "docsis_rngrsp.timingadj",
8033 FT_INT32, BASE_DEC, NULL, 0x0,
8034 "Timing Adjust", HFILL}
8035 },
8036 {&hf_docsis_rngrsp_power_adj,
8037 {"Power Level Adjust (0.25dB units)", "docsis_rngrsp.poweradj",
8038 FT_INT8, BASE_DEC, NULL, 0x0,
8039 "Power Level Adjust", HFILL}
8040 },
8041 {&hf_docsis_rngrsp_freq_adj,
8042 {"Offset Freq Adjust (Hz)", "docsis_rngrsp.freqadj",
8043 FT_INT16, BASE_DEC, NULL, 0x0,
8044 "Frequency Adjust", HFILL}
8045 },
8046 {&hf_docsis_rngrsp_xmit_eq_adj,
8047 {"Transmit Equalization Adjust", "docsis_rngrsp.xmit_eq_adj",
8048 FT_BYTES, BASE_NONE, NULL, 0x0,
8049 NULL, HFILL}
8050 },
8051 {&hf_docsis_rngrsp_ranging_status,
8052 {"Ranging Status", "docsis_rngrsp.rng_stat",
8053 FT_UINT8, BASE_DEC, VALS (rng_stat_vals), 0x0,
8054 NULL, HFILL}
8055 },
8056 {&hf_docsis_rngrsp_down_freq_over,
8057 {"Downstream Frequency Override (Hz)", "docsis_rngrsp.freq_over",
8058 FT_UINT32, BASE_DEC, NULL, 0x0,
8059 "Downstream Frequency Override", HFILL}
8060 },
8061 {&hf_docsis_rngrsp_upstream_ch_over,
8062 {"Upstream Channel ID Override", "docsis_rngrsp.chid_override",
8063 FT_UINT8, BASE_DEC, NULL, 0x0,
8064 NULL, HFILL}
8065 },
8066 {&hf_docsis_rngrsp_xmit_eq_set,
8067 {"Transmit Equalization Set", "docsis_rngrsp.xmit_eq_set",
8068 FT_BYTES, BASE_NONE, NULL, 0x0,
8069 NULL, HFILL}
8070 },
8071 {&hf_docsis_rngrsp_rngrsp_t4_timeout_multiplier,
8072 {"Multiplier of the default T4 Timeout (the valid range is 1-10)", "docsis_rngrsp.t4_timeout_multiplier",
8073 FT_UINT8, BASE_DEC, NULL, 0x0,
8074 "T4 Timeout Multiplier", HFILL}
8075 },
8076 {&hf_docsis_rngrsp_dynamic_range_window_upper_edge,
8077 {"Dynamic Range Window Upper Edge (in units of 0.25 db below the max allowable setting)", "docsis_rngrsp.dynamic_range_window_upper_edge",
8078 FT_UINT8, BASE_DEC, NULL, 0x0,
8079 "Dynamic Range Window Upper EDGE", HFILL}
8080 },
8081 {&hf_docsis_rngrsp_tlv_unknown,
8082 {"Unknown TLV", "docsis_rngrsp.tlv.unknown",
8083 FT_BYTES, BASE_NONE, NULL, 0x0,
8084 NULL, HFILL}
8085 },
8086 {&hf_docsis_rngrsp_trans_eq_enc_scdma_tdma_main_tap_location,
8087 {"Main Tap Location", "docsis_rngrsp.tlv.trans_eq_enc_scdma_tdma.main_tap_location",
8088 FT_UINT8, BASE_DEC, NULL, 0x0,
8089 NULL, HFILL}
8090 },
8091 {&hf_docsis_rngrsp_trans_eq_enc_scdma_tdma_number_of_forward_taps_per_symbol,
8092 {"Number of Forward Taps per Symbol", "docsis_rngrsp.tlv.trans_eq_enc_scdma_tdma.nr_of_forward_taps_per_symbol",
8093 FT_UINT8, BASE_DEC, NULL, 0x0,
8094 NULL, HFILL}
8095 },
8096 {&hf_docsis_rngrsp_trans_eq_enc_scdma_tdma_number_of_forward_taps_n,
8097 {"Number of Forward Taps (N)", "docsis_rngrsp.tlv.trans_eq_enc_scdma_tdma.nr_of_forward_taps_n",
8098 FT_UINT8, BASE_DEC, NULL, 0x0,
8099 NULL, HFILL}
8100 },
8101 {&hf_docsis_rngrsp_trans_eq_enc_scdma_tdma_reserved,
8102 {"Reserved", "docsis_rngrsp.tlv.trans_eq_enc_scdma_tdma.reserved",
8103 FT_UINT8, BASE_DEC, NULL, 0x0,
8104 NULL, HFILL}
8105 },
8106 {&hf_docsis_rngrsp_trans_eq_data,
8107 {"Transmit equalization data", "docsis_rngrsp.tlv.trans_eq_data",
8108 FT_BYTES, BASE_NONE, NULL, 0x0,
8109 NULL, HFILL}
8110 },
8111 {&hf_docsis_rngrsp_trans_eq_enc_lowest_subc,
8112 {"Lowest Subcarrier for this TLV", "docsis_rngrsp.tlv.trans_eq_enc_lowest_subc",
8113 FT_UINT24, BASE_DEC, NULL, 0xFFF000,
8114 NULL, HFILL}
8115 },
8116 {&hf_docsis_rngrsp_trans_eq_enc_highest_subc,
8117 {"Highest Subcarrier for this TLV", "docsis_rngrsp.tlv.trans_eq_enc_highest_subc",
8118 FT_UINT24, BASE_DEC, NULL, 0x0FFF,
8119 NULL, HFILL}
8120 },
8121 {&hf_docsis_rngrsp_trans_eq_enc_coef_real,
8122 {"Coefficient (real)", "docsis_rngrsp.tlv.trans_eq_enc_coef_real",
8123 FT_INT16, BASE_CUSTOM, CF_FUNC(two_compl_frac), 0x0,
8124 NULL, HFILL}
8125 },
8126 {&hf_docsis_rngrsp_trans_eq_enc_coef_imag,
8127 {"Coefficient (imag)", "docsis_rngrsp.tlv.trans_eq_enc_coef_imag",
8128 FT_INT16, BASE_CUSTOM, CF_FUNC(two_compl_frac), 0x0,
8129 NULL, HFILL}
8130 },
8131 {&hf_docsis_rngrsp_commanded_power_data,
8132 {"Commanded Power Data", "docsis_rngrsp.tlv.comm_pwr_data",
8133 FT_BYTES, BASE_NONE, NULL, 0x00,
8134 NULL, HFILL}
8135 },
8136 {&hf_docsis_rngrsp_commanded_power_dynamic_range_window,
8137 {"Dynamic Range Window", "docsis_rngrsp.tlv.comm_pwr_dyn_range_window",
8138 FT_INT8, BASE_DEC, NULL, 0x00,
8139 NULL, HFILL}
8140 },
8141 {&hf_docsis_rngrsp_commanded_power_ucid,
8142 {"UCID", "docsis_rngrsp.tlv.comm_pwr_ucid",
8143 FT_INT8, BASE_DEC, NULL, 0x00,
8144 NULL, HFILL}
8145 },
8146 {&hf_docsis_rngrsp_commanded_power_trans_pow_lvl,
8147 {"Transmit Power Level (quarter dBmV)", "docsis_rngrsp.tlv.comm_pwr_trans_pow_lvl",
8148 FT_INT16, BASE_DEC, NULL, 0x00,
8149 NULL, HFILL}
8150 },
8151
8152 /* REG_REQ */
8153 {&hf_docsis_regreq_sid,
8154 {"Service Identifier", "docsis_regreq.sid",
8155 FT_UINT16, BASE_DEC, NULL, 0x0,
8156 NULL, HFILL}
8157 },
8158 /* REG_RSP */
8159 {&hf_docsis_regrsp_sid,
8160 {"Service Identifier", "docsis_regrsp.sid",
8161 FT_UINT16, BASE_DEC, NULL, 0x0,
8162 NULL, HFILL}
8163 },
8164 {&hf_docsis_regrsp_response,
8165 {"Response Code", "docsis_regrsp.respnse",
8166 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &docsis_conf_code_ext, 0x0,
8167 NULL, HFILL}
8168 },
8169 /* BPKM */
8170 {&hf_docsis_bpkm_code,
8171 {"BPKM Code", "docsis_bpkm.code",
8172 FT_UINT8, BASE_DEC, VALS (code_field_vals), 0x0,
8173 "BPKM Request Message", HFILL}
8174 },
8175 {&hf_docsis_bpkm_ident,
8176 {"BPKM Identifier", "docsis_bpkm.ident",
8177 FT_UINT8, BASE_DEC, NULL, 0x0,
8178 NULL, HFILL}
8179 },
8180 {&hf_docsis_bpkmattr,
8181 {"BPKM Attributes", "docsis_bpkm.attr",
8182 FT_BYTES, BASE_NONE|BASE_NO_DISPLAY_VALUE, NULL, 0x0,
8183 NULL, HFILL}
8184 },
8185 {&hf_docsis_bpkm_length,
8186 {"BPKM Length", "docsis_bpkm.length",
8187 FT_UINT16, BASE_DEC, NULL, 0x0,
8188 NULL, HFILL}
8189 },
8190 {&hf_docsis_bpkmattr_serial_num,
8191 {"Serial Number", "docsis_bpkm.attr.serialnum",
8192 FT_STRING, BASE_NONE, NULL, 0x0,
8193 NULL, HFILL}
8194 },
8195 {&hf_docsis_bpkmattr_manf_id,
8196 {"Manufacturer ID", "docsis_bpkm.attr.manfid",
8197 FT_BYTES, BASE_NONE, NULL, 0x0,
8198 NULL, HFILL}
8199 },
8200 {&hf_docsis_bpkmattr_mac_addr,
8201 {"MAC Address", "docsis_bpkm.attr.macaddr",
8202 FT_ETHER, BASE_NONE, NULL, 0x0,
8203 NULL, HFILL}
8204 },
8205 {&hf_docsis_bpkmattr_rsa_pub_key,
8206 {"RSA Public Key", "docsis_bpkm.attr.rsa_pub_key",
8207 FT_BYTES, BASE_NONE, NULL, 0x0,
8208 NULL, HFILL}
8209 },
8210 {&hf_docsis_bpkmattr_cm_id,
8211 {"CM Identification", "docsis_bpkm.attr.cmid",
8212 FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0,
8213 NULL, HFILL}
8214 },
8215 {&hf_docsis_bpkmattr_display_str,
8216 {"Display String", "docsis_bpkm.attr.dispstr",
8217 FT_STRING, BASE_NONE, NULL, 0x0,
8218 NULL, HFILL}
8219 },
8220 {&hf_docsis_bpkmattr_auth_key,
8221 {"Auth Key", "docsis_bpkm.attr.auth_key",
8222 FT_BYTES, BASE_NONE, NULL, 0x0,
8223 NULL, HFILL}
8224 },
8225 {&hf_docsis_bpkmattr_tek,
8226 {"Traffic Encryption Key", "docsis_bpkm.attr.tek",
8227 FT_BYTES, BASE_NONE, NULL, 0x0,
8228 NULL, HFILL}
8229 },
8230 {&hf_docsis_bpkmattr_key_life,
8231 {"Key Lifetime(s)", "docsis_bpkm.attr.keylife",
8232 FT_UINT32, BASE_DEC, NULL, 0x0,
8233 NULL, HFILL}
8234 },
8235 {&hf_docsis_bpkmattr_key_seq,
8236 {"Key Sequence Number", "docsis_bpkm.attr.keyseq",
8237 FT_UINT8, BASE_DEC, NULL, 0x0,
8238 NULL, HFILL}
8239 },
8240 {&hf_docsis_bpkmattr_hmac_digest,
8241 {"HMAC Digest", "docsis_bpkm.attr.hmacdigest",
8242 FT_BYTES, BASE_NONE, NULL, 0x0,
8243 NULL, HFILL}
8244 },
8245 {&hf_docsis_bpkmattr_said,
8246 {"SAID", "docsis_bpkm.attr.said",
8247 FT_UINT16, BASE_DEC, NULL, 0x0,
8248 "Security Association ID", HFILL}
8249 },
8250 {&hf_docsis_bpkmattr_tek_params,
8251 {"TEK Parameters", "docsis_bpkm.attr.tekparams",
8252 FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0,
8253 NULL, HFILL}
8254 },
8255 {&hf_docsis_bpkmattr_cbc_iv,
8256 {"CBC IV", "docsis_bpkm.attr.cbciv",
8257 FT_BYTES, BASE_NONE, NULL, 0x0,
8258 "Cypher Block Chaining", HFILL}
8259 },
8260 {&hf_docsis_bpkmattr_error_code,
8261 {"Error Code", "docsis_bpkm.attr.errcode",
8262 FT_UINT8, BASE_DEC, VALS (error_code_vals), 0x0,
8263 NULL, HFILL}
8264 },
8265 {&hf_docsis_bpkmattr_vendor_def,
8266 {"Vendor Defined", "docsis_bpkm.attr.vendordef",
8267 FT_BYTES, BASE_NONE, NULL, 0x0,
8268 NULL, HFILL}
8269 },
8270 {&hf_docsis_bpkmattr_ca_cert,
8271 {"CA Certificate", "docsis_bpkm.attr.cacert",
8272 FT_BYTES, BASE_NONE, NULL, 0x0,
8273 NULL, HFILL}
8274 },
8275 {&hf_docsis_bpkmattr_cm_cert,
8276 {"CM Certificate", "docsis_bpkm.attr.cmcert",
8277 FT_BYTES, BASE_NONE, NULL, 0x0,
8278 NULL, HFILL}
8279 },
8280 {&hf_docsis_bpkmattr_security_cap,
8281 {"Security Capabilities", "docsis_bpkm.attr.seccap",
8282 FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0,
8283 NULL, HFILL}
8284 },
8285 {&hf_docsis_bpkmattr_crypto_suite,
8286 {"Cryptographic Suite", "docsis_bpkm.attr.cryptosuite",
8287 FT_UINT16, BASE_HEX, VALS(crypto_suite_attr_vals), 0x0,
8288 NULL, HFILL}
8289 },
8290 {&hf_docsis_bpkmattr_crypto_suite_list,
8291 {"Cryptographic Suite List", "docsis_bpkm.attr.crypto_suite_lst",
8292 FT_BYTES, BASE_NONE, NULL, 0x0,
8293 NULL, HFILL}
8294 },
8295 {&hf_docsis_bpkmattr_bpi_version,
8296 {"BPI Version", "docsis_bpkm.attr.bpiver",
8297 FT_UINT8, BASE_DEC, VALS (bpi_ver_vals), 0x0,
8298 NULL, HFILL}
8299 },
8300 {&hf_docsis_bpkmattr_sa_descr,
8301 {"SA Descriptor", "docsis_bpkm.attr.sadescr",
8302 FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0,
8303 NULL, HFILL}
8304 },
8305 {&hf_docsis_bpkmattr_sa_type,
8306 {"SA Type", "docsis_bpkm.attr.satype",
8307 FT_UINT8, BASE_DEC, NULL, 0x0,
8308 NULL, HFILL}
8309 },
8310 {&hf_docsis_bpkmattr_sa_query,
8311 {"SA Query", "docsis_bpkm.attr.saquery",
8312 FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0,
8313 NULL, HFILL}
8314 },
8315 {&hf_docsis_bpkmattr_sa_query_type,
8316 {"SA Query Type", "docsis_bpkm.attr.saquery_type",
8317 FT_UINT8, BASE_HEX, NULL, 0x0,
8318 NULL, HFILL}
8319 },
8320 {&hf_docsis_bpkmattr_ip_address,
8321 {"IP Address", "docsis_bpkm.attr.ipaddr",
8322 FT_IPv4, BASE_NONE, NULL, 0x0,
8323 NULL, HFILL}
8324 },
8325 {&hf_docsis_bpkmattr_download_param,
8326 {"Download Parameters", "docsis_bpkm.attr.dnld_params",
8327 FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0,
8328 NULL, HFILL}
8329 },
8330 {&hf_docsis_bpkmattr_type,
8331 {"Type", "docsis_bpkm.attr.type",
8332 FT_UINT8, BASE_DEC, VALS(bpkmattr_tlv_vals), 0x0,
8333 "TLV Type", HFILL}
8334 },
8335 {&hf_docsis_bpkmattr_length,
8336 {"Length", "docsis_bpkm.attr.length",
8337 FT_UINT16, BASE_DEC, NULL, 0x0,
8338 "TLV Length", HFILL}
8339 },
8340 /* REG-ACK */
8341 {&hf_docsis_regack_sid,
8342 {"Service Identifier", "docsis_regack.sid",
8343 FT_UINT16, BASE_DEC, NULL, 0x0,
8344 NULL, HFILL}
8345 },
8346 {&hf_docsis_regack_response,
8347 {"Response Code", "docsis_regack.respnse",
8348 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &docsis_conf_code_ext, 0x0,
8349 NULL, HFILL}
8350 },
8351 /* DAS-RSP */
8352 {&hf_docsis_dsarsp_response,
8353 {"Confirmation Code", "docsis_dsarsp.confcode",
8354 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &docsis_conf_code_ext, 0x0,
8355 NULL, HFILL}
8356 },
8357 {&hf_docsis_dsaack_response,
8358 {"Confirmation Code", "docsis_dsaack.confcode",
8359 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &docsis_conf_code_ext, 0x0,
8360 NULL, HFILL}
8361 },
8362 /* DSC-RSP */
8363 {&hf_docsis_dscrsp_response,
8364 {"Confirmation Code", "docsis_dscrsp.confcode",
8365 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &docsis_conf_code_ext, 0x0,
8366 NULL, HFILL}
8367 },
8368 {&hf_docsis_dscack_response,
8369 {"Confirmation Code", "docsis_dscack.confcode",
8370 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &docsis_conf_code_ext, 0x0,
8371 NULL, HFILL}
8372 },
8373 /* DSD-REQ */
8374 {&hf_docsis_dsdreq_rsvd,
8375 {"Reserved", "docsis_dsdreq.rsvd",
8376 FT_UINT16, BASE_HEX, NULL, 0x0,
8377 NULL, HFILL}
8378 },
8379 {&hf_docsis_dsdreq_sfid,
8380 {"Service Flow ID", "docsis_dsdreq.sfid",
8381 FT_UINT32, BASE_DEC, NULL, 0x0,
8382 NULL, HFILL}
8383 },
8384 /* DSD-RSP */
8385 {&hf_docsis_dsdrsp_confcode,
8386 {"Confirmation Code", "docsis_dsdrsp.confcode",
8387 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &docsis_conf_code_ext, 0x0,
8388 NULL, HFILL}
8389 },
8390 {&hf_docsis_dsdrsp_rsvd,
8391 {"Reserved", "docsis_dsdrsp.rsvd",
8392 FT_UINT8, BASE_DEC, NULL, 0x0,
8393 NULL, HFILL}
8394 },
8395 /* DCC-REQ */
8396 {&hf_docsis_dccreq_type,
8397 {
8398 "Type",
8399 "docsis_dccreq.tlvtype",
8400 FT_UINT8, BASE_DEC, VALS(dcc_tlv_vals), 0x0,
8401 NULL,
8402 HFILL
8403 }
8404 },
8405 {&hf_docsis_dccreq_length,
8406 {
8407 "Length",
8408 "docsis_dccreq.tlvlen",
8409 FT_UINT8, BASE_DEC, NULL, 0x0,
8410 NULL,
8411 HFILL
8412 }
8413 },
8414 {&hf_docsis_dccreq_tran_id ,
8415 {
8416 "Transaction ID",
8417 "docsis_dccreq.tran_id",
8418 FT_UINT16, BASE_DEC, NULL, 0x0,
8419 NULL,
8420 HFILL
8421 }
8422 },
8423 {&hf_docsis_dccreq_up_chan_id ,
8424 {
8425 "Up Channel ID",
8426 "docsis_dccreq.up_chan_id",
8427 FT_UINT8, BASE_DEC, NULL, 0x0,
8428 NULL,
8429 HFILL
8430 }
8431 },
8432 {&hf_docsis_dcc_ds_params_subtype,
8433 {
8434 "Type",
8435 "docsis_dccreq.ds_tlvtype",
8436 FT_UINT8, BASE_DEC, VALS(ds_param_subtlv_vals), 0x0,
8437 NULL,
8438 HFILL
8439 }
8440 },
8441 {&hf_docsis_dcc_ds_params_length,
8442 {
8443 "Length",
8444 "docsis_dccreq.ds_tlvlen",
8445 FT_UINT8, BASE_DEC, NULL, 0x0,
8446 NULL,
8447 HFILL
8448 }
8449 },
8450 {&hf_docsis_dccreq_ds_freq ,
8451 {
8452 "Frequency",
8453 "docsis_dccreq.ds_freq",
8454 FT_UINT32, BASE_DEC, NULL, 0x0,
8455 NULL,
8456 HFILL
8457 }
8458 },
8459 {&hf_docsis_dccreq_ds_mod_type ,
8460 {
8461 "Modulation Type",
8462 "docsis_dccreq.ds_mod_type",
8463 FT_UINT8, BASE_DEC, VALS (ds_mod_type_vals), 0x0,
8464 NULL,
8465 HFILL
8466 }
8467 },
8468 {&hf_docsis_dccreq_ds_sym_rate ,
8469 {
8470 "Symbol Rate",
8471 "docsis_dccreq.ds_sym_rate",
8472 FT_UINT8, BASE_DEC, VALS (ds_sym_rate_vals), 0x0,
8473 NULL,
8474 HFILL
8475 }
8476 },
8477 {&hf_docsis_dccreq_ds_intlv_depth_i ,
8478 {
8479 "Interleaver Depth I Value",
8480 "docsis_dccreq.ds_intlv_depth_i",
8481 FT_UINT8, BASE_DEC, NULL, 0x0,
8482 NULL,
8483 HFILL
8484 }
8485 },
8486 {&hf_docsis_dccreq_ds_intlv_depth_j ,
8487 {
8488 "Interleaver Depth J Value",
8489 "docsis_dccreq.ds_intlv_depth_j",
8490 FT_UINT8, BASE_DEC, NULL, 0x0,
8491 NULL,
8492 HFILL
8493 }
8494 },
8495 {&hf_docsis_dccreq_ds_chan_id ,
8496 {
8497 "Downstream Channel ID",
8498 "docsis_dccreq.ds_chan_id",
8499 FT_UINT8, BASE_DEC, NULL, 0x0,
8500 NULL,
8501 HFILL
8502 }
8503 },
8504 {&hf_docsis_dccreq_ds_sync_sub ,
8505 {
8506 "SYNC Substitution",
8507 "docsis_dccreq.ds_sync_sub",
8508 FT_UINT8, BASE_DEC, NULL, 0x0,
8509 NULL,
8510 HFILL
8511 }
8512 },
8513 {&hf_docsis_dccreq_ds_ofdm_block_freq ,
8514 {
8515 "OFDM Block Frequency",
8516 "docsis_dccreq.ds_ofdm_block_freq",
8517 FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &local_units_hz, 0x0,
8518 NULL,
8519 HFILL
8520 }
8521 },
8522 {&hf_docsis_dccreq_init_tech ,
8523 {
8524 "Initialization Technique",
8525 "docsis_dccreq.init_tech",
8526 FT_UINT8, BASE_DEC, VALS (init_tech_vals), 0x0,
8527 NULL,
8528 HFILL
8529 }
8530 },
8531 {&hf_docsis_dccreq_ucd_sub ,
8532 {
8533 "UCD Substitution",
8534 "docsis_dccreq.ucd_sub",
8535 FT_BYTES, BASE_NONE, NULL, 0x0,
8536 NULL,
8537 HFILL
8538 }
8539 },
8540 {&hf_docsis_dccreq_said_sub_cur ,
8541 {
8542 "SAID Sub - Current Value",
8543 "docsis_dccreq.said_sub_cur",
8544 FT_UINT16, BASE_DEC, NULL, 0x0,
8545 NULL,
8546 HFILL
8547 }
8548 },
8549 {&hf_docsis_dccreq_said_sub_new ,
8550 {
8551 "SAID Sub - New Value",
8552 "docsis_dccreq.said_sub_new",
8553 FT_UINT16, BASE_DEC, NULL, 0x0,
8554 NULL,
8555 HFILL
8556 }
8557 },
8558 {&hf_docsis_dcc_sf_sub_subtype,
8559 {
8560 "Type",
8561 "docsis_dccreq.sf_tlvtype",
8562 FT_UINT8, BASE_DEC, VALS(sf_sub_subtlv_vals), 0x0,
8563 NULL,
8564 HFILL
8565 }
8566 },
8567 {&hf_docsis_dcc_sf_sub_length,
8568 {
8569 "Length",
8570 "docsis_dccreq.sf_tlvlen",
8571 FT_UINT8, BASE_DEC, NULL, 0x0,
8572 NULL,
8573 HFILL
8574 }
8575 },
8576 {&hf_docsis_dccreq_sf_sfid_cur ,
8577 {
8578 "SF Sub - SFID Current Value",
8579 "docsis_dccreq.sf_sfid_cur",
8580 FT_UINT32, BASE_DEC, NULL, 0x0,
8581 NULL,
8582 HFILL
8583 }
8584 },
8585 {&hf_docsis_dccreq_sf_sfid_new ,
8586 {
8587 "SF Sub - SFID New Value",
8588 "docsis_dccreq.sf_sfid_new",
8589 FT_UINT32, BASE_DEC, NULL, 0x0,
8590 NULL,
8591 HFILL
8592 }
8593 },
8594 {&hf_docsis_dccreq_sf_sid_cur ,
8595 {
8596 "SF Sub - SID Current Value",
8597 "docsis_dccreq.sf_sid_cur",
8598 FT_UINT16, BASE_DEC, NULL, 0x0,
8599 NULL,
8600 HFILL
8601 }
8602 },
8603 {&hf_docsis_dccreq_sf_sid_new ,
8604 {
8605 "SF Sub - SID New Value",
8606 "docsis_dccreq.sf_sid_new",
8607 FT_UINT16, BASE_DEC, NULL, 0x0,
8608 NULL,
8609 HFILL
8610 }
8611 },
8612 {&hf_docsis_dccreq_sf_unsol_grant_tref ,
8613 {
8614 "SF Sub - Unsolicited Grant Time Reference",
8615 "docsis_dccreq.sf_unsol_grant_tref",
8616 FT_UINT32, BASE_DEC, NULL, 0x0,
8617 NULL,
8618 HFILL
8619 }
8620 },
8621 {&hf_docsis_dccreq_cmts_mac_addr ,
8622 {
8623 "CMTS MAC Address",
8624 "docsis_dccreq.cmts_mac_addr",
8625 FT_ETHER, BASE_NONE, NULL, 0x0,
8626 NULL,
8627 HFILL
8628 }
8629 },
8630 {&hf_docsis_dccreq_key_seq_num ,
8631 {
8632 "Auth Key Sequence Number",
8633 "docsis_dccreq.key_seq_num",
8634 FT_UINT8, BASE_DEC, NULL, 0x0,
8635 NULL,
8636 HFILL
8637 }
8638 },
8639 {&hf_docsis_dccreq_hmac_digest ,
8640 {
8641 "HMAC-DigestNumber",
8642 "docsis_dccreq.hmac_digest",
8643 FT_BYTES, BASE_NONE, NULL, 0x0,
8644 NULL,
8645 HFILL
8646 }
8647 },
8648 /* DCC-RSP */
8649 {&hf_docsis_dccrsp_conf_code ,
8650 {
8651 "Confirmation Code",
8652 "docsis_dccrsp.conf_code",
8653 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &docsis_conf_code_ext, 0x0,
8654 NULL,
8655 HFILL
8656 }
8657 },
8658 {&hf_docsis_dccrsp_type,
8659 {
8660 "Type",
8661 "docsis_dccrsp.tlvtype",
8662 FT_UINT8, BASE_DEC, VALS(dccrsp_tlv_vals), 0x0,
8663 NULL,
8664 HFILL
8665 }
8666 },
8667 {&hf_docsis_dccrsp_length,
8668 {
8669 "Length",
8670 "docsis_dccrsp.tlvlen",
8671 FT_UINT8, BASE_DEC, NULL, 0x0,
8672 NULL,
8673 HFILL
8674 }
8675 },
8676 {&hf_docsis_dcc_cm_jump_subtype,
8677 {
8678 "Type",
8679 "docsis_dccrsp.cm_jump_tlvtype",
8680 FT_UINT8, BASE_DEC, VALS(cm_jump_subtlv_vals), 0x0,
8681 NULL,
8682 HFILL
8683 }
8684 },
8685 {&hf_docsis_dcc_cm_jump_length,
8686 {
8687 "Length",
8688 "docsis_dccrsp.cm_jump_tlvlen",
8689 FT_UINT8, BASE_DEC, NULL, 0x0,
8690 NULL,
8691 HFILL
8692 }
8693 },
8694 {&hf_docsis_dccrsp_cm_jump_time_length ,
8695 {
8696 "Length of Jump",
8697 "docsis_dccrsp.cm_jump_time_length",
8698 FT_UINT32, BASE_DEC, NULL, 0x0,
8699 NULL,
8700 HFILL
8701 }
8702 },
8703 {&hf_docsis_dccrsp_cm_jump_time_start ,
8704 {
8705 "Start Time of Jump",
8706 "docsis_dccrsp.cm_jump_time_start",
8707 FT_UINT64, BASE_DEC, NULL, 0x0,
8708 NULL,
8709 HFILL
8710 }
8711 },
8712 {&hf_docsis_dccrsp_key_seq_num ,
8713 {
8714 "Auth Key Sequence Number",
8715 "docsis_dccrsp.key_seq_num",
8716 FT_UINT8, BASE_DEC, NULL, 0x0,
8717 NULL,
8718 HFILL
8719 }
8720 },
8721 {&hf_docsis_dccrsp_hmac_digest ,
8722 {
8723 "HMAC-Digest Number",
8724 "docsis_dccrsp.hmac_digest",
8725 FT_BYTES, BASE_NONE, NULL, 0x0,
8726 NULL,
8727 HFILL
8728 }
8729 },
8730 /* DCC-ACK */
8731 {&hf_docsis_dccack_type,
8732 {
8733 "Type",
8734 "docsis_dccack.tlvtype",
8735 FT_UINT8, BASE_DEC, VALS(dccack_tlv_vals), 0x0,
8736 NULL,
8737 HFILL
8738 }
8739 },
8740 {&hf_docsis_dccack_length,
8741 {
8742 "Length",
8743 "docsis_dccack.tlvlen",
8744 FT_UINT8, BASE_DEC, NULL, 0x0,
8745 NULL,
8746 HFILL
8747 }
8748 },
8749 {&hf_docsis_dccack_key_seq_num ,
8750 {
8751 "Auth Key Sequence Number",
8752 "docsis_dccack.key_seq_num",
8753 FT_UINT8, BASE_DEC, NULL, 0x0,
8754 NULL,
8755 HFILL
8756 }
8757 },
8758 {&hf_docsis_dccack_hmac_digest ,
8759 {
8760 "HMAC-DigestNumber",
8761 "docsis_dccack.hmac_digest",
8762 FT_BYTES, BASE_NONE, NULL, 0x0,
8763 NULL,
8764 HFILL
8765 }
8766 },
8767 /* INIT_RNG_REQ */
8768 {&hf_docsis_intrngreq_sid,
8769 {"Service Identifier", "docsis_intrngreq.sid",
8770 FT_UINT16, BASE_DEC, NULL, 0x3FFF,
8771 NULL, HFILL}
8772 },
8773 /* DCD */
8774 {&hf_docsis_dcd_config_ch_cnt,
8775 {
8776 "Configuration Change Count",
8777 "docsis_dcd.config_ch_cnt",
8778 FT_UINT8, BASE_DEC, NULL, 0x0,
8779 NULL,
8780 HFILL
8781 }
8782 },
8783 {&hf_docsis_dcd_num_of_frag,
8784 {
8785 "Number of Fragments",
8786 "docsis_dcd.num_of_frag",
8787 FT_UINT8, BASE_DEC, NULL, 0x0,
8788 NULL,
8789 HFILL
8790 }
8791 },
8792 {&hf_docsis_dcd_frag_sequence_num,
8793 {
8794 "Fragment Sequence Number",
8795 "docsis_dcd.frag_sequence_num",
8796 FT_UINT8, BASE_DEC, NULL, 0x0,
8797 NULL,
8798 HFILL
8799 }
8800 },
8801 {&hf_docsis_dcd_type,
8802 {
8803 "Type",
8804 "docsis_dcd.tlvtype",
8805 FT_UINT8, BASE_DEC, VALS(dcd_tlv_vals), 0x0,
8806 NULL,
8807 HFILL
8808 }
8809 },
8810 {&hf_docsis_dcd_length,
8811 {
8812 "Length",
8813 "docsis_dcd.tlvlen",
8814 FT_UINT8, BASE_DEC, NULL, 0x0,
8815 NULL,
8816 HFILL
8817 }
8818 },
8819 {&hf_docsis_dcd_down_classifier_subtype,
8820 {
8821 "Type",
8822 "docsis_dcd.down_classifier_tlvtype",
8823 FT_UINT8, BASE_DEC, VALS(dcd_down_classifier_vals), 0x0,
8824 NULL,
8825 HFILL
8826 }
8827 },
8828 {&hf_docsis_dcd_down_classifier_length,
8829 {
8830 "Length",
8831 "docsis_dcd.down_classifier_tlvlen",
8832 FT_UINT8, BASE_DEC, NULL, 0x0,
8833 NULL,
8834 HFILL
8835 }
8836 },
8837 {&hf_docsis_dcd_cfr_id,
8838 {
8839 "Downstream Classifier ID",
8840 "docsis_dcd.cfr_id",
8841 FT_UINT16, BASE_DEC, NULL, 0x0,
8842 NULL,
8843 HFILL
8844 }
8845 },
8846 {&hf_docsis_dcd_cfr_rule_pri,
8847 {
8848 "Downstream Classifier Rule Priority",
8849 "docsis_dcd.cfr_rule_pri",
8850 FT_UINT8, BASE_DEC, NULL, 0x0,
8851 NULL,
8852 HFILL
8853 }
8854 },
8855 {&hf_docsis_dcd_cfr_ip_subtype,
8856 {
8857 "Type",
8858 "docsis_dcd.cfr_ip_tlvtype",
8859 FT_UINT8, BASE_DEC, VALS(dcd_cfr_ip_vals), 0x0,
8860 NULL,
8861 HFILL
8862 }
8863 },
8864 {&hf_docsis_dcd_cfr_ip_length,
8865 {
8866 "Length",
8867 "docsis_dcd.cfr_ip_tlvlen",
8868 FT_UINT8, BASE_DEC, NULL, 0x0,
8869 NULL,
8870 HFILL
8871 }
8872 },
8873 {&hf_docsis_dcd_cfr_ip_source_addr,
8874 {
8875 "Downstream Classifier IP Source Address",
8876 "docsis_dcd.cfr_ip_source_addr",
8877 FT_IPv4, BASE_NONE, NULL, 0x0,
8878 NULL,
8879 HFILL
8880 }
8881 },
8882 {&hf_docsis_dcd_cfr_ip_source_mask,
8883 {
8884 "Downstream Classifier IP Source Mask",
8885 "docsis_dcd.cfr_ip_source_mask",
8886 FT_IPv4, BASE_NETMASK, NULL, 0x0,
8887 NULL,
8888 HFILL
8889 }
8890 },
8891 {&hf_docsis_dcd_cfr_ip_dest_addr,
8892 {
8893 "Downstream Classifier IP Destination Address",
8894 "docsis_dcd.cfr_ip_dest_addr",
8895 FT_IPv4, BASE_NONE, NULL, 0x0,
8896 NULL,
8897 HFILL
8898 }
8899 },
8900 {&hf_docsis_dcd_cfr_ip_dest_mask,
8901 {
8902 "Downstream Classifier IP Destination Mask",
8903 "docsis_dcd.cfr_ip_dest_mask",
8904 FT_IPv4, BASE_NETMASK, NULL, 0x0,
8905 "Downstream Classifier IP Destination Address",
8906 HFILL
8907 }
8908 },
8909 {&hf_docsis_dcd_cfr_tcpudp_srcport_start,
8910 {
8911 "Downstream Classifier IP TCP/UDP Source Port Start",
8912 "docsis_dcd.cfr_ip_tcpudp_srcport_start",
8913 FT_UINT16, BASE_DEC, NULL, 0x0,
8914 NULL,
8915 HFILL
8916 }
8917 },
8918 {&hf_docsis_dcd_cfr_tcpudp_srcport_end,
8919 {
8920 "Downstream Classifier IP TCP/UDP Source Port End",
8921 "docsis_dcd.cfr_ip_tcpudp_srcport_end",
8922 FT_UINT16, BASE_DEC, NULL, 0x0,
8923 NULL,
8924 HFILL
8925 }
8926 },
8927 {&hf_docsis_dcd_cfr_tcpudp_dstport_start,
8928 {
8929 "Downstream Classifier IP TCP/UDP Destination Port Start",
8930 "docsis_dcd.cfr_ip_tcpudp_dstport_start",
8931 FT_UINT16, BASE_DEC, NULL, 0x0,
8932 NULL,
8933 HFILL
8934 }
8935 },
8936 {&hf_docsis_dcd_cfr_tcpudp_dstport_end,
8937 {
8938 "Downstream Classifier IP TCP/UDP Destination Port End",
8939 "docsis_dcd.cfr_ip_tcpudp_dstport_end",
8940 FT_UINT16, BASE_DEC, NULL, 0x0,
8941 NULL,
8942 HFILL
8943 }
8944 },
8945 {&hf_docsis_dcd_rule_id,
8946 {
8947 "DSG Rule ID",
8948 "docsis_dcd.rule_id",
8949 FT_UINT8, BASE_DEC, NULL, 0x0,
8950 NULL,
8951 HFILL
8952 }
8953 },
8954 {&hf_docsis_dcd_rule_pri,
8955 {
8956 "DSG Rule Priority",
8957 "docsis_dcd.rule_pri",
8958 FT_UINT8, BASE_DEC, NULL, 0x0,
8959 NULL,
8960 HFILL
8961 }
8962 },
8963 {&hf_docsis_dcd_rule_ucid_list,
8964 {
8965 "DSG Rule UCID Range",
8966 "docsis_dcd.rule_ucid_list",
8967 FT_BYTES, BASE_NONE, NULL, 0x0,
8968 NULL,
8969 HFILL
8970 }
8971 },
8972 {&hf_docsis_dcd_clid_subtype,
8973 {
8974 "Type",
8975 "docsis_dcd.clid_tlvtype",
8976 FT_UINT8, BASE_DEC, VALS(dcd_clid_vals), 0x0,
8977 NULL,
8978 HFILL
8979 }
8980 },
8981 {&hf_docsis_dcd_clid_length,
8982 {
8983 "Length",
8984 "docsis_dcd.clid_tlvlen",
8985 FT_UINT8, BASE_DEC, NULL, 0x0,
8986 NULL,
8987 HFILL
8988 }
8989 },
8990 {&hf_docsis_dcd_clid_bcast_id,
8991 {
8992 "DSG Rule Client ID Broadcast ID",
8993 "docsis_dcd.clid_bcast_id",
8994 FT_UINT16, BASE_DEC, NULL, 0x0,
8995 NULL,
8996 HFILL
8997 }
8998 },
8999 {&hf_docsis_dcd_clid_known_mac_addr,
9000 {
9001 "DSG Rule Client ID Known MAC Address",
9002 "docsis_dcd.clid_known_mac_addr",
9003 FT_ETHER, BASE_NONE, NULL, 0x0,
9004 NULL,
9005 HFILL
9006 }
9007 },
9008 {&hf_docsis_dcd_clid_ca_sys_id,
9009 {
9010 "DSG Rule Client ID CA System ID",
9011 "docsis_dcd.clid_ca_sys_id",
9012 FT_UINT16, BASE_DEC, NULL, 0x0,
9013 NULL,
9014 HFILL
9015 }
9016 },
9017 {&hf_docsis_dcd_clid_app_id,
9018 {
9019 "DSG Rule Client ID Application ID",
9020 "docsis_dcd.clid_app_id",
9021 FT_UINT16, BASE_DEC, NULL, 0x0,
9022 NULL,
9023 HFILL
9024 }
9025 },
9026 {&hf_docsis_dcd_dsg_rule_subtype,
9027 {
9028 "Type",
9029 "docsis_dcd.rule_tlvtype",
9030 FT_UINT8, BASE_DEC, VALS(dcd_dsg_rule_vals), 0x0,
9031 NULL,
9032 HFILL
9033 }
9034 },
9035 {&hf_docsis_dcd_dsg_rule_length,
9036 {
9037 "Length",
9038 "docsis_dcd.rule_tlvlen",
9039 FT_UINT8, BASE_DEC, NULL, 0x0,
9040 NULL,
9041 HFILL
9042 }
9043 },
9044 {&hf_docsis_dcd_rule_tunl_addr,
9045 {
9046 "DSG Rule Tunnel MAC Address",
9047 "docsis_dcd.rule_tunl_addr",
9048 FT_ETHER, BASE_NONE, NULL, 0x0,
9049 NULL,
9050 HFILL
9051 }
9052 },
9053 {&hf_docsis_dcd_rule_cfr_id,
9054 {
9055 "DSG Rule Classifier ID",
9056 "docsis_dcd.rule_cfr_id",
9057 FT_UINT16, BASE_DEC, NULL, 0x0,
9058 NULL,
9059 HFILL
9060 }
9061 },
9062 {&hf_docsis_dcd_rule_vendor_spec,
9063 {
9064 "DSG Rule Vendor Specific Parameters",
9065 "docsis_dcd.rule_vendor_spec",
9066 FT_BYTES, BASE_NONE, NULL, 0x0,
9067 NULL,
9068 HFILL
9069 }
9070 },
9071 {&hf_docsis_dcd_cfg_subtype,
9072 {
9073 "Type",
9074 "docsis_dcd.cfg_tlvtype",
9075 FT_UINT8, BASE_DEC, VALS(dcd_cfg_vals), 0x0,
9076 NULL,
9077 HFILL
9078 }
9079 },
9080 {&hf_docsis_dcd_cfg_length,
9081 {
9082 "Length",
9083 "docsis_dcd.cfg_tlvlen",
9084 FT_UINT8, BASE_DEC, NULL, 0x0,
9085 NULL,
9086 HFILL
9087 }
9088 },
9089 {&hf_docsis_dcd_cfg_chan,
9090 {
9091 "DSG Configuration Channel",
9092 "docsis_dcd.cfg_chan",
9093 FT_UINT32, BASE_DEC, NULL, 0x0,
9094 NULL,
9095 HFILL
9096 }
9097 },
9098 {&hf_docsis_dcd_cfg_tdsg1,
9099 {
9100 "DSG Initialization Timeout (Tdsg1)",
9101 "docsis_dcd.cfg_tdsg1",
9102 FT_UINT16, BASE_DEC, NULL, 0x0,
9103 NULL,
9104 HFILL
9105 }
9106 },
9107 {&hf_docsis_dcd_cfg_tdsg2,
9108 {
9109 "DSG Operational Timeout (Tdsg2)",
9110 "docsis_dcd.cfg_tdsg2",
9111 FT_UINT16, BASE_DEC, NULL, 0x0,
9112 NULL,
9113 HFILL
9114 }
9115 },
9116 {&hf_docsis_dcd_cfg_tdsg3,
9117 {
9118 "DSG Two-Way Retry Timer (Tdsg3)",
9119 "docsis_dcd.cfg_tdsg3",
9120 FT_UINT16, BASE_DEC, NULL, 0x0,
9121 NULL,
9122 HFILL
9123 }
9124 },
9125 {&hf_docsis_dcd_cfg_tdsg4,
9126 {
9127 "DSG One-Way Retry Timer (Tdsg4)",
9128 "docsis_dcd.cfg_tdsg4",
9129 FT_UINT16, BASE_DEC, NULL, 0x0,
9130 NULL,
9131 HFILL
9132 }
9133 },
9134 {&hf_docsis_dcd_cfg_vendor_spec,
9135 {
9136 "DSG Configuration Vendor Specific Parameters",
9137 "docsis_dcd.cfg_vendor_spec",
9138 FT_BYTES, BASE_NONE, NULL, 0x0,
9139 NULL,
9140 HFILL
9141 }
9142 },
9143 /* MDD */
9144 {&hf_docsis_mdd_ccc,
9145 {"Configuration Change Count", "docsis_mdd.ccc",
9146 FT_UINT8, BASE_DEC, NULL, 0x0,
9147 "MDD Configuration Change Count", HFILL}
9148 },
9149 {&hf_docsis_mdd_number_of_fragments,
9150 {"Number of Fragments", "docsis_mdd.number_of_fragments",
9151 FT_UINT8, BASE_DEC, NULL, 0x0,
9152 "MDD Number of Fragments", HFILL}
9153 },
9154 {&hf_docsis_mdd_fragment_sequence_number,
9155 {"Fragment Sequence Number", "docsis_mdd.fragment_sequence_number",
9156 FT_UINT8, BASE_DEC, NULL, 0x0,
9157 "MDD Fragment Sequence Number", HFILL}
9158 },
9159 {&hf_docsis_mdd_current_channel_dcid,
9160 {"Current Channel DCID", "docsis_mdd.current_channel_dcid",
9161 FT_UINT8, BASE_DEC, NULL, 0x0,
9162 "MDD Current Channel DCID", HFILL}
9163 },
9164 {&hf_docsis_mdd_ds_active_channel_list_subtype,
9165 {"Type", "docsis_mdd.downstream_active_channel_list_tlvtype",
9166 FT_UINT8, BASE_DEC, VALS(mdd_ds_active_channel_list_vals), 0x0,
9167 NULL, HFILL}
9168 },
9169 {&hf_docsis_mdd_ds_active_channel_list_length,
9170 {"Length", "docsis_mdd.downstream_active_channel_list_tlvlen",
9171 FT_UINT8, BASE_DEC, NULL, 0x0,
9172 NULL, HFILL}
9173 },
9174 {&hf_docsis_mdd_downstream_active_channel_list_channel_id,
9175 {"Channel ID", "docsis_mdd.downstream_active_channel_list_channel_id",
9176 FT_UINT8, BASE_DEC, NULL, 0x0,
9177 "MDD Downstream Active Channel List Channel ID", HFILL}
9178 },
9179 {&hf_docsis_mdd_downstream_active_channel_list_frequency,
9180 {"Frequency", "docsis_mdd.downstream_active_channel_list_frequency",
9181 FT_UINT32, BASE_DEC, NULL, 0x0,
9182 "MDD Downstream Active Channel List Frequency", HFILL}
9183 },
9184 {&hf_docsis_mdd_downstream_active_channel_list_annex,
9185 {"Annex", "docsis_mdd.downstream_active_channel_list_annex",
9186 FT_UINT8, BASE_DEC, VALS(J83_annex_vals), 0xF0,
9187 "MDD Downstream Active Channel List Annex", HFILL}
9188 },
9189 {&hf_docsis_mdd_downstream_active_channel_list_modulation_order,
9190 {"Modulation Order", "docsis_mdd.downstream_active_channel_list_modulation_order",
9191 FT_UINT8, BASE_DEC, VALS(modulation_order_vals), 0x0F,
9192 "MDD Downstream Active Channel List Modulation Order", HFILL}
9193 },
9194 {&hf_docsis_mdd_downstream_active_channel_list_primary_capable,
9195 {"Primary Capable", "docsis_mdd.downstream_active_channel_list_primary_capable",
9196 FT_UINT8, BASE_DEC, VALS(primary_capable_vals), 0x0,
9197 "MDD Downstream Active Channel List Primary Capable", HFILL}
9198 },
9199 {&hf_docsis_mdd_cm_status_event_enable_bitmask,
9200 {"CM-STATUS Event Enable Bitmask", "docsis_mdd.cm_status_event_enable_bitmask",
9201 FT_UINT16, BASE_HEX, NULL, 0x0,
9202 NULL, HFILL}
9203 },
9204 {&hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_timeout,
9205 {"MDD Timeout", "docsis_mdd.downstream_active_channel_list_mdd_timeout",
9206 FT_UINT16, BASE_DEC, NULL, 0x0002,
9207 "MDD Downstream Active Channel List MDD Timeout", HFILL}
9208 },
9209 {&hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_failure,
9210 {"QAM/FEC Lock Failure", "docsis_mdd.cm_status_event_enable_bitmask_qam_fec_lock_failure",
9211 FT_UINT16, BASE_DEC, NULL, 0x0004,
9212 "MDD Downstream Active Channel List QAM/FEC Lock Failure", HFILL}
9213 },
9214 {&hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_recovery,
9215 {"MDD Recovery", "docsis_mdd.cm_status_event_enable_bitmask_mdd_recovery",
9216 FT_UINT16, BASE_DEC, NULL, 0x0010,
9217 "CM-STATUS event MDD Recovery", HFILL}
9218 },
9219 {&hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_recovery,
9220 {"QAM/FEC Lock Recovery", "docsis_mdd.cm_status_event_enable_bitmask_qam_fec_lock_recovery",
9221 FT_UINT16, BASE_DEC, NULL, 0x0020,
9222 "CM-STATUS event QAM/FEC Lock Recovery", HFILL}
9223 },
9224 {&hf_docsis_mdd_downstream_active_channel_list_map_ucd_transport_indicator,
9225 {"MAP and UCD transport indicator", "docsis_mdd.downstream_active_channel_list_map_ucd_transport_indicator",
9226 FT_UINT8, BASE_DEC, VALS(map_ucd_transport_indicator_vals), 0x0,
9227 "MDD Downstream Active Channel List MAP and UCD Transport Indicator", HFILL}
9228 },
9229 {&hf_docsis_mdd_ofdm_plc_parameters,
9230 {"OFDM PLC Parameters", "docsis_mdd.ofdm_plc_parameters",
9231 FT_UINT8, BASE_HEX, NULL, 0x0,
9232 NULL, HFILL}
9233 },
9234 {&hf_docsis_mdd_ofdm_plc_parameters_tukey_raised_cosine_window,
9235 {"Tukey raised cosine window", "docsis_mdd.ofdm_plc_parameters_tukey_raised_cosine_window",
9236 FT_UINT8, BASE_DEC, VALS(tukey_raised_cosine_vals), 0x07,
9237 "OFDM PLC Parameters Tukey raised cosine window", HFILL}
9238 },
9239 {&hf_docsis_mdd_ofdm_plc_parameters_cyclic_prefix,
9240 {"Cyclic prefix", "docsis_mdd.ofdm_plc_parameters_cyclic_prefix",
9241 FT_UINT8, BASE_DEC, VALS(cyclic_prefix_vals), 0x38,
9242 "OFDM PLC parameters Cyclic prefix", HFILL}
9243 },
9244 {&hf_docsis_mdd_ofdm_plc_parameters_sub_carrier_spacing,
9245 {"Sub carrier spacing", "docsis_mdd.ofdm_plc_parameters_sub_carrier_spacing",
9246 FT_UINT8, BASE_DEC, VALS(spacing_vals), 0x40,
9247 "OFDM PLC parameters Sub carrier spacing", HFILL}
9248 },
9249 {&hf_docsis_mdd_up_active_channel_list_subtype,
9250 {"Type", "docsis_mdd.up_active_channel_list_tlvtype",
9251 FT_UINT8, BASE_DEC, VALS(mdd_up_active_channel_list_vals), 0x0,
9252 NULL, HFILL}
9253 },
9254 {&hf_docsis_mdd_up_active_channel_list_length,
9255 {"Length", "docsis_mdd.up_active_channel_list_tlvlen",
9256 FT_UINT8, BASE_DEC, NULL, 0x0,
9257 NULL, HFILL}
9258 },
9259 {&hf_docsis_mdd_cm_status_event_enable_bitmask_t4_timeout,
9260 {"T4 timeout", "docsis_mdd.cm_status_event_enable_bitmask_t4_timeout",
9261 FT_UINT16, BASE_DEC, NULL, 0x0040,
9262 "CM-STATUS event T4 timeout", HFILL}
9263 },
9264 {&hf_docsis_mdd_cm_status_event_enable_bitmask_t3_retries_exceeded,
9265 {"T3 Retries Exceeded", "docsis_mdd.cm_status_event_enable_bitmask_t3_retries_exceeded",
9266 FT_UINT16, BASE_DEC, NULL, 0x0080,
9267 "CM-STATUS event T3 Retries Exceeded", HFILL}
9268 },
9269 {&hf_docsis_mdd_cm_status_event_enable_bitmask_successful_ranging_after_t3_retries_exceeded,
9270 {"Successful Ranging after T3 Retries Exceeded", "docsis_mdd.cm_status_event_enable_bitmask_successful_ranging_after_t3_retries_exceeded",
9271 FT_UINT16, BASE_DEC, NULL, 0x0100,
9272 "CM-STATUS event Successful Ranging after T3 Retries Exceeded", HFILL}
9273 },
9274 {&hf_docsis_mdd_mac_domain_downstream_service_group_channel_id,
9275 {"Channel ID", "docsis_mdd.mac_domain_downstream_service_group_channel_id",
9276 FT_UINT8, BASE_DEC, NULL, 0x0,
9277 "MDD MAC Domain Downstream Service Group Channel ID", HFILL}
9278 },
9279 {&hf_docsis_mdd_ds_service_group_subtype,
9280 {"Type", "docsis_mdd.ds_service_group_type",
9281 FT_UINT8, BASE_DEC, VALS(mdd_ds_service_group_vals), 0x0,
9282 NULL, HFILL}
9283 },
9284 {&hf_docsis_mdd_ds_service_group_length,
9285 {"Length", "docsis_mdd.ds_service_group_length",
9286 FT_UINT8, BASE_DEC, NULL, 0x0,
9287 NULL, HFILL}
9288 },
9289 {&hf_docsis_mdd_mac_domain_downstream_service_group_md_ds_sg_identifier,
9290 {"MD-DS-SG Identifier", "docsis_mdd.mac_domain_downstream_service_group_md_ds_sg_identifier",
9291 FT_UINT8, BASE_DEC, NULL, 0x0,
9292 "MDD MAC Domain Downstream Service Group MD-DS-SG Identifier", HFILL}
9293 },
9294 {&hf_docsis_mdd_type,
9295 {"Type", "docsis_mdd.type",
9296 FT_UINT8, BASE_DEC, VALS(mdd_tlv_vals), 0x0,
9297 NULL, HFILL}
9298 },
9299 {&hf_docsis_mdd_length,
9300 {"Length", "docsis_mdd.length",
9301 FT_UINT8, BASE_DEC, NULL, 0x0,
9302 NULL, HFILL}
9303 },
9304 {&hf_docsis_mdd_downstream_ambiguity_resolution_frequency,
9305 {"Frequency", "docsis_mdd.downstream_ambiguity_resolution_frequency",
9306 FT_UINT32, BASE_DEC, NULL, 0x0,
9307 "MDD Downstream Ambiguity Resolution frequency", HFILL}
9308 },
9309 {&hf_docsis_mdd_channel_profile_reporting_control_subtype,
9310 {"Type", "docsis_mdd.channel_profile_reporting_control_type",
9311 FT_UINT8, BASE_DEC, VALS(mdd_channel_profile_reporting_control_vals), 0x0,
9312 NULL, HFILL}
9313 },
9314 {&hf_docsis_mdd_channel_profile_reporting_control_length,
9315 {"Length", "docsis_mdd.channel_profile_reporting_control_length",
9316 FT_UINT8, BASE_DEC, NULL, 0x0,
9317 NULL, HFILL}
9318 },
9319 {&hf_docsis_mdd_rcp_center_frequency_spacing,
9320 {"RCP Center Frequency Spacing", "docsis_mdd.rcp_center_frequency_spacing",
9321 FT_UINT8, BASE_DEC, VALS(rcp_center_frequency_spacing_vals), 0x0,
9322 "MDD RCP Center Frequency Spacing", HFILL}
9323 },
9324 {&hf_docsis_mdd_verbose_rcp_reporting,
9325 {"Verbose RCP reporting", "docsis_mdd.verbose_rcp_reporting",
9326 FT_UINT8, BASE_DEC, VALS(verbose_rcp_reporting_vals), 0x0,
9327 "MDD Verbose RCP Reporting", HFILL}
9328 },
9329 {&hf_docsis_mdd_fragmented_rcp_transmission,
9330 {"Fragmented RCP transmission", "docsis_mdd.fragmented_rcp_transmission",
9331 FT_UINT8, BASE_DEC, VALS(fragmented_rcp_transmission_vals), 0x0,
9332 "MDD Fragmented RCP transmission", HFILL}
9333 },
9334 {&hf_docsis_mdd_ip_init_param_subtype,
9335 {"Type", "docsis_mdd.ip_init_param_type",
9336 FT_UINT8, BASE_DEC, VALS(mdd_ip_init_param_vals), 0x0,
9337 NULL, HFILL}
9338 },
9339 {&hf_docsis_mdd_ip_init_param_length,
9340 {"Length", "docsis_mdd.ip_init_param_length",
9341 FT_UINT8, BASE_DEC, NULL, 0x0,
9342 NULL, HFILL}
9343 },
9344 {&hf_docsis_mdd_ip_provisioning_mode,
9345 {"IP Provisioning Mode", "docsis_mdd.ip_provisioning_mode",
9346 FT_UINT8, BASE_DEC, VALS(ip_provisioning_mode_vals), 0x0,
9347 "MDD IP Provisioning Mode", HFILL}
9348 },
9349 {&hf_docsis_mdd_pre_registration_dsid,
9350 {"Pre-registration DSID", "docsis_mdd.pre_registration_dsid",
9351 FT_UINT24, BASE_DEC, NULL, 0x0FFFFF,
9352 "MDD Pre-registration DSID", HFILL}
9353 },
9354 {&hf_docsis_mdd_early_authentication_and_encryption,
9355 {"Early Authentication and Encryption", "docsis_mdd.early_authentication_and_encryption",
9356 FT_UINT8, BASE_DEC, VALS(eae_vals), 0x0,
9357 "MDD Early Authentication and Encryption", HFILL}
9358 },
9359 {&hf_docsis_mdd_upstream_active_channel_list_upstream_channel_id,
9360 {"Upstream Channel ID", "docsis_mdd.upstream_active_channel_list_upstream_channel_id",
9361 FT_UINT8, BASE_DEC, NULL, 0x0,
9362 "MDD Upstream Active Channel List - Upstream Channel ID", HFILL}
9363 },
9364 {&hf_docsis_mdd_upstream_active_channel_list_upstream_channel_priority,
9365 {"Upstream Channel Priority", "docsis_mdd.upstream_active_channel_list_upstream_channel_priority",
9366 FT_UINT8, BASE_DEC, NULL, 0x0,
9367 "MDD Upstream Active Channel List - Upstream Channel Priority", HFILL}
9368 },
9369 {&hf_docsis_mdd_upstream_active_channel_list_dschids_maps_ucds,
9370 {"Downstream Channel(s) on which MAPs and UCDs for this Upstream Channel are sent", "docsis_mdd.upstream_active_channel_list_dschids_maps_ucds",
9371 FT_BYTES, BASE_NONE, NULL, 0x0,
9372 "MDD Upstream Active Channel List - Downstream Channel(s) on which MAPs and UCDs for this Upstream Channel are sent", HFILL}
9373 },
9374 {&hf_docsis_mdd_upstream_active_channel_list_dschids_maps_ucds_dschid,
9375 {"Downstream Channel ID", "docsis_mdd.upstream_active_channel_list_dschids_maps_ucds.dschid",
9376 FT_UINT8, BASE_DEC, NULL, 0x0,
9377 "MDD Upstream Active Channel List - ID of Downstream Channel on which MAPs and UCDs for this Upstream Channel are sent", HFILL}
9378 },
9379 {&hf_docsis_mdd_upstream_active_channel_list_fdx_upstream_channel,
9380 {"FDX Upstream Channel", "docsis_mdd.upstream_active_channel_list_fdx_upstream_channel",
9381 FT_UINT8, BASE_DEC, NULL, 0x0,
9382 "MDD Upstream Active Channel List - FDX Upstream Channel", HFILL}
9383 },
9384 {&hf_docsis_mdd_upstream_active_channel_list_fdx_subband_id,
9385 {"FDX Sub-band ID", "docsis_mdd.upstream_active_channel_list_fdx_subband_id",
9386 FT_UINT8, BASE_DEC, NULL, 0x0,
9387 "MDD Upstream Active Channel List - FDX Sub-band ID", HFILL}
9388 },
9389 {&hf_docsis_mdd_upstream_ambiguity_resolution_channel_list_channel_id,
9390 {"Channel ID", "docsis_mdd.upstream_ambiguity_resolution_channel_list_channel_id",
9391 FT_UINT8, BASE_DEC, NULL, 0x0,
9392 "MDD MAC Domain Upstream Ambiguity Resolution Channel List Channel ID", HFILL}
9393 },
9394 {&hf_docsis_mdd_upstream_frequency_range,
9395 {"Upstream Frequency Range", "docsis_mdd.upstream_frequency_range",
9396 FT_UINT8, BASE_DEC, VALS(upstream_frequency_range_vals), 0x0,
9397 "MDD Upstream Frequency Range", HFILL}
9398 },
9399 {&hf_docsis_mdd_symbol_clock_locking_indicator,
9400 {"Symbol Clock Locking Indicator", "docsis_mdd.symbol_clock_locking_indicator",
9401 FT_UINT8, BASE_DEC, VALS(symbol_clock_locking_indicator_vals), 0x0,
9402 "MDD Symbol Clock Locking Indicator", HFILL}
9403 },
9404 {&hf_docsis_mdd_cm_status_event_control_subtype,
9405 {"Type", "docsis_mdd.cm_status_event_control_type",
9406 FT_UINT8, BASE_DEC, VALS(mdd_cm_status_event_control_vals), 0x0,
9407 NULL, HFILL}
9408 },
9409 {&hf_docsis_mdd_cm_status_event_control_length,
9410 {"Length", "docsis_mdd.cm_status_event_control_length",
9411 FT_UINT8, BASE_DEC, NULL, 0x0,
9412 NULL, HFILL}
9413 },
9414 {&hf_docsis_mdd_event_type,
9415 {"Event Type", "docsis_mdd.event_type",
9416 FT_UINT8, BASE_DEC, VALS(symbol_cm_status_event_vals), 0x0,
9417 "MDD CM-STATUS Event Type", HFILL}
9418 },
9419 {&hf_docsis_mdd_maximum_event_holdoff_timer,
9420 {"Maximum Event Holdoff Timer (units of 20 ms)", "docsis_mdd.maximum_event_holdoff_timer",
9421 FT_UINT16, BASE_DEC, NULL, 0x0,
9422 "MDD Maximum Event Holdoff Timer", HFILL}
9423 },
9424 {&hf_docsis_mdd_maximum_number_of_reports_per_event,
9425 {"Maximum Number of Reports per Event", "docsis_mdd.maximum_number_of_reports_per_event",
9426 FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_unlimited), 0x0,
9427 "MDD Maximum Number of Reports per Event", HFILL}
9428 },
9429 {&hf_docsis_mdd_upstream_transmit_power_reporting,
9430 {"Upstream Transmit Power Reporting", "docsis_mdd.upstream_transmit_power_reporting",
9431 FT_UINT8, BASE_DEC, VALS(upstream_transmit_power_reporting_vals), 0x0,
9432 "MDD Upstream Transmit Power Reporting", HFILL}
9433 },
9434 {&hf_docsis_mdd_dsg_da_to_dsid_subtype,
9435 {"Type", "docsis_mdd.dsg_da_to_dsid_type",
9436 FT_UINT8, BASE_DEC, VALS(mdd_cm_dsg_da_to_dsid_vals), 0x0,
9437 NULL, HFILL}
9438 },
9439 {&hf_docsis_mdd_dsg_da_to_dsid_length,
9440 {"Length", "docsis_mdd.dsg_da_to_dsid_length",
9441 FT_UINT8, BASE_DEC, NULL, 0x0,
9442 NULL, HFILL}
9443 },
9444 {&hf_docsis_mdd_dsg_da_to_dsid_association_da,
9445 {"Destination Address", "docsis_mdd.dsg_da_to_dsid_association_da",
9446 FT_ETHER, BASE_NONE, NULL, 0x0,
9447 "MDD DSG DA to DSID association Destination Address", HFILL}
9448 },
9449 {&hf_docsis_mdd_dsg_da_to_dsid_association_dsid,
9450 {"DSID", "docsis_mdd.dsg_da_to_dsid_association_dsid",
9451 FT_UINT24, BASE_DEC, NULL, 0x0FFFFF,
9452 "MDD MDD DSG DA to DSID association DSID", HFILL}
9453 },
9454 {&hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events,
9455 {"CM-STATUS Event Enable Bitmask for Non-Channel-Specific Events", "docsis_mdd.cm_status_event_enable_non_channel_specific_events",
9456 FT_UINT16, BASE_HEX, NULL, 0x0,
9457 NULL, HFILL}
9458 },
9459 {&hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_sequence_out_of_range,
9460 {"Sequence out of range", "docsis_mdd.cm_status_event_enable_non_channel_specific_events_sequence_out_of_range",
9461 FT_UINT16, BASE_DEC, NULL, 0x0008,
9462 "CM-STATUS event non-channel-event Sequence out of range", HFILL}
9463 },
9464 {&hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_operating_on_battery_backup,
9465 {"CM operating on battery backup", "docsis_mdd.cm_status_event_enable_non_channel_specific_events_cm_operating_on_battery_backup",
9466 FT_UINT16, BASE_DEC, NULL, 0x0200,
9467 "CM-STATUS event non-channel-event Cm operating on battery backup", HFILL}
9468 },
9469 {&hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_returned_to_ac_power,
9470 {"Returned to AC power", "docsis_mdd.cm_status_event_enable_non_channel_specific_events_cm_returned_to_ac_power",
9471 FT_UINT16, BASE_DEC, NULL, 0x0400,
9472 "CM-STATUS event non-channel-event Cm returned to AC power", HFILL}
9473 },
9474 {&hf_docsis_mdd_extended_upstream_transmit_power_support,
9475 { "Extended Upstream Transmit Power Support", "docsis_mdd.extended_upstream_transmit_power_support",
9476 FT_BOOLEAN, BASE_NONE, TFS(&tfs_on_off), 0x0,
9477 "MDD Extended Upstream Transmit Power Support", HFILL}
9478 },
9479 {&hf_docsis_mdd_cmts_major_docsis_version,
9480 { "CMTS Major DOCSIS Version", "docsis_mdd.cmts_major_docsis_version",
9481 FT_UINT8, BASE_DEC, NULL, 0x0,
9482 NULL, HFILL}
9483 },
9484 {&hf_docsis_mdd_cmts_minor_docsis_version,
9485 { "CMTS Minor DOCSIS Version", "docsis_mdd.cmts_minor_docsis_version",
9486 FT_UINT8, BASE_DEC, NULL, 0x0,
9487 NULL, HFILL}
9488 },
9489 {&hf_docsis_mdd_cm_periodic_maintenance_timeout_indicator,
9490 { "CM periodic maintenance timeout indicator", "docsis_mdd.cm_periodic_maintenance_timeout_indicator",
9491 FT_UINT8, BASE_DEC, VALS(cm_periodic_maintenance_timeout_indicator_vals), 0x0,
9492 NULL, HFILL}
9493 },
9494 {&hf_docsis_mdd_dls_broadcast_and_multicast_delivery_method,
9495 { "DLS Broadcast and Multicast Delivery Method", "docsis_mdd.dls_broadcast_and_multicast_delivery_method",
9496 FT_UINT8, BASE_DEC, VALS(dls_broadcast_and_multicast_delivery_method_vals), 0x0,
9497 NULL, HFILL}
9498 },
9499 {&hf_docsis_mdd_cm_status_event_d31_ofdm_prof_fail,
9500 { "Downstream OFDM Profile Failure", "docsis_mdd.cm_status_event_d31_ofdm_prof_fail",
9501 FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x01,
9502 NULL, HFILL}
9503 },
9504 {&hf_docsis_mdd_cm_status_event_d31_prim_down_chan_change,
9505 { "Primary Downstream Channel Change", "docsis_mdd.cm_status_event_d31_prim_down_chan_change",
9506 FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x02,
9507 NULL, HFILL}
9508 },
9509 {&hf_docsis_mdd_cm_status_event_d31_dpd_mismatch,
9510 { "DPD Mismatch", "docsis_mdd.cm_status_event_d31_dpd_mismatch",
9511 FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x04,
9512 NULL, HFILL}
9513 },
9514 {&hf_docsis_mdd_cm_status_event_d31_deprecated,
9515 { "Deprecated", "docsis_mdd.cm_status_event_d31_deprecated",
9516 FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x08,
9517 NULL, HFILL}
9518 },
9519 {&hf_docsis_mdd_cm_status_event_d31_ncp_prof_fail,
9520 { "NCP Profile Failure", "docsis_mdd.cm_status_event_d31_ncp_prof_fail",
9521 FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x10,
9522 NULL, HFILL}
9523 },
9524 {&hf_docsis_mdd_cm_status_event_d31_loss_fec_plc,
9525 { "Loss of FEC lock on PLC", "docsis_mdd.cm_status_event_d31_loss_fec_plc",
9526 FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x20,
9527 NULL, HFILL}
9528 },
9529 {&hf_docsis_mdd_cm_status_event_d31_ncp_prof_recover,
9530 { "NCP Profile Recovery", "docsis_mdd.cm_status_event_d31_ncp_prof_recover",
9531 FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x40,
9532 NULL, HFILL}
9533 },
9534 {&hf_docsis_mdd_cm_status_event_d31_fec_recover_on_plc,
9535 { "FEC Recovery on PLC", "docsis_mdd.cm_status_event_d31_fec_recover_on_plc",
9536 FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x80,
9537 NULL, HFILL}
9538 },
9539 {&hf_docsis_mdd_cm_status_event_d31_fec_recover_on_ofdm_prof,
9540 { "FEC Recovery on OFDM Profile", "docsis_mdd.cm_status_event_d31_fec_recover_on_ofdm_prof",
9541 FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x0100,
9542 NULL, HFILL}
9543 },
9544 {&hf_docsis_mdd_cm_status_event_d31_ofdma_prof_fail,
9545 { "OFDMA Profile Failure", "docsis_mdd.cm_status_event_d31_ofdma_prof_fail",
9546 FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x0200,
9547 NULL, HFILL}
9548 },
9549 {&hf_docsis_mdd_cm_status_event_d31_map_stor_overflow_ind,
9550 { "MAP Storage Overflow Indicator", "docsis_mdd.cm_status_event_d31_map_stor_overflow_ind",
9551 FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x0400,
9552 NULL, HFILL}
9553 },
9554 {&hf_docsis_mdd_cm_status_event_d31_ofdm_map_stor_almost_full_ind,
9555 { "MAP Storage Almost Full Indicator", "docsis_mdd.cm_status_event_d31_ofdm_map_stor_almost_full_ind",
9556 FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x0800,
9557 NULL, HFILL}
9558 },
9559 {&hf_docsis_mdd_cm_status_event_d31_reserved,
9560 { "Reserved for future use", "docsis_mdd.cm_status_event_d31_reserved",
9561 FT_UINT32, BASE_HEX, NULL, 0xFFFFF000,
9562 NULL, HFILL}
9563 },
9564 {&hf_docsis_mdd_diplexer_band_edge,
9565 { "Diplexer Band Edge", "docsis_mdd.diplexer_band_edge",
9566 FT_UINT8, BASE_DEC, VALS(mdd_diplexer_band_edge_vals), 0x0,
9567 NULL, HFILL}
9568 },
9569 {&hf_docsis_mdd_diplexer_band_edge_length,
9570 {"Length", "docsis_mdd.diplexer_band_edge_length",
9571 FT_UINT8, BASE_DEC, NULL, 0x0,
9572 NULL, HFILL}
9573 },
9574 {&hf_docsis_mdd_diplexer_us_upper_band_edge,
9575 {"Diplexer Upstream Upper Band Edge", "docsis_mdd.diplexer_us_upper_band_edge",
9576 FT_UINT8, BASE_DEC, VALS(mdd_diplexer_us_upper_band_edge_vals), 0x0,
9577 NULL, HFILL}
9578 },
9579 {&hf_docsis_mdd_diplexer_ds_lower_band_edge,
9580 {"Diplexer Downstream Lower Band Edge", "docsis_mdd.diplexer_ds_lower_band_edge",
9581 FT_UINT8, BASE_DEC, VALS(mdd_diplexer_ds_lower_band_edge_vals), 0x0,
9582 NULL, HFILL}
9583 },
9584 {&hf_docsis_mdd_diplexer_ds_upper_band_edge,
9585 {"Diplexer Downstream Upper Band Edge", "docsis_mdd.diplexer_ds_upper_band_edge",
9586 FT_UINT8, BASE_DEC, VALS(mdd_diplexer_ds_upper_band_edge_vals), 0x0,
9587 NULL, HFILL}
9588 },
9589 {&hf_docsis_mdd_full_duplex_descriptor,
9590 {"Full Duplex Descriptor", "docsis_mdd.full_duplex_descriptor",
9591 FT_UINT8, BASE_DEC, VALS(mdd_full_duplex_descriptor_vals), 0x0,
9592 NULL, HFILL}
9593 },
9594 {&hf_docsis_mdd_full_duplex_descriptor_length,
9595 {"Length", "docsis_mdd.full_duplex_descriptor_length",
9596 FT_UINT8, BASE_DEC, NULL, 0x0,
9597 NULL, HFILL}
9598 },
9599 {&hf_docsis_mdd_full_duplex_allocated_spectrum,
9600 {"Full Duplex Allocated Spectrum", "docsis_mdd.full_duplex_full_allocated_spectrum",
9601 FT_UINT8, BASE_DEC, VALS(mdd_full_duplex_allocated_spectrum_vals), 0x0,
9602 NULL, HFILL}
9603 },
9604 {&hf_docsis_mdd_full_duplex_total_number_of_sub_bands,
9605 {"Total number of sub-bands", "docsis_mdd.full_duplex_total_number_of_sub_bands",
9606 FT_UINT8, BASE_DEC, NULL, 0x0,
9607 NULL, HFILL}
9608 },
9609 {&hf_docsis_mdd_full_duplex_sub_band_width,
9610 {"Full Duplex Sub-band Width", "docsis_mdd.full_duplex_sub_band_width",
9611 FT_UINT8, BASE_DEC, VALS(mdd_full_duplex_sub_band_width_vals), 0x0,
9612 NULL, HFILL}
9613 },
9614 {&hf_docsis_mdd_full_duplex_sub_band_descriptor,
9615 {"Full Duplex Sub-band Descriptor", "docsis_mdd.full_duplex_sub_band_descriptor",
9616 FT_UINT8, BASE_DEC, VALS(mdd_full_duplex_sub_band_vals), 0x0,
9617 NULL, HFILL}
9618 },
9619 {&hf_docsis_mdd_full_duplex_sub_band_descriptor_length,
9620 {"Length", "docsis_mdd.full_duplex_sub_band_descriptor_length",
9621 FT_UINT8, BASE_DEC, NULL, 0x0,
9622 NULL, HFILL}
9623 },
9624 {&hf_docsis_mdd_full_duplex_sub_band_id,
9625 {"Full Duplex Sub-band ID", "docsis_mdd.full_duplex_sub_band_id",
9626 FT_UINT8, BASE_DEC, NULL, 0x0,
9627 NULL, HFILL}
9628 },
9629 {&hf_docsis_mdd_full_duplex_sub_band_offset,
9630 {"Full Duplex Sub-band Offset", "docsis_mdd.full_duplex_sub_band_offset",
9631 FT_UINT16, BASE_DEC, NULL, 0x0,
9632 NULL, HFILL}
9633 },
9634
9635 /* B_INIT_RNG_REQ */
9636 {&hf_docsis_bintrngreq_capflags,
9637 {"Capability Flags", "docsis_bintrngreq.capflags",
9638 FT_UINT8, BASE_HEX, NULL, 0x0,
9639 NULL, HFILL}
9640 },
9641 {&hf_docsis_bintrngreq_capflags_frag,
9642 {"Pre-3.0 Fragmentation", "docsis_bintrngreq.capflags.frag",
9643 FT_BOOLEAN, 8, NULL, (1<<7),
9644 "Pre-3.0 DOCSIS fragmentation is supported prior to registration", HFILL }
9645 },
9646 {&hf_docsis_bintrngreq_capflags_encrypt,
9647 {"Early Auth. & Encrypt", "docsis_bintrngreq.capflags.encrypt",
9648 FT_BOOLEAN, 8, NULL, (1<<6),
9649 "Early Authentication and Encryption supported", HFILL }
9650 },
9651 {&hf_docsis_bintrngreq_mddsgid,
9652 {"MD-DS-SG-ID", "docsis_bintrngreq.mddsgid",
9653 FT_UINT8, BASE_HEX_DEC, NULL, 0x0,
9654 "MAC Domain Downstream Service Group Identifier", HFILL}
9655 },
9656 /* DBC_REQ */
9657 {&hf_docsis_dbcreq_number_of_fragments,
9658 {"Number of Fragments", "docsis_dbcreq.number_of_fragments",
9659 FT_UINT8, BASE_HEX_DEC, NULL, 0x0,
9660 NULL, HFILL}
9661 },
9662 {&hf_docsis_dbcreq_fragment_sequence_number,
9663 {"Fragment Seq No", "docsis_dbcreq.fragment_sequence_number",
9664 FT_UINT8, BASE_HEX_DEC, NULL, 0x0,
9665 NULL, HFILL}
9666 },
9667 /* DBC_RSP */
9668 {&hf_docsis_dbcrsp_conf_code,
9669 {"Confirmation Code", "docsis_dbcrsp.conf_code",
9670 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &docsis_conf_code_ext, 0x0,
9671 NULL, HFILL}
9672 },
9673 /* DPV_REQ/RSP */
9674 {&hf_docsis_dpv_flags,
9675 {"Flags", "docsis_dpv.flags",
9676 FT_UINT8, BASE_DEC, NULL, 0x0,
9677 NULL, HFILL}
9678 },
9679 {&hf_docsis_dpv_us_sf,
9680 {"Upstream Service Flow ID", "docsis_dpv.us_sf",
9681 FT_UINT32, BASE_DEC, NULL, 0x0,
9682 NULL, HFILL}
9683 },
9684 {&hf_docsis_dpv_n,
9685 {"N (Measurement avaraging factor)", "docsis_dpv.n",
9686 FT_UINT16, BASE_DEC, NULL, 0x0,
9687 NULL, HFILL}
9688 },
9689 {&hf_docsis_dpv_start,
9690 {"Start Reference Point", "docsis_dpv.start",
9691 FT_UINT8, BASE_DEC, NULL, 0x0,
9692 NULL, HFILL}
9693 },
9694 {&hf_docsis_dpv_end,
9695 {"End Reference Point", "docsis_dpv.end",
9696 FT_UINT8, BASE_DEC, NULL, 0x0,
9697 NULL, HFILL}
9698 },
9699 {&hf_docsis_dpv_ts_start,
9700 {"Timestamp Start", "docsis_dpv.ts_start",
9701 FT_UINT32, BASE_DEC, NULL, 0x0,
9702 NULL, HFILL}
9703 },
9704 {&hf_docsis_dpv_ts_end,
9705 {"Timestamp End", "docsis_dpv.ts_end",
9706 FT_UINT32, BASE_DEC, NULL, 0x0,
9707 NULL, HFILL}
9708 },
9709 /* CM Status */
9710 {&hf_docsis_cmstatus_e_t_mdd_t,
9711 {"Event Type: Secondary Channel MDD timeout", "docsis_cmstatus.mdd_timeout", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9712 },
9713 {&hf_docsis_cmstatus_e_t_qfl_f,
9714 {"Event Type: QAM/FEC lock failure", "docsis_cmstatus.qam_fec_lock_failure", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9715 },
9716 {&hf_docsis_cmstatus_e_t_s_o,
9717 {"Event Type: Sequence out-of-range", "docsis_cmstatus.sequence_out_of_range", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9718 },
9719 {&hf_docsis_cmstatus_e_t_mdd_r,
9720 {"Event Type: Secondary Channel MDD Recovery", "docsis_cmstatus.mdd_recovery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9721 },
9722 {&hf_docsis_cmstatus_e_t_qfl_r,
9723 {"Event Type: QAM/FEC Lock Recovery", "docsis_cmstatus.qam_fec_lock_recovery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9724 },
9725 {&hf_docsis_cmstatus_e_t_t4_t,
9726 {"Event Type: T4 timeout", "docsis_cmstatus.t4_timeout", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9727 },
9728 {&hf_docsis_cmstatus_e_t_t3_e,
9729 {"Event Type: T3 retries exceeded", "docsis_cmstatus.t3_retries_exceeded", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9730 },
9731 {&hf_docsis_cmstatus_e_t_rng_s,
9732 {"Event Type: Successful ranging after T3 retries exceeded", "docsis_cmstatus.successful_ranging_after_t3_retries_exceeded", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9733 },
9734 {&hf_docsis_cmstatus_e_t_cm_b,
9735 {"Event Type: CM operating on battery backup", "docsis_cmstatus.cm_on_battery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9736 },
9737 {&hf_docsis_cmstatus_e_t_cm_a,
9738 {"Event Type: CM returned to A/C power", "docsis_cmstatus.cm_on_ac_power", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9739 },
9740 {&hf_docsis_cmstatus_e_t_mac_removal,
9741 {"Event Type: MAC Removal event", "docsis_cmstatus.mac_removal", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9742 },
9743 {&hf_docsis_cmstatus_e_t_ds_ofdm_profile_failure,
9744 {"Event Type: DS OFDM profile failure", "docsis_cmstatus.ds_ofdm_profile_failure", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9745 },
9746 {&hf_docsis_cmstatus_e_t_prim_ds_change,
9747 {"Event Type: Primary Downstream Change", "docsis_cmstatus.primary_downstream_change", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9748 },
9749 {&hf_docsis_cmstatus_e_t_dpd_mismatch,
9750 {"Event Type: DPD Mismatch", "docsis_cmstatus.dpd_mismatch", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9751 },
9752 {&hf_docsis_cmstatus_e_t_ncp_profile_failure,
9753 {"Event Type: NCP Profile failure", "docsis_cmstatus.ncp_profile_failure", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9754 },
9755 {&hf_docsis_cmstatus_e_t_plc_failure,
9756 {"Event Type: PLC failure", "docsis_cmstatus.plc_failure", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9757 },
9758 {&hf_docsis_cmstatus_e_t_ncp_profile_recovery,
9759 {"Event Type: NCP profile recovery", "docsis_cmstatus.ncp_profile_recovery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9760 },
9761 {&hf_docsis_cmstatus_e_t_plc_recovery,
9762 {"Event Type: PLC recovery", "docsis_cmstatus.plc_recovery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9763 },
9764 {&hf_docsis_cmstatus_e_t_ofdm_profile_recovery,
9765 {"Event Type: OFDM profile recovery", "docsis_cmstatus.ofdm_profile_recovery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9766 },
9767 {&hf_docsis_cmstatus_e_t_ofdma_profile_failure,
9768 {"Event Type: OFDMA profile failure", "docsis_cmstatus.ofdma_profile_failure", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9769 },
9770 {&hf_docsis_cmstatus_e_t_map_storage_overflow_indicator,
9771 {"Event Type: MAP Storage overflow indicator", "docsis_cmstatus.map_storage_overflow_indicator", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9772 },
9773 {&hf_docsis_cmstatus_e_t_map_storage_almost_full_indicator,
9774 {"Event Type: MAP Storage almost full indicator", "docsis_cmstatus.map_storage_almost_full_indicator", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9775 },
9776 {&hf_docsis_cmstatus_e_t_unknown,
9777 {"Unknown Event Type", "docsis_cmstatus.unknown_event_type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9778 },
9779 {&hf_docsis_cmstatus_status_event_descr,
9780 {"Description", "docsis_cmstatus.status_event.description",FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
9781 },
9782 {&hf_docsis_cmstatus_status_event_ds_ch_id,
9783 {"Downstream Channel ID", "docsis_cmstatus.status_event.ds_chid",FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9784 },
9785 {&hf_docsis_cmstatus_status_event_us_ch_id,
9786 {"Upstream Channel ID", "docsis_cmstatus.status_event.us_chid",FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9787 },
9788 {&hf_docsis_cmstatus_status_event_dsid,
9789 {"DSID", "docsis_cmstatus.status_event.dsid", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL}
9790 },
9791 {&hf_docsis_cmstatus_status_event_mac_address,
9792 {"MAC Address", "docsis_cmstatus.status_event.mac_address", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL}
9793 },
9794 {&hf_docsis_cmstatus_status_event_ds_ofdm_profile_id,
9795 {"Downstream OFDM Profile ID", "docsis_cmstatus.status_event.ds_ofdm_profile_id", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9796 },
9797 {&hf_docsis_cmstatus_status_event_us_ofdma_profile_id,
9798 {"US OFDMA Profile ID", "docsis_cmstatus.status_event.us_ofdma_profile_id", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9799 },
9800 {&hf_docsis_cmstatus_tlv_data,
9801 {"TLV Data", "docsis_cmstatus.tlv_data", FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0, NULL, HFILL}
9802 },
9803 {&hf_docsis_cmstatus_type,
9804 {"Type", "docsis_cmstatus.type",FT_UINT8, BASE_DEC, VALS(cmstatus_tlv_vals), 0x0, NULL, HFILL}
9805 },
9806 {&hf_docsis_cmstatus_length,
9807 {"Length", "docsis_cmstatus.length",FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9808 },
9809 {&hf_docsis_cmstatus_status_event_tlv_data,
9810 {"Status Event TLV Data", "docsis_cmstatus.status_event.tlv_data", FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0, NULL, HFILL}
9811 },
9812 {&hf_docsis_cmstatus_status_event_type,
9813 {"Status Event Type", "docsis_cmstatus.status_event.type",FT_UINT8, BASE_DEC, VALS(cmstatus_status_event_tlv_vals), 0x0, NULL, HFILL}
9814 },
9815 {&hf_docsis_cmstatus_status_event_length,
9816 {"Status Event Length", "docsis_cmstatus.status_event.length",FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9817 },
9818
9819 /* CM_CTRL_REQ */
9820 {&hf_docsis_cmctrl_tlv_mute,
9821 {"Upstream Channel RF Mute", "docsis_cmctrl.mute",
9822 FT_UINT8, BASE_DEC, NULL, 0x0,
9823 NULL, HFILL}
9824 },
9825 {&hf_docsis_cmctrl_tlv_mute_timeout,
9826 {"RF Mute Timeout Interval", "docsis_cmctrl.mute_timeout",
9827 FT_UINT32, BASE_DEC, NULL, 0x0,
9828 NULL, HFILL}
9829 },
9830 {&hf_docsis_cmctrl_tlv_reinit,
9831 {"CM Reinitialize", "docsis_cmctrl.reinit",
9832 FT_UINT8, BASE_DEC, NULL, 0x0,
9833 NULL, HFILL}
9834 },
9835 {&hf_docsis_cmctrl_tlv_disable_fwd,
9836 {"Disable Forwarding", "docsis_cmctrl.disable_fwd",
9837 FT_UINT8, BASE_DEC, NULL, 0x0,
9838 NULL, HFILL}
9839 },
9840 {&hf_docsis_cmctrl_tlv_ds_event,
9841 {"Override Downstream Events", "docsis_cmctrl.ds_event",
9842 FT_BYTES, BASE_NONE, NULL, 0x0,
9843 NULL, HFILL}
9844 },
9845 {&hf_docsis_cmctrl_tlv_us_event,
9846 {"Override Upstream Events", "docsis_cmctrl.us_event",
9847 FT_BYTES, BASE_NONE, NULL, 0x0,
9848 NULL, HFILL}
9849 },
9850 {&hf_docsis_cmctrl_tlv_event,
9851 {"Override Non-Channel-Specific Events", "docsis_cmctrl.event",
9852 FT_BYTES, BASE_NONE, NULL, 0x0,
9853 NULL, HFILL}
9854 },
9855 {&hf_docsis_cmctrlreq_tlv_data,
9856 {"TLV Data", "docsis_cmctrl.tlv_data",
9857 FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0,
9858 NULL, HFILL}
9859 },
9860 {&hf_docsis_cmctrlreq_type,
9861 {"Type", "docsis_cmctrl.tlv_type",
9862 FT_UINT8, BASE_DEC, VALS(cmctrlreq_tlv_vals), 0x0,
9863 NULL, HFILL}
9864 },
9865 {&hf_docsis_cmctrlreq_length,
9866 {"Length", "docsis_cmctrl.tlv_length",
9867 FT_UINT8, BASE_DEC, NULL, 0x0,
9868 NULL, HFILL}
9869 },
9870 {&hf_docsis_cmctrlreq_us_type,
9871 {"Type", "docsis_cmctrl.us_event_type",
9872 FT_UINT8, BASE_DEC, VALS(cmctrlreq_us_tlv_vals), 0x0,
9873 NULL, HFILL}
9874 },
9875 {&hf_docsis_cmctrlreq_us_length,
9876 {"Length", "docsis_cmctrl.us_event_length",
9877 FT_UINT8, BASE_DEC, NULL, 0x0,
9878 NULL, HFILL}
9879 },
9880 {&hf_docsis_cmctrl_us_event_ch_id,
9881 {"Upstream Channel ID", "docsis_cmctrl.us_event.chid",
9882 FT_UINT8, BASE_DEC, NULL, 0x0,
9883 NULL, HFILL}
9884 },
9885 {&hf_docsis_cmctrl_us_event_mask,
9886 {"Upstream Status Event Enable Bitmask", "docsis_cmctrl.us_event.mask",
9887 FT_BYTES, BASE_NONE, NULL, 0x0,
9888 NULL, HFILL}
9889 },
9890 {&hf_docsis_cmctrl_ds_type,
9891 {"Type", "docsis_cmctrl.ds_event_type",
9892 FT_UINT8, BASE_DEC, VALS(cmctrlreq_ds_tlv_vals), 0x0,
9893 NULL, HFILL}
9894 },
9895 {&hf_docsis_cmctrl_ds_length,
9896 {"Length", "docsis_cmctrl.ds_event_length",
9897 FT_UINT8, BASE_DEC, NULL, 0x0,
9898 NULL, HFILL}
9899 },
9900 {&hf_docsis_cmctrl_ds_event_ch_id,
9901 {"Downstream Channel ID", "docsis_cmctrl.ds_event.chid",
9902 FT_UINT8, BASE_DEC, NULL, 0x0,
9903 NULL, HFILL}
9904 },
9905 {&hf_docsis_cmctrl_ds_event_mask,
9906 {"Downstream Status Event Enable Bitmask", "docsis_cmctrl.ds_event.mask",
9907 FT_BYTES, BASE_NONE, NULL, 0x0,
9908 NULL, HFILL}
9909 },
9910 /* REG_REQ_MP */
9911 {&hf_docsis_regreqmp_sid,
9912 {"Sid", "docsis_regreqmp.sid",
9913 FT_UINT16, BASE_DEC, NULL, 0x0,
9914 "Reg-Req-Mp Sid", HFILL}
9915 },
9916 {&hf_docsis_regreqmp_number_of_fragments,
9917 {"Number of Fragments", "docsis_regreqmp.number_of_fragments",
9918 FT_UINT8, BASE_DEC, NULL, 0x0,
9919 "Reg-Req-Mp Number of Fragments", HFILL}
9920 },
9921 {&hf_docsis_regreqmp_fragment_sequence_number,
9922 {"Fragment Sequence Number", "docsis_regreqmp.fragment_sequence_number",
9923 FT_UINT8, BASE_DEC, NULL, 0x0,
9924 "Reg-Req-Mp Fragment Sequence Number", HFILL}
9925 },
9926 /* REG_RSP_MP */
9927 {&hf_docsis_regrspmp_sid,
9928 {"Sid", "docsis_regrspmp.sid",
9929 FT_UINT16, BASE_DEC, NULL, 0x0,
9930 "Reg-Rsp-Mp Sid", HFILL}
9931 },
9932 {&hf_docsis_regrspmp_response,
9933 {"Response", "docsis_regrspmp.response",
9934 FT_UINT8, BASE_DEC, NULL, 0x0,
9935 "Reg-Rsp-Mp Response", HFILL}
9936 },
9937 {&hf_docsis_regrspmp_number_of_fragments,
9938 {"Number of Fragments", "docsis_regrspmp.number_of_fragments",
9939 FT_UINT8, BASE_DEC, NULL, 0x0,
9940 "Reg-Rsp-Mp Number of Fragments", HFILL}
9941 },
9942 {&hf_docsis_regrspmp_fragment_sequence_number,
9943 {"Fragment Sequence Number", "docsis_regrspmp.fragment_sequence_number",
9944 FT_UINT8, BASE_DEC, NULL, 0x0,
9945 "Reg-Rsp-Mp Fragment Sequence Number", HFILL}
9946 },
9947 /* EM */
9948 {&hf_docsis_emrsp_tlv_data,
9949 {"Energy Management TLV data", "docsis_emrsp.tlv_data",
9950 FT_BYTES, BASE_NONE, NULL, 0x0,
9951 NULL, HFILL}
9952 },
9953 {&hf_docsis_emrsp_tlv_type,
9954 {"Energy Management TLV Type", "docsis_emrsp.tlv.type",
9955 FT_UINT8, BASE_DEC, VALS(emrsp_tlv_vals), 0x0,
9956 NULL, HFILL}
9957 },
9958 {&hf_docsis_emrsp_tlv_length,
9959 {"Energy Management TLV Length", "docsis_emrsp.tlv.length",
9960 FT_UINT8, BASE_DEC, NULL, 0x0,
9961 NULL, HFILL}
9962 },
9963 {&hf_docsis_emrsp_tlv_holdoff_timer,
9964 {"Hold-Off Timer", "docsis_emrsp.tlv.holdoff_timer",
9965 FT_UINT16, BASE_DEC, NULL, 0x0,
9966 NULL, HFILL}
9967 },
9968 {&hf_docsis_emreq_req_power_mode,
9969 {"Requested Power Mode", "docsis_emreq.req_power_mode",
9970 FT_UINT8, BASE_DEC, VALS(emreq_req_power_mode_vals), 0x0,
9971 NULL, HFILL}
9972 },
9973 {&hf_docsis_emreq_reserved,
9974 {"Reserved", "docsis_emreq.reserved",
9975 FT_UINT8, BASE_HEX, NULL, 0x0,
9976 NULL, HFILL}
9977 },
9978 {&hf_docsis_emrsp_rsp_code,
9979 {"Response Code", "docsis_emrsp.resp_code",
9980 FT_UINT8, BASE_DEC, VALS(emrsp_rsp_code_vals), 0x0,
9981 NULL, HFILL}
9982 },
9983 {&hf_docsis_emrsp_reserved,
9984 {"Reserved", "docsis_emrsp.reserved",
9985 FT_UINT8, BASE_HEX, NULL, 0x0,
9986 NULL, HFILL}
9987 },
9988 {&hf_docsis_emrsp_tlv_unknown,
9989 {"Unknown TLV", "docsis_emrsp.unknown_tlv",
9990 FT_BYTES, BASE_NONE, NULL, 0x0,
9991 NULL, HFILL}
9992 },
9993 /* OCD */
9994 {&hf_docsis_ocd_tlv_unknown,
9995 {"Unknown TLV", "docsis_ocd.unknown_tlv", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
9996 },
9997 {&hf_docsis_ocd_ccc,
9998 {"Configuration Change Count", "docsis_ocd.ccc", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
9999 },
10000 {&hf_docsis_ocd_tlv_four_trans_size,
10001 {"Discrete Fourier Transform Size", "docsis_ocd.tlv.four_trans_size", FT_UINT8, BASE_DEC, VALS (docsis_ocd_four_trans_size), 0x0, NULL, HFILL}
10002 },
10003 {&hf_docsis_ocd_tlv_cycl_pref,
10004 {"Cyclic Prefix", "docsis_ocd.tlv.cyc_pref", FT_UINT8, BASE_DEC, VALS (docsis_ocd_cyc_prefix), 0x0, NULL, HFILL}
10005 },
10006 {&hf_docsis_ocd_tlv_roll_off,
10007 {"Roll Off", "docsis_ocd.tlv.roll_off", FT_UINT8, BASE_DEC, VALS (docsis_ocd_roll_off), 0x0, NULL, HFILL}
10008 },
10009 {&hf_docsis_ocd_tlv_ofdm_spec_loc,
10010 {"OFDM Spectrum Location", "docsis_ocd.tlv.ofdm_spec_loc", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &local_units_hz, 0x0, NULL, HFILL}
10011 },
10012 {&hf_docsis_ocd_tlv_time_int_depth,
10013 {"Time Interleaving Depth", "docsis_ocd.tlv.time_int_depth", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
10014 },
10015 {&hf_docsis_ocd_tlv_prim_cap_ind,
10016 {"Primary Capable Indicator", "docsis_ocd.tlv.prim_cap_ind", FT_UINT8, BASE_DEC, VALS(docsis_ocd_prim_cap_ind_str), 0x0, NULL, HFILL}
10017 },
10018 {&hf_docsis_ocd_tlv_subc_assign_type,
10019 {"Assignment type", "docsis_ocd.tlv.subc_assign.type", FT_UINT8, BASE_DEC, VALS(docsis_ocd_subc_assign_type_str), 0xC0, NULL, HFILL}
10020 },
10021 {&hf_docsis_ocd_tlv_subc_assign_value,
10022 {"Assignment value", "docsis_ocd.tlv.subc_assign.value", FT_UINT8, BASE_DEC, VALS(docsis_ocd_subc_assign_value_str), 0x20, NULL, HFILL}
10023 },
10024 {&hf_docsis_ocd_subc_assign_subc_type,
10025 {"Subcarrier Type", "docsis_ocd.tlv.subc_assign.subc_type", FT_UINT8, BASE_DEC, VALS(docsis_ocd_subc_assign_subc_type_str), 0x1F, NULL, HFILL}
10026 },
10027 {&hf_docsis_ocd_subc_assign_range,
10028 {"Subcarrier index range", "docsis_ocd.tlv.subc_assign.range", FT_UINT32, BASE_CUSTOM, CF_FUNC(subc_assign_range), 0x00, NULL, HFILL}
10029 },
10030 {&hf_docsis_ocd_subc_assign_index,
10031 {"Subcarrier index", "docsis_ocd.tlv.subc_assign.index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL}
10032 },
10033 {&hf_docsis_ocd_tlv_data,
10034 {"TLV Data", "docsis_ocd.tlv_data", FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0, NULL, HFILL}
10035 },
10036 {&hf_docsis_ocd_type,
10037 {"Type", "docsis_ocd.type",FT_UINT8, BASE_DEC, VALS(ocd_tlv_vals), 0x0, NULL, HFILL}
10038 },
10039 {&hf_docsis_ocd_length,
10040 {"Length", "docsis_ocd.length",FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
10041 },
10042 /* DPD */
10043 {&hf_docsis_dpd_tlv_unknown,
10044 {"Unknown TLV", "docsis_dpd.unknown_tlv",
10045 FT_BYTES, BASE_NONE, NULL, 0x0,
10046 NULL, HFILL}
10047 },
10048 {&hf_docsis_dpd_prof_id,
10049 {"Profile Identifier", "docsis_dpd.prof_id", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
10050 },
10051 {&hf_docsis_dpd_ccc,
10052 {"Configuration Change Count", "docsis_dpd.ccc", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
10053 },
10054 {&hf_docsis_dpd_tlv_subc_assign_type,
10055 {"Subcarrier Assignment Type", "docsis_dpd.tlv.subc_assign.type", FT_UINT8, BASE_DEC, VALS(docsis_dpd_subc_assign_type_str), 0xC0, NULL, HFILL}
10056 },
10057 {&hf_docsis_dpd_tlv_subc_assign_value,
10058 {"Subcarrier Assignment Value", "docsis_dpd.tlv.subc_assign.value", FT_UINT8, BASE_DEC, VALS(docsis_dpd_subc_assign_value_str), 0x20, NULL, HFILL}
10059 },
10060 {&hf_docsis_dpd_tlv_subc_assign_reserved,
10061 {"reserved", "docsis_dpd.tlv.subc_assign.reserved", FT_UINT8, BASE_DEC, NULL, 0x10, NULL, HFILL}
10062 },
10063 {&hf_docsis_dpd_tlv_subc_assign_modulation,
10064 {"Subcarrier Assignment Modulation", "docsis_dpd.tlv.subc_assign.modulation", FT_UINT8, BASE_DEC, VALS(docsis_dpd_subc_assign_modulation_str), 0x0F, NULL, HFILL}
10065 },
10066 {&hf_docsis_dpd_subc_assign_range,
10067 {"Subcarrier index range", "docsis_dpd.tlv.subc_assign.range", FT_UINT32, BASE_CUSTOM, CF_FUNC(subc_assign_range), 0x00, NULL, HFILL}
10068 },
10069 {&hf_docsis_dpd_subc_assign_index,
10070 {"Subcarrier index", "docsis_dpd.tlv.subc_assign.index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL}
10071 },
10072 {&hf_docsis_dpd_tlv_subc_assign_vector_oddness,
10073 {"Odd or even", "docsis_dpd.tlv.subc_assign_vect.oddness", FT_UINT8, BASE_DEC, VALS(docsis_dpd_tlv_subc_assign_vector_oddness_str), 0x80, NULL, HFILL}
10074 },
10075 {&hf_docsis_dpd_tlv_subc_assign_vector_reserved,
10076 {"Reserved", "docsis_dpd.tlv.subc_assign_vect.reserved", FT_UINT8, BASE_DEC, NULL, 0x60, NULL, HFILL}
10077 },
10078 {&hf_docsis_dpd_tlv_subc_assign_vector_subc_start,
10079 {"Subcarrier start", "docsis_dpd.tlv.subc_assign_vect.subc_start", FT_UINT16, BASE_DEC, NULL, 0x1FFF, NULL, HFILL}
10080 },
10081 {&hf_docsis_dpd_tlv_subc_assign_vector_modulation_odd,
10082 {"Modulation", "docsis_dpd.tlv.subc_assign_vect.modulation", FT_UINT8, BASE_DEC, VALS(docsis_dpd_tlv_subc_assign_vector_modulation_str), 0xF0, NULL, HFILL}
10083 },
10084 {&hf_docsis_dpd_tlv_subc_assign_vector_modulation_even,
10085 {"Modulation", "docsis_dpd.tlv.subc_assign_vect.modulation", FT_UINT8, BASE_DEC, VALS(docsis_dpd_tlv_subc_assign_vector_modulation_str), 0x0F, NULL, HFILL}
10086 },
10087 {&hf_docsis_dpd_tlv_data,
10088 {"TLV Data", "docsis_dpd.tlv_data", FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0, NULL, HFILL}
10089 },
10090 {&hf_docsis_dpd_type,
10091 {"Type", "docsis_dpd.type",FT_UINT8, BASE_DEC, VALS(dpd_tlv_vals), 0x0, NULL, HFILL}
10092 },
10093 {&hf_docsis_dpd_length,
10094 {"Length", "docsis_dpd.length",FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
10095 },
10096 /* OPT-REQ */
10097 {&hf_docsis_optreq_tlv_unknown,
10098 {"Unknown TLV", "docsis_optreq.unknown_tlv", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
10099 },
10100 {&hf_docsis_optreq_reserved,
10101 {"Reserved", "docsis_optreq.reserved", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
10102 },
10103 {&hf_docsis_optreq_prof_id,
10104 {"Profile Identifier", "docsis_optreq.prof_id", FT_UINT8, BASE_DEC, VALS(profile_id_vals), 0x0, NULL, HFILL}
10105 },
10106 {&hf_docsis_optreq_opcode,
10107 {"Opcode", "docsis_optreq.opcode", FT_UINT8, BASE_DEC, VALS(opt_opcode_vals), 0x0, NULL, HFILL}
10108 },
10109 {&hf_docsis_optreq_tlv_data,
10110 {"TLV Data", "docsis_optreq.tlv_data", FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0, NULL, HFILL}
10111 },
10112 {&hf_docsis_optreq_type,
10113 {"Type", "docsis_optreq.type",FT_UINT8, BASE_DEC, VALS(optreq_tlv_vals), 0x0, NULL, HFILL}
10114 },
10115 {&hf_docsis_optreq_length,
10116 {"Length", "docsis_optreq.length",FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
10117 },
10118 {&hf_docsis_optreq_reqstat_rxmer_stat_subc,
10119 {"RxMER Statistics per subcarrier", "docsis_optreq.reqstat.rxmer_stat_per_subcarrier", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x1, NULL, HFILL}
10120 },
10121 {&hf_docsis_optreq_reqstat_rxmer_subc_threshold_comp,
10122 {"RxMER per Subcarrier Threshold Comparison for Candidate Profile", "docsis_optreq.reqstat.rxmer_per_subcarrier_thresh_comp", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x2, NULL, HFILL}
10123 },
10124 {&hf_docsis_optreq_reqstat_snr_marg_cand_prof,
10125 {"SNR Margin for Candidate Profile", "docsis_optreq.reqstat.snr_marg_cand_prof", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x4, NULL, HFILL}
10126 },
10127 {&hf_docsis_optreq_reqstat_codew_stat_cand_prof,
10128 {"Codeword Statistics for Candidate Profile", "docsis_optreq.reqstat.codew_stat_cand_prof", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x8, NULL, HFILL}
10129 },
10130 {&hf_docsis_optreq_reqstat_codew_thresh_comp_cand_prof,
10131 {"Codeword Threshold Comparison for Candidate Profile", "docsis_optreq.reqstat.codew_thresh_comp_cand_prof", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x10, NULL, HFILL}
10132 },
10133 {&hf_docsis_optreq_reqstat_ncp_field_stat,
10134 {"NCP Field Statistics", "docsis_optreq.reqstat.ncp_field_stats", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x20, NULL, HFILL}
10135 },
10136 {&hf_docsis_optreq_reqstat_ncp_crc_thresh_comp,
10137 {"NCP CRC Threshold Comparison", "docsis_optreq.reqstat.ncp_crc_thresh_comp", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x40, NULL, HFILL}
10138 },
10139 {&hf_docsis_optreq_reqstat_reserved,
10140 {"Reserved", "docsis_optreq.reqstat.reserved", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x80, NULL, HFILL}
10141 },
10142 {&hf_docsis_optreq_tlv_xrmer_thresh_data,
10143 {"TLV Data", "docsis_optreq.rxmer_thresh_params.tlv_data", FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0, NULL, HFILL}
10144 },
10145 {&hf_docsis_optreq_xmer_thresh_params_type,
10146 {"Type", "docsis_optreq.rxmer_thres_params.type",FT_UINT8, BASE_DEC, VALS(optreq_tlv_rxmer_thresh_params_vals), 0x0, NULL, HFILL}
10147 },
10148 {&hf_docsis_optreq_xmer_thresh_params_length,
10149 {"Length", "docsis_optreq.rxmer_thres_params.length",FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
10150 },
10151 {&hf_docsis_optreq_tlv_xrmer_thresh_data_mod_order,
10152 {"Modulation Order", "docsis_optreq.rxmer_thres_params.mod_order", FT_UINT8, BASE_DEC, VALS(opreq_tlv_rxmer_thresh_params_mod_order), 0x0, NULL, HFILL}
10153 },
10154 /* OPT-RSP */
10155 {&hf_docsis_optrsp_tlv_unknown,
10156 {"Unknown TLV", "docsis_optrsp.unknown_tlv", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
10157 },
10158 {&hf_docsis_optrsp_reserved,
10159 {"Reserved", "docsis_optrsp.reserved", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
10160 },
10161 {&hf_docsis_optrsp_prof_id,
10162 {"Profile Identifier", "docsis_optrsp.prof_id", FT_UINT8, BASE_DEC, VALS(profile_id_vals), 0x0, NULL, HFILL}
10163 },
10164 {&hf_docsis_optrsp_status,
10165 {"Status", "docsis_optrsp.status", FT_UINT8, BASE_DEC, VALS(opt_status_vals), 0x0, NULL, HFILL}
10166 },
10167 {&hf_docsis_optrsp_tlv_data,
10168 {"TLV Data", "docsis_optrsp.tlv_data", FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0, NULL, HFILL}
10169 },
10170 {&hf_docsis_optrsp_type,
10171 {"Type", "docsis_optrsp.type",FT_UINT8, BASE_DEC, VALS(optreq_tlv_vals), 0x0, NULL, HFILL}
10172 },
10173 {&hf_docsis_optrsp_length,
10174 {"Length", "docsis_optrsp.length",FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
10175 },
10176 {&hf_docsis_optrsp_tlv_xrmer_snr_margin_data,
10177 {"TLV Data", "docsis_optrsp.rxmer_snr_margin.tlv_data", FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0, NULL, HFILL}
10178 },
10179 {&hf_docsis_optrsp_xmer_snr_margin_type,
10180 {"Type", "docsis_optrsp.xmer_snr_margin.type",FT_UINT8, BASE_DEC, VALS(optrsp_tlv_rxmer_snr_margin_vals), 0x0, NULL, HFILL}
10181 },
10182 {&hf_docsis_optrsp_xmer_snr_margin_length,
10183 {"Length", "docsis_optrsp.rxmer_snr_margin.length",FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
10184 },
10185 {&hf_docsis_optrsp_tlv_xrmer_snr_margin_data_rxmer_subc,
10186 {"RxMER", "docsis_optrsp.rxmer_snr_margin.rxmer_per_subc", FT_UINT8, BASE_CUSTOM, CF_FUNC(fourth_db), 0x0, NULL, HFILL}
10187 },
10188 {&hf_docsis_optrsp_tlv_rxmer_snr_margin_data_snr_margin,
10189 {"SNR Margin", "docsis_optrsp.rxmer_snr_margin.snr_margin", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
10190 },
10191 /* OPT-ACK */
10192 {&hf_docsis_optack_prof_id,
10193 {"Profile Identifier", "docsis_optack.prof_id", FT_UINT8, BASE_DEC, VALS(profile_id_vals), 0x0, NULL, HFILL}
10194 },
10195 {&hf_docsis_optack_reserved,
10196 {"Reserved", "docsis_optack.reserved", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
10197 },
10198 /* RBA */
10199 {&hf_docsis_rba_tg_id,
10200 {"Transmission Group ID", "docsis_rba.tg_id", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
10201 },
10202 {&hf_docsis_rba_ccc,
10203 {"Change Count", "docsis_rba.ccc", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
10204 },
10205 {&hf_docsis_rba_dcid,
10206 {"Current Channel DCID", "docsis_rba.dcid", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
10207 },
10208 {&hf_docsis_rba_control_byte_bitmask,
10209 {"Control byte bitmask", "docsis_rba.control_byte_bitmask", FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL}
10210 },
10211 {&hf_docsis_rba_resource_block_change_bit,
10212 {"Resource Block Change bit", "docsis_rba.rb_change_bit", FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL}
10213 },
10214 {&hf_docsis_rba_expiration_time_valid_bit,
10215 {"Expiration Time Valid bit", "docsis_rba.exp_time_valid_bit", FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL}
10216 },
10217 {&hf_docsis_rba_control_byte_bitmask_rsvd,
10218 {"Control byte bitmask reserved", "docsis_rba.control_byte_bitmask_rsvd", FT_UINT8, BASE_HEX, NULL, 0xFC, NULL, HFILL}
10219 },
10220 {&hf_docsis_rba_rba_time,
10221 {"RBA Time", "docsis_rba.rba_time", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
10222 },
10223 {&hf_docsis_rba_rba_expiration_time,
10224 {"RBA Expiration Time", "docsis_rba.rba_expiration_time", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
10225 },
10226 {&hf_docsis_rba_number_of_subbands,
10227 {"Number of Sub-bands", "docsis_rba.nr_subbands", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
10228 },
10229 {&hf_docsis_rba_subband_direction,
10230 {"Sub-band direction", "docsis_rba.subband_direction", FT_UINT8, BASE_DEC, VALS(rba_subband_direction_vals), 0x0, NULL, HFILL}
10231 },
10232
10233 /* MAC Management */
10234 {&hf_docsis_mgt_upstream_chid,
10235 {"Upstream Channel ID", "docsis_mgmt.upchid",
10236 FT_UINT8, BASE_DEC, NULL, 0x0,
10237 NULL, HFILL}
10238 },
10239 {&hf_docsis_mgt_down_chid,
10240 {"Downstream Channel ID", "docsis_mgmt.downchid",
10241 FT_UINT8, BASE_DEC, NULL, 0x0,
10242 "Management Message", HFILL}
10243 },
10244 {&hf_docsis_mgt_tranid,
10245 {"Transaction ID", "docsis_mgmt.tranid",
10246 FT_UINT16, BASE_DEC, NULL, 0x0,
10247 NULL, HFILL}
10248 },
10249 {&hf_docsis_mgt_dst_addr,
10250 {"Destination Address", "docsis_mgmt.dst",
10251 FT_ETHER, BASE_NONE, NULL, 0x0,
10252 NULL, HFILL}
10253 },
10254 {&hf_docsis_mgt_src_addr,
10255 {"Source Address", "docsis_mgmt.src",
10256 FT_ETHER, BASE_NONE, NULL, 0x0,
10257 NULL, HFILL}
10258 },
10259 {&hf_docsis_mgt_msg_len,
10260 {"Message Length - DSAP to End (Bytes)", "docsis_mgmt.msglen",
10261 FT_UINT16, BASE_DEC, NULL, 0x0,
10262 NULL, HFILL}
10263 },
10264 {&hf_docsis_mgt_dsap,
10265 {"DSAP", "docsis_mgmt.dsap",
10266 FT_UINT8, BASE_HEX, NULL, 0x0,
10267 "Destination SAP", HFILL}
10268 },
10269 {&hf_docsis_mgt_ssap,
10270 {"SSAP", "docsis_mgmt.ssap",
10271 FT_UINT8, BASE_HEX, NULL, 0x0,
10272 "Source SAP", HFILL}
10273 },
10274 {&hf_docsis_mgt_30_transmit_power,
10275 {"Upstream Transmit Power, sent to 3.0 CMTS", "docsis_mgmt.30_transmit_power",
10276 FT_UINT8, BASE_CUSTOM, CF_FUNC(fourth_db), 0x0,
10277 NULL, HFILL}
10278 },
10279 {&hf_docsis_mgt_31_transmit_power,
10280 {"Upstream Transmit Power, sent to 3.1 CMTS", "docsis_mgmt.31_transmit_power",
10281 FT_UINT16, BASE_CUSTOM, CF_FUNC(fourth_db), 0x1FF,
10282 NULL, HFILL}
10283 },
10284 {&hf_docsis_mgt_control,
10285 {"Control", "docsis_mgmt.control",
10286 FT_UINT8, BASE_HEX, NULL, 0x0,
10287 NULL, HFILL}
10288 },
10289 {&hf_docsis_mgt_version,
10290 {"Version", "docsis_mgmt.version",
10291 FT_UINT8, BASE_DEC, NULL, 0x0,
10292 NULL, HFILL}
10293 },
10294 {&hf_docsis_mgt_type,
10295 {"Type", "docsis_mgmt.type",
10296 FT_UINT8, BASE_DEC, VALS (mgmt_type_vals), 0x0,
10297 NULL, HFILL}
10298 },
10299 {&hf_docsis_mgt_rsvd,
10300 {"Reserved", "docsis_mgmt.rsvd",
10301 FT_UINT8, BASE_DEC, NULL, 0x0,
10302 NULL, HFILL}
10303 },
10304 {&hf_docsis_mgt_multipart,
10305 {"Multipart", "docsis_mgmt.multipart",
10306 FT_UINT8, BASE_HEX, NULL, 0x0,
10307 NULL, HFILL}
10308 },
10309 {&hf_docsis_mgt_multipart_number_of_fragments,
10310 {"Multipart - Number of Fragments", "docsis_mgmt.multipart.number_of_fragments",
10311 FT_UINT8, BASE_CUSTOM, CF_FUNC(multipart_number_of_fragments), 0xF0,
10312 NULL, HFILL}
10313 },
10314 {&hf_docsis_mgt_multipart_fragment_sequence_number,
10315 {"Multipart - Fragment Sequence Number", "docsis_mgmt.multipart.fragment_sequence_number",
10316 FT_UINT8, BASE_DEC, NULL, 0x0F,
10317 NULL, HFILL}
10318 },
10319 { &hf_docsis_tlv_fragment_overlap,
10320 { "Fragment overlap", "docsis_mgmt.tlv.fragment.overlap",
10321 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
10322 "Fragment overlaps with other fragments", HFILL}
10323 },
10324 { &hf_docsis_tlv_fragment_overlap_conflict,
10325 { "Conflicting data in fragment overlap", "docsis_mgmt.tlv.fragment.overlap.conflict",
10326 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
10327 "Overlapping fragments contained conflicting data", HFILL}
10328 },
10329 { &hf_docsis_tlv_fragment_multiple_tails,
10330 { "Multiple tail fragments found", "docsis_mgmt.tlv.fragment.multipletails",
10331 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
10332 "Several tails were found when defragmenting the packet", HFILL}
10333 },
10334 { &hf_docsis_tlv_fragment_too_long_fragment,
10335 { "Fragment too long", "docsis_mgmt.tlv.fragment.toolongfragment",
10336 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
10337 "Fragment contained data past end of packet", HFILL}
10338 },
10339 { &hf_docsis_tlv_fragment_error,
10340 { "Defragmentation error", "docsis_mgmt.tlv.fragment.error",
10341 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
10342 "Defragmentation error due to illegal fragments", HFILL}
10343 },
10344 { &hf_docsis_tlv_fragment_count,
10345 { "Fragment count", "docsis_mgmt.tlv.fragment.count",
10346 FT_UINT32, BASE_DEC, NULL, 0x0,
10347 NULL, HFILL}
10348 },
10349 { &hf_docsis_tlv_fragment,
10350 { "TLV Fragment", "docsis_mgmt.tlv.fragment",
10351 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
10352 NULL, HFILL}
10353 },
10354 { &hf_docsis_tlv_fragments,
10355 { "TLV Fragments", "docsis_mgmt.tlv.fragments",
10356 FT_BYTES, BASE_NONE, NULL, 0x0,
10357 NULL, HFILL}
10358 },
10359 { &hf_docsis_tlv_reassembled_in,
10360 { "Reassembled TLV in frame", "docsis_mgmt.tlv.reassembled_in",
10361 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
10362 "This TLV packet is reassembled in this frame", HFILL}
10363 },
10364 { &hf_docsis_tlv_reassembled_length,
10365 { "Reassembled TLV length", "docsis_mgmt.tlv.reassembled.length",
10366 FT_UINT32, BASE_DEC, NULL, 0x0,
10367 "The total length of the reassembled payload", HFILL}
10368 },
10369 { &hf_docsis_tlv_reassembled_data,
10370 { "Reassembled TLV data", "docsis_mgmt.tlv.reassembled.data",
10371 FT_BYTES, BASE_NONE, NULL, 0x0,
10372 "The reassembled payload", HFILL}
10373 },
10374 { &hf_docsis_tlv_reassembled,
10375 { "Reassembled TLV", "docsis_mgmt.tlv.reassembled",
10376 FT_BYTES, BASE_NONE, NULL, 0x0,
10377 NULL, HFILL}
10378 },
10379 };
10380
10381 static gint *ett[] = {
10382 &ett_docsis_sync,
10383 &ett_docsis_ucd,
10384 &ett_docsis_tlv,
10385 &ett_docsis_burst_tlv,
10386 &ett_docsis_map,
10387 &ett_docsis_map_ie,
10388 &ett_docsis_map_probe_ie,
10389 &ett_docsis_rngreq,
10390 &ett_docsis_rngrsp,
10391 &ett_docsis_rngrsptlv,
10392 &ett_docsis_rngrsp_tlv_transmit_equalization_encodings,
10393 &ett_docsis_rngrsp_tlv_transmit_equalization_encodings_coef,
10394 &ett_docsis_rngrsp_tlv_commanded_power,
10395 &ett_docsis_rngrsp_tlv_commanded_power_subtlv,
10396 &ett_docsis_regreq,
10397 &ett_docsis_regrsp,
10398 &ett_docsis_uccreq,
10399 &ett_docsis_uccrsp,
10400 &ett_docsis_bpkmreq,
10401 &ett_docsis_bpkmrsp,
10402 &ett_docsis_bpkmattr,
10403 &ett_docsis_bpkmattr_cmid,
10404 &ett_docsis_bpkmattr_scap,
10405 &ett_docsis_bpkmattr_tekp,
10406 &ett_docsis_bpkmattr_sadsc,
10407 &ett_docsis_bpkmattr_saqry,
10408 &ett_docsis_bpkmattr_dnld,
10409 &ett_docsis_bpkmattrtlv,
10410 &ett_docsis_regack,
10411 &ett_docsis_dsareq,
10412 &ett_docsis_dsarsp,
10413 &ett_docsis_dsaack,
10414 &ett_docsis_dscreq,
10415 &ett_docsis_dscrsp,
10416 &ett_docsis_dscack,
10417 &ett_docsis_dsdreq,
10418 &ett_docsis_dsdrsp,
10419 &ett_docsis_dccreq,
10420 &ett_docsis_dccreq_sf_sub,
10421 &ett_docsis_dccreq_ds_params,
10422 &ett_docsis_dccreq_tlv,
10423 &ett_docsis_dccrsp,
10424 &ett_docsis_dccrsp_cm_jump_time,
10425 &ett_docsis_dccrsp_tlv,
10426 &ett_docsis_dccack,
10427 &ett_docsis_dccack_tlv,
10428 &ett_docsis_intrngreq,
10429 &ett_docsis_dcd,
10430 &ett_docsis_dcd_cfr,
10431 &ett_docsis_dcd_cfr_ip,
10432 &ett_docsis_dcd_rule,
10433 &ett_docsis_dcd_clid,
10434 &ett_docsis_dcd_cfg,
10435 &ett_docsis_dcd_tlv,
10436 &ett_docsis_mdd,
10437 &ett_tlv,
10438 &ett_sub_tlv,
10439 &ett_docsis_mdd_cm_status_ev_en_for_docsis31,
10440 &ett_docsis_mdd_ds_active_channel_list,
10441 &ett_docsis_mdd_ds_service_group,
10442 &ett_docsis_mdd_channel_profile_reporting_control,
10443 &ett_docsis_mdd_ip_init_param,
10444 &ett_docsis_mdd_up_active_channel_list,
10445 &ett_docsis_mdd_upstream_active_channel_list_dschids_maps_ucds_dschids,
10446 &ett_docsis_mdd_cm_status_event_control,
10447 &ett_docsis_mdd_dsg_da_to_dsid,
10448 &ett_docsis_mdd_diplexer_band_edge,
10449 &ett_docsis_mdd_full_duplex_descriptor,
10450 &ett_docsis_mdd_full_duplex_sub_band_descriptor,
10451 &ett_docsis_bintrngreq,
10452 &ett_docsis_dbcreq,
10453 &ett_docsis_dbcrsp,
10454 &ett_docsis_dbcack,
10455 &ett_docsis_dpvreq,
10456 &ett_docsis_dpvrsp,
10457 &ett_docsis_cmstatus,
10458 &ett_docsis_cmstatus_tlv,
10459 &ett_docsis_cmstatus_tlvtlv,
10460 &ett_docsis_cmstatus_status_event_tlv,
10461 &ett_docsis_cmstatus_status_event_tlvtlv,
10462 &ett_docsis_cmstatusack,
10463 &ett_docsis_cmctrlreq,
10464 &ett_docsis_cmctrlreq_tlv,
10465 &ett_docsis_cmctrlreq_tlvtlv,
10466 &ett_docsis_cmctrl_tlv_us_event,
10467 &ett_docsis_cmctrl_tlv_ds_event,
10468 &ett_docsis_cmctrlrsp,
10469 &ett_docsis_regreqmp,
10470 &ett_docsis_regrspmp,
10471 &ett_docsis_emreq,
10472 &ett_docsis_emrsp,
10473 &ett_docsis_emrsp_tlv,
10474 &ett_docsis_emrsp_tlvtlv,
10475 &ett_docsis_ocd,
10476 &ett_docsis_ocd_tlv,
10477 &ett_docsis_ocd_tlvtlv,
10478 &ett_docsis_dpd,
10479 &ett_docsis_dpd_tlv,
10480 &ett_docsis_dpd_tlvtlv,
10481 &ett_docsis_dpd_tlv_subcarrier_assignment,
10482 &ett_docsis_dpd_tlv_subcarrier_assignment_vector,
10483 &ett_docsis_optreq,
10484 &ett_docsis_optreq_tlv,
10485 &ett_docsis_optreq_tlvtlv,
10486 &ett_docsis_optreq_tlv_rxmer_thresh_params,
10487 &ett_docsis_optreq_tlv_rxmer_thresh_params_tlv,
10488 &ett_docsis_optrsp,
10489 &ett_docsis_optrsp_tlv,
10490 &ett_docsis_optrsp_tlvtlv,
10491 &ett_docsis_optrsp_tlv_rxmer_snr_margin_data,
10492 &ett_docsis_optrsp_tlv_rxmer_snr_margin_tlv,
10493 &ett_docsis_optack,
10494 &ett_docsis_rba,
10495 &ett_docsis_rba_control_byte,
10496 &ett_docsis_mgmt,
10497 &ett_mgmt_pay,
10498 &ett_docsis_tlv_fragment,
10499 &ett_docsis_tlv_fragments,
10500 &ett_docsis_tlv_reassembled
10501 };
10502
10503 static ei_register_info ei[] = {
10504 {&ei_docsis_mgmt_tlvlen_bad, {"docsis_mgmt.tlvlenbad", PI_MALFORMED, PI_ERROR, "Bad TLV length", EXPFILL}},
10505 {&ei_docsis_mgmt_tlvtype_unknown, { "docsis_mgmt.tlvtypeunknown", PI_PROTOCOL, PI_WARN, "Unknown TLV type", EXPFILL}},
10506 {&ei_docsis_mgmt_version_unknown, { "docsis_mgmt.versionunknown", PI_PROTOCOL, PI_WARN, "Unknown MAC management version", EXPFILL}},
10507 };
10508
10509 expert_module_t* expert_docsis_mgmt;
10510
10511 proto_docsis_mgmt = proto_register_protocol ("DOCSIS MAC Management", "DOCSIS MAC MGMT", "docsis_mgmt");
10512
10513 proto_register_field_array (proto_docsis_mgmt, hf, array_length (hf));
10514 proto_register_subtree_array (ett, array_length (ett));
10515 expert_docsis_mgmt = expert_register_protocol(proto_docsis_mgmt);
10516 expert_register_field_array(expert_docsis_mgmt, ei, array_length(ei));
10517
10518 docsis_mgmt_dissector_table = register_dissector_table ("docsis_mgmt",
10519 "DOCSIS MAC Management", proto_docsis_mgmt,
10520 FT_UINT8, BASE_DEC);
10521
10522 /* Register MAC Management commands as their own protocols so we can get the name of the option */
10523 proto_docsis_sync = proto_register_protocol_in_name_only("DOCSIS Synchronisation Message", "SYNC Message", "docsis_sync", proto_docsis_mgmt, FT_BYTES);
10524 proto_docsis_ucd = proto_register_protocol_in_name_only("DOCSIS Upstream Channel Descriptor", "DOCSIS UCD", "docsis_ucd", proto_docsis_mgmt, FT_BYTES);
10525 proto_docsis_map_v1 = proto_register_protocol_in_name_only("DOCSIS Upstream Bandwidth Allocation - version 1", "DOCSIS MAP", "docsis_map", proto_docsis_mgmt, FT_BYTES);
10526 proto_docsis_map_v5 = proto_register_protocol_in_name_only("DOCSIS Upstream Bandwidth Allocation - version 5", "DOCSIS MAP", "docsis_map", proto_docsis_mgmt, FT_BYTES);
10527 proto_docsis_rngreq = proto_register_protocol_in_name_only("DOCSIS Range Request Message", "DOCSIS RNG-REQ", "docsis_rngreq", proto_docsis_mgmt, FT_BYTES);
10528 proto_docsis_rngrsp = proto_register_protocol_in_name_only("DOCSIS Ranging Response", "DOCSIS RNG-RSP", "docsis_rngrsp", proto_docsis_mgmt, FT_BYTES);
10529 proto_docsis_regreq = proto_register_protocol_in_name_only("DOCSIS Registration Requests", "DOCSIS REG-REQ", "docsis_regreq", proto_docsis_mgmt, FT_BYTES);
10530 proto_docsis_regrsp = proto_register_protocol_in_name_only("DOCSIS Registration Responses", "DOCSIS REG-RSP", "docsis_regrsp", proto_docsis_mgmt, FT_BYTES);
10531 proto_docsis_uccreq = proto_register_protocol_in_name_only("DOCSIS Upstream Channel Change Request", "DOCSIS UCC-REQ", "docsis_uccreq", proto_docsis_mgmt, FT_BYTES);
10532 proto_docsis_uccrsp = proto_register_protocol_in_name_only("DOCSIS Upstream Channel Change Response", "DOCSIS UCC-RSP", "docsis_uccrsp", proto_docsis_mgmt, FT_BYTES);
10533 proto_docsis_bpkmreq = proto_register_protocol_in_name_only("DOCSIS Baseline Privacy Key Management Request", "DOCSIS BPKM-REQ", "docsis_bpkm.req", proto_docsis_mgmt, FT_BYTES);
10534 proto_docsis_bpkmrsp = proto_register_protocol_in_name_only("DOCSIS Baseline Privacy Key Management Response", "DOCSIS BPKM-RSP", "docsis_bpkm.rsp", proto_docsis_mgmt, FT_BYTES);
10535 proto_docsis_regack = proto_register_protocol_in_name_only("DOCSIS Registration Acknowledge", "DOCSIS REG-ACK", "docsis_regack", proto_docsis_mgmt, FT_BYTES);
10536 proto_docsis_dsareq = proto_register_protocol_in_name_only("DOCSIS Dynamic Service Addition Request", "DOCSIS DSA-REQ", "docsis_dsareq", proto_docsis_mgmt, FT_BYTES);
10537 proto_docsis_dsarsp = proto_register_protocol_in_name_only("DOCSIS Dynamic Service Addition Response", "DOCSIS DSA-RSP", "docsis_dsarsp", proto_docsis_mgmt, FT_BYTES);
10538 proto_docsis_dsaack = proto_register_protocol_in_name_only("DOCSIS Dynamic Service Addition Acknowledge", "DOCSIS DSA-ACK", "docsis_dsaack", proto_docsis_mgmt, FT_BYTES);
10539 proto_docsis_dscreq = proto_register_protocol_in_name_only("DOCSIS Dynamic Service Change Request", "DOCSIS DSC-REQ", "docsis_dscreq", proto_docsis_mgmt, FT_BYTES);
10540 proto_docsis_dscrsp = proto_register_protocol_in_name_only("DOCSIS Dynamic Service Change Response", "DOCSIS DSC-RSP", "docsis_dscrsp", proto_docsis_mgmt, FT_BYTES);
10541 proto_docsis_dscack = proto_register_protocol_in_name_only("DOCSIS Dynamic Service Change Acknowledge", "DOCSIS DSC-ACK", "docsis_dscack", proto_docsis_mgmt, FT_BYTES);
10542 proto_docsis_dsdreq = proto_register_protocol_in_name_only("DOCSIS Dynamic Service Delete Request", "DOCSIS DSD-REQ", "docsis_dsdreq", proto_docsis_mgmt, FT_BYTES);
10543 proto_docsis_dsdrsp = proto_register_protocol_in_name_only("DOCSIS Dynamic Service Delete Response", "DOCSIS DSD-RSP", "docsis_dsdrsp", proto_docsis_mgmt, FT_BYTES);
10544 proto_docsis_dccreq = proto_register_protocol_in_name_only("DOCSIS Downstream Channel Change Request", "DOCSIS DCC-REQ", "docsis_dccreq", proto_docsis_mgmt, FT_BYTES);
10545 proto_docsis_dccrsp = proto_register_protocol_in_name_only("DOCSIS Downstream Channel Change Response", "DOCSIS DCC-RSP", "docsis_dccrsp", proto_docsis_mgmt, FT_BYTES);
10546 proto_docsis_dccack = proto_register_protocol_in_name_only("DOCSIS Downstream Channel Change Acknowledge", "DOCSIS DCC-ACK", "docsis_dccack", proto_docsis_mgmt, FT_BYTES);
10547 proto_docsis_type29ucd = proto_register_protocol_in_name_only("DOCSIS Upstream Channel Descriptor Type 29", "DOCSIS type29ucd", "docsis_type29ucd", proto_docsis_mgmt, FT_BYTES);
10548 proto_docsis_intrngreq = proto_register_protocol_in_name_only("DOCSIS Initial Ranging Message", "DOCSIS INT-RNG-REQ", "docsis_intrngreq", proto_docsis_mgmt, FT_BYTES);
10549 proto_docsis_dcd = proto_register_protocol_in_name_only("DOCSIS Downstream Channel Descriptor", "DOCSIS DCD", "docsis_dcd", proto_docsis_mgmt, FT_BYTES);
10550 proto_docsis_mdd = proto_register_protocol_in_name_only("DOCSIS MAC Domain Description", "DOCSIS MDD", "docsis_mdd", proto_docsis_mgmt, FT_BYTES);
10551 proto_docsis_bintrngreq = proto_register_protocol_in_name_only("DOCSIS Bonded Initial Ranging Message", "DOCSIS B-INT-RNG-REQ", "docsis_bintrngreq", proto_docsis_mgmt, FT_BYTES);
10552 proto_docsis_type35ucd = proto_register_protocol_in_name_only("DOCSIS Upstream Channel Descriptor Type 35", "DOCSIS type35ucd", "docsis_type35ucd", proto_docsis_mgmt, FT_BYTES);
10553 proto_docsis_dbcreq = proto_register_protocol_in_name_only("DOCSIS Dynamic Bonding Change Request", "DOCSIS DBC-REQ", "docsis_dbcreq", proto_docsis_mgmt, FT_BYTES);
10554 proto_docsis_dbcrsp = proto_register_protocol_in_name_only("DOCSIS Dynamic Bonding Change Response", "DOCSIS DBC-RSP", "docsis_dbcrsp", proto_docsis_mgmt, FT_BYTES);
10555 proto_docsis_dbcack = proto_register_protocol_in_name_only("DOCSIS Dynamic Bonding Change Acknowledge", "DOCSIS DBC-ACK", "docsis_dbcack", proto_docsis_mgmt, FT_BYTES);
10556 proto_docsis_dpvreq = proto_register_protocol_in_name_only("DOCSIS Path Verify Request", "DOCSIS DPV-REQ", "docsis_dpv.req", proto_docsis_mgmt, FT_BYTES);
10557 proto_docsis_dpvrsp = proto_register_protocol_in_name_only("DOCSIS Path Verify Response", "DOCSIS DPV-RSP", "docsis_dpv.rsp", proto_docsis_mgmt, FT_BYTES);
10558 proto_docsis_cmstatus = proto_register_protocol_in_name_only("DOCSIS CM-STATUS Report", "DOCSIS CM-STATUS", "docsis_cmstatus", proto_docsis_mgmt, FT_BYTES);
10559 proto_docsis_cmstatusack = proto_register_protocol_in_name_only("DOCSIS Status Report Acknowledge", "DOCSIS CM-STATUS-ACK", "docsis_cmstatusack", proto_docsis_mgmt, FT_BYTES);
10560 proto_docsis_cmctrlreq = proto_register_protocol_in_name_only("DOCSIS CM Control Request", "DOCSIS CM-CTRL-REQ", "docsis_cmctrl.req", proto_docsis_mgmt, FT_BYTES);
10561 proto_docsis_cmctrlrsp = proto_register_protocol_in_name_only("DOCSIS CM Control Response", "DOCSIS CM-CTRL-RSP", "docsis_cmctrlrsp", proto_docsis_mgmt, FT_BYTES);
10562 proto_docsis_regreqmp = proto_register_protocol_in_name_only("DOCSIS Registration Request Multipart", "DOCSIS Reg-Req-Mp", "docsis_regreqmp", proto_docsis_mgmt, FT_BYTES);
10563 proto_docsis_regrspmp = proto_register_protocol_in_name_only("DOCSIS Registration Response Multipart", "DOCSIS Reg-Rsp-Mp", "docsis_regrspmp", proto_docsis_mgmt, FT_BYTES);
10564 proto_docsis_emreq = proto_register_protocol_in_name_only("DOCSIS Energy Management Request", "DOCSIS EM-REQ", "docsis_emreq", proto_docsis_mgmt, FT_BYTES);
10565 proto_docsis_emrsp = proto_register_protocol_in_name_only("DOCSIS Energy Management Response", "DOCSIS EM-RSP", "docsis_emrsp", proto_docsis_mgmt, FT_BYTES);
10566 proto_docsis_ocd = proto_register_protocol_in_name_only("DOCSIS OFDM Channel Descriptor", "DOCSIS OCD", "docsis_ocd", proto_docsis_mgmt, FT_BYTES);
10567 proto_docsis_dpd = proto_register_protocol_in_name_only("DOCSIS Downstream Profile Descriptor", "DOCSIS DPD", "docsis_dpd", proto_docsis_mgmt, FT_BYTES);
10568 proto_docsis_type51ucd = proto_register_protocol_in_name_only("DOCSIS Upstream Channel Descriptor Type 51", "DOCSIS type51ucd", "docsis_type51ucd", proto_docsis_mgmt, FT_BYTES);
10569 proto_docsis_optreq = proto_register_protocol_in_name_only("OFDM Downstream Profile Test Request", "DOCSIS OPT-REQ", "docsis_optreq", proto_docsis_mgmt, FT_BYTES);
10570 proto_docsis_optrsp = proto_register_protocol_in_name_only("OFDM Downstream Profile Test Response", "DOCSIS OPT-RSP", "docsis_optrsp", proto_docsis_mgmt, FT_BYTES);
10571 proto_docsis_optack = proto_register_protocol_in_name_only("OFDM Downstream Profile Test Acknowledge", "DOCSIS OPT-ACK", "docsis_optack", proto_docsis_mgmt, FT_BYTES);
10572 proto_docsis_rba = proto_register_protocol_in_name_only("DOCSIS Resource Block Assignment Message", "DOCSIS RBA", "docsis_rba", proto_docsis_mgmt, FT_BYTES);
10573
10574 register_dissector ("docsis_mgmt", dissect_macmgmt, proto_docsis_mgmt);
10575 docsis_ucd_handle = register_dissector ("docsis_ucd", dissect_ucd, proto_docsis_ucd);
10576 }
10577
10578 void
proto_reg_handoff_docsis_mgmt(void)10579 proto_reg_handoff_docsis_mgmt (void)
10580 {
10581 /* Create dissection function handles for all MAC Management commands */
10582 dissector_add_uint ("docsis_mgmt", MGT_SYNC, create_dissector_handle( dissect_sync, proto_docsis_sync ));
10583 dissector_add_uint ("docsis_mgmt", MGT_UCD, docsis_ucd_handle);
10584 dissector_add_uint ("docsis_mgmt", 256*MAP_v1 + MGT_MAP, create_dissector_handle( dissect_map_v1, proto_docsis_map_v1 ));
10585 dissector_add_uint ("docsis_mgmt", 256*MAP_v5 + MGT_MAP, create_dissector_handle( dissect_map_v5, proto_docsis_map_v5 ));
10586 dissector_add_uint ("docsis_mgmt", MGT_RNG_REQ, create_dissector_handle( dissect_rngreq, proto_docsis_rngreq ));
10587 dissector_add_uint ("docsis_mgmt", MGT_RNG_RSP, create_dissector_handle( dissect_rngrsp, proto_docsis_rngrsp ));
10588 dissector_add_uint ("docsis_mgmt", MGT_REG_REQ, create_dissector_handle( dissect_regreq, proto_docsis_regreq ));
10589 dissector_add_uint ("docsis_mgmt", MGT_REG_RSP, create_dissector_handle( dissect_regrsp, proto_docsis_regrsp ));
10590 dissector_add_uint ("docsis_mgmt", MGT_UCC_REQ, create_dissector_handle( dissect_uccreq, proto_docsis_uccreq ));
10591 dissector_add_uint ("docsis_mgmt", MGT_UCC_RSP, create_dissector_handle( dissect_uccrsp, proto_docsis_uccrsp ));
10592 dissector_add_uint ("docsis_mgmt", MGT_BPKM_REQ, create_dissector_handle( dissect_bpkmreq, proto_docsis_bpkmreq ));
10593 dissector_add_uint ("docsis_mgmt", MGT_BPKM_RSP, create_dissector_handle( dissect_bpkmrsp, proto_docsis_bpkmrsp ));
10594 dissector_add_uint ("docsis_mgmt", MGT_REG_ACK, create_dissector_handle( dissect_regack, proto_docsis_regack ));
10595 dissector_add_uint ("docsis_mgmt", MGT_DSA_REQ, create_dissector_handle( dissect_dsareq, proto_docsis_dsareq ));
10596 dissector_add_uint ("docsis_mgmt", MGT_DSA_RSP, create_dissector_handle( dissect_dsarsp, proto_docsis_dsarsp ));
10597 dissector_add_uint ("docsis_mgmt", MGT_DSA_ACK, create_dissector_handle( dissect_dsaack, proto_docsis_dsaack ));
10598 dissector_add_uint ("docsis_mgmt", MGT_DSC_REQ, create_dissector_handle( dissect_dscreq, proto_docsis_dscreq ));
10599 dissector_add_uint ("docsis_mgmt", MGT_DSC_RSP, create_dissector_handle( dissect_dscrsp, proto_docsis_dscrsp ));
10600 dissector_add_uint ("docsis_mgmt", MGT_DSC_ACK, create_dissector_handle( dissect_dscack, proto_docsis_dscack ));
10601 dissector_add_uint ("docsis_mgmt", MGT_DSD_REQ, create_dissector_handle( dissect_dsdreq, proto_docsis_dsdreq ));
10602 dissector_add_uint ("docsis_mgmt", MGT_DSD_RSP, create_dissector_handle( dissect_dsdrsp, proto_docsis_dsdrsp ));
10603 dissector_add_uint ("docsis_mgmt", MGT_DCC_REQ, create_dissector_handle( dissect_dccreq, proto_docsis_dccreq ));
10604 dissector_add_uint ("docsis_mgmt", MGT_DCC_RSP, create_dissector_handle( dissect_dccrsp, proto_docsis_dccrsp ));
10605 dissector_add_uint ("docsis_mgmt", MGT_DCC_ACK, create_dissector_handle( dissect_dccack, proto_docsis_dccack ));
10606 dissector_add_uint ("docsis_mgmt", MGT_TYPE29UCD, create_dissector_handle( dissect_type29ucd, proto_docsis_type29ucd ));
10607 dissector_add_uint ("docsis_mgmt", MGT_INIT_RNG_REQ, create_dissector_handle( dissect_intrngreq, proto_docsis_intrngreq ));
10608 dissector_add_uint ("docsis_mgmt", MGT_DS_CH_DESC, create_dissector_handle( dissect_dcd, proto_docsis_dcd ));
10609 dissector_add_uint ("docsis_mgmt", MGT_MDD, create_dissector_handle( dissect_mdd, proto_docsis_mdd ));
10610 dissector_add_uint ("docsis_mgmt", MGT_B_INIT_RNG_REQ, create_dissector_handle( dissect_bintrngreq, proto_docsis_bintrngreq ));
10611 dissector_add_uint ("docsis_mgmt", MGT_TYPE35UCD, create_dissector_handle( dissect_type35ucd, proto_docsis_type35ucd ));
10612 dissector_add_uint ("docsis_mgmt", MGT_DBC_REQ, create_dissector_handle( dissect_dbcreq, proto_docsis_dbcreq ));
10613 dissector_add_uint ("docsis_mgmt", MGT_DBC_RSP, create_dissector_handle( dissect_dbcrsp, proto_docsis_dbcrsp ));
10614 dissector_add_uint ("docsis_mgmt", MGT_DBC_ACK, create_dissector_handle( dissect_dbcack, proto_docsis_dbcack ));
10615 dissector_add_uint ("docsis_mgmt", MGT_DPV_REQ, create_dissector_handle( dissect_dpvreq, proto_docsis_dpvreq ));
10616 dissector_add_uint ("docsis_mgmt", MGT_DPV_RSP, create_dissector_handle( dissect_dpvrsp, proto_docsis_dpvrsp ));
10617 dissector_add_uint ("docsis_mgmt", MGT_CM_STATUS, create_dissector_handle( dissect_cmstatus, proto_docsis_cmstatus ));
10618 dissector_add_uint ("docsis_mgmt", MGT_CM_STATUS_ACK, create_dissector_handle( dissect_cmstatusack, proto_docsis_cmstatusack ));
10619 dissector_add_uint ("docsis_mgmt", MGT_CM_CTRL_REQ, create_dissector_handle( dissect_cmctrlreq, proto_docsis_cmctrlreq ));
10620 dissector_add_uint ("docsis_mgmt", MGT_CM_CTRL_RSP, create_dissector_handle( dissect_cmctrlrsp, proto_docsis_cmctrlrsp ));
10621 dissector_add_uint ("docsis_mgmt", MGT_REG_REQ_MP, create_dissector_handle( dissect_regreqmp, proto_docsis_regreqmp ));
10622 dissector_add_uint ("docsis_mgmt", MGT_REG_RSP_MP, create_dissector_handle( dissect_regrspmp, proto_docsis_regrspmp ));
10623 dissector_add_uint ("docsis_mgmt", MGT_EM_REQ, create_dissector_handle( dissect_emreq, proto_docsis_emreq ));
10624 dissector_add_uint ("docsis_mgmt", MGT_EM_RSP, create_dissector_handle( dissect_emrsp, proto_docsis_emrsp ));
10625 dissector_add_uint ("docsis_mgmt", MGT_OCD, create_dissector_handle( dissect_ocd, proto_docsis_ocd ));
10626 dissector_add_uint ("docsis_mgmt", MGT_DPD, create_dissector_handle( dissect_dpd, proto_docsis_dpd ));
10627 dissector_add_uint ("docsis_mgmt", MGT_TYPE51UCD, create_dissector_handle( dissect_type51ucd, proto_docsis_type51ucd ));
10628 dissector_add_uint ("docsis_mgmt", MGT_OPT_REQ, create_dissector_handle( dissect_optreq, proto_docsis_optreq ));
10629 dissector_add_uint ("docsis_mgmt", MGT_OPT_RSP, create_dissector_handle( dissect_optrsp, proto_docsis_optrsp ));
10630 dissector_add_uint ("docsis_mgmt", MGT_OPT_ACK, create_dissector_handle( dissect_optack, proto_docsis_optack ));
10631 dissector_add_uint ("docsis_mgmt", MGT_RBA_SW, create_dissector_handle( dissect_rba, proto_docsis_rba ));
10632
10633 docsis_tlv_handle = find_dissector ("docsis_tlv");
10634
10635 reassembly_table_register(&docsis_tlv_reassembly_table, &addresses_reassembly_table_functions);
10636 reassembly_table_register(&docsis_opt_tlv_reassembly_table, &addresses_reassembly_table_functions);
10637 reassembly_table_register(&docsis_rngrsp_tlv_reassembly_table, &addresses_reassembly_table_functions);
10638
10639 }
10640
10641 /*
10642 * Editor modelines - https://www.wireshark.org/tools/modelines.html
10643 *
10644 * Local Variables:
10645 * c-basic-offset: 2
10646 * tab-width: 8
10647 * indent-tabs-mode: nil
10648 * End:
10649 *
10650 * ex: set shiftwidth=2 tabstop=8 expandtab:
10651 * :indentSize=2:tabSize=8:noTabs=true:
10652 */
10653