2 * Routines for UCD Message dissection
3 * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 #include <epan/packet.h>
29 #include <epan/exceptions.h>
31 #define UCD_SYMBOL_RATE 1
32 #define UCD_FREQUENCY 2
33 #define UCD_PREAMBLE 3
34 #define UCD_BURST_DESCR 4
35 #define UCD_BURST_DESCR5 5
37 #define UCD_MODULATION 1
38 #define UCD_DIFF_ENCODING 2
39 #define UCD_PREAMBLE_LEN 3
40 #define UCD_PREAMBLE_VAL_OFF 4
42 #define UCD_FEC_CODEWORD 6
43 #define UCD_SCRAMBLER_SEED 7
44 #define UCD_MAX_BURST 8
45 #define UCD_GUARD_TIME 9
46 #define UCD_LAST_CW_LEN 10
47 #define UCD_SCRAMBLER_ONOFF 11
48 #define UCD_RS_INT_DEPTH 12
49 #define UCD_RS_INT_BLOCK 13
50 #define UCD_PREAMBLE_TYPE 14
51 #define UCD_SCMDA_SCRAMBLER_ONOFF 15
52 #define UCD_SCDMA_CODES_PER_SUBFRAME 16
53 #define UCD_SCDMA_FRAMER_INT_STEP_SIZE 17
54 #define UCD_TCM_ENABLED 18
57 #define IUC_REQ_DATA 2
58 #define IUC_INIT_MAINT 3
59 #define IUC_STATION_MAINT 4
60 #define IUC_SHORT_DATA_GRANT 5
61 #define IUC_LONG_DATA_GRANT 6
63 #define IUC_DATA_ACK 8
64 #define IUC_ADV_PHY_SHORT_DATA_GRANT 9
65 #define IUC_ADV_PHY_LONG_DATA_GRANT 10
66 #define IUC_ADV_PHY_UGS 11
67 #define IUC_RESERVED12 12
68 #define IUC_RESERVED13 13
69 #define IUC_RESERVED14 14
70 #define IUC_EXPANSION 15
72 /* Initialize the protocol and registered fields */
73 static int proto_docsis_ucd
= -1;
75 static int hf_docsis_ucd_upstream_chid
= -1;
76 static int hf_docsis_ucd_config_ch_cnt
= -1;
77 static int hf_docsis_ucd_mini_slot_size
= -1;
78 static int hf_docsis_ucd_down_chid
= -1;
79 static int hf_docsis_ucd_type
= -1;
80 static int hf_docsis_ucd_length
= -1;
81 static int hf_docsis_ucd_symbol_rate
= -1;
82 static int hf_docsis_ucd_frequency
= -1;
83 static int hf_docsis_ucd_preamble_pat
= -1;
84 static int hf_docsis_ucd_iuc
= -1;
86 static int hf_docsis_burst_mod_type
= -1;
87 static int hf_docsis_burst_diff_encoding
= -1;
88 static int hf_docsis_burst_preamble_len
= -1;
89 static int hf_docsis_burst_preamble_val_off
= -1;
90 static int hf_docsis_burst_fec
= -1;
91 static int hf_docsis_burst_fec_codeword
= -1;
92 static int hf_docsis_burst_scrambler_seed
= -1;
93 static int hf_docsis_burst_max_burst
= -1;
94 static int hf_docsis_burst_guard_time
= -1;
95 static int hf_docsis_burst_last_cw_len
= -1;
96 static int hf_docsis_burst_scrambler_onoff
= -1;
97 static int hf_docsis_rs_int_depth
= -1;
98 static int hf_docsis_rs_int_block
= -1;
99 static int hf_docsis_preamble_type
= -1;
100 static int hf_docsis_scdma_scrambler_onoff
= -1;
101 static int hf_docsis_scdma_codes_per_subframe
= -1;
102 static int hf_docsis_scdma_framer_int_step_size
= -1;
103 static int hf_docsis_tcm_enabled
= -1;
105 /* Initialize the subtree pointers */
106 static gint ett_docsis_ucd
= -1;
107 static gint ett_tlv
= -1;
109 static const value_string channel_tlv_vals
[] = {
110 {UCD_SYMBOL_RATE
, "Symbol Rate"},
111 {UCD_FREQUENCY
, "Frequency"},
112 {UCD_PREAMBLE
, "Preamble Pattern"},
113 {UCD_BURST_DESCR
, "Burst Descriptor"},
114 {UCD_BURST_DESCR5
, "Burst Descriptor DOCSIS 2.0"},
118 static const value_string on_off_vals
[] = {
124 static const value_string mod_vals
[] = {
130 value_string iuc_vals
[] = {
131 {IUC_REQUEST
, "Request"},
132 {IUC_REQ_DATA
, "REQ/Data"},
133 {IUC_INIT_MAINT
, "Initial Maintenance"},
134 {IUC_STATION_MAINT
, "Station Maintenance"},
135 {IUC_SHORT_DATA_GRANT
, "Short Data Grant"},
136 {IUC_LONG_DATA_GRANT
, "Long Data Grant"},
137 {IUC_NULL_IE
, "NULL IE"},
138 {IUC_DATA_ACK
, "Data Ack"},
139 {IUC_ADV_PHY_SHORT_DATA_GRANT
, "Advanced Phy Short Data Grant"},
140 {IUC_ADV_PHY_LONG_DATA_GRANT
, "Advanced Phy Long Data Grant"},
141 {IUC_ADV_PHY_UGS
, "Advanced Phy UGS"},
142 {IUC_RESERVED12
, "Reserved"},
143 {IUC_RESERVED13
, "Reserved"},
144 {IUC_RESERVED14
, "Reserved"},
145 {IUC_EXPANSION
, "Expanded IUC"},
150 static const value_string last_cw_len_vals
[] = {
155 /* Code to actually dissect the packets */
157 dissect_ucd (tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
)
161 guint8 tlvlen
, tlvtype
;
162 proto_tree
*ucd_tree
;
163 proto_item
*ucd_item
;
164 proto_tree
*tlv_tree
;
165 proto_item
*tlv_item
;
167 guint8 upchid
, symrate
;
169 len
= tvb_reported_length_remaining (tvb
, 0);
170 upchid
= tvb_get_guint8 (tvb
, 0);
172 /* if the upstream Channel ID is 0 then this is for Telephony Return) */
174 col_add_fstr (pinfo
->cinfo
, COL_INFO
,
175 "UCD Message: Channel ID = %u (U%u)", upchid
,
178 col_add_fstr (pinfo
->cinfo
, COL_INFO
,
179 "UCD Message: Channel ID = %u (Telephony Return)",
185 proto_tree_add_protocol_format (tree
, proto_docsis_ucd
, tvb
, 0, -1,
187 ucd_tree
= proto_item_add_subtree (ucd_item
, ett_docsis_ucd
);
188 proto_tree_add_item (ucd_tree
, hf_docsis_ucd_upstream_chid
, tvb
, 0, 1,
190 proto_tree_add_item (ucd_tree
, hf_docsis_ucd_config_ch_cnt
, tvb
, 1, 1,
192 proto_tree_add_item (ucd_tree
, hf_docsis_ucd_mini_slot_size
, tvb
, 2, 1,
194 proto_tree_add_item (ucd_tree
, hf_docsis_ucd_down_chid
, tvb
, 3, 1,
200 type
= tvb_get_guint8 (tvb
, pos
);
201 tlv_item
= proto_tree_add_text (ucd_tree
, tvb
, pos
, -1,
203 val_to_str(type
, channel_tlv_vals
,
204 "Unknown TLV (%u)"));
205 tlv_tree
= proto_item_add_subtree (tlv_item
, ett_tlv
);
206 proto_tree_add_uint (tlv_tree
, hf_docsis_ucd_type
,
209 length
= tvb_get_guint8 (tvb
, pos
);
210 proto_tree_add_uint (tlv_tree
, hf_docsis_ucd_length
,
211 tvb
, pos
, 1, length
);
213 proto_item_set_len(tlv_item
, length
+ 2);
216 case UCD_SYMBOL_RATE
:
219 symrate
= tvb_get_guint8 (tvb
, pos
);
220 proto_tree_add_uint (tlv_tree
, hf_docsis_ucd_symbol_rate
,
221 tvb
, pos
, length
, symrate
* 160);
225 THROW (ReportedBoundsError
);
232 proto_tree_add_item (tlv_tree
, hf_docsis_ucd_frequency
, tvb
,
233 pos
, length
, ENC_BIG_ENDIAN
);
238 THROW (ReportedBoundsError
);
242 proto_tree_add_item (tlv_tree
, hf_docsis_ucd_preamble_pat
, tvb
,
243 pos
, length
, ENC_NA
);
246 case UCD_BURST_DESCR
:
247 proto_tree_add_item (tlv_tree
, hf_docsis_ucd_iuc
, tvb
,
248 pos
++, 1, ENC_BIG_ENDIAN
);
249 endtlvpos
= pos
+ length
- 1;
250 while (pos
< endtlvpos
)
252 tlvtype
= tvb_get_guint8 (tvb
, pos
++);
253 tlvlen
= tvb_get_guint8 (tvb
, pos
++);
259 proto_tree_add_item (tlv_tree
,
260 hf_docsis_burst_mod_type
, tvb
,
261 pos
, tlvlen
, ENC_BIG_ENDIAN
);
265 THROW (ReportedBoundsError
);
268 case UCD_DIFF_ENCODING
:
271 proto_tree_add_item (tlv_tree
,
272 hf_docsis_burst_diff_encoding
,
273 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
277 THROW (ReportedBoundsError
);
280 case UCD_PREAMBLE_LEN
:
283 proto_tree_add_item (tlv_tree
,
284 hf_docsis_burst_preamble_len
,
285 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
289 THROW (ReportedBoundsError
);
292 case UCD_PREAMBLE_VAL_OFF
:
295 proto_tree_add_item (tlv_tree
,
296 hf_docsis_burst_preamble_val_off
,
297 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
301 THROW (ReportedBoundsError
);
307 proto_tree_add_item (tlv_tree
,
308 hf_docsis_burst_fec
, tvb
, pos
,
309 tlvlen
, ENC_BIG_ENDIAN
);
313 THROW (ReportedBoundsError
);
316 case UCD_FEC_CODEWORD
:
319 proto_tree_add_item (tlv_tree
,
320 hf_docsis_burst_fec_codeword
,
321 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
325 THROW (ReportedBoundsError
);
328 case UCD_SCRAMBLER_SEED
:
331 proto_tree_add_item (tlv_tree
,
332 hf_docsis_burst_scrambler_seed
,
333 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
337 THROW (ReportedBoundsError
);
343 proto_tree_add_item (tlv_tree
,
344 hf_docsis_burst_max_burst
, tvb
,
345 pos
, tlvlen
, ENC_BIG_ENDIAN
);
349 THROW (ReportedBoundsError
);
355 proto_tree_add_item (tlv_tree
,
356 hf_docsis_burst_guard_time
,
357 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
361 THROW (ReportedBoundsError
);
364 case UCD_LAST_CW_LEN
:
367 proto_tree_add_item (tlv_tree
,
368 hf_docsis_burst_last_cw_len
,
369 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
373 THROW (ReportedBoundsError
);
376 case UCD_SCRAMBLER_ONOFF
:
379 proto_tree_add_item (tlv_tree
,
380 hf_docsis_burst_scrambler_onoff
,
381 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
385 THROW (ReportedBoundsError
);
388 } /* switch(tlvtype) */
390 } /* while (pos < endtlvpos) */
392 case UCD_BURST_DESCR5
:
393 /* DOCSIS 2.0 Upstream Channel Descriptor */
394 proto_tree_add_item (tlv_tree
, hf_docsis_ucd_iuc
, tvb
,
395 pos
++, 1, ENC_BIG_ENDIAN
);
396 endtlvpos
= pos
+ length
- 1;
397 while (pos
< endtlvpos
)
399 tlvtype
= tvb_get_guint8 (tvb
, pos
++);
400 tlvlen
= tvb_get_guint8 (tvb
, pos
++);
406 proto_tree_add_item (tlv_tree
,
407 hf_docsis_burst_mod_type
, tvb
,
408 pos
, tlvlen
, ENC_BIG_ENDIAN
);
412 THROW (ReportedBoundsError
);
415 case UCD_DIFF_ENCODING
:
418 proto_tree_add_item (tlv_tree
,
419 hf_docsis_burst_diff_encoding
,
420 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
424 THROW (ReportedBoundsError
);
427 case UCD_PREAMBLE_LEN
:
430 proto_tree_add_item (tlv_tree
,
431 hf_docsis_burst_preamble_len
,
432 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
436 THROW (ReportedBoundsError
);
439 case UCD_PREAMBLE_VAL_OFF
:
442 proto_tree_add_item (tlv_tree
,
443 hf_docsis_burst_preamble_val_off
,
444 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
448 THROW (ReportedBoundsError
);
454 proto_tree_add_item (tlv_tree
,
455 hf_docsis_burst_fec
, tvb
, pos
,
456 tlvlen
, ENC_BIG_ENDIAN
);
460 THROW (ReportedBoundsError
);
463 case UCD_FEC_CODEWORD
:
466 proto_tree_add_item (tlv_tree
,
467 hf_docsis_burst_fec_codeword
,
468 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
472 THROW (ReportedBoundsError
);
475 case UCD_SCRAMBLER_SEED
:
478 proto_tree_add_item (tlv_tree
,
479 hf_docsis_burst_scrambler_seed
,
480 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
484 THROW (ReportedBoundsError
);
490 proto_tree_add_item (tlv_tree
,
491 hf_docsis_burst_max_burst
, tvb
,
492 pos
, tlvlen
, ENC_BIG_ENDIAN
);
496 THROW (ReportedBoundsError
);
502 proto_tree_add_item (tlv_tree
,
503 hf_docsis_burst_guard_time
,
504 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
508 THROW (ReportedBoundsError
);
511 case UCD_LAST_CW_LEN
:
514 proto_tree_add_item (tlv_tree
,
515 hf_docsis_burst_last_cw_len
,
516 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
520 THROW (ReportedBoundsError
);
523 case UCD_SCRAMBLER_ONOFF
:
526 proto_tree_add_item (tlv_tree
,
527 hf_docsis_burst_scrambler_onoff
,
528 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
532 THROW (ReportedBoundsError
);
535 /* New cases added for DOCSIS 2.0 US Physical Burst Descriptor TLV */
536 /* #define UCD_RS_INT_DEPTH 12
537 * * #define UCD_RS_INT_BLOCK 13
538 * * #define UCD_PREAMBLE_TYPE 14
539 * * #define UCD_SCMDA_SCRAMBLER_ONOFF 15
540 * * #define UCD_SCDMA_CODES_PER_SUBFRAME 16
541 * * #define UCD_SCDMA_FRAMER_INT_STEP_SIZE 17
542 * * #define UCD_TCM_ENABLED 18
544 case UCD_RS_INT_DEPTH
:
547 proto_tree_add_item (tlv_tree
,
548 hf_docsis_rs_int_depth
,
549 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
553 THROW (ReportedBoundsError
);
556 case UCD_RS_INT_BLOCK
:
559 proto_tree_add_item (tlv_tree
,
560 hf_docsis_rs_int_block
,
561 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
565 THROW (ReportedBoundsError
);
568 case UCD_PREAMBLE_TYPE
:
571 proto_tree_add_item (tlv_tree
,
572 hf_docsis_preamble_type
,
573 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
577 THROW (ReportedBoundsError
);
580 case UCD_SCMDA_SCRAMBLER_ONOFF
:
583 proto_tree_add_item (tlv_tree
,
584 hf_docsis_scdma_scrambler_onoff
,
585 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
589 THROW (ReportedBoundsError
);
592 case UCD_SCDMA_CODES_PER_SUBFRAME
:
595 proto_tree_add_item (tlv_tree
,
596 hf_docsis_scdma_codes_per_subframe
,
597 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
601 THROW (ReportedBoundsError
);
604 case UCD_SCDMA_FRAMER_INT_STEP_SIZE
:
607 proto_tree_add_item (tlv_tree
,
608 hf_docsis_scdma_framer_int_step_size
,
609 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
613 THROW (ReportedBoundsError
);
616 case UCD_TCM_ENABLED
:
619 proto_tree_add_item (tlv_tree
,
620 hf_docsis_tcm_enabled
,
621 tvb
, pos
, tlvlen
, ENC_BIG_ENDIAN
);
625 THROW (ReportedBoundsError
);
628 } /* switch(tlvtype) */
630 } /* while (pos < endtlvpos) */
633 } /* while (pos < len) */
638 /* Register the protocol with Wireshark */
640 /* this format is require because a script is used to build the C function
641 that calls all the protocol registration.
646 proto_register_docsis_ucd (void)
649 /* Setup list of header fields See Section 1.6.1 for details*/
650 static hf_register_info hf
[] = {
651 {&hf_docsis_ucd_upstream_chid
,
652 {"Upstream Channel ID", "docsis_ucd.upchid",
653 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
656 {&hf_docsis_ucd_config_ch_cnt
,
657 {"Config Change Count", "docsis_ucd.confcngcnt",
658 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
659 "Configuration Change Count", HFILL
}
661 {&hf_docsis_ucd_mini_slot_size
,
662 {"Mini Slot Size (6.25us TimeTicks)", "docsis_ucd.mslotsize",
663 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
666 {&hf_docsis_ucd_down_chid
,
667 {"Downstream Channel ID", "docsis_ucd.downchid",
668 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
669 "Management Message", HFILL
}
671 {&hf_docsis_ucd_type
,
672 {"TLV Type", "docsis_ucd.type",
673 FT_UINT8
, BASE_DEC
, VALS(channel_tlv_vals
), 0x0,
674 "Channel TLV type", HFILL
}
676 {&hf_docsis_ucd_length
,
677 {"TLV Length", "docsis_ucd.length",
678 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
679 "Channel TLV length", HFILL
}
681 {&hf_docsis_ucd_symbol_rate
,
682 {"Symbol Rate (ksym/sec)", "docsis_ucd.symrate",
683 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
684 "Symbol Rate", HFILL
}
686 {&hf_docsis_ucd_frequency
,
687 {"Frequency (Hz)", "docsis_ucd.freq",
688 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
689 "Upstream Center Frequency", HFILL
}
691 {&hf_docsis_ucd_preamble_pat
,
692 {"Preamble Pattern", "docsis_ucd.preamble",
693 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
694 "Preamble Superstring", HFILL
}
697 {"Interval Usage Code", "docsis_ucd.iuc",
698 FT_UINT8
, BASE_DEC
, VALS (iuc_vals
), 0x0,
701 {&hf_docsis_burst_mod_type
,
702 {"1 Modulation Type", "docsis_ucd.burst.modtype",
703 FT_UINT8
, BASE_DEC
, VALS (mod_vals
), 0x0,
704 "Modulation Type", HFILL
}
706 {&hf_docsis_burst_diff_encoding
,
707 {"2 Differential Encoding", "docsis_ucd.burst.diffenc",
708 FT_UINT8
, BASE_DEC
, VALS (on_off_vals
), 0x0,
709 "Differential Encoding", HFILL
}
711 {&hf_docsis_burst_preamble_len
,
712 {"3 Preamble Length (Bits)", "docsis_ucd.burst.preamble_len",
713 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
714 "Preamble Length (Bits)", HFILL
}
716 {&hf_docsis_burst_preamble_val_off
,
717 {"4 Preamble Offset (Bits)", "docsis_ucd.burst.preamble_off",
718 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
719 "Preamble Offset (Bits)", HFILL
}
721 {&hf_docsis_burst_fec
,
722 {"5 FEC (T)", "docsis_ucd.burst.fec",
723 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
724 "FEC (T) Codeword Parity Bits = 2^T", HFILL
}
726 {&hf_docsis_burst_fec_codeword
,
727 {"6 FEC Codeword Info bytes (k)", "docsis_ucd.burst.fec_codeword",
728 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
729 "FEC Codeword Info Bytes (k)", HFILL
}
731 {&hf_docsis_burst_scrambler_seed
,
732 {"7 Scrambler Seed", "docsis_ucd.burst.scrambler_seed",
733 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
734 "Burst Descriptor", HFILL
}
736 {&hf_docsis_burst_max_burst
,
737 {"8 Max Burst Size (Minislots)", "docsis_ucd.burst.maxburst",
738 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
739 "Max Burst Size (Minislots)", HFILL
}
741 {&hf_docsis_burst_guard_time
,
742 {"9 Guard Time Size (Symbol Times)", "docsis_ucd.burst.guardtime",
743 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
744 "Guard Time Size", HFILL
}
746 {&hf_docsis_burst_last_cw_len
,
747 {"10 Last Codeword Length", "docsis_ucd.burst.last_cw_len",
748 FT_UINT8
, BASE_DEC
, VALS (last_cw_len_vals
), 0x0,
749 "Last Codeword Length", HFILL
}
751 {&hf_docsis_burst_scrambler_onoff
,
752 {"11 Scrambler On/Off", "docsis_ucd.burst.scrambleronoff",
753 FT_UINT8
, BASE_DEC
, VALS (on_off_vals
), 0x0,
754 "Scrambler On/Off", HFILL
}
756 {&hf_docsis_rs_int_depth
,
757 {"12 RS Interleaver Depth", "docsis_ucd.burst.rsintdepth",
758 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
759 "R-S Interleaver Depth", HFILL
}
761 {&hf_docsis_rs_int_block
,
762 {"13 RS Interleaver Block Size", "docsis_ucd.burst.rsintblock",
763 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
764 "R-S Interleaver Block", HFILL
}
766 {&hf_docsis_preamble_type
,
767 {"14 Preamble Type", "docsis_ucd.burst.preambletype",
768 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
769 "Preamble Type", HFILL
}
771 {&hf_docsis_scdma_scrambler_onoff
,
772 {"15 SCDMA Scrambler On/Off", "docsis_ucd.burst.scdmascrambleronoff",
773 FT_UINT8
, BASE_DEC
, VALS (on_off_vals
), 0x0,
774 "SCDMA Scrambler On/Off", HFILL
}
776 {&hf_docsis_scdma_codes_per_subframe
,
777 {"16 SCDMA Codes per Subframe", "docsis_ucd.burst.scdmacodespersubframe",
778 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
779 "SCDMA Codes per Subframe", HFILL
}
781 {&hf_docsis_scdma_framer_int_step_size
,
782 {"17 SDMA Framer Int Step Size", "docsis_ucd.burst.scdmaframerintstepsize",
783 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
784 "SCDMA Framer Interleaving Step Size", HFILL
}
786 {&hf_docsis_tcm_enabled
,
787 {"18 TCM Enable", "docsis_ucd.burst.tcmenabled",
788 FT_UINT8
, BASE_DEC
, VALS (on_off_vals
), 0x0,
789 "TCM Enabled", HFILL
}
793 /* Setup protocol subtree array */
794 static gint
*ett
[] = {
799 /* Register the protocol name and description */
801 proto_register_protocol ("DOCSIS Upstream Channel Descriptor",
802 "DOCSIS UCD", "docsis_ucd");
804 /* Required function calls to register the header fields and subtrees used */
805 proto_register_field_array (proto_docsis_ucd
, hf
, array_length (hf
));
806 proto_register_subtree_array (ett
, array_length (ett
));
808 register_dissector ("docsis_ucd", dissect_ucd
, proto_docsis_ucd
);
812 /* If this dissector uses sub-dissector registration add a registration routine.
813 This format is required because a script is used to find these routines and
814 create the code that calls these routines.
817 proto_reg_handoff_docsis_ucd (void)
819 dissector_handle_t docsis_ucd_handle
;
821 docsis_ucd_handle
= find_dissector ("docsis_ucd");
822 dissector_add_uint ("docsis_mgmt", 0x02, docsis_ucd_handle
);