Convert 'encoding' parameter of certain proto_tree_add_item() calls in plugins/*:
[obnox/wireshark/wip.git] / plugins / docsis / packet-tlv.c
1 /* packet-tlv.c
2  * Routines to Dissect Appendix C TLV's
3  * Copyright 2002, Anand V. Narwani <anand[AT]narwani.org>
4  *
5  * $Id$
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
10  *
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.
15  *
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.
20  *
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24  */
25
26 #ifdef HAVE_CONFIG_H
27 # include "config.h"
28 #endif
29
30 #include <epan/packet.h>
31 #include "packet-tlv.h"
32
33 /* This module will dissect the Appendix C TLV's.  Please see:
34  * http://www.cablemodem.com/specifications/specifications.html
35  *
36  * The main dissector is dissect_tlv.  This routine will dissect
37  * top level TLV's and call sub-dissectors for the sub-TLV's.
38  */
39
40 /* Initialize the protocol and registered fields */
41 static dissector_handle_t docsis_vsif_handle;
42 static dissector_handle_t docsis_ucd_handle;
43
44
45 static int proto_docsis_tlv = -1;
46 static int hf_docsis_tlv_down_freq = -1;
47 static int hf_docsis_tlv_upstream_chid = -1;
48 static int hf_docsis_tlv_net_access = -1;
49 static int hf_docsis_tlv_cos = -1;
50 static int hf_docsis_tlv_mcap = -1;
51 static int hf_docsis_tlv_privacy_enable = -1;
52 static int hf_docsis_tlv_max_cpe = -1;
53 static int hf_docsis_tlv_max_classifiers = -1;
54 static int hf_docsis_tlv_snmp_access = -1;
55 static int hf_docsis_tlv_snmp_obj = -1;
56 static int hf_docsis_tlv_svc_unavail = -1;
57 static int hf_docsis_tlv_svc_unavail_classid = -1;
58 static int hf_docsis_tlv_svc_unavail_type = -1;
59 static int hf_docsis_tlv_svc_unavail_code = -1;
60 static int hf_docsis_tlv_bpi = -1;
61 static int hf_docsis_tlv_phs = -1;
62 static int hf_docsis_tlv_hmac_digest = -1;
63 static int hf_docsis_tlv_tftp_server_timestamp = -1;
64 static int hf_docsis_tlv_tftp_prov_modem_address = -1;
65 static int hf_docsis_tlv_upclsfr = -1;
66 static int hf_docsis_tlv_downclsfr = -1;
67 static int hf_docsis_tlv_upsflow = -1;
68 static int hf_docsis_tlv_downsflow = -1;
69 static int hf_docsis_tlv_vendor_spec = -1;
70 static int hf_docsis_tlv_cm_mic = -1;
71 static int hf_docsis_tlv_cmts_mic = -1;
72 static int hf_docsis_tlv_auth_block = -1;
73 static int hf_docsis_tlv_key_seq_num = -1;
74 static int hf_docsis_tlv_snmpv3_kick = -1;
75 static int hf_docsis_tlv_snmpv3_kick_name = -1;
76 static int hf_docsis_tlv_snmpv3_kick_publicnum = -1;
77 static int hf_docsis_tlv_mfgr_cvc = -1;
78 static int hf_docsis_tlv_cosign_cvc = -1;
79 static int hf_docsis_tlv_vendor_id = -1;
80 static int hf_docsis_tlv_sw_file = -1;
81 static int hf_docsis_tlv_sw_upg_srvr = -1;
82 static int hf_docsis_tlv_cpe_ethernet = -1;
83 static int hf_docsis_tlv_modem_addr = -1;
84 static int hf_docsis_tlv_rng_tech = -1;
85 static int hf_docsis_tlv_subs_mgmt_ctrl = -1;
86 static int hf_docsis_tlv_subs_mgmt_ip_table = -1;
87 static int hf_docsis_tlv_subs_mgmt_ip_entry = -1;
88 static int hf_docsis_tlv_subs_mgmt_filter_grps = -1;
89 static int hf_docsis_tlv_snmpv3_ntfy_rcvr = -1;
90 static int hf_docsis_tlv_enable_20_mode = -1;
91 static int hf_docsis_tlv_enable_test_modes = -1;
92 static int hf_docsis_tlv_ds_ch_list = -1;
93 static int hf_docsis_tlv_mc_mac_address = -1;
94 static int hf_docsis_tlv_dut_filter = -1;
95 static int hf_docsis_tlv_tcc = -1;
96 static int hf_docsis_tlv_sid_cl = -1;
97 static int hf_docsis_tlv_rcp = -1;
98 static int hf_docsis_tlv_rcc = -1;
99 static int hf_docsis_tlv_dsid = -1;
100 static int hf_docsis_tlv_sec_assoc = -1;
101 static int hf_docsis_tlv_init_ch_timeout = -1;
102 static int hf_docsis_tlv_ch_asgn = -1;
103 static int hf_docsis_tlv_cm_init_reason = -1;
104 static int hf_docsis_tlv_sw_upg_srvr_ipv6 = -1;
105 static int hf_docsis_tlv_tftp_prov_cm_ipv6_addr = -1;
106 static int hf_docsis_tlv_us_drop_clfy = -1;
107 static int hf_docsis_tlv_subs_mgmt_ipv6_lst = -1;
108 static int hf_docsis_tlv_us_drop_clfy_group_id = -1;
109 static int hf_docsis_tlv_subs_mgmt_ctrl_max_cpe_ipv6 = -1;
110 static int hf_docsis_tlv_cmts_mc_sess_enc = -1;
111
112 static int hf_docsis_tlv_cos_id = -1;
113 static int hf_docsis_tlv_cos_sid = -1;
114 static int hf_docsis_tlv_cos_max_down = -1;
115 static int hf_docsis_tlv_cos_max_up = -1;
116 static int hf_docsis_tlv_cos_up_chnl_pri = -1;
117 static int hf_docsis_tlv_cos_min_grntd_up = -1;
118 static int hf_docsis_tlv_cos_max_up_burst = -1;
119 static int hf_docsis_tlv_cos_privacy_enable = -1;
120
121 static int hf_docsis_tlv_mcap_concat = -1;
122 static int hf_docsis_tlv_mcap_docs_ver = -1;
123 static int hf_docsis_tlv_mcap_frag = -1;
124 static int hf_docsis_tlv_mcap_phs = -1;
125 static int hf_docsis_tlv_mcap_igmp = -1;
126 static int hf_docsis_tlv_mcap_down_said = -1;
127 static int hf_docsis_tlv_mcap_up_sid = -1;
128 static int hf_docsis_tlv_mcap_privacy = -1;
129 static int hf_docsis_tlv_mcap_8021P_filter = -1;
130 static int hf_docsis_tlv_mcap_8021Q_filter = -1;
131 static int hf_docsis_tlv_mcap_xmit_eq_taps_per_sym = -1;
132 static int hf_docsis_tlv_mcap_xmit_eq_taps = -1;
133 static int hf_docsis_tlv_mcap_dcc = -1;
134 static int hf_docsis_tlv_mcap_ip_filters = -1;
135 static int hf_docsis_tlv_mcap_llc_filters = -1;
136 static int hf_docsis_tlv_mcap_exp_unicast_sid = -1;
137 static int hf_docsis_tlv_mcap_rnghoff_cm = -1;
138 static int hf_docsis_tlv_mcap_rnghoff_erouter = -1;
139 static int hf_docsis_tlv_mcap_rnghoff_emta = -1;
140 static int hf_docsis_tlv_mcap_rnghoff_estb = -1;
141 static int hf_docsis_tlv_mcap_l2vpn = -1;
142 static int hf_docsis_tlv_mcap_l2vpn_esafe = -1;
143 static int hf_docsis_tlv_mcap_dut_filtering = -1;
144 static int hf_docsis_tlv_mcap_us_freq_range = -1;
145 static int hf_docsis_tlv_mcap_us_srate_160 = -1;
146 static int hf_docsis_tlv_mcap_us_srate_320 = -1;
147 static int hf_docsis_tlv_mcap_us_srate_640 = -1;
148 static int hf_docsis_tlv_mcap_us_srate_1280 = -1;
149 static int hf_docsis_tlv_mcap_us_srate_2560 = -1;
150 static int hf_docsis_tlv_mcap_us_srate_5120 = -1;
151 static int hf_docsis_tlv_mcap_sac = -1;
152 static int hf_docsis_tlv_mcap_code_hop_mode2 = -1;
153 static int hf_docsis_tlv_mcap_mtc = -1;
154 static int hf_docsis_tlv_mcap_512_msps_utc = -1;
155 static int hf_docsis_tlv_mcap_256_msps_utc = -1;
156 static int hf_docsis_tlv_mcap_total_sid_cluster = -1;
157 static int hf_docsis_tlv_mcap_sid_per_sf = -1;
158 static int hf_docsis_tlv_mcap_mrc = -1;
159 static int hf_docsis_tlv_mcap_total_dsid = -1;
160 static int hf_docsis_tlv_mcap_reseq_dsid = -1;
161 static int hf_docsis_tlv_mcap_mc_dsid = -1;
162 static int hf_docsis_tlv_mcap_mc_dsid_fwd = -1;
163 static int hf_docsis_tlv_mcap_fctype_fwd = -1;
164 static int hf_docsis_tlv_mcap_dpv_path = -1;
165 static int hf_docsis_tlv_mcap_dpv_packet = -1;
166 static int hf_docsis_tlv_mcap_ugs = -1;
167 static int hf_docsis_tlv_mcap_map_ucd = -1;
168 static int hf_docsis_tlv_mcap_udc = -1;
169 static int hf_docsis_tlv_mcap_ipv6 = -1;
170 static int hf_docsis_tlv_mcap_ext_us_trans_power = -1;
171
172
173 static int hf_docsis_tlv_clsfr_ref = -1;
174 static int hf_docsis_tlv_clsfr_id = -1;
175 static int hf_docsis_tlv_clsfr_sflow_ref = -1;
176 static int hf_docsis_tlv_clsfr_sflow_id = -1;
177 static int hf_docsis_tlv_clsfr_rule_pri = -1;
178 static int hf_docsis_tlv_clsfr_act_state = -1;
179 static int hf_docsis_tlv_clsfr_dsc_act = -1;
180 static int hf_docsis_tlv_clsfr_err = -1;
181 static int hf_docsis_tlv_ipclsfr = -1;
182 static int hf_docsis_tlv_ethclsfr = -1;
183 static int hf_docsis_tlv_dot1qclsfr = -1;
184
185 static int hf_docsis_tlv_clsfr_vendor_spc = -1;
186
187 static int hf_docsis_tlv_clsfr_err_param = -1;
188 static int hf_docsis_tlv_clsfr_err_code = -1;
189 static int hf_docsis_tlv_clsfr_err_msg = -1;
190
191 static int hf_docsis_tlv_ipclsfr_tosmask = -1;
192 static int hf_docsis_tlv_ipclsfr_ipproto = -1;
193 static int hf_docsis_tlv_ipclsfr_src = -1;
194 static int hf_docsis_tlv_ipclsfr_dst = -1;
195 static int hf_docsis_tlv_ipclsfr_srcmask = -1;
196 static int hf_docsis_tlv_ipclsfr_dstmask = -1;
197 static int hf_docsis_tlv_ipclsfr_sport_start = -1;
198 static int hf_docsis_tlv_ipclsfr_sport_end = -1;
199 static int hf_docsis_tlv_ipclsfr_dport_start = -1;
200 static int hf_docsis_tlv_ipclsfr_dport_end = -1;
201
202 static int hf_docsis_tlv_ethclsfr_dmac = -1;
203 static int hf_docsis_tlv_ethclsfr_smac = -1;
204 static int hf_docsis_tlv_ethclsfr_ethertype = -1;
205
206 static int hf_docsis_tlv_dot1qclsfr_user_pri = -1;
207 static int hf_docsis_tlv_dot1qclsfr_vlanid = -1;
208 static int hf_docsis_tlv_dot1qclsfr_vendorspec = -1;
209
210 static int hf_docsis_tlv_sflow_ref = -1;
211 static int hf_docsis_tlv_sflow_id = -1;
212 static int hf_docsis_tlv_sflow_sid = -1;
213 static int hf_docsis_tlv_sflow_classname = -1;
214 static int hf_docsis_tlv_sflow_qos_param = -1;
215 static int hf_docsis_tlv_sflow_err = -1;
216 static int hf_docsis_tlv_sflow_traf_pri = -1;
217 static int hf_docsis_tlv_sflow_max_sus = -1;
218 static int hf_docsis_tlv_sflow_max_burst = -1;
219 static int hf_docsis_tlv_sflow_min_traf = -1;
220 static int hf_docsis_tlv_sflow_ass_min_pkt_size = -1;
221 static int hf_docsis_tlv_sflow_timeout_active = -1;
222 static int hf_docsis_tlv_sflow_timeout_admitted = -1;
223 static int hf_docsis_tlv_sflow_vendor_spec = -1;
224 static int hf_docsis_tlv_sflow_max_concat_burst = -1;
225 static int hf_docsis_tlv_sflow_sched_type = -1;
226 static int hf_docsis_tlv_sflow_reqxmit_pol = -1;
227 static int hf_docsis_tlv_sflow_nominal_polling = -1;
228 static int hf_docsis_tlv_sflow_tolerated_jitter = -1;
229 static int hf_docsis_tlv_sflow_ugs_size = -1;
230 static int hf_docsis_tlv_sflow_nom_grant_intvl = -1;
231 static int hf_docsis_tlv_sflow_tol_grant_jitter = -1;
232 static int hf_docsis_tlv_sflow_grants_per_intvl = -1;
233 static int hf_docsis_tlv_sflow_ip_tos_overwrite = -1;
234 static int hf_docsis_tlv_sflow_ugs_timeref = -1;
235 static int hf_docsis_tlv_sflow_max_down_latency = -1;
236
237 static int hf_docsis_tlv_sflow_err_param = -1;
238 static int hf_docsis_tlv_sflow_err_code = -1;
239 static int hf_docsis_tlv_sflow_err_msg = -1;
240
241 static int hf_docsis_tlv_phs_class_ref = -1;
242 static int hf_docsis_tlv_phs_class_id = -1;
243 static int hf_docsis_tlv_phs_sflow_ref = -1;
244 static int hf_docsis_tlv_phs_sflow_id = -1;
245 static int hf_docsis_tlv_phs_dsc_action = -1;
246 static int hf_docsis_tlv_phs_err = -1;
247 static int hf_docsis_tlv_phs_phsf = -1;
248 static int hf_docsis_tlv_phs_phsm = -1;
249 static int hf_docsis_tlv_phs_phsv = -1;
250 static int hf_docsis_tlv_phs_phsi = -1;
251 static int hf_docsis_tlv_phs_phss = -1;
252 static int hf_docsis_tlv_phs_vendorspec = -1;
253
254 static int hf_docsis_tlv_phs_err_param = -1;
255 static int hf_docsis_tlv_phs_err_code = -1;
256 static int hf_docsis_tlv_phs_err_msg = -1;
257
258 static int hf_docsis_tlv_ds_ch_list_single = -1;
259 static int hf_docsis_tlv_ds_ch_list_range = -1;
260 static int hf_docsis_tlv_ds_ch_list_default_timeout = -1;
261
262 static int hf_docsis_tlv_single_ch_timeout = -1;
263 static int hf_docsis_tlv_single_ch_freq = -1;
264
265 static int hf_docsis_tlv_freq_rng_timeout = -1;
266 static int hf_docsis_tlv_freq_rng_start = -1;
267 static int hf_docsis_tlv_freq_rng_end = -1;
268 static int hf_docsis_tlv_freq_rng_step = -1;
269
270 static int hf_docsis_tlv_dut_filter_control = -1;
271 static int hf_docsis_tlv_dut_filter_cmim = -1;
272
273 static int hf_docsis_tlv_tcc_refid = -1;
274 static int hf_docsis_tlv_tcc_us_ch_action= -1;
275 static int hf_docsis_tlv_tcc_us_ch_id= -1;
276 static int hf_docsis_tlv_tcc_new_us_ch_id= -1;
277 static int hf_docsis_tlv_tcc_ucd = -1;
278 static int hf_docsis_tlv_tcc_rng_sid= -1;
279 static int hf_docsis_tlv_tcc_init_tech= -1;
280 static int hf_docsis_tlv_tcc_rng_parms= -1;
281 static int hf_docsis_tlv_tcc_dyn_rng_win= -1;
282 static int hf_docsis_tlv_tcc_err = -1;
283
284 static int hf_docsis_rng_parms_us_ch_id = -1;
285 static int hf_docsis_rng_parms_time_off_int = -1;
286 static int hf_docsis_rng_parms_time_off_frac = -1;
287 static int hf_docsis_rng_parms_power_off = -1;
288 static int hf_docsis_rng_parms_freq_off = -1;
289
290 static int hf_docsis_tcc_err_subtype = -1;
291 static int hf_docsis_tcc_err_code = -1;
292 static int hf_docsis_tcc_err_msg = -1;
293
294 static int hf_docsis_sid_cl_sf_id = -1;
295 static int hf_docsis_sid_cl_enc = -1;
296 static int hf_docsis_sid_cl_so_crit = -1;
297
298 static int hf_docsis_sid_cl_enc_id = -1;
299 static int hf_docsis_sid_cl_enc_map = -1;
300
301 static int hf_docsis_sid_cl_map_us_ch_id = -1;
302 static int hf_docsis_sid_cl_map_sid = -1;
303 static int hf_docsis_sid_cl_map_action = -1;
304
305 static int hf_docsis_sid_cl_so_max_req = -1;
306 static int hf_docsis_sid_cl_so_max_out_bytes = -1;
307 static int hf_docsis_sid_cl_so_max_req_bytes = -1;
308 static int hf_docsis_sid_cl_so_max_time = -1;
309
310 static int hf_docsis_tlv_rcp_id = -1;
311 static int hf_docsis_tlv_rcp_name = -1;
312 static int hf_docsis_tlv_rcp_freq_spc = -1;
313 static int hf_docsis_tlv_rcp_rcv_mod_enc = -1;
314 static int hf_docsis_tlv_rcp_rcv_ch = -1;
315 static int hf_docsis_tlv_rcp_ven_spec = -1;
316
317 static int hf_docsis_rcv_mod_enc_idx = -1;
318 static int hf_docsis_rcv_mod_enc_adj_ch = -1;
319 static int hf_docsis_rcv_mod_enc_ch_bl_rng = -1;
320 static int hf_docsis_rcv_mod_enc_ctr_freq_asgn = -1;
321 static int hf_docsis_rcv_mod_enc_rsq_ch_subs_cap = -1;
322 static int hf_docsis_rcv_mod_enc_conn = -1;
323 static int hf_docsis_rcv_mod_enc_phy_layr_parms = -1;
324
325 static int hf_docsis_rcc_rcv_mod_enc_idx = -1;
326 static int hf_docsis_rcc_rcv_mod_enc_ctr_freq_asgn = -1;
327 static int hf_docsis_rcc_rcv_mod_enc_conn = -1;
328
329 static int hf_docsis_ch_bl_rng_min_ctr_freq = -1;
330 static int hf_docsis_ch_bl_rng_max_ctr_freq = -1;
331
332 static int hf_docsis_rcv_ch_idx = -1;
333 static int hf_docsis_rcv_ch_conn = -1;
334 static int hf_docsis_rcv_ch_conn_off = -1;
335 static int hf_docsis_rcv_ch_prim_ds_ch_ind = -1;
336
337 static int hf_docsis_rcc_rcv_ch_idx = -1;
338 static int hf_docsis_rcc_rcv_ch_conn = -1;
339 static int hf_docsis_rcc_rcv_ch_ctr_freq_asgn = -1;
340 static int hf_docsis_rcc_rcv_ch_prim_ds_ch_ind = -1;
341
342 static int hf_docsis_tlv_rcc_id = -1;
343 static int hf_docsis_tlv_rcc_rcv_mod_enc = -1;
344 static int hf_docsis_tlv_rcc_rcv_ch = -1;
345 static int hf_docsis_tlv_rcc_part_serv_ds_ch = -1;
346 static int hf_docsis_tlv_rcc_ven_spec = -1;
347 static int hf_docsis_tlv_rcc_err = -1;
348
349 static int hf_docsis_tlv_rcc_err_mod_or_ch = -1;
350 static int hf_docsis_tlv_rcc_err_idx = -1;
351 static int hf_docsis_tlv_rcc_err_param = -1;
352 static int hf_docsis_tlv_rcc_err_code = -1;
353 static int hf_docsis_tlv_rcc_err_msg = -1;
354
355 static int hf_docsis_tlv_dsid_id = -1;
356 static int hf_docsis_tlv_dsid_action = -1;
357 static int hf_docsis_tlv_dsid_ds_reseq = -1;
358 static int hf_docsis_tlv_dsid_mc = -1;
359
360 static int hf_docsis_ds_reseq_dsid = -1;
361 static int hf_docsis_ds_reseq_ch_lst = -1;
362 static int hf_docsis_ds_reseq_wait_time = -1;
363 static int hf_docsis_ds_reseq_warn_thresh = -1;
364 static int hf_docsis_ds_reseq_ho_timer = -1;
365
366 static int hf_docsis_tlv_dsid_mc_addr = -1;
367 static int hf_docsis_tlv_dsid_mc_cmim = -1;
368 static int hf_docsis_tlv_dsid_mc_group = -1;
369 static int hf_docsis_tlv_dsid_mc_phs = -1;
370
371 static int hf_docsis_mc_addr_action = -1;
372 static int hf_docsis_mc_addr_addr = -1;
373
374 static int hf_docsis_tlv_sec_assoc_action = -1;
375 static int hf_docsis_tlv_sec_assoc_desc = -1;
376
377 static int hf_docsis_ch_asgn_us_ch_id = -1;
378 static int hf_docsis_ch_asgn_rx_freq = -1;
379
380 static int hf_docsis_cmts_mc_sess_enc_grp = -1;
381 static int hf_docsis_cmts_mc_sess_enc_src = -1;
382
383 /* Initialize the subtree pointers */
384 static gint ett_docsis_tlv = -1;
385 static gint ett_docsis_tlv_cos = -1;
386 static gint ett_docsis_tlv_mcap = -1;
387 static gint ett_docsis_tlv_clsfr = -1;
388 static gint ett_docsis_tlv_clsfr_ip = -1;
389 static gint ett_docsis_tlv_clsfr_eth = -1;
390 static gint ett_docsis_tlv_clsfr_err = -1;
391 static gint ett_docsis_tlv_phs = -1;
392 static gint ett_docsis_tlv_phs_err = -1;
393 static gint ett_docsis_tlv_clsfr_dot1q = -1;
394 static gint ett_docsis_tlv_reqxmitpol = -1;
395 static gint ett_docsis_tlv_sflow_err = -1;
396 static gint ett_docsis_tlv_svc_unavail = -1;
397 static gint ett_docsis_tlv_snmpv3_kick = -1;
398 static gint ett_docsis_tlv_ds_ch_list = -1;
399 static gint ett_docsis_tlv_ds_ch_list_single = -1;
400 static gint ett_docsis_tlv_ds_ch_list_range = -1;
401 static gint ett_docsis_tlv_dut_filter = -1;
402 static gint ett_docsis_tlv_tcc = -1;
403 static gint ett_docsis_tlv_tcc_ucd = -1;
404 static gint ett_docsis_tlv_tcc_rng_parms = -1;
405 static gint ett_docsis_tlv_tcc_err = -1;
406 static gint ett_docsis_tlv_sid_cl = -1;
407 static gint ett_docsis_tlv_sid_cl_enc = -1;
408 static gint ett_docsis_tlv_sid_cl_enc_map = -1;
409 static gint ett_docsis_tlv_sid_cl_so = -1;
410 static gint ett_docsis_tlv_rcp = -1;
411 static gint ett_docsis_tlv_rcp_rcv_mod_enc = -1;
412 static gint ett_docsis_tlv_rcp_ch_bl_rng = -1;
413 static gint ett_docsis_tlv_rcp_rcv_ch = -1;
414 static gint ett_docsis_tlv_rcc = -1;
415 static gint ett_docsis_tlv_rcc_rcv_mod_enc = -1;
416 static gint ett_docsis_tlv_rcc_rcv_ch = -1;
417 static gint ett_docsis_tlv_rcc_err = -1;
418 static gint ett_docsis_tlv_dsid = -1;
419 static gint ett_docsis_tlv_dsid_ds_reseq = -1;
420 static gint ett_docsis_tlv_dsid_mc = -1;
421 static gint ett_docsis_tlv_dsid_mc_addr = -1;
422 static gint ett_docsis_tlv_sec_assoc = -1;
423 static gint ett_docsis_tlv_ch_asgn = -1;
424 static gint ett_docsis_cmts_mc_sess_enc = -1;
425
426 static const true_false_string on_off_tfs = {
427   "On",
428   "Off"
429 };
430
431 static const value_string on_off_vals[] = {
432   {0, "Off"},
433   {1, "On"},
434   {0, NULL},
435 };
436
437 static const true_false_string ena_dis_tfs = {
438   "Enable",
439   "Disable"
440 };
441
442 static const value_string docs_ver_vals[] = {
443   {0, "v1.0"},
444   {1, "v1.1"},
445   {0, NULL},
446 };
447
448 static const true_false_string activation_tfs = {
449   "Active",
450   "Inactive"
451 };
452
453 static const value_string dsc_act_vals[] = {
454   {0, "DSC Add Classifier"},
455   {1, "DSC Replace Classifier"},
456   {2, "DSC Delete Classifier"},
457   {0, NULL},
458 };
459
460 static const value_string qos_param_vals[] = {
461   {0x01, "Apply to provisioned set only"},
462   {0x02, "Perform admission control add apply to admitted set"},
463   {0x03, "Apply to provisioned and admitted set; Perform admission control"},
464   {0x04, "Perform admission control if needed and apply to active set"},
465   {0x05,
466    "Apply to provisioned and active sets; Admission control on admitted set in separate service flow, and activate service flow"},
467   {0x06,
468    "Perform admission control and activate; Apply to admitted and active sets"},
469   {0x07,
470    "Apply to Provisioned, Active and Admitted Sets; Admission Control and Activate Service Flow"},
471   {0, NULL},
472 };
473
474 static const value_string sched_type_vals[] = {
475   {0, "Reserved"},
476   {1, "Undefined (CMTS Dependent)"},
477   {2, "Best Effort Service"},
478   {3, "Non-Real-Time Polling Service"},
479   {4, "Real-Time Polling Service"},
480   {5, "Unsolicited Grant Service w/Activity Detection"},
481   {6, "Unsolicited Grant Service"},
482   {0, NULL},
483 };
484
485 static const value_string action_vals[] = {
486   {0, "Add PHS Rule"},
487   {1, "Set PHS Rule"},
488   {2, "Delete PHS Rule"},
489   {3, "Delete all PHS Rules"},
490   {0, NULL},
491 };
492
493 static const true_false_string verify_tfs = {
494   "Don't Verify",
495   "Verify"
496 };
497
498 static const value_string rng_tech_vals[] = {
499   {0, "Perform initial maintenance on new channel"},
500   {1, "Perform only station maintenance on new channel"},
501   {2, "Perform either initial maintenance or station maintenance on new channel"},
502   {3, "Use the new channel directly without performing initial or station maintenance"},
503   {0, NULL},
504 };
505
506
507 const value_string docsis_conf_code[] = {
508   {0, "okay/success"},
509   {1, "Reject: Other/Auth failure (1.0)"},
510   {2, "Reject: Unrecognized configuration setting/COS failure (1.0)"},
511   {3, "Reject: Temporary/Reject resource"},
512   {4, "Reject: Permanent/Reject admin"},
513   {5, "Reject: Not owner"},
514   {6, "Reject: Service flow not found"},
515   {7, "Reject: Service flow exists"},
516   {8, "Reject: Required parameter not present"},
517   {9, "Reject: Header suppression"},
518   {10, "Reject: Unknown transaction id"},
519   {11, "Reject: Authentication failure"},
520   {12, "Reject: Add aborted"},
521   {13, "Reject: Multiple errors"},
522   {14, "Reject: Classifier not found"},
523   {15, "Reject: Classifier exists"},
524   {16, "Reject: PHS rule not found"},
525   {17, "Reject: PHS rule exists"},
526   {18, "Reject: Duplicate reference ID or index in message"},
527   {19, "Reject: Multiple upstream service flows"},
528   {20, "Reject: Multiple downstream service flows"},
529   {21, "Reject: Classifier for another service flow "},
530   {22, "Reject: PHS for another service flow "},
531   {23, "Reject: Parameter invalid for context"},
532   {24, "Reject: Authorization failure"},
533   {25, "Reject: Temporary DCC"},
534   {180, "Depart"},
535   {181, "Arrive"},
536   {182, "Reject: Already There"},
537   {200, "Reject: Major Service Flow Error"},
538   {201, "Reject: Major Classifier Error"},
539   {202, "Reject: Major PHS Rule Error"},
540   {203, "Reject: Multiple Major Errors"},
541   {204, "Reject: Message Syntax Error"},
542   {205, "Reject: Primary Service Flow Error"},
543   {206, "Reject: Message Too Big"},
544   {207, "Reject: Invalid Modem Capabilities"},
545   {0, NULL}
546 };
547
548 static const value_string us_ch_action_vals[] = {
549   {0, "No Action"},
550   {1, "Add"},
551   {2, "Change"},
552   {3, "Delete"},
553   {4, "Replace"},
554   {5, "Re-range"},
555   {0, NULL},
556 };
557
558 static const value_string init_tech_vals[] = {
559   {0, "reserved"},
560   {1, "Perform broadcast initial ranging before normal ops"},
561   {2, "Perform unicast ranging before normal ops"},
562   {3, "Perform either broadcast or unicast ranging before normal ops"},
563   {4, "Use new channel directly without reinitializing or ranging"},
564   {0, NULL},
565 };
566
567 static const value_string sid_ch_map_vals[] = {
568   {0, "reserved"},
569   {1, "Add"},
570   {2, "Delete"},
571   {0, NULL},
572 };
573
574 static const value_string mod_or_ch_vals[] = {
575   {0, "reserved"},
576   {1, "reserved"},
577   {2, "reserved"},
578   {3, "reserved"},
579   {4, "Receive Module"},
580   {5, "Receive Channel"},
581   {0, NULL},
582 };
583
584 static const value_string dsid_action_vals[] = {
585   {0, "Add"},
586   {1, "Change"},
587   {2, "Delete"},
588   {0, NULL},
589 };
590
591 static const value_string add_del_vals[] = {
592   {0, "Add"},
593   {1, "Delete"},
594   {0, NULL},
595 };
596
597 static const value_string init_reason_vals[] = {
598   {0, "reserved"},
599   {1, "Power On"},
600   {2, "T17 Lost Sync"},
601   {3, "All Upstream Failed"},
602   {4, "Bad DHCP Ack"},
603   {5, "Link Local Address in use"},
604   {6, "T6 Expired"},
605   {7, "REG-RSP not ok"},
606   {8, "BAD RCC/TCC"},
607   {9, "Failed Primary Downstream"},
608   {10, "TCS failed on all upstreams"},
609   {11, "reserved"},
610   {12, "reserved"},
611   {13, "reserved"},
612   {14, "reserved"},
613   {15, "MTCM Change"},
614   {16, "T4 Expired"},
615   {17, "No Primary SF on US Channel"},
616   {18, "CM Control Init"},
617   {19, "Dynamic Range Window Violation"},
618   {0, NULL},
619 };
620
621 static const value_string docsis_freq_rng_vals[] = {
622   {0, "Standard Upstream Frequency Range"},
623   {1, "Standard and Extended Upstream Frequency Range"},
624   {0, NULL},
625 };
626
627 static const value_string mc_dsid_fwd_vals[] = {
628   {0, "Support for GMAC explicit multicast DCID Forwarding"},
629   {1, "Support for GMAC promiscuous multicast DCID Forwarding"},
630   {0, NULL},
631 };
632
633 static const value_string fctype_fwd_vals[] = {
634   {0, "Isolation Packet PDU Header (FC_Type of 10) is not forwarded"},
635   {1, "Isolation Packet PDU Header (FC_Type of 10) is forwarded"},
636   {0, NULL},
637 };
638
639 /* Code to actually dissect the packets */
640 static void
641 dissect_phs_err (tvbuff_t * tvb, proto_tree * tree, int start,
642                  guint16 len)
643 {
644   guint8 type, length;
645   proto_item *it;
646   proto_tree *err_tree;
647   int pos = start;
648   it =
649     proto_tree_add_text (tree, tvb, start, len,
650                          "5 Service Flow Error Encodings (Length = %u)", len);
651   err_tree = proto_item_add_subtree (it, ett_docsis_tlv_sflow_err);
652
653   while (pos < (start + len))
654     {
655       type = tvb_get_guint8 (tvb, pos++);
656       length = tvb_get_guint8 (tvb, pos++);
657       switch (type)
658         {
659         case PHS_ERR_PARAM:
660           if (length == 1)
661             {
662               proto_tree_add_item (err_tree, hf_docsis_tlv_phs_err_param, tvb,
663                                    pos, length, ENC_BIG_ENDIAN);
664             }
665           else
666             {
667               THROW (ReportedBoundsError);
668             }
669           break;
670         case PHS_ERR_CODE:
671           if (length == 1)
672             {
673               proto_tree_add_item (err_tree, hf_docsis_tlv_phs_err_code, tvb,
674                                    pos, length, ENC_BIG_ENDIAN);
675             }
676           else
677             {
678               THROW (ReportedBoundsError);
679             }
680           break;
681         case PHS_ERR_MSG:
682           proto_tree_add_item (err_tree, hf_docsis_tlv_phs_err_msg, tvb, pos,
683                                length, FALSE);
684           break;
685         }                       /* switch */
686       pos = pos + length;
687
688     }                           /* while */
689 }
690
691 static void
692 dissect_phs (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
693 {
694   guint8 type, length;
695   proto_item *it;
696   proto_tree *phs_tree;
697   int pos = start;
698   it =
699     proto_tree_add_text (tree, tvb, start, len,
700                          "26 PHS Encodings (Length = %u)", len);
701   phs_tree = proto_item_add_subtree (it, ett_docsis_tlv_phs);
702
703   while (pos < (start + len))
704     {
705       type = tvb_get_guint8 (tvb, pos++);
706       length = tvb_get_guint8 (tvb, pos++);
707       switch (type)
708         {
709         case PHS_CLSFR_REF:
710           if (length == 1)
711             {
712               proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_class_ref, tvb,
713                                    pos, length, ENC_BIG_ENDIAN);
714             }
715           else
716             {
717               THROW (ReportedBoundsError);
718             }
719           break;
720         case PHS_CLSFR_ID:
721           if (length == 2)
722             {
723               proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_class_id, tvb,
724                                    pos, length, ENC_BIG_ENDIAN);
725             }
726           else
727             {
728               THROW (ReportedBoundsError);
729             }
730           break;
731         case PHS_SFLOW_REF:
732           if (length == 2)
733             {
734               proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_sflow_ref, tvb,
735                                    pos, length, ENC_BIG_ENDIAN);
736             }
737           else
738             {
739               THROW (ReportedBoundsError);
740             }
741           break;
742         case PHS_SFLOW_ID:
743           if (length == 4)
744             {
745               proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_sflow_id, tvb,
746                                    pos, length, ENC_BIG_ENDIAN);
747             }
748           else
749             {
750               THROW (ReportedBoundsError);
751             }
752           break;
753         case PHS_DSC_ACTION:
754           if (length == 1)
755             {
756               proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_dsc_action,
757                                    tvb, pos, length, ENC_BIG_ENDIAN);
758             }
759           else
760             {
761               THROW (ReportedBoundsError);
762             }
763           break;
764         case PHS_ERRORS:
765           dissect_phs_err (tvb, phs_tree, pos, length);
766         case PHS_FIELD:
767           proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phsf, tvb, pos,
768                                length, ENC_NA);
769           break;
770         case PHS_INDEX:
771           if (length == 1)
772             {
773               proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phsi, tvb, pos,
774                                    length, ENC_BIG_ENDIAN);
775             }
776           else
777             {
778               THROW (ReportedBoundsError);
779             }
780           break;
781         case PHS_MASK:
782           proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phsm, tvb, pos,
783                                length, ENC_NA);
784           break;
785         case PHS_SUP_SIZE:
786           if (length == 1)
787             {
788               proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phss, tvb, pos,
789                                    length, ENC_BIG_ENDIAN);
790             }
791           else
792             {
793               THROW (ReportedBoundsError);
794             }
795           break;
796         case PHS_VERIFICATION:
797           if (length == 1)
798             {
799               proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phsf, tvb, pos,
800                                    length, ENC_NA);
801             }
802           else
803             {
804               THROW (ReportedBoundsError);
805             }
806           break;
807         case PHS_VENDOR_SPEC:
808           proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_vendorspec, tvb,
809                                pos, length, ENC_NA);
810           break;
811         }                       /* switch */
812       pos = pos + length;
813
814     }                           /* while */
815 }
816
817
818 static void
819 dissect_reqxmit_policy (tvbuff_t * tvb, proto_tree * tree, int start)
820 {
821   guint32 value;
822   proto_item *it;
823   proto_tree *pol_tree;
824
825   value = tvb_get_ntohl (tvb, start);
826   it =
827     proto_tree_add_item (tree, hf_docsis_tlv_sflow_reqxmit_pol, tvb, start, 4,
828                          ENC_BIG_ENDIAN);
829   pol_tree = proto_item_add_subtree (it, ett_docsis_tlv_reqxmitpol);
830
831   if (value & 0x01)
832     proto_tree_add_text (pol_tree, tvb, start, 4,
833                          "Service flow MUST NOT use \"all CMs\" broadcast request opportunities");
834   if (value & 0x02)
835     proto_tree_add_text (pol_tree, tvb, start, 4,
836                          "Service flow MUST NOT use priority multicast request opportunities");
837   if (value & 0x04)
838     proto_tree_add_text (pol_tree, tvb, start, 4,
839                          "Service flow MUST NOT use Request/Data opportunities for requests");
840   if (value & 0x08)
841     proto_tree_add_text (pol_tree, tvb, start, 4,
842                          "Service flow MUST NOT use Request/Data opportunities for data");
843   if (value & 0x10)
844     proto_tree_add_text (pol_tree, tvb, start, 4,
845                          "Service flow MUST NOT use piggy back requests with data");
846   if (value & 0x20)
847     proto_tree_add_text (pol_tree, tvb, start, 4,
848                          "Service flow MUST NOT concatenate data");
849   if (value & 0x40)
850     proto_tree_add_text (pol_tree, tvb, start, 4,
851                          "Service flow MUST NOT fragment data");
852   if (value & 0x80)
853     proto_tree_add_text (pol_tree, tvb, start, 4,
854                          "Service flow MUST NOT suppress payload headers");
855   if (value & 0x100)
856     proto_tree_add_text (pol_tree, tvb, start, 4,
857                          "Service flow MUST drop packets that do not fit in the UGS size");
858 }
859
860 static void
861 dissect_sflow_err (tvbuff_t * tvb, proto_tree * tree, int start,
862                    guint16 len)
863 {
864   guint8 type, length;
865   proto_item *it;
866   proto_tree *err_tree;
867   int pos = start;
868   it =
869     proto_tree_add_text (tree, tvb, start, len,
870                          "5 Service Flow Error Encodings (Length = %u)", len);
871   err_tree = proto_item_add_subtree (it, ett_docsis_tlv_sflow_err);
872
873   while (pos < (start + len))
874     {
875       type = tvb_get_guint8 (tvb, pos++);
876       length = tvb_get_guint8 (tvb, pos++);
877       switch (type)
878         {
879         case SFW_ERR_PARAM:
880           if (length == 1)
881             {
882               proto_tree_add_item (err_tree, hf_docsis_tlv_sflow_err_param,
883                                    tvb, pos, length, ENC_BIG_ENDIAN);
884             }
885           else
886             {
887               THROW (ReportedBoundsError);
888             }
889           break;
890         case SFW_ERR_CODE:
891           if (length == 1)
892             {
893               proto_tree_add_item (err_tree, hf_docsis_tlv_sflow_err_code,
894                                    tvb, pos, length, ENC_BIG_ENDIAN);
895             }
896           else
897             {
898               THROW (ReportedBoundsError);
899             }
900           break;
901         case SFW_ERR_MSG:
902           proto_tree_add_item (err_tree, hf_docsis_tlv_sflow_err_msg, tvb,
903                                pos, length, FALSE);
904           break;
905         }                       /* switch */
906       pos = pos + length;
907
908     }                           /* while */
909 }
910
911 static void
912 dissect_downstream_sflow (tvbuff_t * tvb, proto_tree * sflow_tree,
913                           int start, guint16 len)
914 {
915   guint8 type, length;
916   int pos = start;
917   while (pos < (start + len))
918     {
919       type = tvb_get_guint8 (tvb, pos++);
920       length = tvb_get_guint8 (tvb, pos++);
921       switch (type)
922         {
923         case SFW_MAX_DOWN_LAT:
924           if (length == 4)
925             {
926               proto_tree_add_item (sflow_tree,
927                                    hf_docsis_tlv_sflow_max_down_latency, tvb,
928                                    pos, length, ENC_BIG_ENDIAN);
929             }
930           else
931             {
932               THROW (ReportedBoundsError);
933
934             }
935           break;
936         }                       /* switch */
937       pos = pos + length;
938
939     }                           /* while */
940 }
941
942 static void
943 dissect_upstream_sflow (tvbuff_t * tvb, proto_tree * sflow_tree,
944                         int start, guint16 len)
945 {
946   guint8 type, length;
947   int pos = start;
948   while (pos < (start + len))
949     {
950       type = tvb_get_guint8 (tvb, pos++);
951       length = tvb_get_guint8 (tvb, pos++);
952       switch (type)
953         {
954         case SFW_MAX_CONCAT_BURST:
955           if (length == 2)
956             {
957               proto_tree_add_item (sflow_tree,
958                                    hf_docsis_tlv_sflow_max_concat_burst, tvb,
959                                    pos, length, ENC_BIG_ENDIAN);
960             }
961           else
962             {
963               THROW (ReportedBoundsError);
964
965             }
966           break;
967         case SFW_SCHEDULING_TYPE:
968           if (length == 1)
969             {
970               proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_sched_type,
971                                    tvb, pos, length, ENC_BIG_ENDIAN);
972             }
973           else
974             {
975               THROW (ReportedBoundsError);
976             }
977           break;
978         case SFW_REQ_XMIT_POL:
979           dissect_reqxmit_policy (tvb, sflow_tree, pos);
980           break;
981         case SFW_NOM_POLL_INT:
982           if (length == 4)
983             {
984               proto_tree_add_item (sflow_tree,
985                                    hf_docsis_tlv_sflow_nominal_polling, tvb,
986                                    pos, length, ENC_BIG_ENDIAN);
987             }
988           else
989             {
990               THROW (ReportedBoundsError);
991             }
992           break;
993         case SFW_POLL_JTTR_TOL:
994           if (length == 4)
995             {
996               proto_tree_add_item (sflow_tree,
997                                    hf_docsis_tlv_sflow_tolerated_jitter, tvb,
998                                    pos, length, ENC_BIG_ENDIAN);
999             }
1000           else
1001             {
1002               THROW (ReportedBoundsError);
1003             }
1004           break;
1005         case SFW_UG_SIZE:
1006           if (length == 2)
1007             {
1008               proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_ugs_size,
1009                                    tvb, pos, length, ENC_BIG_ENDIAN);
1010             }
1011           else
1012             {
1013               THROW (ReportedBoundsError);
1014             }
1015           break;
1016         case SFW_NOM_GRNT_INTV:
1017           if (length == 4)
1018             {
1019               proto_tree_add_item (sflow_tree,
1020                                    hf_docsis_tlv_sflow_nom_grant_intvl, tvb,
1021                                    pos, length, ENC_BIG_ENDIAN);
1022             }
1023           else
1024             {
1025               THROW (ReportedBoundsError);
1026             }
1027           break;
1028         case SFW_GRNT_JTTR_TOL:
1029           if (length == 4)
1030             {
1031               proto_tree_add_item (sflow_tree,
1032                                    hf_docsis_tlv_sflow_tol_grant_jitter, tvb,
1033                                    pos, length, ENC_BIG_ENDIAN);
1034             }
1035           else
1036             {
1037               THROW (ReportedBoundsError);
1038             }
1039           break;
1040         case SFW_GRNTS_PER_INTV:
1041           if (length == 1)
1042             {
1043               proto_tree_add_item (sflow_tree,
1044                                    hf_docsis_tlv_sflow_grants_per_intvl, tvb,
1045                                    pos, length, ENC_BIG_ENDIAN);
1046             }
1047           else
1048             {
1049               THROW (ReportedBoundsError);
1050             }
1051           break;
1052         case SFW_IP_TOS_OVERWRITE:
1053           if (length == 2)
1054             {
1055               proto_tree_add_item (sflow_tree,
1056                                    hf_docsis_tlv_sflow_ip_tos_overwrite, tvb,
1057                                    pos, length, ENC_BIG_ENDIAN);
1058             }
1059           else
1060             {
1061               THROW (ReportedBoundsError);
1062             }
1063           break;
1064         case SFW_UG_TIME_REF:
1065           if (length == 4)
1066             {
1067               proto_tree_add_item (sflow_tree,
1068                                    hf_docsis_tlv_sflow_ugs_timeref, tvb, pos,
1069                                    length, ENC_BIG_ENDIAN);
1070             }
1071           else
1072             {
1073               THROW (ReportedBoundsError);
1074             }
1075           break;
1076
1077         }                       /* switch */
1078       pos = pos + length;
1079
1080     }                           /* while */
1081 }
1082
1083 static void
1084 dissect_sflow (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len,
1085                guint8 direction)
1086 {
1087   guint8 type, length;
1088   proto_item *it;
1089   proto_tree *sflow_tree;
1090   int pos = start;
1091   if (direction == 24)
1092     it =
1093       proto_tree_add_text (tree, tvb, start, len,
1094                            "24 Upstream Service Flow (Length = %u)", len);
1095   else if (direction == 25)
1096     it =
1097       proto_tree_add_text (tree, tvb, start, len,
1098                            "25 Downstream Service Flow (Length = %u)", len);
1099   else
1100     return;
1101   sflow_tree = proto_item_add_subtree (it, ett_docsis_tlv_clsfr);
1102
1103   while (pos < (start + len))
1104     {
1105       type = tvb_get_guint8 (tvb, pos++);
1106       length = tvb_get_guint8 (tvb, pos++);
1107       switch (type)
1108         {
1109         case SFW_REF:
1110           if (length == 2)
1111             {
1112               proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_ref, tvb,
1113                                    pos, length, ENC_BIG_ENDIAN);
1114             }
1115           else
1116             {
1117               THROW (ReportedBoundsError);
1118             }
1119           break;
1120         case SFW_ID:
1121           if (length == 4)
1122             {
1123               proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_id, tvb,
1124                                    pos, length, ENC_BIG_ENDIAN);
1125             }
1126           else
1127             {
1128               THROW (ReportedBoundsError);
1129             }
1130           break;
1131         case SFW_SID:
1132           if (length == 2)
1133             {
1134               proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_sid, tvb,
1135                                    pos, length, ENC_BIG_ENDIAN);
1136             }
1137           else
1138             {
1139               THROW (ReportedBoundsError);
1140             }
1141           break;
1142         case SFW_SERVICE_CLASS_NAME:
1143           proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_classname, tvb,
1144                                pos, length, FALSE);
1145           break;
1146         case SFW_ERRORS:
1147           dissect_sflow_err (tvb, sflow_tree, pos, length);
1148           break;
1149         case SFW_QOS_SET_TYPE:
1150           if (length == 1)
1151             {
1152               proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_qos_param,
1153                                    tvb, pos, length, ENC_BIG_ENDIAN);
1154             }
1155           else
1156             {
1157               THROW (ReportedBoundsError);
1158             }
1159           break;
1160         case SFW_TRAF_PRI:
1161           if (length == 1)
1162             {
1163               proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_traf_pri,
1164                                    tvb, pos, length, ENC_BIG_ENDIAN);
1165             }
1166           else
1167             {
1168               THROW (ReportedBoundsError);
1169             }
1170           break;
1171         case SFW_MAX_SUSTAINED:
1172           if (length == 4)
1173             {
1174               proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_max_sus,
1175                                    tvb, pos, length, ENC_BIG_ENDIAN);
1176             }
1177           else
1178             {
1179               THROW (ReportedBoundsError);
1180             }
1181           break;
1182         case SFW_MAX_BURST:
1183           if (length == 4)
1184             {
1185               proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_max_burst,
1186                                    tvb, pos, length, ENC_BIG_ENDIAN);
1187             }
1188           else
1189             {
1190               THROW (ReportedBoundsError);
1191             }
1192           break;
1193         case SFW_MIN_RSVD_TRAF:
1194           if (length == 4)
1195             {
1196               proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_min_traf,
1197                                    tvb, pos, length, ENC_BIG_ENDIAN);
1198             }
1199           else
1200             {
1201               THROW (ReportedBoundsError);
1202             }
1203           break;
1204         case SFW_MIN_RSVD_PACKETSIZE:
1205           if (length == 2)
1206             {
1207               proto_tree_add_item (sflow_tree,
1208                                    hf_docsis_tlv_sflow_ass_min_pkt_size, tvb,
1209                                    pos, length, ENC_BIG_ENDIAN);
1210             }
1211           else
1212             {
1213               THROW (ReportedBoundsError);
1214             }
1215           break;
1216         case SFW_ACTIVE_QOS_TIMEOUT:
1217           if (length == 2)
1218             {
1219               proto_tree_add_item (sflow_tree,
1220                                    hf_docsis_tlv_sflow_timeout_active, tvb,
1221                                    pos, length, ENC_BIG_ENDIAN);
1222             }
1223           else
1224             {
1225               THROW (ReportedBoundsError);
1226             }
1227           break;
1228         case SFW_ADMITT_QOS_TIMEOUT:
1229           if (length == 2)
1230             {
1231               proto_tree_add_item (sflow_tree,
1232                                    hf_docsis_tlv_sflow_timeout_admitted, tvb,
1233                                    pos, length, ENC_BIG_ENDIAN);
1234             }
1235           else
1236             {
1237               THROW (ReportedBoundsError);
1238             }
1239           break;
1240         case SFW_VENDOR_SPEC:
1241           proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_vendor_spec,
1242                                tvb, pos, length, ENC_NA);
1243           break;
1244         default:
1245           if (direction == 24)
1246             dissect_upstream_sflow (tvb, sflow_tree, pos - 2, length);
1247           else
1248             dissect_downstream_sflow (tvb, sflow_tree, pos - 2, length);
1249           break;
1250
1251         }                       /* switch (type) */
1252       pos = pos + length;
1253     }                           /* while(pos < start + len) */
1254
1255 }
1256
1257 static void
1258 dissect_dot1q_clsfr (tvbuff_t * tvb, proto_tree * tree, int start,
1259                      guint16 len)
1260 {
1261   guint8 type, length;
1262   proto_item *it;
1263   proto_tree *dot1qclsfr_tree;
1264   int pos = start;
1265   it =
1266     proto_tree_add_text (tree, tvb, start, len,
1267                          "11 801.1P/Q Classifiers (Length = %u)", len);
1268   dot1qclsfr_tree = proto_item_add_subtree (it, ett_docsis_tlv_cos);
1269
1270   while (pos < (start + len))
1271     {
1272       type = tvb_get_guint8 (tvb, pos++);
1273       length = tvb_get_guint8 (tvb, pos++);
1274       switch (type)
1275         {
1276         case CFR_D1Q_USER_PRI:
1277           if (length == 2)
1278             {
1279               proto_tree_add_item (dot1qclsfr_tree,
1280                                    hf_docsis_tlv_dot1qclsfr_user_pri, tvb,
1281                                    pos, length, ENC_BIG_ENDIAN);
1282             }
1283           else
1284             {
1285               THROW (ReportedBoundsError);
1286             }
1287           break;
1288         case CFR_D1Q_VLAN_ID:
1289           if (length == 2)
1290             {
1291               proto_tree_add_item (dot1qclsfr_tree,
1292                                    hf_docsis_tlv_dot1qclsfr_vlanid, tvb, pos,
1293                                    length, ENC_BIG_ENDIAN);
1294             }
1295           else
1296             {
1297               THROW (ReportedBoundsError);
1298             }
1299           break;
1300         case CFR_D1Q_VENDOR_SPEC:
1301           proto_tree_add_item (dot1qclsfr_tree,
1302                                hf_docsis_tlv_dot1qclsfr_vendorspec, tvb, pos,
1303                                length, ENC_NA);
1304           break;
1305         }                       /* switch */
1306       pos = pos + length;
1307
1308     }                           /* while */
1309 }
1310
1311 static void
1312 dissect_eth_clsfr (tvbuff_t * tvb, proto_tree * tree, int start,
1313                    guint16 len)
1314 {
1315   guint8 type, length;
1316   proto_item *it;
1317   proto_tree *ethclsfr_tree;
1318   int pos = start;
1319   it =
1320     proto_tree_add_text (tree, tvb, start, len,
1321                          "10 Ethernet Classifiers (Length = %u)", len);
1322   ethclsfr_tree = proto_item_add_subtree (it, ett_docsis_tlv_clsfr_eth);
1323
1324   while (pos < (start + len))
1325     {
1326       type = tvb_get_guint8 (tvb, pos++);
1327       length = tvb_get_guint8 (tvb, pos++);
1328       switch (type)
1329         {
1330         case CFR_ETH_DST_MAC:
1331           if (length == 6)
1332             {
1333               proto_tree_add_item (ethclsfr_tree, hf_docsis_tlv_ethclsfr_dmac,
1334                                    tvb, pos, length, FALSE);
1335             }
1336           else
1337             {
1338               THROW (ReportedBoundsError);
1339             }
1340           break;
1341         case CFR_ETH_SRC_MAC:
1342           if (length == 6)
1343             {
1344               proto_tree_add_item (ethclsfr_tree, hf_docsis_tlv_ethclsfr_smac,
1345                                    tvb, pos, length, FALSE);
1346             }
1347           else
1348             {
1349               THROW (ReportedBoundsError);
1350             }
1351           break;
1352         case CFR_ETH_DSAP:
1353           if (length == 3)
1354             {
1355               proto_tree_add_item (ethclsfr_tree,
1356                                    hf_docsis_tlv_ethclsfr_ethertype, tvb, pos,
1357                                    length, ENC_BIG_ENDIAN);
1358             }
1359           else
1360             {
1361               THROW (ReportedBoundsError);
1362             }
1363           break;
1364         }                       /* switch */
1365       pos = pos + length;
1366
1367     }                           /* while */
1368
1369
1370
1371 }
1372
1373 static void
1374 dissect_clsfr_err (tvbuff_t * tvb, proto_tree * tree, int start,
1375                    guint16 len)
1376 {
1377   guint8 type, length;
1378   proto_item *it;
1379   proto_tree *err_tree;
1380   int pos = start;
1381   it =
1382     proto_tree_add_text (tree, tvb, start, len,
1383                          "8 Classifier Error Encodings (Length = %u)", len);
1384   err_tree = proto_item_add_subtree (it, ett_docsis_tlv_clsfr_err);
1385
1386   while (pos < (start + len))
1387     {
1388       type = tvb_get_guint8 (tvb, pos++);
1389       length = tvb_get_guint8 (tvb, pos++);
1390       switch (type)
1391         {
1392         case CFR_ERR_PARAM:
1393           if (length == 1)
1394             proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_param, tvb,
1395                                  pos, length, ENC_BIG_ENDIAN);
1396           else if (length == 2)
1397             {
1398               proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_param,
1399                                    tvb, pos, 1, ENC_BIG_ENDIAN);
1400               proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_param,
1401                                    tvb, pos + 1, 1, ENC_BIG_ENDIAN);
1402             }
1403           else
1404             {
1405               THROW (ReportedBoundsError);
1406             }
1407           break;
1408         case CFR_ERR_CODE:
1409           if (length == 1)
1410             {
1411               proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_code,
1412                                    tvb, pos, length, ENC_BIG_ENDIAN);
1413             }
1414           else
1415             {
1416               THROW (ReportedBoundsError);
1417             }
1418           break;
1419         case CFR_ERR_MSG:
1420           proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_msg, tvb,
1421                                pos, length, FALSE);
1422           break;
1423         }                       /* switch */
1424       pos = pos + length;
1425
1426     }                           /* while */
1427
1428
1429
1430 }
1431
1432 static void
1433 dissect_ip_classifier (tvbuff_t * tvb, proto_tree * tree, int start,
1434                        guint16 len)
1435 {
1436   guint8 type, length;
1437   proto_item *it;
1438   proto_tree *ipclsfr_tree;
1439   int pos = start;
1440   it =
1441     proto_tree_add_text (tree, tvb, start, len,
1442                          "9 IP Classifier (Length = %u)", len);
1443   ipclsfr_tree = proto_item_add_subtree (it, ett_docsis_tlv_clsfr_ip);
1444
1445   while (pos < (start + len))
1446     {
1447       type = tvb_get_guint8 (tvb, pos++);
1448       length = tvb_get_guint8 (tvb, pos++);
1449       switch (type)
1450         {
1451         case CFR_IP_TOS_RANGE_MASK:
1452           if (length == 3)
1453             {
1454               proto_tree_add_item (ipclsfr_tree,
1455                                    hf_docsis_tlv_ipclsfr_tosmask, tvb, pos,
1456                                    length, ENC_NA);
1457             }
1458           else
1459             {
1460               THROW (ReportedBoundsError);
1461             }
1462           break;
1463         case CFR_IP_PROTO:
1464           if (length == 2)
1465             {
1466               proto_tree_add_item (ipclsfr_tree,
1467                                    hf_docsis_tlv_ipclsfr_ipproto, tvb, pos,
1468                                    length, ENC_BIG_ENDIAN);
1469             }
1470           else
1471             {
1472               THROW (ReportedBoundsError);
1473             }
1474           break;
1475         case CFR_IP_SOURCE_ADDR:
1476           if (length == 4)
1477             {
1478               proto_tree_add_item (ipclsfr_tree, hf_docsis_tlv_ipclsfr_src,
1479                                    tvb, pos, length, ENC_BIG_ENDIAN);
1480             }
1481           else
1482             {
1483               THROW (ReportedBoundsError);
1484             }
1485           break;
1486         case CFR_IP_SOURCE_MASK:
1487           if (length == 4)
1488             {
1489               proto_tree_add_item (ipclsfr_tree,
1490                                    hf_docsis_tlv_ipclsfr_srcmask, tvb, pos,
1491                                    length, ENC_BIG_ENDIAN);
1492             }
1493           else
1494             {
1495               THROW (ReportedBoundsError);
1496             }
1497           break;
1498         case CFR_IP_DEST_ADDR:
1499           if (length == 4)
1500             {
1501               proto_tree_add_item (ipclsfr_tree, hf_docsis_tlv_ipclsfr_dst,
1502                                    tvb, pos, length, ENC_BIG_ENDIAN);
1503             }
1504           else
1505             {
1506               THROW (ReportedBoundsError);
1507             }
1508           break;
1509         case CFR_IP_DEST_MASK:
1510           if (length == 4)
1511             {
1512               proto_tree_add_item (ipclsfr_tree,
1513                                    hf_docsis_tlv_ipclsfr_dstmask, tvb, pos,
1514                                    length, ENC_BIG_ENDIAN);
1515             }
1516           else
1517             {
1518               THROW (ReportedBoundsError);
1519             }
1520           break;
1521         case CFR_IP_SRCPORT_START:
1522           if (length == 2)
1523             {
1524               proto_tree_add_item (ipclsfr_tree,
1525                                    hf_docsis_tlv_ipclsfr_sport_start, tvb,
1526                                    pos, length, ENC_BIG_ENDIAN);
1527             }
1528           else
1529             {
1530               THROW (ReportedBoundsError);
1531             }
1532           break;
1533         case CFR_IP_SRCPORT_END:
1534           if (length == 2)
1535             {
1536               proto_tree_add_item (ipclsfr_tree,
1537                                    hf_docsis_tlv_ipclsfr_sport_end, tvb, pos,
1538                                    length, ENC_BIG_ENDIAN);
1539             }
1540           else
1541             {
1542               THROW (ReportedBoundsError);
1543             }
1544           break;
1545         case CFR_IP_DSTPORT_START:
1546           if (length == 2)
1547             {
1548               proto_tree_add_item (ipclsfr_tree,
1549                                    hf_docsis_tlv_ipclsfr_dport_start, tvb,
1550                                    pos, length, ENC_BIG_ENDIAN);
1551             }
1552           else
1553             {
1554               THROW (ReportedBoundsError);
1555             }
1556           break;
1557         case CFR_IP_DSTPORT_END:
1558           if (length == 2)
1559             {
1560               proto_tree_add_item (ipclsfr_tree,
1561                                    hf_docsis_tlv_ipclsfr_dport_end, tvb, pos,
1562                                    length, ENC_BIG_ENDIAN);
1563             }
1564           else
1565             {
1566               THROW (ReportedBoundsError);
1567             }
1568           break;
1569         }                       /* switch */
1570       pos = pos + length;
1571
1572     }                           /* while */
1573
1574 }
1575 static void
1576 dissect_classifiers (tvbuff_t * tvb, proto_tree * tree, int start,
1577                      guint16 len, guint8 direction)
1578 {
1579   guint8 type, length;
1580   proto_item *it;
1581   proto_tree *clsfr_tree;
1582   int pos = start;
1583   if (direction == 22)
1584     it =
1585       proto_tree_add_text (tree, tvb, start, len,
1586                            "22 Upstream Packet Classifier (Length = %u)",
1587                            len);
1588   else if (direction == 23)
1589     it =
1590       proto_tree_add_text (tree, tvb, start, len,
1591                            "23 Downstream Packet Classifier (Length = %u)",
1592                            len);
1593   else
1594     return;
1595   clsfr_tree = proto_item_add_subtree (it, ett_docsis_tlv_clsfr);
1596
1597   while (pos < (start + len))
1598     {
1599       type = tvb_get_guint8 (tvb, pos++);
1600       length = tvb_get_guint8 (tvb, pos++);
1601       switch (type)
1602         {
1603         case CFR_REF:
1604           if (length == 1)
1605             {
1606               proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_ref, tvb,
1607                                    pos, length, ENC_BIG_ENDIAN);
1608             }
1609           else
1610             {
1611               THROW (ReportedBoundsError);
1612             }
1613           break;
1614         case CFR_ID:
1615           if (length == 2)
1616             {
1617               proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_id, tvb,
1618                                    pos, length, ENC_BIG_ENDIAN);
1619             }
1620           else
1621             {
1622               THROW (ReportedBoundsError);
1623             }
1624           break;
1625         case CFR_SFLOW_REF:
1626           if (length == 2)
1627             {
1628               proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_sflow_ref,
1629                                    tvb, pos, length, ENC_BIG_ENDIAN);
1630             }
1631           else
1632             {
1633               THROW (ReportedBoundsError);
1634             }
1635           break;
1636         case CFR_SFLOW_ID:
1637           if (length == 4)
1638             {
1639               proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_sflow_id,
1640                                    tvb, pos, length, ENC_BIG_ENDIAN);
1641             }
1642           else
1643             {
1644               THROW (ReportedBoundsError);
1645             }
1646           break;
1647         case CFR_RULE_PRI:
1648           if (length == 1)
1649             {
1650               proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_rule_pri,
1651                                    tvb, pos, length, ENC_BIG_ENDIAN);
1652             }
1653           else
1654             {
1655               THROW (ReportedBoundsError);
1656             }
1657           break;
1658         case CFR_ACT_STATE:
1659           if (length == 1)
1660             {
1661               proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_act_state,
1662                                    tvb, pos, length, ENC_BIG_ENDIAN);
1663             }
1664           else
1665             {
1666               THROW (ReportedBoundsError);
1667             }
1668           break;
1669         case CFR_DSA_ACTION:
1670           if (length == 1)
1671             {
1672               proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_dsc_act,
1673                                    tvb, pos, length, ENC_BIG_ENDIAN);
1674             }
1675           else
1676             {
1677               THROW (ReportedBoundsError);
1678             }
1679           break;
1680         case CFR_ERROR:
1681           dissect_clsfr_err (tvb, clsfr_tree, pos, length);
1682           break;
1683         case CFR_IP_CLASSIFIER:
1684           dissect_ip_classifier (tvb, clsfr_tree, pos, length);
1685           break;
1686         case CFR_ETH_CLASSIFIER:
1687           dissect_eth_clsfr (tvb, clsfr_tree, pos, length);
1688           break;
1689         case CFR_8021Q_CLASSIFIER:
1690           dissect_dot1q_clsfr (tvb, clsfr_tree, pos, length);
1691           break;
1692         case CFR_VENDOR_SPEC:
1693           proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_vendor_spc,
1694                                tvb, pos, length, ENC_NA);
1695           break;
1696         }                       /* switch */
1697       pos = pos + length;
1698
1699     }                           /* while */
1700
1701
1702
1703 }
1704
1705 static void
1706 dissect_doc10cos (tvbuff_t * tvb, proto_tree * tree, int start,
1707                   guint16 len)
1708 {
1709   guint8 type, length;
1710   proto_item *it;
1711   proto_tree *doc10cos_tree;
1712   int pos = start;
1713   it =
1714     proto_tree_add_text (tree, tvb, start, len,
1715                          "1 Docsis 1.0 Class of Service (Length = %u)", len);
1716   doc10cos_tree = proto_item_add_subtree (it, ett_docsis_tlv_cos);
1717
1718   while (pos < (start + len))
1719     {
1720       type = tvb_get_guint8 (tvb, pos++);
1721       length = tvb_get_guint8 (tvb, pos++);
1722       switch (type)
1723         {
1724         case 1:
1725           if (length == 1)
1726             {
1727               proto_tree_add_item (doc10cos_tree, hf_docsis_tlv_cos_id, tvb,
1728                                    pos, length, ENC_BIG_ENDIAN);
1729             }
1730           else
1731             {
1732               THROW (ReportedBoundsError);
1733             }
1734           break;
1735         case 2:
1736           if (length == 2)
1737             {
1738               proto_tree_add_item (doc10cos_tree, hf_docsis_tlv_cos_sid, tvb,
1739                                    pos, length, ENC_BIG_ENDIAN);
1740             }
1741           else
1742             {
1743               THROW (ReportedBoundsError);
1744             }
1745           break;
1746         }                       /* switch */
1747       pos = pos + length;
1748
1749     }                           /* while */
1750 }
1751
1752 static void
1753 dissect_modemcap (tvbuff_t * tvb, proto_tree * tree, int start,
1754                   guint16 len)
1755 {
1756   guint8 type, length;
1757   proto_item *it;
1758   proto_tree *mcap_tree;
1759   int pos = start;
1760
1761   it =
1762     proto_tree_add_text (tree, tvb, start, len,
1763                          "5 Modem Capabilities Type (Length = %u)", len);
1764
1765   mcap_tree = proto_item_add_subtree (it, ett_docsis_tlv_mcap);
1766   while (pos < (start + len))
1767     {
1768       type = tvb_get_guint8 (tvb, pos++);
1769       length = tvb_get_guint8 (tvb, pos++);
1770       switch (type)
1771         {
1772         case CAP_CONCAT:
1773           if (length == 1)
1774             {
1775               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_concat, tvb,
1776                                    pos, length, ENC_BIG_ENDIAN);
1777             }
1778           else
1779             {
1780               THROW (ReportedBoundsError);
1781             }
1782           break;
1783         case CAP_DOCSIS_VER:
1784           if (length == 1)
1785             {
1786               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_docs_ver,
1787                                    tvb, pos, length, ENC_BIG_ENDIAN);
1788             }
1789           else
1790             {
1791               THROW (ReportedBoundsError);
1792             }
1793           break;
1794         case CAP_FRAG:
1795           if (length == 1)
1796             {
1797               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_frag, tvb,
1798                                    pos, length, ENC_BIG_ENDIAN);
1799             }
1800           else
1801             {
1802               THROW (ReportedBoundsError);
1803             }
1804           break;
1805         case CAP_PHS:
1806           if (length == 1)
1807             {
1808               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_phs, tvb,
1809                                    pos, length, ENC_BIG_ENDIAN);
1810             }
1811           else
1812             {
1813               THROW (ReportedBoundsError);
1814             }
1815           break;
1816         case CAP_IGMP:
1817           if (length == 1)
1818             {
1819               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_igmp, tvb,
1820                                    pos, length, ENC_BIG_ENDIAN);
1821             }
1822           else
1823             {
1824               THROW (ReportedBoundsError);
1825             }
1826           break;
1827         case CAP_PRIVACY:
1828           if (length == 1)
1829             {
1830               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_privacy, tvb,
1831                                    pos, length, ENC_BIG_ENDIAN);
1832             }
1833           else
1834             {
1835               THROW (ReportedBoundsError);
1836             }
1837           break;
1838         case CAP_DOWN_SAID:
1839           if (length == 1)
1840             {
1841               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_down_said,
1842                                    tvb, pos, length, FALSE);
1843             }
1844           else
1845             {
1846               THROW (ReportedBoundsError);
1847             }
1848           break;
1849         case CAP_UP_SID:
1850           if (length == 1)
1851             {
1852               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_up_sid, tvb,
1853                                    pos, length, FALSE);
1854             }
1855           else
1856             {
1857               THROW (ReportedBoundsError);
1858             }
1859           break;
1860         case CAP_OPT_FILT:
1861           if (length == 1)
1862             {
1863               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_8021P_filter,
1864                                    tvb, pos, length, ENC_BIG_ENDIAN);
1865               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_8021Q_filter,
1866                                    tvb, pos, length, ENC_BIG_ENDIAN);
1867             }
1868           else
1869             {
1870               THROW (ReportedBoundsError);
1871             }
1872           break;
1873         case CAP_XMIT_EQPERSYM:
1874           if (length == 1)
1875             {
1876               proto_tree_add_item (mcap_tree,
1877                                    hf_docsis_tlv_mcap_xmit_eq_taps_per_sym,
1878                                    tvb, pos, length, ENC_BIG_ENDIAN);
1879             }
1880           else
1881             {
1882               THROW (ReportedBoundsError);
1883             }
1884           break;
1885         case CAP_NUM_XMIT_EQ_TAPS:
1886           if (length == 1)
1887             {
1888               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_xmit_eq_taps,
1889                                    tvb, pos, length, FALSE);
1890             }
1891           else
1892             {
1893               THROW (ReportedBoundsError);
1894             }
1895           break;
1896         case CAP_DCC:
1897           if (length == 1)
1898             {
1899               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_dcc, tvb,
1900                                    pos, length, ENC_BIG_ENDIAN);
1901             }
1902           else
1903             {
1904               THROW (ReportedBoundsError);
1905             }
1906           break;
1907         case CAP_IP_FILTERS:
1908           if (length == 2)
1909             {
1910               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_ip_filters, tvb,
1911                                    pos, length, ENC_BIG_ENDIAN);
1912             }
1913           else
1914             {
1915               THROW (ReportedBoundsError);
1916             }
1917           break;
1918         case CAP_LLC_FILTERS:
1919           if (length == 2)
1920             {
1921               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_llc_filters, tvb,
1922                                    pos, length, ENC_BIG_ENDIAN);
1923             }
1924           else
1925             {
1926               THROW (ReportedBoundsError);
1927             }
1928           break;
1929         case CAP_EXP_UNICAST_SID:
1930           if (length == 1)
1931             {
1932               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_exp_unicast_sid, tvb,
1933                                    pos, length, ENC_BIG_ENDIAN);
1934             }
1935           else
1936             {
1937               THROW (ReportedBoundsError);
1938             }
1939           break;
1940         case CAP_RNG_HOFF:
1941           if (length == 4)
1942             {
1943               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_rnghoff_cm, tvb,
1944                                    pos, length, ENC_BIG_ENDIAN);
1945               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_rnghoff_erouter, tvb,
1946                                    pos, length, ENC_BIG_ENDIAN);
1947               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_rnghoff_emta, tvb,
1948                                    pos, length, ENC_BIG_ENDIAN);
1949               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_rnghoff_estb, tvb,
1950                                    pos, length, ENC_BIG_ENDIAN);
1951             }
1952           else
1953             {
1954               THROW (ReportedBoundsError);
1955             }
1956           break;
1957         case CAP_L2VPN:
1958           proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_l2vpn, tvb,
1959                                 pos, length, ENC_NA);
1960           break;
1961         case CAP_L2VPN_ESAFE:
1962           proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_l2vpn_esafe, tvb,
1963                                 pos, length, ENC_NA);
1964           break;
1965         case CAP_DUT_FILTERING:
1966           proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_dut_filtering, tvb,
1967                                 pos, length, ENC_NA);
1968           break;
1969         case CAP_US_FREQ_RNG:
1970           if (length == 1)
1971             {
1972               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_freq_range, tvb,
1973                                    pos, length, ENC_BIG_ENDIAN);
1974             }
1975           else
1976             {
1977               THROW (ReportedBoundsError);
1978             }
1979           break;
1980         case CAP_US_SRATE:
1981           if (length == 1)
1982             {
1983               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_160, tvb,
1984                                    pos, length, ENC_BIG_ENDIAN);
1985               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_320, tvb,
1986                                    pos, length, ENC_BIG_ENDIAN);
1987               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_640, tvb,
1988                                    pos, length, ENC_BIG_ENDIAN);
1989               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_1280, tvb,
1990                                    pos, length, ENC_BIG_ENDIAN);
1991               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_2560, tvb,
1992                                    pos, length, ENC_BIG_ENDIAN);
1993               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_5120, tvb,
1994                                    pos, length, ENC_BIG_ENDIAN);
1995             }
1996           else
1997             {
1998               THROW (ReportedBoundsError);
1999             }
2000           break;
2001         case CAP_SAC:
2002           if (length == 1)
2003             {
2004               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_sac, tvb,
2005                                    pos, length, ENC_BIG_ENDIAN);
2006             }
2007           else
2008             {
2009               THROW (ReportedBoundsError);
2010             }
2011           break;
2012         case CAP_CODE_HOP_M2:
2013           if (length == 1)
2014             {
2015               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_code_hop_mode2, tvb,
2016                                    pos, length, ENC_BIG_ENDIAN);
2017             }
2018           else
2019             {
2020               THROW (ReportedBoundsError);
2021             }
2022           break;
2023         case CAP_MTC:
2024           if (length == 1)
2025             {
2026               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_mtc, tvb,
2027                                    pos, length, ENC_BIG_ENDIAN);
2028             }
2029           else
2030             {
2031               THROW (ReportedBoundsError);
2032             }
2033           break;
2034         case CAP_512_MSPS_UTC:
2035           if (length == 1)
2036             {
2037               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_512_msps_utc, tvb,
2038                                    pos, length, ENC_BIG_ENDIAN);
2039             }
2040           else
2041             {
2042               THROW (ReportedBoundsError);
2043             }
2044           break;
2045         case CAP_256_MSPS_UTC:
2046           if (length == 1)
2047             {
2048               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_256_msps_utc, tvb,
2049                                    pos, length, ENC_BIG_ENDIAN);
2050             }
2051           else
2052             {
2053               THROW (ReportedBoundsError);
2054             }
2055           break;
2056         case CAP_TOTAL_SID_CLUST:
2057           if (length == 1)
2058             {
2059               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_total_sid_cluster, tvb,
2060                                    pos, length, ENC_BIG_ENDIAN);
2061             }
2062           else
2063             {
2064               THROW (ReportedBoundsError);
2065             }
2066           break;
2067         case CAP_SID_PER_SF:
2068           if (length == 1)
2069             {
2070               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_sid_per_sf, tvb,
2071                                    pos, length, ENC_BIG_ENDIAN);
2072             }
2073           else
2074             {
2075               THROW (ReportedBoundsError);
2076             }
2077           break;
2078         case CAP_MRC:
2079           if (length == 1)
2080             {
2081               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_mrc, tvb,
2082                                    pos, length, ENC_BIG_ENDIAN);
2083             }
2084           else
2085             {
2086               THROW (ReportedBoundsError);
2087             }
2088           break;
2089         case CAP_TOTAL_DSID:
2090           if (length == 1)
2091             {
2092               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_total_dsid, tvb,
2093                                    pos, length, ENC_BIG_ENDIAN);
2094             }
2095           else
2096             {
2097               THROW (ReportedBoundsError);
2098             }
2099           break;
2100         case CAP_RESEQ_DSID:
2101           if (length == 1)
2102             {
2103               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_reseq_dsid, tvb,
2104                                    pos, length, ENC_BIG_ENDIAN);
2105             }
2106           else
2107             {
2108               THROW (ReportedBoundsError);
2109             }
2110           break;
2111         case CAP_MC_DSID:
2112           if (length == 1)
2113             {
2114               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_mc_dsid, tvb,
2115                                    pos, length, ENC_BIG_ENDIAN);
2116             }
2117           else
2118             {
2119               THROW (ReportedBoundsError);
2120             }
2121           break;
2122         case CAP_MC_DSID_FWD:
2123           if (length == 1)
2124             {
2125               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_mc_dsid_fwd, tvb,
2126                                    pos, length, ENC_BIG_ENDIAN);
2127             }
2128           else
2129             {
2130               THROW (ReportedBoundsError);
2131             }
2132           break;
2133         case CAP_FCTYPE_FWD:
2134           if (length == 1)
2135             {
2136               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_fctype_fwd, tvb,
2137                                    pos, length, ENC_BIG_ENDIAN);
2138             }
2139           else
2140             {
2141               THROW (ReportedBoundsError);
2142             }
2143           break;
2144         case CAP_DPV:
2145           if (length == 1)
2146             {
2147               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_dpv_path, tvb,
2148                                    pos, length, ENC_BIG_ENDIAN);
2149               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_dpv_packet, tvb,
2150                                    pos, length, ENC_BIG_ENDIAN);
2151             }
2152           else
2153             {
2154               THROW (ReportedBoundsError);
2155             }
2156           break;
2157         case CAP_UGS:
2158           if (length == 1)
2159             {
2160               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_ugs, tvb,
2161                                    pos, length, ENC_BIG_ENDIAN);
2162             }
2163           else
2164             {
2165               THROW (ReportedBoundsError);
2166             }
2167           break;
2168         case CAP_MAP_UCD:
2169           if (length == 1)
2170             {
2171               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_map_ucd, tvb,
2172                                    pos, length, ENC_BIG_ENDIAN);
2173             }
2174           else
2175             {
2176               THROW (ReportedBoundsError);
2177             }
2178           break;
2179         case CAP_UDC:
2180           if (length == 2)
2181             {
2182               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_udc, tvb,
2183                                    pos, length, ENC_BIG_ENDIAN);
2184             }
2185           else
2186             {
2187               THROW (ReportedBoundsError);
2188             }
2189           break;
2190         case CAP_IPV6:
2191           if (length == 1)
2192             {
2193               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_ipv6, tvb,
2194                                    pos, length, ENC_BIG_ENDIAN);
2195             }
2196           else
2197             {
2198               THROW (ReportedBoundsError);
2199             }
2200           break;
2201         case CAP_EXT_US_TRNS_PWR:
2202           if (length == 1)
2203             {
2204               proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_ext_us_trans_power, tvb,
2205                                    pos, length, ENC_BIG_ENDIAN);
2206             }
2207           else
2208             {
2209               THROW (ReportedBoundsError);
2210             }
2211           break;
2212         }                       /* switch (type) */
2213       pos = pos + length;
2214     }                           /* while (pos < pos+len) */
2215
2216 }
2217
2218 static void
2219 dissect_cos (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
2220 {
2221   guint8 type, length;
2222   proto_item *it;
2223   proto_tree *cos_tree;
2224   int pos = start;
2225
2226   it =
2227     proto_tree_add_text (tree, tvb, start, len,
2228                          "4 Class of Service Type (Length = %u)", len);
2229   cos_tree = proto_item_add_subtree (it, ett_docsis_tlv_cos);
2230
2231   while (pos < (start + len))
2232     {
2233       type = tvb_get_guint8 (tvb, pos++);
2234       length = tvb_get_guint8 (tvb, pos++);
2235       switch (type)
2236         {
2237         case COS_CLASSID:
2238           if (length == 1)
2239             {
2240               proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_id, tvb, pos,
2241                                    length, ENC_BIG_ENDIAN);
2242             }
2243           else
2244             {
2245               THROW (ReportedBoundsError);
2246             }
2247           break;
2248         case COS_MAX_DOWN:
2249           if (length == 4)
2250             {
2251               proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_max_down, tvb,
2252                                    pos, length, ENC_BIG_ENDIAN);
2253             }
2254           else
2255             {
2256               THROW (ReportedBoundsError);
2257             }
2258           break;
2259         case COS_MAX_UP:
2260           if (length == 4)
2261             {
2262               proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_max_up, tvb,
2263                                    pos, length, ENC_BIG_ENDIAN);
2264             }
2265           else
2266             {
2267               THROW (ReportedBoundsError);
2268             }
2269           break;
2270         case COS_UP_CH_PRIO:
2271           if (length == 1)
2272             {
2273               proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_up_chnl_pri,
2274                                    tvb, pos, length, ENC_BIG_ENDIAN);
2275             }
2276           else
2277             {
2278               THROW (ReportedBoundsError);
2279             }
2280           break;
2281         case COS_MIN_UP_RATE:
2282           if (length == 4)
2283             {
2284               proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_min_grntd_up,
2285                                    tvb, pos, length, ENC_BIG_ENDIAN);
2286             }
2287           else
2288             {
2289               THROW (ReportedBoundsError);
2290             }
2291           break;
2292         case COS_MAX_UP_BURST:
2293           if (length == 2)
2294             {
2295               proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_max_up_burst,
2296                                    tvb, pos, length, ENC_BIG_ENDIAN);
2297             }
2298           else
2299             {
2300               THROW (ReportedBoundsError);
2301             }
2302           break;
2303         case COS_BP_ENABLE:
2304           if (length == 1)
2305             {
2306               proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_privacy_enable,
2307                                    tvb, pos, length, ENC_BIG_ENDIAN);
2308             }
2309           else
2310             {
2311               THROW (ReportedBoundsError);
2312
2313             }
2314           break;
2315         }                       /* switch (type) */
2316       pos = pos + length;
2317     }                           /* while (pos < pos+len) */
2318
2319 }
2320
2321 static void
2322 dissect_svc_unavail(tvbuff_t * tvb, proto_tree * tree, int pos, guint16 length) {
2323
2324   proto_item *svc_unavail_it;
2325   proto_tree *svc_unavail_tree;
2326   svc_unavail_it = proto_tree_add_item (tree,
2327                                         hf_docsis_tlv_svc_unavail,
2328                                         tvb, pos, length, ENC_NA);
2329   svc_unavail_tree = proto_item_add_subtree(svc_unavail_it, ett_docsis_tlv_svc_unavail );
2330   proto_tree_add_item (svc_unavail_tree,
2331                        hf_docsis_tlv_svc_unavail_classid, tvb,
2332                        pos, 1, ENC_BIG_ENDIAN);
2333   proto_tree_add_item (svc_unavail_tree,
2334                        hf_docsis_tlv_svc_unavail_type, tvb,
2335                        pos+1, 1, ENC_BIG_ENDIAN);
2336   proto_tree_add_item (svc_unavail_tree,
2337                        hf_docsis_tlv_svc_unavail_code, tvb,
2338                        pos+2, 1, ENC_BIG_ENDIAN);
2339
2340 }
2341
2342 static void
2343 dissect_snmpv3_kickstart(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len) {
2344   proto_item *snmpv3_it;
2345   proto_tree *snmpv3_tree;
2346   guint8 type, length;
2347   int pos = start;
2348
2349   snmpv3_it = proto_tree_add_item (tree,
2350                                    hf_docsis_tlv_snmpv3_kick,
2351                                    tvb, start, len, ENC_NA);
2352   snmpv3_tree = proto_item_add_subtree(snmpv3_it, ett_docsis_tlv_snmpv3_kick);
2353
2354   while (pos < (start + len))
2355     {
2356       type = tvb_get_guint8 (tvb, pos++);
2357       length = tvb_get_guint8 (tvb, pos++);
2358       switch (type)
2359         {
2360         case SNMPV3_SEC_NAME:
2361           proto_tree_add_item (snmpv3_tree,
2362                                hf_docsis_tlv_snmpv3_kick_name, tvb,
2363                                pos, length, FALSE);
2364           break;
2365         case SNMPV3_MGR_PUB_NUM:
2366           proto_tree_add_item (snmpv3_tree,
2367                                hf_docsis_tlv_snmpv3_kick_publicnum, tvb,
2368                                pos, length, ENC_NA);
2369           break;
2370         }  /* switch */
2371       pos += length;
2372     }   /* while */
2373 }
2374
2375 static void
2376 dissect_ds_ch_list_single (tvbuff_t * tvb, proto_tree * tree,
2377                            int start, guint16 len)
2378 {
2379   guint8 type, length;
2380   proto_item *it;
2381   proto_tree *single_tree;
2382   int pos = start;
2383   it =
2384     proto_tree_add_text (tree, tvb, start, len,
2385                          "1 Single Downstream Channel (Length = %u)", len);
2386   single_tree = proto_item_add_subtree (it, ett_docsis_tlv_ds_ch_list_single);
2387
2388   while (pos < (start + len))
2389     {
2390       type = tvb_get_guint8 (tvb, pos++);
2391       length = tvb_get_guint8 (tvb, pos++);
2392       switch (type)
2393         {
2394         case SINGLE_CH_TIMEOUT:
2395           if (length == 2)
2396             {
2397               proto_tree_add_item (single_tree, hf_docsis_tlv_single_ch_timeout, tvb,
2398                                    pos, length, ENC_BIG_ENDIAN);
2399             }
2400           else
2401             {
2402               THROW (ReportedBoundsError);
2403             }
2404           break;
2405         case SINGLE_CH_FREQ:
2406           if (length == 4)
2407             {
2408               proto_tree_add_item (single_tree, hf_docsis_tlv_single_ch_freq, tvb,
2409                                    pos, length, ENC_BIG_ENDIAN);
2410             }
2411           else
2412             {
2413               THROW (ReportedBoundsError);
2414             }
2415           break;
2416         }  /* switch */
2417       pos = pos + length;
2418     }                           /* while */
2419 }
2420
2421 static void
2422 dissect_ds_ch_list_range (tvbuff_t * tvb, proto_tree * tree,
2423                           int start, guint16 len)
2424 {
2425   guint8 type, length;
2426   proto_item *it;
2427   proto_tree *range_tree;
2428   int pos = start;
2429   it =
2430     proto_tree_add_text (tree, tvb, start, len,
2431                          "2 Downstream Frequency Range (Length = %u)", len);
2432   range_tree = proto_item_add_subtree (it, ett_docsis_tlv_ds_ch_list_range);
2433
2434   while (pos < (start + len))
2435     {
2436       type = tvb_get_guint8 (tvb, pos++);
2437       length = tvb_get_guint8 (tvb, pos++);
2438       switch (type)
2439         {
2440         case FREQ_RNG_TIMEOUT:
2441           if (length == 2)
2442             {
2443               proto_tree_add_item (range_tree, hf_docsis_tlv_freq_rng_timeout, tvb,
2444                                    pos, length, ENC_BIG_ENDIAN);
2445             }
2446           else
2447             {
2448               THROW (ReportedBoundsError);
2449             }
2450           break;
2451         case FREQ_RNG_START:
2452           if (length == 4)
2453             {
2454               proto_tree_add_item (range_tree, hf_docsis_tlv_freq_rng_start, tvb,
2455                                    pos, length, ENC_BIG_ENDIAN);
2456             }
2457           else
2458             {
2459               THROW (ReportedBoundsError);
2460             }
2461           break;
2462         case FREQ_RNG_END:
2463           if (length == 4)
2464             {
2465               proto_tree_add_item (range_tree, hf_docsis_tlv_freq_rng_end, tvb,
2466                                    pos, length, ENC_BIG_ENDIAN);
2467             }
2468           else
2469             {
2470               THROW (ReportedBoundsError);
2471             }
2472           break;
2473         case FREQ_RNG_STEP:
2474           if (length == 4)
2475             {
2476               proto_tree_add_item (range_tree, hf_docsis_tlv_freq_rng_step, tvb,
2477                                    pos, length, ENC_BIG_ENDIAN);
2478             }
2479           else
2480             {
2481               THROW (ReportedBoundsError);
2482             }
2483           break;
2484         }                           /* switch */
2485       pos = pos + length;
2486     }                             /* while */
2487 }
2488
2489 static void
2490 dissect_dut_filter (tvbuff_t * tvb, proto_tree * tree,
2491                     int start, guint16 len)
2492 {
2493   guint8 type, length;
2494   proto_item *it;
2495   proto_tree *dut_tree;
2496   int pos = start;
2497   it =
2498     proto_tree_add_text (tree, tvb, start, len,
2499                          "Downstream Unencrypted Traffic (Length = %u)", len);
2500   dut_tree = proto_item_add_subtree (it, ett_docsis_tlv_dut_filter);
2501
2502   while (pos < (start + len))
2503     {
2504       type = tvb_get_guint8 (tvb, pos++);
2505       length = tvb_get_guint8 (tvb, pos++);
2506       switch (type)
2507         {
2508         case DUT_CONTROL:
2509           if (length == 1)
2510             {
2511               proto_tree_add_item (dut_tree, hf_docsis_tlv_dut_filter_control, tvb,
2512                                    pos, length, ENC_BIG_ENDIAN);
2513             }
2514           else
2515             {
2516               THROW (ReportedBoundsError);
2517             }
2518           break;
2519         case DUT_CMIM:
2520           proto_tree_add_item (dut_tree, hf_docsis_tlv_dut_filter_cmim, tvb,
2521                                    pos, length, ENC_NA);
2522           break;
2523         }                       /* switch */
2524       pos = pos + length;
2525     }                           /* while */
2526 }
2527
2528 static void
2529 dissect_ds_ch_list(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
2530 {
2531   guint8 type, length;
2532   proto_item *it;
2533   proto_tree *dschlst_tree;
2534   int pos = start;
2535   it =
2536     proto_tree_add_text (tree, tvb, start, len,
2537                          "41 Downstream Channel List (Length = %u)", len);
2538   dschlst_tree = proto_item_add_subtree (it, ett_docsis_tlv_ds_ch_list);
2539
2540   while (pos < (start + len))
2541     {
2542       type = tvb_get_guint8 (tvb, pos++);
2543       length = tvb_get_guint8 (tvb, pos++);
2544       switch (type)
2545         {
2546         case DS_CH_LIST_SINGLE:
2547       dissect_ds_ch_list_single(tvb, dschlst_tree, pos, length);
2548           break;
2549         case DS_CH_LIST_RANGE:
2550       dissect_ds_ch_list_range(tvb, dschlst_tree, pos, length);
2551           break;
2552         case DS_CH_LIST_DEFAULT_TIMEOUT:
2553           if (length == 2)
2554             {
2555               proto_tree_add_item (dschlst_tree,
2556                                    hf_docsis_tlv_ds_ch_list_default_timeout, tvb, pos,
2557                                    length, ENC_BIG_ENDIAN);
2558             }
2559           else
2560             {
2561               THROW (ReportedBoundsError);
2562             }
2563           break;
2564         }                       /* switch */
2565       pos = pos + length;
2566     }                           /* while */
2567 }
2568
2569 static void
2570 dissect_tcc_err(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
2571 {
2572   guint8 type, length;
2573   proto_item *it;
2574   proto_tree *tccerr_tree;
2575   int pos = start;
2576   it =
2577     proto_tree_add_text (tree, tvb, start, len,
2578                          "TCC Error Encodings (Length = %u)", len);
2579   tccerr_tree = proto_item_add_subtree (it, ett_docsis_tlv_tcc_err);
2580
2581   while (pos < (start + len))
2582     {
2583       type = tvb_get_guint8 (tvb, pos++);
2584       length = tvb_get_guint8 (tvb, pos++);
2585       switch (type)
2586         {
2587         case TCC_ERR_SUBTYPE:
2588           proto_tree_add_item (tccerr_tree,
2589                                hf_docsis_tcc_err_subtype, tvb,
2590                                pos, length, ENC_NA);
2591           break;
2592         case TCC_ERR_CODE:
2593           if (length == 1)
2594             {
2595               proto_tree_add_item (tccerr_tree,
2596                                    hf_docsis_tcc_err_code, tvb, pos,
2597                                    length, ENC_BIG_ENDIAN);
2598             }
2599           else
2600             {
2601               THROW (ReportedBoundsError);
2602             }
2603           break;
2604         case TCC_ERR_MSG:
2605           proto_tree_add_item (tccerr_tree,
2606                                hf_docsis_tcc_err_msg, tvb,
2607                                pos, length, FALSE);
2608           break;
2609         }                       /* switch */
2610       pos = pos + length;
2611     }                           /* while */
2612 }
2613
2614 static void
2615 dissect_tcc_rng_parms(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
2616 {
2617   guint8 type, length;
2618   proto_item *it;
2619   proto_tree *rngparm_tree;
2620   int pos = start;
2621   it =
2622     proto_tree_add_text (tree, tvb, start, len,
2623                          "Ranging Parameters (Length = %u)", len);
2624   rngparm_tree = proto_item_add_subtree (it, ett_docsis_tlv_tcc_rng_parms);
2625
2626   while (pos < (start + len))
2627     {
2628       type = tvb_get_guint8 (tvb, pos++);
2629       length = tvb_get_guint8 (tvb, pos++);
2630       switch (type)
2631         {
2632         case RNG_PARMS_US_CH_ID:
2633           if (length == 1)
2634             {
2635               proto_tree_add_item (rngparm_tree,
2636                                    hf_docsis_rng_parms_us_ch_id, tvb, pos,
2637                                    length, ENC_BIG_ENDIAN);
2638             }
2639           else
2640             {
2641               THROW (ReportedBoundsError);
2642             }
2643           break;
2644         case RNG_PARMS_TIME_OFF_INT:
2645           if (length == 4)
2646             {
2647               proto_tree_add_item (rngparm_tree,
2648                                    hf_docsis_rng_parms_time_off_int, tvb, pos,
2649                                    length, FALSE);
2650             }
2651           else
2652             {
2653               THROW (ReportedBoundsError);
2654             }
2655           break;
2656         case RNG_PARMS_TIME_OFF_FRAC:
2657           if (length == 1)
2658             {
2659               proto_tree_add_item (rngparm_tree,
2660                                    hf_docsis_rng_parms_time_off_frac, tvb, pos,
2661                                    length, FALSE);
2662             }
2663           else
2664             {
2665               THROW (ReportedBoundsError);
2666             }
2667           break;
2668         case RNG_PARMS_POWER_OFF:
2669           if (length == 1)
2670             {
2671               proto_tree_add_item (rngparm_tree,
2672                                    hf_docsis_rng_parms_power_off, tvb, pos,
2673                                    length, ENC_BIG_ENDIAN);
2674             }
2675           else
2676             {
2677               THROW (ReportedBoundsError);
2678             }
2679           break;
2680         case RNG_PARMS_FREQ_OFF:
2681           if (length == 1)
2682             {
2683               proto_tree_add_item (rngparm_tree,
2684                                    hf_docsis_rng_parms_freq_off, tvb, pos,
2685                                    length, ENC_BIG_ENDIAN);
2686             }
2687           else
2688             {
2689               THROW (ReportedBoundsError);
2690             }
2691           break;
2692         }                       /* switch */
2693       pos = pos + length;
2694     }                           /* while */
2695 }
2696
2697 static void
2698 dissect_sid_cl_so_crit(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
2699 {
2700   guint8 type, length;
2701   proto_item *it;
2702   proto_tree *crit_tree;
2703   int pos = start;
2704   it =
2705     proto_tree_add_text (tree, tvb, start, len,
2706                          "SID Cluster Switchover Criteria (Length = %u)", len);
2707   crit_tree = proto_item_add_subtree (it, ett_docsis_tlv_sid_cl_so);
2708
2709   while (pos < (start + len))
2710     {
2711       type = tvb_get_guint8 (tvb, pos++);
2712       length = tvb_get_guint8 (tvb, pos++);
2713       switch (type)
2714         {
2715         case SID_CL_SO_MAX_REQ:
2716           if (length == 1)
2717             {
2718               proto_tree_add_item (crit_tree,
2719                                    hf_docsis_sid_cl_so_max_req, tvb, pos,
2720                                    length, ENC_BIG_ENDIAN);
2721             }
2722           else
2723             {
2724               THROW (ReportedBoundsError);
2725             }
2726           break;
2727         case SID_CL_SO_MAX_OUT_BYTES:
2728           if (length == 4)
2729             {
2730               proto_tree_add_item (crit_tree,
2731                                    hf_docsis_sid_cl_so_max_out_bytes, tvb, pos,
2732                                    length, ENC_BIG_ENDIAN);
2733             }
2734           else
2735             {
2736               THROW (ReportedBoundsError);
2737             }
2738           break;
2739         case SID_CL_SO_MAX_REQ_BYTES:
2740           if (length == 4)
2741             {
2742               proto_tree_add_item (crit_tree,
2743                                    hf_docsis_sid_cl_so_max_req_bytes, tvb, pos,
2744                                    length, ENC_BIG_ENDIAN);
2745             }
2746           else
2747             {
2748               THROW (ReportedBoundsError);
2749             }
2750           break;
2751         case SID_CL_SO_MAX_TIME:
2752           if (length == 2)
2753             {
2754               proto_tree_add_item (crit_tree,
2755                                    hf_docsis_sid_cl_so_max_time, tvb, pos,
2756                                    length, ENC_BIG_ENDIAN);
2757             }
2758           else
2759             {
2760               THROW (ReportedBoundsError);
2761             }
2762           break;
2763         }                       /* switch */
2764       pos = pos + length;
2765     }                           /* while */
2766 }
2767
2768 static void
2769 dissect_sid_cl_enc_map(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
2770 {
2771   guint8 type, length;
2772   proto_item *it;
2773   proto_tree *map_tree;
2774   int pos = start;
2775   it =
2776     proto_tree_add_text (tree, tvb, start, len,
2777                          "SID-to-Channel Mapping (Length = %u)", len);
2778   map_tree = proto_item_add_subtree (it, ett_docsis_tlv_sid_cl_enc_map);
2779
2780   while (pos < (start + len))
2781     {
2782       type = tvb_get_guint8 (tvb, pos++);
2783       length = tvb_get_guint8 (tvb, pos++);
2784       switch (type)
2785         {
2786         case SID_CL_MAP_US_CH_ID:
2787           if (length == 1)
2788             {
2789               proto_tree_add_item (map_tree,
2790                                    hf_docsis_sid_cl_map_us_ch_id, tvb, pos,
2791                                    length, ENC_BIG_ENDIAN);
2792             }
2793           else
2794             {
2795               THROW (ReportedBoundsError);
2796             }
2797           break;
2798         case SID_CL_MAP_SID:
2799           if (length == 2)
2800             {
2801               proto_tree_add_item (map_tree,
2802                                    hf_docsis_sid_cl_map_sid, tvb, pos,
2803                                    length, ENC_BIG_ENDIAN);
2804             }
2805           else
2806             {
2807               THROW (ReportedBoundsError);
2808             }
2809           break;
2810         case SID_CL_MAP_ACTION:
2811           if (length == 1)
2812             {
2813               proto_tree_add_item (map_tree,
2814                                    hf_docsis_sid_cl_map_action, tvb, pos,
2815                                    length, ENC_BIG_ENDIAN);
2816             }
2817           else
2818             {
2819               THROW (ReportedBoundsError);
2820             }
2821           break;
2822         }                       /* switch */
2823       pos = pos + length;
2824     }                           /* while */
2825 }
2826
2827 static void
2828 dissect_sid_cl_enc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
2829 {
2830   guint8 type, length;
2831   proto_item *it;
2832   proto_tree *enc_tree;
2833   int pos = start;
2834   it =
2835     proto_tree_add_text (tree, tvb, start, len,
2836                          "SID Cluster Encoding (Length = %u)", len);
2837   enc_tree = proto_item_add_subtree (it, ett_docsis_tlv_sid_cl_enc);
2838
2839   while (pos < (start + len))
2840     {
2841       type = tvb_get_guint8 (tvb, pos++);
2842       length = tvb_get_guint8 (tvb, pos++);
2843       switch (type)
2844         {
2845         case SID_CL_ENC_ID:
2846           if (length == 1)
2847             {
2848               proto_tree_add_item (enc_tree,
2849                                    hf_docsis_sid_cl_enc_id, tvb, pos,
2850                                    length, ENC_BIG_ENDIAN);
2851             }
2852           else
2853             {
2854               THROW (ReportedBoundsError);
2855             }
2856           break;
2857         case SID_CL_ENC_MAP:
2858           if (length == 10)
2859              dissect_sid_cl_enc_map(tvb, enc_tree, pos, length);
2860           else
2861               THROW (ReportedBoundsError);
2862           break;
2863         }                       /* switch */
2864       pos = pos + length;
2865     }                           /* while */
2866 }
2867
2868 static void
2869 dissect_sid_cl(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
2870 {
2871   guint8 type, length;
2872   proto_item *it;
2873   proto_tree *sid_tree;
2874   int pos = start;
2875   it =
2876     proto_tree_add_text (tree, tvb, start, len,
2877                          "47 Service Flow SID Cluster Assignments (Length = %u)", len);
2878   sid_tree = proto_item_add_subtree (it, ett_docsis_tlv_sid_cl);
2879
2880   while (pos < (start + len))
2881     {
2882       type = tvb_get_guint8 (tvb, pos++);
2883       length = tvb_get_guint8 (tvb, pos++);
2884       switch (type)
2885         {
2886         case SID_CL_SF_ID:
2887           if (length == 4)
2888             {
2889               proto_tree_add_item (sid_tree,
2890                                    hf_docsis_sid_cl_sf_id, tvb, pos,
2891                                    length, ENC_BIG_ENDIAN);
2892             }
2893           else
2894             {
2895               THROW (ReportedBoundsError);
2896             }
2897           break;
2898         case SID_CL_ENC:
2899           dissect_sid_cl_enc(tvb, sid_tree, pos, length);
2900           break;
2901         case SID_CL_SO_CRIT:
2902           dissect_sid_cl_so_crit(tvb, sid_tree, pos, length);
2903           break;
2904         }                       /* switch */
2905       pos = pos + length;
2906     }                           /* while */
2907 }
2908
2909 static void
2910 dissect_tcc(tvbuff_t * tvb, packet_info * pinfo _U_,
2911             proto_tree *tree, int start, guint16 len)
2912 {
2913   guint8 type, length;
2914   proto_item *it;
2915   proto_tree *tcc_tree;
2916   int pos = start;
2917   tvbuff_t *ucd_tvb;
2918
2919   it =
2920     proto_tree_add_text (tree, tvb, start, len,
2921                          "46 Transmit Channel Configuration (Length = %u)", len);
2922   tcc_tree = proto_item_add_subtree (it, ett_docsis_tlv_tcc);
2923
2924   while (pos < (start + len))
2925     {
2926       type = tvb_get_guint8 (tvb, pos++);
2927       length = tvb_get_guint8 (tvb, pos++);
2928       switch (type)
2929         {
2930         case TLV_TCC_REFID:
2931           if (length == 1)
2932             {
2933               proto_tree_add_item (tcc_tree,
2934                                    hf_docsis_tlv_tcc_refid, tvb, pos,
2935                                    length, ENC_BIG_ENDIAN);
2936             }
2937           else
2938             {
2939               THROW (ReportedBoundsError);
2940             }
2941           break;
2942         case TLV_TCC_US_CH_ACTION:
2943           if (length == 1)
2944             {
2945               proto_tree_add_item (tcc_tree,
2946                                    hf_docsis_tlv_tcc_us_ch_action, tvb, pos,
2947                                    length, ENC_BIG_ENDIAN);
2948             }
2949           else
2950             {
2951               THROW (ReportedBoundsError);
2952             }
2953           break;
2954         case TLV_TCC_US_CH_ID:
2955           if (length == 1)
2956             {
2957               proto_tree_add_item (tcc_tree,
2958                                    hf_docsis_tlv_tcc_us_ch_id, tvb, pos,
2959                                    length, ENC_BIG_ENDIAN);
2960             }
2961           else
2962             {
2963               THROW (ReportedBoundsError);
2964             }
2965           break;
2966         case TLV_TCC_NEW_US_CH_ID:
2967           if (length == 1)
2968             {
2969               proto_tree_add_item (tcc_tree,
2970                                    hf_docsis_tlv_tcc_new_us_ch_id, tvb, pos,
2971                                    length, ENC_BIG_ENDIAN);
2972             }
2973           else
2974             {
2975               THROW (ReportedBoundsError);
2976             }
2977           break;
2978         case TLV_TCC_UCD:
2979           ucd_tvb = tvb_new_subset (tvb, pos, length, length);
2980           call_dissector (docsis_ucd_handle, ucd_tvb, pinfo, tcc_tree);
2981           break;
2982         case TLV_TCC_RNG_SID:
2983           if (length == 2)
2984             {
2985               proto_tree_add_item (tcc_tree,
2986                                    hf_docsis_tlv_tcc_rng_sid, tvb, pos,
2987                                    length, ENC_BIG_ENDIAN);
2988             }
2989           else
2990             {
2991               THROW (ReportedBoundsError);
2992             }
2993           break;
2994         case TLV_TCC_INIT_TECH:
2995           if (length == 1)
2996             {
2997               proto_tree_add_item (tcc_tree,
2998                                    hf_docsis_tlv_tcc_init_tech, tvb, pos,
2999                                    length, ENC_BIG_ENDIAN);
3000             }
3001           else
3002             {
3003               THROW (ReportedBoundsError);
3004             }
3005           break;
3006         case TLV_TCC_RNG_PARMS:
3007           dissect_tcc_rng_parms(tvb, tcc_tree, pos, length);
3008           break;
3009         case TLV_TCC_DYN_RNG_WIN:
3010           if (length == 1)
3011             {
3012               proto_tree_add_item (tcc_tree,
3013                                    hf_docsis_tlv_tcc_dyn_rng_win, tvb, pos,
3014                                    length, ENC_BIG_ENDIAN);
3015             }
3016           else
3017             {
3018               THROW (ReportedBoundsError);
3019             }
3020           break;
3021         case TLV_TCC_ERR:
3022           dissect_tcc_err(tvb, tcc_tree, pos, length);
3023           break;
3024         }                       /* switch */
3025       pos = pos + length;
3026     }                           /* while */
3027 }
3028
3029 static void
3030 dissect_ch_bl_rng(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
3031 {
3032   guint8 type, length;
3033   proto_item *it;
3034   proto_tree *chblrng_tree;
3035   int pos = start;
3036   it =
3037     proto_tree_add_text (tree, tvb, start, len,
3038                          "Receive Module Channel Block Range (Length = %u)", len);
3039   chblrng_tree = proto_item_add_subtree (it, ett_docsis_tlv_rcp_ch_bl_rng);
3040
3041   while (pos < (start + len))
3042     {
3043       type = tvb_get_guint8 (tvb, pos++);
3044       length = tvb_get_guint8 (tvb, pos++);
3045       switch (type)
3046         {
3047         case CH_BL_RNG_MIN_CTR_FREQ:
3048           if (length == 4)
3049             {
3050               proto_tree_add_item (chblrng_tree,
3051                                    hf_docsis_ch_bl_rng_min_ctr_freq, tvb, pos,
3052                                    length, ENC_BIG_ENDIAN);
3053             }
3054           else
3055             {
3056               THROW (ReportedBoundsError);
3057             }
3058           break;
3059         case CH_BL_RNG_MAX_CTR_FREQ:
3060           if (length == 4)
3061             {
3062               proto_tree_add_item (chblrng_tree,
3063                                    hf_docsis_ch_bl_rng_max_ctr_freq, tvb, pos,
3064                                    length, ENC_BIG_ENDIAN);
3065             }
3066           else
3067             {
3068               THROW (ReportedBoundsError);
3069             }
3070           break;
3071         }                       /* switch */
3072       pos = pos + length;
3073     }                           /* while */
3074 }
3075
3076 static void
3077 dissect_rcp_rcv_mod(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
3078 {
3079   guint8 type, length;
3080   proto_item *it;
3081   proto_tree *rcvmod_tree;
3082   int pos = start;
3083   it =
3084     proto_tree_add_text (tree, tvb, start, len,
3085                          "Receive Module Capability (Length = %u)", len);
3086   rcvmod_tree = proto_item_add_subtree (it, ett_docsis_tlv_rcp_rcv_mod_enc);
3087
3088   while (pos < (start + len))
3089     {
3090       type = tvb_get_guint8 (tvb, pos++);
3091       length = tvb_get_guint8 (tvb, pos++);
3092       switch (type)
3093         {
3094         case RCV_MOD_ENC_IDX:
3095           if (length == 1)
3096             {
3097               proto_tree_add_item (rcvmod_tree,
3098                                    hf_docsis_rcv_mod_enc_idx, tvb, pos,
3099                                    length, ENC_BIG_ENDIAN);
3100             }
3101           else
3102             {
3103               THROW (ReportedBoundsError);
3104             }
3105           break;
3106         case RCV_MOD_ENC_CH_BL_RNG:
3107           dissect_ch_bl_rng(tvb, rcvmod_tree, pos, length);
3108           break;
3109         case RCV_MOD_ENC_CTR_FREQ_ASGN:
3110           if (length == 4)
3111             {
3112               proto_tree_add_item (rcvmod_tree,
3113                                    hf_docsis_rcv_mod_enc_ctr_freq_asgn, tvb, pos,
3114                                    length, FALSE);
3115             }
3116           else
3117             {
3118               THROW (ReportedBoundsError);
3119             }
3120           break;
3121         case RCV_MOD_ENC_RSQ_CH_SUBS_CAP:
3122           proto_tree_add_item (rcvmod_tree,
3123                    hf_docsis_rcv_mod_enc_rsq_ch_subs_cap, tvb, pos,
3124                    length, ENC_NA);
3125           break;
3126         case RCV_MOD_ENC_CONN:
3127           proto_tree_add_item (rcvmod_tree,
3128                    hf_docsis_rcv_mod_enc_conn, tvb, pos,
3129                    length, ENC_NA);
3130           break;
3131         case RCV_MOD_ENC_PHY_LAYR_PARMS:
3132           proto_tree_add_item (rcvmod_tree,
3133                    hf_docsis_rcv_mod_enc_phy_layr_parms, tvb, pos,
3134                    length, ENC_NA);
3135           break;
3136         }                       /* switch */
3137       pos = pos + length;
3138     }                           /* while */
3139 }
3140
3141 static void
3142 dissect_rcp_rcv_ch(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
3143 {
3144   guint8 type, length;
3145   proto_item *it;
3146   proto_tree *rcvch_tree;
3147   int pos = start;
3148   it =
3149     proto_tree_add_text (tree, tvb, start, len,
3150                          "Receive Channels (Length = %u)", len);
3151   rcvch_tree = proto_item_add_subtree (it, ett_docsis_tlv_rcp_rcv_ch);
3152
3153   while (pos < (start + len))
3154     {
3155       type = tvb_get_guint8 (tvb, pos++);
3156       length = tvb_get_guint8 (tvb, pos++);
3157       switch (type)
3158         {
3159         case RCV_CH_IDX:
3160           if (length == 1)
3161             {
3162               proto_tree_add_item (rcvch_tree,
3163                                    hf_docsis_rcv_ch_idx, tvb, pos,
3164                                    length, ENC_BIG_ENDIAN);
3165             }
3166           else
3167             {
3168               THROW (ReportedBoundsError);
3169             }
3170           break;
3171         case RCV_CH_CONN:
3172           proto_tree_add_item (rcvch_tree,
3173                            hf_docsis_rcv_ch_conn, tvb, pos,
3174                            length, ENC_NA);
3175           break;
3176         case RCV_CH_CONN_OFF:
3177           if (length == 1)
3178             {
3179               proto_tree_add_item (rcvch_tree,
3180                                    hf_docsis_rcv_ch_conn_off, tvb, pos,
3181                                    length, ENC_BIG_ENDIAN);
3182             }
3183           else
3184             {
3185               THROW (ReportedBoundsError);
3186             }
3187           break;
3188         case RCV_CH_PRIM_DS_CH_IND:
3189           if (length == 1)
3190             {
3191               proto_tree_add_item (rcvch_tree,
3192                                    hf_docsis_rcv_ch_prim_ds_ch_ind, tvb, pos,
3193                                    length, ENC_BIG_ENDIAN);
3194             }
3195           else
3196             {
3197               THROW (ReportedBoundsError);
3198             }
3199           break;
3200         }                       /* switch */
3201       pos = pos + length;
3202     }                           /* while */
3203 }
3204
3205
3206 static void
3207 dissect_rcp(tvbuff_t * tvb, packet_info * pinfo _U_,
3208             proto_tree *tree, int start, guint16 len)
3209 {
3210   guint8 type, length;
3211   proto_item *it;
3212   proto_tree *rcp_tree;
3213   int pos = start;
3214   tvbuff_t *vsif_tvb;
3215
3216   it =
3217     proto_tree_add_text (tree, tvb, start, len,
3218                           "48 Receive Channel Profile (Length = %u)", len);
3219   rcp_tree = proto_item_add_subtree (it, ett_docsis_tlv_rcp);
3220
3221   while (pos < (start + len))
3222     {
3223       type = tvb_get_guint8 (tvb, pos++);
3224       length = tvb_get_guint8 (tvb, pos++);
3225       switch (type)
3226         {
3227         case TLV_RCP_ID:
3228           if (length == 5)
3229             {
3230               proto_tree_add_item (rcp_tree,
3231                                    hf_docsis_tlv_rcp_id, tvb, pos,
3232                                    length, ENC_NA);
3233             }
3234           else
3235             {
3236               THROW (ReportedBoundsError);
3237             }
3238           break;
3239         case TLV_RCP_NAME:
3240           if (length <= 15)
3241             {
3242               proto_tree_add_item (rcp_tree,
3243                                    hf_docsis_tlv_rcp_name, tvb, pos,
3244                                    length, ENC_NA);
3245             }
3246           else
3247             {
3248               THROW (ReportedBoundsError);
3249             }
3250           break;
3251         case TLV_RCP_FREQ_SPC:
3252           if (length == 1)
3253             {
3254               proto_tree_add_item (rcp_tree,
3255                                    hf_docsis_tlv_rcp_freq_spc, tvb, pos,
3256                                    length, ENC_BIG_ENDIAN);
3257             }
3258           else
3259             {
3260               THROW (ReportedBoundsError);
3261             }
3262           break;
3263         case TLV_RCP_RCV_MOD_ENC:
3264           dissect_rcp_rcv_mod(tvb, rcp_tree, pos, length);
3265           break;
3266         case TLV_RCP_RCV_CH:
3267           dissect_rcp_rcv_ch(tvb, rcp_tree, pos, length);
3268           break;
3269         case TLV_RCP_VEN_SPEC:
3270           vsif_tvb = tvb_new_subset (tvb, pos, length, length);
3271           call_dissector (docsis_vsif_handle, vsif_tvb, pinfo, rcp_tree);
3272           break;
3273         }                       /* switch */
3274       pos = pos + length;
3275     }                           /* while */
3276 }
3277
3278 static void
3279 dissect_rcc_rcv_mod(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
3280 {
3281   guint8 type, length;
3282   proto_item *it;
3283   proto_tree *rcvmod_tree;
3284   int pos = start;
3285   it =
3286     proto_tree_add_text (tree, tvb, start, len,
3287                          "Receive Module Assignment (Length = %u)", len);
3288   rcvmod_tree = proto_item_add_subtree (it, ett_docsis_tlv_rcc_rcv_mod_enc);
3289
3290   while (pos < (start + len))
3291     {
3292       type = tvb_get_guint8 (tvb, pos++);
3293       length = tvb_get_guint8 (tvb, pos++);
3294       switch (type)
3295         {
3296         case RCV_MOD_ENC_IDX:
3297           if (length == 1)
3298             {
3299               proto_tree_add_item (rcvmod_tree,
3300                                    hf_docsis_rcc_rcv_mod_enc_idx, tvb, pos,
3301                                    length, ENC_BIG_ENDIAN);
3302             }
3303           else
3304             {
3305               THROW (ReportedBoundsError);
3306             }
3307           break;
3308         case RCV_MOD_ENC_CTR_FREQ_ASGN:
3309           if (length == 4)
3310             {
3311               proto_tree_add_item (rcvmod_tree,
3312                                    hf_docsis_rcc_rcv_mod_enc_ctr_freq_asgn, tvb, pos,
3313                                    length, ENC_BIG_ENDIAN);
3314             }
3315           else
3316             {
3317               THROW (ReportedBoundsError);
3318             }
3319           break;
3320         case RCV_MOD_ENC_CONN:
3321           proto_tree_add_item (rcvmod_tree,
3322                    hf_docsis_rcc_rcv_mod_enc_conn, tvb, pos,
3323                    length, ENC_NA);
3324           break;
3325         }                       /* switch */
3326       pos = pos + length;
3327     }                           /* while */
3328 }
3329
3330 static void
3331 dissect_rcc_rcv_ch(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
3332 {
3333   guint8 type, length;
3334   proto_item *it;
3335   proto_tree *rcvch_tree;
3336   int pos = start;
3337   it =
3338     proto_tree_add_text (tree, tvb, start, len,
3339                          "Receive Channels (Length = %u)", len);
3340   rcvch_tree = proto_item_add_subtree (it, ett_docsis_tlv_rcc_rcv_ch);
3341
3342   while (pos < (start + len))
3343     {
3344       type = tvb_get_guint8 (tvb, pos++);
3345       length = tvb_get_guint8 (tvb, pos++);
3346       switch (type)
3347         {
3348         case RCV_CH_IDX:
3349           if (length == 1)
3350             {
3351               proto_tree_add_item (rcvch_tree,
3352                                    hf_docsis_rcc_rcv_ch_idx, tvb, pos,
3353                                    length, ENC_BIG_ENDIAN);
3354             }
3355           else
3356             {
3357               THROW (ReportedBoundsError);
3358             }
3359           break;
3360         case RCV_CH_CONN:
3361           proto_tree_add_item (rcvch_tree,
3362                            hf_docsis_rcc_rcv_ch_conn, tvb, pos,
3363                            length, ENC_NA);
3364           break;
3365         case RCV_CH_CTR_FREQ_ASGN:
3366           if (length == 4)
3367             {
3368               proto_tree_add_item (rcvch_tree,
3369                                    hf_docsis_rcc_rcv_ch_ctr_freq_asgn, tvb, pos,
3370                                    length, ENC_BIG_ENDIAN);
3371             }
3372           else
3373             {
3374               THROW (ReportedBoundsError);
3375             }
3376           break;
3377         case RCV_CH_PRIM_DS_CH_IND:
3378           if (length == 1)
3379             {
3380               proto_tree_add_item (rcvch_tree,
3381                                    hf_docsis_rcc_rcv_ch_prim_ds_ch_ind, tvb, pos,
3382                                    length, ENC_BIG_ENDIAN);
3383             }
3384           else
3385             {
3386               THROW (ReportedBoundsError);
3387             }
3388           break;
3389         }                       /* switch */
3390       pos = pos + length;
3391     }                           /* while */
3392 }
3393
3394 static void
3395 dissect_rcc_err(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
3396 {
3397   guint8 type, length;
3398   proto_item *it;
3399   proto_tree *err_tree;
3400   int pos = start;
3401   it =
3402     proto_tree_add_text (tree, tvb, start, len,
3403                          "RCC Error Encodings (Length = %u)", len);
3404   err_tree = proto_item_add_subtree (it, ett_docsis_tlv_rcc_rcv_ch);
3405
3406   while (pos < (start + len))
3407     {
3408       type = tvb_get_guint8 (tvb, pos++);
3409       length = tvb_get_guint8 (tvb, pos++);
3410       switch (type)
3411         {
3412         case RCC_ERR_MOD_OR_CH:
3413           if (length == 1)
3414             {
3415               proto_tree_add_item (err_tree,
3416                                    hf_docsis_tlv_rcc_err_mod_or_ch, tvb, pos,
3417                                    length, ENC_BIG_ENDIAN);
3418             }
3419           else
3420             {
3421               THROW (ReportedBoundsError);
3422             }
3423           break;
3424         case RCC_ERR_IDX:
3425           if (length == 1)
3426             {
3427               proto_tree_add_item (err_tree,
3428                                    hf_docsis_tlv_rcc_err_idx, tvb, pos,
3429                                    length, ENC_BIG_ENDIAN);
3430             }
3431           else
3432             {
3433               THROW (ReportedBoundsError);
3434             }
3435           break;
3436         case RCC_ERR_PARAM:
3437           if (length == 1)
3438             {
3439               proto_tree_add_item (err_tree,
3440                                    hf_docsis_tlv_rcc_err_param, tvb, pos,
3441                                    length, ENC_BIG_ENDIAN);
3442             }
3443           else
3444             {
3445               THROW (ReportedBoundsError);
3446             }
3447           break;
3448         case RCC_ERR_CODE:
3449           if (length == 1)
3450             {
3451               proto_tree_add_item (err_tree,
3452                                    hf_docsis_tlv_rcc_err_code, tvb, pos,
3453                                    length, ENC_BIG_ENDIAN);
3454             }
3455           else
3456             {
3457               THROW (ReportedBoundsError);
3458             }
3459           break;
3460         case RCC_ERR_MSG:
3461           proto_tree_add_item (err_tree,
3462                                hf_docsis_tlv_rcc_err_msg, tvb, pos,
3463                                length, ENC_NA);
3464           break;
3465         }                       /* switch */
3466       pos = pos + length;
3467     }                           /* while */
3468 }
3469
3470 static void
3471 dissect_rcc(tvbuff_t * tvb, packet_info * pinfo _U_,
3472             proto_tree *tree, int start, guint16 len)
3473 {
3474   guint8 type, length;
3475   proto_item *it;
3476   proto_tree *rcc_tree;
3477   int pos = start;
3478   tvbuff_t *vsif_tvb;
3479
3480   it =
3481     proto_tree_add_text (tree, tvb, start, len,
3482                           "49 Receive Channel Configuration (Length = %u)", len);
3483   rcc_tree = proto_item_add_subtree (it, ett_docsis_tlv_rcc);
3484
3485   while (pos < (start + len))
3486     {
3487       type = tvb_get_guint8 (tvb, pos++);
3488       length = tvb_get_guint8 (tvb, pos++);
3489       switch (type)
3490         {
3491         case TLV_RCP_ID:
3492           if (length == 5)
3493             {
3494               proto_tree_add_item (rcc_tree,
3495                                    hf_docsis_tlv_rcc_id, tvb, pos,
3496                                    length, ENC_NA);
3497             }
3498           else
3499             {
3500               THROW (ReportedBoundsError);
3501             }
3502           break;
3503         case TLV_RCP_RCV_MOD_ENC:
3504           dissect_rcc_rcv_mod(tvb, rcc_tree, pos, length);
3505           break;
3506         case TLV_RCP_RCV_CH:
3507           dissect_rcc_rcv_ch(tvb, rcc_tree, pos, length);
3508           break;
3509         case TLV_RCP_VEN_SPEC:
3510           vsif_tvb = tvb_new_subset (tvb, pos, length, length);
3511           call_dissector (docsis_vsif_handle, vsif_tvb, pinfo, rcc_tree);
3512           break;
3513         case TLV_RCC_ERR:
3514           dissect_rcc_err(tvb, rcc_tree, pos, length);
3515           break;
3516         }                       /* switch */
3517       pos = pos + length;
3518     }                           /* while */
3519 }
3520
3521 static void
3522 dissect_dsid_ds_reseq(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
3523 {
3524   guint8 type, length;
3525   proto_item *it;
3526   proto_tree *dsid_tree;
3527   int pos = start;
3528   it =
3529     proto_tree_add_text (tree, tvb, start, len,
3530                          "Resequencing DSID (Length = %u)", len);
3531   dsid_tree = proto_item_add_subtree (it, ett_docsis_tlv_dsid_ds_reseq);
3532
3533   while (pos < (start + len))
3534     {
3535       type = tvb_get_guint8 (tvb, pos++);
3536       length = tvb_get_guint8 (tvb, pos++);
3537       switch (type)
3538         {
3539         case DS_RESEQ_DSID:
3540           if (length == 1)
3541             {
3542               proto_tree_add_item (dsid_tree,
3543                                    hf_docsis_ds_reseq_dsid, tvb, pos,
3544                                    length, ENC_BIG_ENDIAN);
3545             }
3546           else
3547             {
3548               THROW (ReportedBoundsError);
3549             }
3550           break;
3551         case DS_RESEQ_CH_LST:
3552           proto_tree_add_item (dsid_tree,
3553                            hf_docsis_ds_reseq_ch_lst, tvb, pos,
3554                            length, ENC_NA);
3555           break;
3556         case DS_RESEQ_WAIT_TIME:
3557           if (length == 1)
3558             {
3559               proto_tree_add_item (dsid_tree,
3560                                    hf_docsis_ds_reseq_wait_time, tvb, pos,
3561                                    length, ENC_BIG_ENDIAN);
3562             }
3563           else
3564             {
3565               THROW (ReportedBoundsError);
3566             }
3567           break;
3568         case DS_RESEQ_WARN_THRESH:
3569           if (length == 1)
3570             {
3571               proto_tree_add_item (dsid_tree,
3572                                    hf_docsis_ds_reseq_warn_thresh, tvb, pos,
3573                                    length, ENC_BIG_ENDIAN);
3574             }
3575           else
3576             {
3577               THROW (ReportedBoundsError);
3578             }
3579           break;
3580         case DS_RESEQ_HO_TIMER:
3581           if (length == 2)
3582             {
3583               proto_tree_add_item (dsid_tree,
3584                                    hf_docsis_ds_reseq_ho_timer, tvb, pos,
3585                                    length, ENC_BIG_ENDIAN);
3586             }
3587           else
3588             {
3589               THROW (ReportedBoundsError);
3590             }
3591           break;
3592         }                       /* switch */
3593       pos = pos + length;
3594     }                           /* while */
3595 }
3596
3597 static void
3598 dissect_dsid_mc_addr(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
3599 {
3600   guint8 type, length;
3601   proto_item *it;
3602   proto_tree *dsid_tree;
3603   int pos = start;
3604   it =
3605     proto_tree_add_text (tree, tvb, start, len,
3606                          "Client MAC Address Encodings (Length = %u)", len);
3607   dsid_tree = proto_item_add_subtree (it, ett_docsis_tlv_dsid_mc_addr);
3608
3609   while (pos < (start + len))
3610     {
3611       type = tvb_get_guint8 (tvb, pos++);
3612       length = tvb_get_guint8 (tvb, pos++);
3613       switch (type)
3614         {
3615         case MC_ADDR_ACTION:
3616           if (length == 1)
3617             {
3618               proto_tree_add_item (dsid_tree,
3619                                    hf_docsis_mc_addr_action, tvb, pos,
3620                                    length, ENC_BIG_ENDIAN);
3621             }
3622           else
3623             {
3624               THROW (ReportedBoundsError);
3625             }
3626           break;
3627         case MC_ADDR_ADDR:
3628           if (length == 6)
3629             {
3630               proto_tree_add_item (dsid_tree,
3631                                    hf_docsis_mc_addr_addr, tvb, pos,
3632                                    length, ENC_NA);
3633             }
3634           else
3635             {
3636               THROW (ReportedBoundsError);
3637             }
3638           break;
3639         }                       /* switch */
3640       pos = pos + length;
3641     }                           /* while */
3642 }
3643
3644 static void
3645 dissect_dsid_mc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
3646 {
3647   guint8 type, length;
3648   proto_item *it;
3649   proto_tree *dsid_tree;
3650   int pos = start;
3651   it =
3652     proto_tree_add_text (tree, tvb, start, len,
3653                          "Multicast Encodings (Length = %u)", len);
3654   dsid_tree = proto_item_add_subtree (it, ett_docsis_tlv_dsid_mc);
3655
3656   while (pos < (start + len))
3657     {
3658       type = tvb_get_guint8 (tvb, pos++);
3659       length = tvb_get_guint8 (tvb, pos++);
3660       switch (type)
3661         {
3662         case TLV_DSID_MC_ADDR:
3663           dissect_dsid_mc_addr(tvb, dsid_tree, pos, length);
3664           break;
3665         case TLV_DSID_MC_CMIM:
3666           proto_tree_add_item (dsid_tree,
3667                                hf_docsis_tlv_dsid_mc_cmim, tvb, pos,
3668                                length, ENC_NA);
3669           break;
3670         case TLV_DSID_MC_GROUP:
3671           proto_tree_add_item (dsid_tree,
3672                                hf_docsis_tlv_dsid_mc_group, tvb, pos,
3673                                length, ENC_NA);
3674           break;
3675     case TLV_DSID_MC_PHS:
3676           dissect_phs(tvb, dsid_tree, pos, length);
3677           break;
3678         }                       /* switch */
3679       pos = pos + length;
3680     }                           /* while */
3681 }
3682
3683 static void
3684 dissect_dsid(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
3685 {
3686   guint8 type, length;
3687   proto_item *it;
3688   proto_tree *dsid_tree;
3689   int pos = start;
3690   it =
3691     proto_tree_add_text (tree, tvb, start, len,
3692                          "50 DSID Encodings (Length = %u)", len);
3693   dsid_tree = proto_item_add_subtree (it, ett_docsis_tlv_dsid);
3694
3695   while (pos < (start + len))
3696     {
3697       type = tvb_get_guint8 (tvb, pos++);
3698       length = tvb_get_guint8 (tvb, pos++);
3699       switch (type)
3700         {
3701         case TLV_DSID_ID:
3702           if (length == 3)
3703             {
3704               proto_tree_add_item (dsid_tree,
3705                                    hf_docsis_tlv_dsid_id, tvb, pos,
3706                                    length, ENC_BIG_ENDIAN);
3707             }
3708           else
3709             {
3710               THROW (ReportedBoundsError);
3711             }
3712           break;
3713         case TLV_DSID_ACTION:
3714           if (length == 1)
3715             {
3716               proto_tree_add_item (dsid_tree,
3717                                    hf_docsis_tlv_dsid_action, tvb, pos,
3718                                    length, ENC_BIG_ENDIAN);
3719             }
3720           else
3721             {
3722               THROW (ReportedBoundsError);
3723             }
3724           break;
3725         case TLV_DSID_DS_RESEQ:
3726           dissect_dsid_ds_reseq(tvb, dsid_tree, pos, length);
3727           break;
3728         case TLV_DSID_MC:
3729           dissect_dsid_mc(tvb, dsid_tree, pos, length);
3730           break;
3731         }                       /* switch */
3732       pos = pos + length;
3733     }                           /* while */
3734 }
3735
3736 static void
3737 dissect_sec_assoc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
3738 {
3739   guint8 type, length;
3740   proto_item *it;
3741   proto_tree *sec_tree;
3742   int pos = start;
3743   it =
3744     proto_tree_add_text (tree, tvb, start, len,
3745                          "51 Security Association Encodings (Length = %u)", len);
3746   sec_tree = proto_item_add_subtree (it, ett_docsis_tlv_dsid);
3747
3748   while (pos < (start + len))
3749     {
3750       type = tvb_get_guint8 (tvb, pos++);
3751       length = tvb_get_guint8 (tvb, pos++);
3752       switch (type)
3753         {
3754         case TLV_SEC_ASSOC_ACTION:
3755           if (length == 1)
3756             {
3757               proto_tree_add_item (sec_tree,
3758                                    hf_docsis_tlv_sec_assoc_action, tvb, pos,
3759                                    length, ENC_BIG_ENDIAN);
3760             }
3761           else
3762             {
3763               THROW (ReportedBoundsError);
3764             }
3765           break;
3766         case TLV_SEC_ASSOC_DESC:
3767           if (length == 14)
3768             {
3769               proto_tree_add_item (sec_tree,
3770                                    hf_docsis_tlv_sec_assoc_desc, tvb, pos,
3771                                    length, ENC_NA);
3772             }
3773           else
3774             {
3775               THROW (ReportedBoundsError);
3776             }
3777           break;
3778         }                       /* switch */
3779       pos = pos + length;
3780     }                           /* while */
3781 }
3782
3783 static void
3784 dissect_ch_asgn(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
3785 {
3786   guint8 type, length;
3787   proto_item *it;
3788   proto_tree *asgn_tree;
3789   int pos = start;
3790   it =
3791     proto_tree_add_text (tree, tvb, start, len,
3792                          "56 Channel Assignment Configuration Settings (Length = %u)", len);
3793   asgn_tree = proto_item_add_subtree (it, ett_docsis_tlv_ch_asgn);
3794
3795   while (pos < (start + len))
3796     {
3797       type = tvb_get_guint8 (tvb, pos++);
3798       length = tvb_get_guint8 (tvb, pos++);
3799       switch (type)
3800         {
3801         case TLV_CH_ASGN_US_CH_ID:
3802           if (length == 1)
3803             {
3804               proto_tree_add_item (asgn_tree,
3805                                    hf_docsis_ch_asgn_us_ch_id, tvb, pos,
3806                                    length, ENC_BIG_ENDIAN);
3807             }
3808           else
3809             {
3810               THROW (ReportedBoundsError);
3811             }
3812           break;
3813         case TLV_CH_ASGN_RX_FREQ:
3814           if (length == 4)
3815             {
3816               proto_tree_add_item (asgn_tree,
3817                                    hf_docsis_ch_asgn_rx_freq, tvb, pos,
3818                                    length, ENC_BIG_ENDIAN);
3819             }
3820           else
3821             {
3822               THROW (ReportedBoundsError);
3823             }
3824           break;
3825         }                       /* switch */
3826       pos = pos + length;
3827     }                           /* while */
3828 }
3829
3830 static void
3831 dissect_cmts_mc_sess_enc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
3832 {
3833   guint8 type, length;
3834   proto_item *it;
3835   proto_tree *mc_tree;
3836   int pos = start;
3837   it =
3838     proto_tree_add_text (tree, tvb, start, len,
3839                          "64 CMTS Static Multicast Session Encoding (Length = %u)", len);
3840   mc_tree = proto_item_add_subtree (it, ett_docsis_cmts_mc_sess_enc);
3841
3842   while (pos < (start + len))
3843     {
3844       type = tvb_get_guint8 (tvb, pos++);
3845       length = tvb_get_guint8 (tvb, pos++);
3846       switch (type)
3847         {
3848         case CMTS_MC_SESS_ENC_GRP:
3849           if (length == 4 || length == 16)
3850             {
3851               proto_tree_add_item (mc_tree,
3852                                    hf_docsis_cmts_mc_sess_enc_grp, tvb, pos,
3853                                    length, ENC_NA);
3854             }
3855           else
3856             {
3857               THROW (ReportedBoundsError);
3858             }
3859           break;
3860         case CMTS_MC_SESS_ENC_SRC:
3861           if (length == 4 || length == 16)
3862             {
3863               proto_tree_add_item (mc_tree,
3864                                    hf_docsis_cmts_mc_sess_enc_src, tvb, pos,
3865                                    length, ENC_NA);
3866             }
3867           else
3868             {
3869               THROW (ReportedBoundsError);
3870             }
3871           break;
3872         }                       /* switch */
3873       pos = pos + length;
3874     }                           /* while */
3875 }
3876
3877
3878 static void
3879 dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
3880 {
3881
3882   proto_item *it;
3883   proto_tree *tlv_tree;
3884   int pos = 0;
3885   gint total_len;
3886   guint8 type, length;
3887   guint16 x;
3888   tvbuff_t *vsif_tvb;
3889
3890   total_len = tvb_reported_length_remaining (tvb, 0);
3891
3892   {
3893     it =
3894       proto_tree_add_protocol_format (tree, proto_docsis_tlv, tvb, 0,
3895                                       total_len, "TLV Data");
3896     tlv_tree = proto_item_add_subtree (it, ett_docsis_tlv);
3897     while (pos < total_len)
3898       {
3899         type = tvb_get_guint8 (tvb, pos++);
3900         length = tvb_get_guint8 (tvb, pos++);
3901         switch (type)
3902           {
3903           case TLV_DOWN_FREQ:
3904             /* This is ugly.  There are multiple type 1 TLV's that may appear
3905              * in the TLV data, the problem is that they are dependent on
3906              * message type.  */
3907             if (length == 4)
3908               proto_tree_add_item (tlv_tree, hf_docsis_tlv_down_freq, tvb,
3909                                    pos, length, ENC_BIG_ENDIAN);
3910             else if (length == 1)
3911               proto_tree_add_item (tlv_tree, hf_docsis_tlv_rng_tech, tvb,
3912                                    pos, length, ENC_BIG_ENDIAN);
3913             else
3914               dissect_doc10cos (tvb, tlv_tree, pos, length);
3915             break;
3916           case TLV_CHNL_ID:
3917             if (length == 1)
3918               {
3919                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_upstream_chid,
3920                                      tvb, pos, length, ENC_BIG_ENDIAN);
3921               }
3922             else
3923               {
3924                 THROW (ReportedBoundsError);
3925               }
3926             break;
3927           case TLV_NET_ACCESS:
3928             if (length == 1)
3929               {
3930                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_net_access,
3931                                      tvb, pos, length, ENC_BIG_ENDIAN);
3932               }
3933             else
3934               {
3935                 THROW (ReportedBoundsError);
3936               }
3937             break;
3938           case TLV_COS:
3939             dissect_cos (tvb, tlv_tree, pos, length);
3940             break;
3941           case TLV_MODEM_CAP:
3942             dissect_modemcap (tvb, tlv_tree, pos, length);
3943             break;
3944           case TLV_CM_MIC:
3945             if (length == 16)
3946               {
3947                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_cm_mic, tvb,
3948                                      pos, length, ENC_NA);
3949               }
3950             else
3951               {
3952                 THROW (ReportedBoundsError);
3953               }
3954             break;
3955           case TLV_CMTS_MIC:
3956             if (length == 16)
3957               {
3958                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_cmts_mic, tvb,
3959                                      pos, length, ENC_NA);
3960               }
3961             else
3962               {
3963                 THROW (ReportedBoundsError);
3964               }
3965             break;
3966           case TLV_VENDOR_ID:
3967             if (length == 3)
3968               {
3969                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_vendor_id, tvb,
3970                                      pos, length, ENC_NA);
3971               }
3972             else
3973               {
3974                 THROW (ReportedBoundsError);
3975               }
3976             break;
3977           case TLV_SW_UPG_FILE:
3978             proto_tree_add_item (tlv_tree, hf_docsis_tlv_sw_file, tvb, pos,
3979                                  length, FALSE);
3980             break;
3981           case TLV_SNMP_WRITE_CTRL:
3982             proto_tree_add_item (tlv_tree, hf_docsis_tlv_snmp_access, tvb,
3983                                  pos, length, ENC_NA);
3984             break;
3985           case TLV_SNMP_OBJECT:
3986             proto_tree_add_item (tlv_tree, hf_docsis_tlv_snmp_obj, tvb,
3987                                  pos, length, ENC_NA);
3988             break;
3989           case TLV_MODEM_IP:
3990             if (length == 4)
3991               {
3992                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_modem_addr,
3993                                      tvb, pos, length, ENC_BIG_ENDIAN);
3994               }
3995             else
3996               {
3997                 THROW (ReportedBoundsError);
3998               }
3999             break;
4000           case TLV_SVC_UNAVAIL:
4001             if (length == 3)
4002               {
4003                 dissect_svc_unavail(tvb, tlv_tree, pos, length);
4004               }
4005             else
4006               {
4007                 THROW (ReportedBoundsError);
4008               }
4009             break;
4010           case TLV_ETHERNET_MAC:
4011             if (length == 6)
4012               {
4013                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_cpe_ethernet,
4014                                      tvb, pos, length, FALSE);
4015               }
4016             else
4017               {
4018                 THROW (ReportedBoundsError);
4019               }
4020             break;
4021           case TLV_TEL_SETTINGS:
4022             break;
4023           case TLV_BPI_CONFIG:
4024             proto_tree_add_item (tlv_tree, hf_docsis_tlv_bpi, tvb,
4025                                  pos, length, ENC_NA);
4026             break;
4027           case TLV_MAX_CPES:
4028             if (length == 1)
4029               {
4030                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_max_cpe, tvb,
4031                                      pos, length, FALSE);
4032               }
4033             else
4034               {
4035                 THROW (ReportedBoundsError);
4036               }
4037             break;
4038           case TLV_TFTP_TIME:
4039             if (length == 4)
4040               {
4041                 proto_tree_add_item (tlv_tree,
4042                                      hf_docsis_tlv_tftp_server_timestamp,
4043                                      tvb, pos, length, ENC_BIG_ENDIAN);
4044               }
4045             else
4046               {
4047                 THROW (ReportedBoundsError);
4048               }
4049             break;
4050           case TLV_TFTP_MODEM_ADDRESS:
4051             if (length == 4)
4052               {
4053                 proto_tree_add_item (tlv_tree,
4054                                      hf_docsis_tlv_tftp_prov_modem_address,
4055                                      tvb, pos, length, ENC_BIG_ENDIAN);
4056               }
4057             else
4058               {
4059                 THROW (ReportedBoundsError);
4060               }
4061             break;
4062           case TLV_SW_UPG_SRVR:
4063             if (length == 4)
4064               {
4065                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_sw_upg_srvr,
4066                                      tvb, pos, length, ENC_BIG_ENDIAN);
4067               }
4068             else
4069               {
4070                 THROW (ReportedBoundsError);
4071               }
4072             break;
4073           case TLV_UPSTREAM_CLASSIFIER:
4074           case TLV_DOWN_CLASSIFIER:
4075             dissect_classifiers (tvb, tlv_tree, pos, length, type);
4076             break;
4077           case TLV_UPSTREAM_SERVICE_FLOW:
4078           case TLV_DOWN_SERVICE_FLOW:
4079             dissect_sflow (tvb, tlv_tree, pos, length, type);
4080             break;
4081           case TLV_PHS:
4082             dissect_phs (tvb, tlv_tree, pos, length);
4083             break;
4084           case TLV_HMAC_DIGEST:
4085             if (length == 20)
4086               {
4087                 proto_tree_add_item (tlv_tree,
4088                                      hf_docsis_tlv_hmac_digest, tvb,
4089                                      pos, length, ENC_NA);
4090               }
4091             else
4092               {
4093                 THROW (ReportedBoundsError);
4094               }
4095             break;
4096           case TLV_MAX_CLASSIFIERS:
4097             if (length == 2)
4098               {
4099                 proto_tree_add_item (tlv_tree,
4100                                      hf_docsis_tlv_max_classifiers, tvb,
4101                                      pos, length, FALSE);
4102               }
4103             else
4104               {
4105                 THROW (ReportedBoundsError);
4106               }
4107             break;
4108           case TLV_PRIVACY_ENABLE:
4109             if (length == 1)
4110               {
4111                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_privacy_enable,
4112                                      tvb, pos, length, ENC_BIG_ENDIAN);
4113               }
4114             else
4115               {
4116                 THROW (ReportedBoundsError);
4117               }
4118             break;
4119           case TLV_AUTH_BLOCK:
4120             proto_tree_add_item (tlv_tree, hf_docsis_tlv_auth_block,
4121                                  tvb, pos, length, ENC_NA);
4122             break;
4123           case TLV_KEY_SEQ_NUM:
4124             if (length == 1)
4125               {
4126                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_key_seq_num, tvb,
4127                                      pos, length, ENC_NA);
4128               }
4129             else
4130               {
4131                 THROW (ReportedBoundsError);
4132               }
4133             break;
4134           case TLV_MFGR_CVC:
4135             proto_tree_add_item (tlv_tree, hf_docsis_tlv_mfgr_cvc,
4136                                  tvb, pos, length, ENC_NA);
4137             break;
4138           case TLV_COSIGN_CVC:
4139             proto_tree_add_item (tlv_tree, hf_docsis_tlv_cosign_cvc,
4140                                  tvb, pos, length, ENC_NA);
4141             break;
4142           case TLV_SNMPV3_KICKSTART:
4143             dissect_snmpv3_kickstart(tvb, tlv_tree, pos, length);
4144             break;
4145           case TLV_SUBS_MGMT_CTRL:
4146             proto_tree_add_item (tlv_tree, hf_docsis_tlv_subs_mgmt_ctrl,
4147                                  tvb, pos, length, ENC_NA);
4148             break;
4149           case TLV_SUBS_MGMT_CPE:
4150             if ((length % 4) == 0)
4151               {
4152                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_subs_mgmt_ip_table,
4153                                      tvb, pos, length, ENC_NA);
4154                 for (x = 0; x < length; x+=4)
4155                   {
4156                     proto_tree_add_item (tlv_tree,
4157                                          hf_docsis_tlv_subs_mgmt_ip_entry,
4158                                          tvb, pos + x, 4, ENC_BIG_ENDIAN);
4159                   }
4160               }
4161             else
4162               {
4163                 THROW (ReportedBoundsError);
4164               }
4165             break;
4166           case TLV_SUBS_MGMT_FLTR:
4167             proto_tree_add_item (tlv_tree,
4168                                  hf_docsis_tlv_subs_mgmt_filter_grps,
4169                                  tvb, pos, length, ENC_NA);
4170             break;
4171           case TLV_SNMPV3_NTFY_RCVR:
4172             proto_tree_add_item(tlv_tree,
4173                                 hf_docsis_tlv_snmpv3_ntfy_rcvr,
4174                                 tvb, pos, length, ENC_NA);
4175             break;
4176           case TLV_ENABLE_20_MODE:
4177             if (length == 1)
4178               {
4179                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_enable_20_mode,
4180                                      tvb, pos, length, ENC_BIG_ENDIAN);
4181               }
4182             else
4183               {
4184                 THROW (ReportedBoundsError);
4185               }
4186             break;
4187           case TLV_ENABLE_TEST_MODES:
4188             if (length == 1)
4189               {
4190                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_enable_test_modes,
4191                                      tvb, pos, length, ENC_BIG_ENDIAN);
4192               }
4193             else
4194               {
4195                 THROW (ReportedBoundsError);
4196               }
4197             break;
4198           case TLV_DS_CH_LIST:
4199             dissect_ds_ch_list(tvb, tlv_tree, pos, length);
4200             break;
4201           case TLV_MC_MAC_ADDRESS:
4202             if (length == 6)
4203               {
4204                 proto_tree_add_item(tlv_tree, hf_docsis_tlv_mc_mac_address,
4205                                     tvb, pos, length, FALSE);
4206               }
4207             else
4208               {
4209                 THROW (ReportedBoundsError);
4210               }
4211             break;
4212           case TLV_VENDOR_SPEC:
4213             vsif_tvb = tvb_new_subset (tvb, pos, length, length);
4214             call_dissector (docsis_vsif_handle, vsif_tvb, pinfo, tlv_tree);
4215             break;
4216           case TLV_DUT_FILTER:
4217             dissect_dut_filter(tvb, tlv_tree, pos, length);
4218             break;
4219           case TLV_TCC:
4220             dissect_tcc(tvb, pinfo, tlv_tree, pos, length);
4221             break;
4222           case TLV_SID_CL:
4223             dissect_sid_cl(tvb, tlv_tree, pos, length);
4224             break;
4225           case TLV_RCP:
4226             dissect_rcp(tvb, pinfo, tlv_tree, pos, length);
4227             break;
4228           case TLV_RCC:
4229             dissect_rcc(tvb, pinfo, tlv_tree, pos, length);
4230             break;
4231           case TLV_DSID:
4232             dissect_dsid(tvb, tlv_tree, pos, length);
4233             break;
4234           case TLV_SEC_ASSOC:
4235             dissect_sec_assoc(tvb, tlv_tree, pos, length);
4236             break;
4237           case TLV_INIT_CH_TIMEOUT:
4238             if (length == 2)
4239               {
4240                 proto_tree_add_item(tlv_tree, hf_docsis_tlv_init_ch_timeout,
4241                                     tvb, pos, length, ENC_BIG_ENDIAN);
4242               }
4243             else
4244               {
4245                 THROW (ReportedBoundsError);
4246               }
4247             break;
4248           case TLV_CH_ASGN:
4249             dissect_ch_asgn(tvb, tlv_tree, pos, length);
4250             break;
4251           case TLV_CM_INIT_REASON:
4252             if (length == 1)
4253               {
4254                 proto_tree_add_item(tlv_tree, hf_docsis_tlv_cm_init_reason,
4255                                     tvb, pos, length, ENC_BIG_ENDIAN);
4256               }
4257             else
4258               {
4259                 THROW (ReportedBoundsError);
4260               }
4261             break;
4262           case TLV_SW_UPG_SRVR_IPV6:
4263             if (length == 16)
4264               {
4265                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_sw_upg_srvr_ipv6,
4266                                      tvb, pos, length, ENC_NA);
4267               }
4268             else
4269               {
4270                 THROW (ReportedBoundsError);
4271               }
4272             break;
4273           case TLV_TFTP_PROV_CM_IPV6_ADDR:
4274             if (length == 16)
4275               {
4276                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_tftp_prov_cm_ipv6_addr,
4277                                      tvb, pos, length, ENC_NA);
4278               }
4279             else
4280               {
4281                 THROW (ReportedBoundsError);
4282               }
4283             break;
4284           case TLV_US_DROP_CLFY:
4285             proto_tree_add_item (tlv_tree, hf_docsis_tlv_us_drop_clfy,
4286                                  tvb, pos, length, ENC_NA);
4287             break;
4288           case TLV_SUBS_MGMT_IPV6_LST:
4289             proto_tree_add_item (tlv_tree, hf_docsis_tlv_subs_mgmt_ipv6_lst,
4290                                  tvb, pos, length, ENC_NA);
4291             break;
4292           case TLV_US_DROP_CLFY_GROUP_ID:
4293             proto_tree_add_item (tlv_tree, hf_docsis_tlv_us_drop_clfy_group_id,
4294                                  tvb, pos, length, ENC_NA);
4295             break;
4296           case TLV_SUBS_MGMT_CTRL_MAX_CPE_IPV6:
4297             if (length == 2)
4298               {
4299                 proto_tree_add_item (tlv_tree, hf_docsis_tlv_subs_mgmt_ctrl_max_cpe_ipv6,
4300                                      tvb, pos, length, ENC_BIG_ENDIAN);
4301               }
4302             else
4303               {
4304                 THROW (ReportedBoundsError);
4305               }
4306             break;
4307           case TLV_CMTS_MC_SESS_ENC:
4308             dissect_cmts_mc_sess_enc(tvb, tlv_tree, pos, length);
4309             break;
4310           case TLV_END:
4311             break;
4312           }                     /* switch(type) */
4313
4314         pos = pos + length;
4315       }                         /* while (pos < total_len) */
4316   }                             /*if (tree) */
4317
4318 }
4319
4320
4321
4322
4323 /* Register the protocol with Wireshark */
4324
4325 /* this format is require because a script is used to build the C function
4326    that calls all the protocol registration.
4327 */
4328
4329
4330 void
4331 proto_register_docsis_tlv (void)
4332 {
4333
4334 /* Setup list of header fields  See Section 1.6.1 for details*/
4335   static hf_register_info hf[] = {
4336     {&hf_docsis_tlv_down_freq,
4337      {"1 Downstream Frequency", "docsis_tlv.downfreq",
4338       FT_UINT32, BASE_DEC, NULL, 0x0,
4339       "Downstream Frequency", HFILL}
4340      },
4341     {&hf_docsis_tlv_upstream_chid,
4342      {"2 Upstream Channel ID", "docsis_tlv.upchid",
4343       FT_UINT8, BASE_DEC, NULL, 0x0,
4344       "Service Identifier", HFILL}
4345      },
4346     {&hf_docsis_tlv_net_access,
4347      {"3 Network Access", "docsis_tlv.netaccess",
4348       FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
4349       "Network Access TLV", HFILL}
4350      },
4351     {&hf_docsis_tlv_cos,
4352      {"4 COS Encodings", "docsis_tlv.cos",
4353       FT_BYTES, BASE_NONE, NULL, 0x0,
4354       NULL, HFILL}
4355      },
4356     {&hf_docsis_tlv_cos_id,
4357      {".1 Class ID", "docsis_tlv.cos.id",
4358       FT_UINT8, BASE_DEC, NULL, 0x0,
4359       "Class ID", HFILL}
4360      },
4361     {&hf_docsis_tlv_cos_sid,
4362      {".2 Service ID", "docsis_tlv.cos.sid",
4363       FT_UINT16, BASE_DEC, NULL, 0x0,
4364       "Service ID", HFILL}
4365      },
4366     {&hf_docsis_tlv_cos_max_down,
4367      {".2 Max Downstream Rate (bps)", "docsis_tlv.cos.maxdown",
4368       FT_UINT32, BASE_DEC, NULL, 0x0,
4369       "Max Downstream Rate", HFILL}
4370      },
4371     {&hf_docsis_tlv_cos_max_up,
4372      {".3 Max Upstream Rate (bps)", "docsis_tlv.cos.maxup",
4373       FT_UINT32, BASE_DEC, NULL, 0x0,
4374       "Max Upstream Rate", HFILL}
4375      },
4376     {&hf_docsis_tlv_cos_up_chnl_pri,
4377      {".4 Upstream Channel Priority", "docsis_tlv.cos.upchnlpri",
4378       FT_UINT8, BASE_DEC, NULL, 0x0,
4379       "Upstream Channel Priority", HFILL}
4380      },
4381     {&hf_docsis_tlv_cos_min_grntd_up,
4382      {".5 Guaranteed Upstream Rate", "docsis_tlv.cos.mingrntdup",
4383       FT_UINT32, BASE_DEC, NULL, 0x0,
4384       "Guaranteed Minimum Upstream Data Rate", HFILL}
4385      },
4386     {&hf_docsis_tlv_cos_max_up_burst,
4387      {".6 Maximum Upstream Burst", "docsis_tlv.cos.maxupburst",
4388       FT_UINT16, BASE_DEC, NULL, 0x0,
4389       "Maximum Upstream Burst", HFILL}
4390      },
4391     {&hf_docsis_tlv_cos_privacy_enable,
4392      {".7 COS Privacy Enable", "docsis_tlv.cos.privacy_enable",
4393       FT_BOOLEAN, BASE_NONE, TFS (&ena_dis_tfs), 0x0,
4394       "Class of Service Privacy Enable", HFILL}
4395      },
4396     {&hf_docsis_tlv_mcap,
4397      {"5 Modem Capabilities", "docsis_tlv.mcap",
4398       FT_BYTES, BASE_NONE, NULL, 0x0,
4399       "Modem Capabilities", HFILL}
4400      },
4401     {&hf_docsis_tlv_mcap_concat,
4402      {".1 Concatenation Support", "docsis_tlv.mcap.concat",
4403       FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
4404       "Concatenation Support", HFILL}
4405      },
4406     {&hf_docsis_tlv_mcap_docs_ver,
4407      {".2 Docsis Version", "docsis_tlv.map.docsver",
4408       FT_UINT8, BASE_DEC, VALS (docs_ver_vals), 0x0,
4409       "DOCSIS Version", HFILL}
4410      },
4411     {&hf_docsis_tlv_mcap_frag,
4412      {".3 Fragmentation Support", "docsis_tlv.mcap.frag",
4413       FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
4414       "Fragmentation Support", HFILL}
4415      },
4416     {&hf_docsis_tlv_mcap_phs,
4417      {".4 PHS Support", "docsis_tlv.mcap.phs",
4418       FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
4419       "PHS Support", HFILL}
4420      },
4421     {&hf_docsis_tlv_mcap_igmp,
4422      {".5 IGMP Support", "docsis_tlv.mcap.igmp",
4423       FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
4424       "IGMP Support", HFILL}
4425      },
4426     {&hf_docsis_tlv_mcap_privacy,
4427      {".6 Privacy Support", "docsis_tlv.mcap.privacy",
4428       FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
4429       "Privacy Support", HFILL}
4430      },
4431     {&hf_docsis_tlv_mcap_down_said,
4432      {".7 # Downstream SAIDs Supported", "docsis_tlv.mcap.downsaid",
4433       FT_UINT8, BASE_DEC, NULL, 0x0,
4434       "Downstream Said Support", HFILL}
4435      },
4436     {&hf_docsis_tlv_mcap_up_sid,
4437      {".8 # Upstream SAIDs Supported", "docsis_tlv.mcap.upsid",
4438       FT_UINT8, BASE_DEC, NULL, 0x0,
4439       "Upstream SID Support", HFILL}
4440      },
4441     {&hf_docsis_tlv_mcap_8021P_filter,
4442      {".9 802.1P Filtering Support", "docsis_tlv.mcap.dot1pfiltering",
4443       FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x80,
4444       "802.1P Filtering Support", HFILL}
4445      },
4446     {&hf_docsis_tlv_mcap_8021Q_filter,
4447      {".9 802.1Q Filtering Support", "docsis_tlv.mcap.dot1qfilt",
4448       FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x40,
4449       "802.1Q Filtering Support", HFILL}
4450      },
4451     {&hf_docsis_tlv_mcap_xmit_eq_taps_per_sym,
4452      {".10 Xmit Equalizer Taps/Sym", "docsis_tlv.mcap.tapspersym",
4453       FT_UINT8, BASE_DEC, NULL, 0x0,
4454       "Transmit Equalizer Taps per Symbol", HFILL}
4455      },
4456     {&hf_docsis_tlv_mcap_xmit_eq_taps,
4457      {".11 # Xmit Equalizer Taps", "docsis_tlv.mcap.numtaps",
4458       FT_UINT8, BASE_DEC, NULL, 0x0,
4459       "Number of Transmit Equalizer Taps", HFILL}
4460      },
4461     {&hf_docsis_tlv_mcap_dcc,
4462      {".12 DCC Support", "docsis_tlv.mcap.dcc",
4463       FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
4464       "DCC Support", HFILL}
4465      },
4466         {&hf_docsis_tlv_mcap_ip_filters,
4467          {".13 IP Filters Support","docsis_tlv.mcap.ipfilters",
4468      FT_UINT16, BASE_DEC, NULL, 0x0,
4469          "IP Filters Support", HFILL}
4470         },
4471         {&hf_docsis_tlv_mcap_llc_filters,
4472          {".14 LLC Filters Support","docsis_tlv.mcap.llcfilters",
4473      FT_UINT16, BASE_DEC, NULL, 0x0,
4474          "LLC Filters Support", HFILL}
4475         },
4476         {&hf_docsis_tlv_mcap_exp_unicast_sid,
4477          {".15 Expanded Unicast SID Space","docsis_tlv.mcap.exucsid",
4478      FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
4479          "Expanded Unicast SID Space", HFILL}
4480         },
4481         {&hf_docsis_tlv_mcap_rnghoff_cm,
4482          {".16 Ranging Hold-Off (CM)","docsis_tlv.mcap.rnghoffcm",
4483      FT_UINT32, BASE_DEC, VALS (on_off_vals), 0x1,
4484          "Ranging Hold-Off (CM)", HFILL}
4485         },
4486         {&hf_docsis_tlv_mcap_rnghoff_erouter,
4487          {".16 Ranging Hold-Off (ePS or eRouter)",
4488           "docsis_tlv.mcap.rnghofferouter",
4489      FT_UINT32, BASE_DEC, VALS (on_off_vals), 0x2,
4490          "Ranging Hold-Off (ePS or eRouter)", HFILL}
4491         },
4492         {&hf_docsis_tlv_mcap_rnghoff_emta,
4493          {".16 Ranging Hold-Off (eMTA or EDVA)", 
4494           "docsis_tlv.mcap.rnghoffemta",
4495      FT_UINT32, BASE_DEC, VALS (on_off_vals), 0x4,
4496          "Ranging Hold-Off (eMTA or EDVA)", HFILL}
4497         },
4498         {&hf_docsis_tlv_mcap_rnghoff_estb,
4499          {".16 Ranging Hold-Off (DSG/eSTB)",
4500           "docsis_tlv.mcap.rnghoffestb",
4501      FT_UINT32, BASE_DEC, VALS (on_off_vals), 0x8,
4502          "Ranging Hold-Off (DSG/eSTB)", HFILL}
4503         },
4504         {&hf_docsis_tlv_mcap_l2vpn,
4505          {".17 L2VPN Capability","docsis_tlv.mcap.l2vpn",
4506      FT_BYTES, BASE_NONE, NULL, 0x0,
4507          "L2VPN Capability", HFILL}
4508         },
4509         {&hf_docsis_tlv_mcap_l2vpn_esafe,
4510          {".18 L2VPN eSAFE Host Capability","docsis_tlv.mcap.l2vpnesafe",
4511      FT_BYTES, BASE_NONE, NULL, 0x0,
4512          "L2VPN eSAFE Host Capability", HFILL}
4513         },
4514         {&hf_docsis_tlv_mcap_dut_filtering,
4515          {".19 Downstream Unencrypted Traffic (DUT) Filtering",
4516                 "docsis_tlv.mcap.dut",
4517      FT_BYTES, BASE_NONE, NULL, 0x0,
4518          "Downstream Unencrypted Traffic (DUT) Filtering", HFILL}
4519         },
4520         {&hf_docsis_tlv_mcap_us_freq_range,
4521          {".20 Upstream Frequency Range Support",
4522                 "docsis_tlv.mcap.usfreqrng",
4523      FT_UINT8, BASE_DEC, VALS (docsis_freq_rng_vals), 0x0,
4524          "Upstream Frequency Range Support", HFILL}
4525         },
4526         {&hf_docsis_tlv_mcap_us_srate_160,
4527          {".21 Upstream Symbol Rate 160ksps supported",
4528                 "docsis_tlv.mcap.srate160",
4529      FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x1,
4530          "Upstream Symbol Rate 160ksps supported", HFILL}
4531         },
4532         {&hf_docsis_tlv_mcap_us_srate_320,
4533          {".21 Upstream Symbol Rate 320ksps supported",
4534                 "docsis_tlv.mcap.srate320",
4535      FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x2,
4536          "Upstream Symbol Rate 320ksps supported", HFILL}
4537         },
4538         {&hf_docsis_tlv_mcap_us_srate_640,
4539          {".21 Upstream Symbol Rate 640ksps supported",
4540                 "docsis_tlv.mcap.srate640",
4541      FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x4,
4542          "Upstream Symbol Rate 640ksps supported", HFILL}
4543         },
4544         {&hf_docsis_tlv_mcap_us_srate_1280,
4545          {".21 Upstream Symbol Rate 1280ksps supported",
4546                 "docsis_tlv.mcap.srate1280",
4547      FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x8,
4548          "Upstream Symbol Rate 1280ksps supported", HFILL}
4549         },
4550         {&hf_docsis_tlv_mcap_us_srate_2560,
4551          {".21 Upstream Symbol Rate 2560ksps supported",
4552                 "docsis_tlv.mcap.srate2560",
4553      FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x10,
4554          "Upstream Symbol Rate 2560ksps supported", HFILL}
4555         },
4556         {&hf_docsis_tlv_mcap_us_srate_5120,
4557          {".21 Upstream Symbol Rate 5120ksps supported",
4558                 "docsis_tlv.mcap.srate5120",
4559      FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x20,
4560          "Upstream Symbol Rate 5120ksps supported", HFILL}
4561         },
4562         {&hf_docsis_tlv_mcap_sac,
4563          {".22 Selectable Active Code Mode 2 Support","docsis_tlv.mcap.sac",
4564      FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
4565          "Selectable Active Code Mode 2 Support", HFILL}
4566         },
4567         {&hf_docsis_tlv_mcap_code_hop_mode2,
4568          {".23 Code Hopping Mode 2 Support","docsis_tlv.mcap.codehopm2",
4569      FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
4570          "Code Hopping Mode 2 Support", HFILL}
4571         },
4572         {&hf_docsis_tlv_mcap_mtc,
4573          {".24 Multiple Transmit Channel Support","docsis_tlv.mcap.mtc",
4574      FT_UINT8, BASE_DEC, NULL, 0x0,
4575          "Multiple Transmit Channel Support", HFILL}
4576         },
4577         {&hf_docsis_tlv_mcap_512_msps_utc,
4578          {".25 5.12 Msps Upstream Transmit Channel Support",
4579                 "docsis_tlv.mcap.512mspsutc",
4580      FT_UINT8, BASE_DEC, NULL, 0x0,
4581          "5.12 Msps Upstream Transmit Channel Support", HFILL}
4582         },
4583         {&hf_docsis_tlv_mcap_256_msps_utc,
4584          {".26 2.56 Msps Upstream Transmit Channel Support",
4585                 "docsis_tlv.mcap.256mspsutc",
4586      FT_UINT8, BASE_DEC, NULL, 0x0,
4587          "2.56 Msps Upstream Transmit Channel Support", HFILL}
4588         },
4589         {&hf_docsis_tlv_mcap_total_sid_cluster,
4590          {".27 Total SID Cluster Support","docsis_tlv.mcap.totalsidcl",
4591      FT_UINT8, BASE_DEC, NULL, 0x0,
4592          "Total SID Cluster Support", HFILL}
4593         },
4594         {&hf_docsis_tlv_mcap_sid_per_sf,
4595          {".28 SID Clusters per Service Flow Support",
4596                 "docsis_tlv.mcap.sidpersf",
4597      FT_UINT8, BASE_DEC, NULL, 0x0,
4598          "SID Clusters per Service Flow Support", HFILL}
4599         },
4600         {&hf_docsis_tlv_mcap_mrc,
4601          {".29 Multiple Receive Channel Support","docsis_tlv.mcap.mrc",
4602      FT_UINT8, BASE_DEC, NULL, 0x0,
4603          "Multiple Receive Channel Support", HFILL}
4604         },
4605         {&hf_docsis_tlv_mcap_total_dsid,
4606          {".30 Total Downstream Service ID (DSID) Support",
4607                 "docsis_tlv.mcap.totaldsid",
4608      FT_UINT8, BASE_DEC, NULL, 0x0,
4609          "Total Downstream Service ID (DSID) Support", HFILL}
4610         },
4611         {&hf_docsis_tlv_mcap_reseq_dsid,
4612          {".31 Resequencing Downstream Service ID (DSID) Support",
4613                 "docsis_tlv.mcap.reseqdsid",
4614      FT_UINT8, BASE_DEC, NULL, 0x0,
4615          "Resequencing Downstream Service ID (DSID) Support", HFILL}
4616         },
4617         {&hf_docsis_tlv_mcap_mc_dsid,
4618          {".32 Multicast Downstream Service ID (DSID) Support",
4619                 "docsis_tlv.mcap.mcdsid",
4620      FT_UINT8, BASE_DEC, NULL, 0x0,
4621          "Multicast Downstream Service ID (DSID) Support", HFILL}
4622         },
4623         {&hf_docsis_tlv_mcap_mc_dsid_fwd,
4624          {".33 Mulitcast DSID Forwarding","docsis_tlv.mcap.mcdsidfwd",
4625      FT_UINT8, BASE_DEC, VALS (mc_dsid_fwd_vals), 0x0,
4626          "Mulitcast DSID Forwarding", HFILL}
4627         },
4628         {&hf_docsis_tlv_mcap_fctype_fwd,
4629          {".34 Frame Control Type Forwarding Capability",
4630                 "docsis_tlv.mcap.fctypefwd",
4631      FT_UINT8, BASE_DEC, VALS (fctype_fwd_vals), 0x0,
4632          "Frame Control Type Forwarding Capability", HFILL}
4633         },
4634         {&hf_docsis_tlv_mcap_dpv_path,
4635          {".35 DPV Capability (per Path)","docsis_tlv.mcap.dpvpath",
4636      FT_UINT8, BASE_DEC, NULL, 0x1,
4637          "DPV Capability (per Path)", HFILL}
4638         },
4639         {&hf_docsis_tlv_mcap_dpv_packet,
4640          {".35 DPV Capability (per Packet)","docsis_tlv.mcap.dpvpacket",
4641      FT_UINT8, BASE_DEC, NULL, 0x2,
4642          "DPV Capability (per Packet)", HFILL}
4643         },
4644         {&hf_docsis_tlv_mcap_ugs,
4645          {".36 Unsolicited Grant Service Support","docsis_tlv.mcap.ugs",
4646      FT_UINT8, BASE_DEC, NULL, 0x0,
4647          "Unsolicited Grant Service Support", HFILL}
4648         },
4649         {&hf_docsis_tlv_mcap_map_ucd,
4650          {".37 MAP and UCD Receipt Support","docsis_tlv.mcap.mapucd",
4651      FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
4652          "MAP and UCD Receipt Support", HFILL}
4653         },
4654         {&hf_docsis_tlv_mcap_udc,
4655          {".38 Upstream Drop Classifier Support","docsis_tlv.mcap.udc",
4656      FT_UINT16, BASE_DEC, NULL, 0x0,
4657          "Upstream Drop Classifier Support", HFILL}
4658         },
4659         {&hf_docsis_tlv_mcap_ipv6,
4660          {".39 IPv6 Support","docsis_tlv.mcap.ipv6",
4661      FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
4662          "IPv6 Support", HFILL}
4663         },
4664         {&hf_docsis_tlv_mcap_ext_us_trans_power,
4665          {".40 Extended Upstream Transmit Power Capability",
4666                 "docsis_tlv.mcap.extustrpwr",
4667      FT_UINT8, BASE_DEC, NULL, 0x0,
4668          "Extended Upstream Transmit Power Capability", HFILL}
4669         },
4670     {&hf_docsis_tlv_cm_mic,
4671      {"6 CM MIC", "docsis_tlv.cmmic",
4672       FT_BYTES, BASE_NONE, NULL, 0x0,
4673       "Cable Modem Message Integrity Check", HFILL}
4674      },
4675     {&hf_docsis_tlv_cmts_mic,
4676      {"7 CMTS MIC", "docsis_tlv.cmtsmic",
4677       FT_BYTES, BASE_NONE, NULL, 0x0,
4678       "CMTS Message Integrity Check", HFILL}
4679      },
4680     {&hf_docsis_tlv_vendor_id,
4681      {"8 Vendor ID", "docsis_tlv.vendorid",
4682       FT_BYTES, BASE_NONE, NULL, 0x0,
4683       "Vendor Identifier", HFILL}
4684      },
4685     {&hf_docsis_tlv_sw_file,
4686      {"9 Software Upgrade File", "docsis_tlv.sw_upg_file",
4687       FT_STRINGZ, BASE_NONE, NULL, 0x0,
4688       "Software Upgrade File", HFILL}
4689      },
4690     {&hf_docsis_tlv_snmp_access,
4691      {"10 SNMP Write Access", "docsis_tlv.snmp_access",
4692       FT_BYTES, BASE_NONE, NULL, 0x0,
4693       "SNMP Write Access", HFILL}
4694      },
4695     {&hf_docsis_tlv_snmp_obj,
4696      {"11 SNMP Object", "docsis_tlv.snmp_obj",
4697       FT_BYTES, BASE_NONE, NULL, 0x0,
4698       "SNMP Object", HFILL}
4699      },
4700     {&hf_docsis_tlv_modem_addr,
4701      {"12 Modem IP Address", "docsis_tlv.modemaddr",
4702       FT_IPv4, BASE_NONE, NULL, 0x0,
4703       "Modem IP Address", HFILL}
4704      },
4705     {&hf_docsis_tlv_svc_unavail,
4706      {"13 Service Not Available Response", "docsis_tlv.svcunavail",
4707       FT_BYTES, BASE_NONE, NULL, 0x0,
4708       "Service Not Available Response", HFILL}
4709      },
4710     {&hf_docsis_tlv_svc_unavail_classid,
4711      {"Service Not Available: (Class ID)", "docsis_tlv.svcunavail.classid",
4712       FT_UINT8, BASE_DEC, NULL, 0x0,
4713       "Service Not Available (Class ID)", HFILL}
4714      },
4715     {&hf_docsis_tlv_svc_unavail_type,
4716      {"Service Not Available (Type)", "docsis_tlv.svcunavail.type",
4717       FT_UINT8, BASE_DEC, NULL, 0x0,
4718       NULL, HFILL}
4719      },
4720     {&hf_docsis_tlv_svc_unavail_code,
4721      {"Service Not Available (Code)", "docsis_tlv.svcunavail.code",
4722       FT_UINT8, BASE_DEC, VALS(docsis_conf_code), 0x0,
4723       NULL, HFILL}
4724      },
4725     {&hf_docsis_tlv_cpe_ethernet,
4726      {"14 CPE Ethernet Addr", "docsis_tlv.cpe_ether",
4727       FT_ETHER, BASE_NONE, NULL, 0x0,
4728       "CPE Ethernet Addr", HFILL}
4729      },
4730     {&hf_docsis_tlv_bpi,
4731      {"17 Baseline Privacy Encoding", "docsis_tlv.bpi",
4732       FT_BYTES, BASE_NONE, NULL, 0x0,
4733       "Baseline Privacy Encoding", HFILL}
4734      },
4735     {&hf_docsis_tlv_max_cpe,
4736      {"18 Max # of CPE's", "docsis_tlv.maxcpe",
4737       FT_UINT8, BASE_DEC, NULL, 0x0,
4738       "Max Number of CPE's", HFILL}
4739      },
4740     {&hf_docsis_tlv_tftp_server_timestamp,
4741      {"19 TFTP Server Timestamp", "docsis_tlv.tftp_time",
4742       FT_UINT32, BASE_DEC, NULL, 0x0,
4743       "TFTP Server TimeStamp", HFILL}
4744      },
4745     {&hf_docsis_tlv_tftp_prov_modem_address,
4746      {"20 TFTP Server Provisioned Modem Addr", "docsis_tlv.tftpmodemaddr",
4747       FT_IPv4, BASE_NONE, NULL, 0x0,
4748       "TFTP Server Provisioned Modem Addr", HFILL}
4749      },
4750     {&hf_docsis_tlv_sw_upg_srvr,
4751      {"21 Software Upgrade Server", "docsis_tlv.sw_upg_srvr",
4752       FT_IPv4, BASE_NONE, NULL, 0x0,
4753       "Software Upgrade Server", HFILL}
4754      },
4755     {&hf_docsis_tlv_upclsfr,
4756      {"22 Upstream Classifier", "docsis_tlv.upclsfr",
4757       FT_BYTES, BASE_NONE, NULL, 0x0,
4758       NULL, HFILL}
4759      },
4760     {&hf_docsis_tlv_downclsfr,
4761      {"23 Downstream Classifier", "docsis_tlv.downclsfr",
4762       FT_BYTES, BASE_NONE, NULL, 0x0,
4763       NULL, HFILL}
4764      },
4765     {&hf_docsis_tlv_clsfr_ref,
4766      {".1 Classifier Ref", "docsis_tlv.clsfr.ref",
4767       FT_UINT8, BASE_DEC, NULL, 0x0,
4768       "Classifier Reference", HFILL}
4769      },
4770     {&hf_docsis_tlv_clsfr_id,
4771      {".2 Classifier ID", "docsis_tlv.clsfr.id",
4772       FT_UINT16, BASE_DEC, NULL, 0x0,
4773       "Classifier ID", HFILL}
4774      },
4775     {&hf_docsis_tlv_clsfr_sflow_ref,
4776      {".3 Service Flow Ref", "docsis_tlv.clsfr.sflowref",
4777       FT_UINT16, BASE_DEC, NULL, 0x0,
4778       "Service Flow Reference", HFILL}
4779      },
4780     {&hf_docsis_tlv_clsfr_sflow_id,
4781      {".4 Service Flow ID", "docsis_tlv.clsfr.sflowid",
4782       FT_UINT16, BASE_DEC, NULL, 0x0,
4783       "Service Flow ID", HFILL}
4784      },
4785     {&hf_docsis_tlv_clsfr_rule_pri,
4786      {".5 Rule Priority", "docsis_tlv.clsfr.rulepri",
4787       FT_UINT8, BASE_DEC, NULL, 0x0,
4788       "Rule Priority", HFILL}
4789      },
4790     {&hf_docsis_tlv_clsfr_act_state,
4791      {".6 Activation State", "docsis_tlv.clsfr.actstate",
4792       FT_BOOLEAN, BASE_NONE, TFS (&activation_tfs), 0x0,
4793       "Classifier Activation State", HFILL}
4794      },
4795     {&hf_docsis_tlv_clsfr_dsc_act,
4796      {".7 DSC Action", "docsis_tlv.clsfr.dscact",
4797       FT_UINT8, BASE_DEC, VALS (dsc_act_vals), 0x0,
4798       "Dynamic Service Change Action", HFILL}
4799      },
4800     {&hf_docsis_tlv_clsfr_err,
4801      {".8 Error Encodings", "docsis_tlv.clsfr.err",
4802       FT_BYTES, BASE_NONE, NULL, 0x0,
4803       "Error Encodings", HFILL}
4804      },
4805     {&hf_docsis_tlv_clsfr_err_param,
4806      {"..1 Param Subtype", "docsis_tlv.clsfr.err.param",
4807       FT_UINT8, BASE_DEC, NULL, 0x0,
4808       "Parameter Subtype", HFILL}
4809      },
4810     {&hf_docsis_tlv_clsfr_err_code,
4811      {"..2 Error Code", "docsis_tlv.clsfr.err.code",
4812       FT_UINT8, BASE_DEC, VALS(docsis_conf_code), 0x0,
4813       "TCP/UDP Destination Port End", HFILL}
4814      },
4815     {&hf_docsis_tlv_clsfr_err_msg,
4816      {"..3 Error Message", "docsis_tlv.clsfr.err.msg",
4817       FT_STRINGZ, BASE_NONE, NULL, 0x0,
4818       "Error Message", HFILL}
4819      },
4820     {&hf_docsis_tlv_ipclsfr,
4821      {".9 IP Classifier Encodings", "docsis_tlv.clsfr.ip",
4822       FT_BYTES, BASE_NONE, NULL, 0x0,
4823       "IP Classifier Encodings", HFILL}
4824      },
4825     {&hf_docsis_tlv_ipclsfr_tosmask,
4826      {"..1 Type Of Service Mask", "docsis_tlv.clsfr.ip.tosmask",
4827       FT_BYTES, BASE_NONE, NULL, 0x0,
4828       "Type Of Service Mask", HFILL}
4829      },
4830     {&hf_docsis_tlv_ipclsfr_ipproto,
4831      {"..2 IP Protocol", "docsis_tlv.clsfr.ip.ipproto",
4832       FT_UINT16, BASE_DEC, NULL, 0x0,
4833       "IP Protocol", HFILL}
4834      },
4835     {&hf_docsis_tlv_ipclsfr_src,
4836      {"..3 Source Address", "docsis_tlv.clsfr.ip.src",
4837       FT_IPv4, BASE_NONE, NULL, 0x0,
4838       "Source Address", HFILL}
4839      },
4840     {&hf_docsis_tlv_ipclsfr_dst,
4841      {"..4 Destination Address", "docsis_tlv.clsfr.ip.dst",
4842       FT_IPv4, BASE_NONE, NULL, 0x0,
4843       "Destination Address", HFILL}
4844      },
4845     {&hf_docsis_tlv_ipclsfr_srcmask,
4846      {"..5 Source Mask", "docsis_tlv.clsfr.ip.smask",
4847       FT_IPv4, BASE_NONE, NULL, 0x0,
4848       "Source Mask", HFILL}
4849      },
4850     {&hf_docsis_tlv_ipclsfr_dstmask,
4851      {"..6 Destination Mask", "docsis_tlv.clsfr.ip.dmask",
4852       FT_IPv4, BASE_NONE, NULL, 0x0,
4853       "Destination Mask", HFILL}
4854      },
4855     {&hf_docsis_tlv_ipclsfr_sport_start,
4856      {"..7 Source Port Start", "docsis_tlv.clsfr.ip.sportstart",
4857       FT_UINT16, BASE_DEC, NULL, 0x0,
4858       "TCP/UDP Source Port Start", HFILL}
4859      },
4860     {&hf_docsis_tlv_ipclsfr_sport_end,
4861      {"..8 Source Port End", "docsis_tlv.clsfr.ip.sportend",
4862       FT_UINT16, BASE_DEC, NULL, 0x0,
4863       "TCP/UDP Source Port End", HFILL}
4864      },
4865     {&hf_docsis_tlv_ipclsfr_dport_start,
4866      {"..9 Dest Port Start", "docsis_tlv.clsfr.ip.dportstart",
4867       FT_UINT16, BASE_DEC, NULL, 0x0,
4868       "TCP/UDP Destination Port Start", HFILL}
4869      },
4870     {&hf_docsis_tlv_ipclsfr_dport_end,
4871      {"..10 Dest Port End", "docsis_tlv.clsfr.ip.dportend",
4872       FT_UINT16, BASE_DEC, NULL, 0x0,
4873       "TCP/UDP Destination Port End", HFILL}
4874      },
4875     {&hf_docsis_tlv_ethclsfr,
4876      {".10 Ethernet Classifier Encodings", "docsis_tlv.clsfr.eth",
4877       FT_BYTES, BASE_NONE, NULL, 0x0,
4878       "Ethernet Classifier Encodings", HFILL}
4879      },
4880     {&hf_docsis_tlv_ethclsfr_dmac,
4881      {"..1 Dest Mac Address", "docsis_tlv.clsfr.eth.dmac",
4882       FT_ETHER, BASE_NONE, NULL, 0x0,
4883       "Destination Mac Address", HFILL}
4884      },
4885     {&hf_docsis_tlv_ethclsfr_smac,
4886      {"..2 Source Mac Address", "docsis_tlv.clsfr.eth.smac",
4887       FT_ETHER, BASE_NONE, NULL, 0x0,
4888       "Source Mac Address", HFILL}
4889      },
4890     {&hf_docsis_tlv_ethclsfr_ethertype,
4891      {"..3 Ethertype", "docsis_tlv.clsfr.eth.ethertype",
4892       FT_UINT24, BASE_HEX, NULL, 0x0,
4893       "Ethertype", HFILL}
4894      },
4895     {&hf_docsis_tlv_dot1qclsfr,
4896      {".11 802.1Q Classifier Encodings", "docsis_tlv.clsfr.dot1q",
4897       FT_BYTES, BASE_NONE, NULL, 0x0,
4898       "802.1Q Classifier Encodings", HFILL}
4899      },
4900     {&hf_docsis_tlv_dot1qclsfr_user_pri,
4901      {"..1 User Priority", "docsis_tlv.clsfr.dot1q.userpri",
4902       FT_UINT16, BASE_HEX, NULL, 0x0,
4903       "User Priority", HFILL}
4904      },
4905     {&hf_docsis_tlv_dot1qclsfr_vlanid,
4906      {"..2 VLAN id", "docsis_tlv.clsfr.dot1q.ethertype",
4907       FT_UINT16, BASE_DEC, NULL, 0x0,
4908       "VLAN Id", HFILL}
4909      },
4910     {&hf_docsis_tlv_dot1qclsfr_vendorspec,
4911      {"..43 Vendor Specific Encodings", "docsis_tlv.clsfr.dot1q.vendorspec",
4912       FT_BYTES, BASE_NONE, NULL, 0x0,
4913       "Vendor Specific Encodings", HFILL}
4914      },
4915     {&hf_docsis_tlv_clsfr_vendor_spc,
4916      {".43 Vendor Specific Encodings", "docsis_tlv.clsfr.vendor",
4917       FT_BYTES, BASE_NONE, NULL, 0x0,
4918       "Vendor Specific Encodings", HFILL}
4919      },
4920     {&hf_docsis_tlv_upsflow,
4921      {"24 Upstream Service Flow", "docsis_tlv.upsflow",
4922       FT_BYTES, BASE_NONE, NULL, 0x0,
4923       NULL, HFILL}
4924      },
4925     {&hf_docsis_tlv_downsflow,
4926      {"25 Downstream Service Flow", "docsis_tlv.downsflow",
4927       FT_BYTES, BASE_NONE, NULL, 0x0,
4928       NULL, HFILL}
4929      },
4930     {&hf_docsis_tlv_sflow_ref,
4931      {".1 Service Flow Ref", "docsis_tlv.sflow.ref",
4932       FT_UINT16, BASE_DEC, NULL, 0x0,
4933       "Service Flow Reference", HFILL}
4934      },
4935     {&hf_docsis_tlv_sflow_id,
4936      {".2 Service Flow Id", "docsis_tlv.sflow.id",
4937       FT_UINT32, BASE_DEC, NULL, 0x0,
4938       "Service Flow Id", HFILL}
4939      },
4940     {&hf_docsis_tlv_sflow_sid,
4941      {".3 Service Identifier", "docsis_tlv.sflow.sid",
4942       FT_UINT16, BASE_DEC, NULL, 0x0,
4943       "Service Identifier", HFILL}
4944      },
4945     {&hf_docsis_tlv_sflow_classname,
4946      {".4 Service Class Name", "docsis_tlv.sflow.cname",
4947       FT_STRINGZ, BASE_NONE, NULL, 0x0,
4948       "Service Class Name", HFILL}
4949      },
4950     {&hf_docsis_tlv_sflow_err,
4951      {".5 Error Encodings", "docsis_tlv.sflow.err",
4952       FT_BYTES, BASE_NONE, NULL, 0x0,
4953       "Error Encodings", HFILL}
4954      },
4955     {&hf_docsis_tlv_sflow_err_param,
4956      {"..1 Param Subtype", "docsis_tlv.sflow.err.param",
4957       FT_UINT8, BASE_DEC, NULL, 0x0,
4958       "Parameter Subtype", HFILL}
4959      },
4960     {&hf_docsis_tlv_sflow_err_code,
4961      {"..2 Error Code", "docsis_tlv.sflow.err.code",
4962       FT_UINT8, BASE_DEC, VALS(docsis_conf_code), 0x0,
4963       "Error Code", HFILL}
4964      },
4965     {&hf_docsis_tlv_sflow_err_msg,
4966      {"..3 Error Message", "docsis_tlv.sflow.err.msg",
4967       FT_STRINGZ, BASE_NONE, NULL, 0x0,
4968       "Error Message", HFILL}
4969      },
4970     {&hf_docsis_tlv_sflow_qos_param,
4971      {".6 QOS Parameter Set", "docsis_tlv.sflow.qos",
4972       FT_UINT8, BASE_HEX, VALS (qos_param_vals), 0x0,
4973       "QOS Parameter Set", HFILL}
4974      },
4975     {&hf_docsis_tlv_sflow_traf_pri,
4976      {".7 Traffic Priority", "docsis_tlv.sflow.trafpri",
4977       FT_UINT8, BASE_DEC, NULL, 0x0,
4978       "Traffic Priority", HFILL}
4979      },
4980     {&hf_docsis_tlv_sflow_max_sus,
4981      {".8 Maximum Sustained Traffic Rate (bps)", "docsis_tlv.sflow.maxtrafrate",
4982       FT_UINT32, BASE_DEC, NULL, 0x0,
4983       "Maximum Sustained Traffic Rate (bps)", HFILL}
4984      },
4985     {&hf_docsis_tlv_sflow_max_burst,
4986      {".9 Maximum Burst (bps)", "docsis_tlv.sflow.maxburst",
4987       FT_UINT32, BASE_DEC, NULL, 0x0,
4988       "Maximum Burst (bps)", HFILL}
4989      },
4990     {&hf_docsis_tlv_sflow_min_traf,
4991      {".10 Minimum Traffic Rate (bps)", "docsis_tlv.sflow.mintrafrate",
4992       FT_UINT32, BASE_DEC, NULL, 0x0,
4993       "Minimum Traffic Rate (bps)", HFILL}
4994      },
4995     {&hf_docsis_tlv_sflow_ass_min_pkt_size,
4996      {".11 Assumed Min Reserved Packet Size", "docsis_tlv.sflow.assumed_min_pkt_size",
4997       FT_UINT16, BASE_DEC, NULL, 0x0,
4998       "Assumed Minimum Reserved Packet Size", HFILL}
4999      },
5000     {&hf_docsis_tlv_sflow_timeout_active,
5001      {".12 Timeout for Active Params (secs)", "docsis_tlv.sflow.act_timeout",
5002       FT_UINT16, BASE_DEC, NULL, 0x0,
5003       "Timeout for Active Params (secs)", HFILL}
5004      },
5005     {&hf_docsis_tlv_sflow_timeout_admitted,
5006      {".13 Timeout for Admitted Params (secs)", "docsis_tlv.sflow.adm_timeout",
5007       FT_UINT16, BASE_DEC, NULL, 0x0,
5008       "Timeout for Admitted Params (secs)", HFILL}
5009      },
5010     {&hf_docsis_tlv_sflow_max_down_latency,
5011      {".14 Maximum Downstream Latency (usec)", "docsis_tlv.sflow.max_down_lat",
5012       FT_UINT32, BASE_DEC, NULL, 0x0,
5013       "Maximum Downstream Latency (usec)", HFILL}
5014      },
5015     {&hf_docsis_tlv_sflow_max_concat_burst,
5016      {".14 Max Concat Burst", "docsis_tlv.sflow.maxconcat",
5017       FT_UINT16, BASE_DEC, NULL, 0x0,
5018       "Max Concatenated Burst", HFILL}
5019      },
5020     {&hf_docsis_tlv_sflow_sched_type,
5021      {".15 Scheduling Type", "docsis_tlv.sflow.schedtype",
5022       FT_UINT32, BASE_HEX, VALS (sched_type_vals), 0x0,
5023       "Scheduling Type", HFILL}
5024      },
5025     {&hf_docsis_tlv_sflow_reqxmit_pol,
5026      {".16 Request/Transmission Policy", "docsis_tlv.sflow.reqxmitpol",
5027       FT_UINT32, BASE_HEX, NULL, 0x0,
5028       "Request/Transmission Policy", HFILL}
5029      },
5030     {&hf_docsis_tlv_sflow_nominal_polling,
5031      {".17 Nominal Polling Interval(usec)", "docsis_tlv.sflow.nominal_polling",
5032       FT_UINT32, BASE_DEC, NULL, 0x0,
5033       "Nominal Polling Interval(usec)", HFILL}
5034      },
5035     {&hf_docsis_tlv_sflow_tolerated_jitter,
5036      {".18 Tolerated Poll Jitter (usec)", "docsis_tlv.sflow.toler_jitter",
5037       FT_UINT32, BASE_DEC, NULL, 0x0,
5038       "Tolerated Poll Jitter (usec)", HFILL}
5039      },
5040     {&hf_docsis_tlv_sflow_ugs_size,
5041      {".19 Unsolicited Grant Size (bytes)", "docsis_tlv.sflow.ugs_size",
5042       FT_UINT16, BASE_DEC, NULL, 0x0,
5043       "Unsolicited Grant Size (bytes)", HFILL}
5044      },
5045     {&hf_docsis_tlv_sflow_nom_grant_intvl,
5046      {".20 Nominal Grant Interval (usec)", "docsis_tlv.sflow.nom_grant_intvl",
5047       FT_UINT32, BASE_DEC, NULL, 0x0,
5048       "Nominal Grant Interval (usec)", HFILL}
5049      },
5050     {&hf_docsis_tlv_sflow_tol_grant_jitter,
5051      {".21 Tolerated Grant Jitter (usec)", "docsis_tlv.sflow.tol_grant_jitter",
5052       FT_UINT32, BASE_DEC, NULL, 0x0,
5053       "Tolerated Grant Jitter (usec)", HFILL}
5054      },
5055     {&hf_docsis_tlv_sflow_grants_per_intvl,
5056      {".22 Grants Per Interval", "docsis_tlv.sflow.grnts_per_intvl",
5057       FT_UINT8, BASE_DEC, NULL, 0x0,
5058       "Grants Per Interval", HFILL}
5059      },
5060     {&hf_docsis_tlv_sflow_ip_tos_overwrite,
5061      {".23 IP TOS Overwrite", "docsis_tlv.sflow.iptos_overwrite",
5062       FT_UINT16, BASE_HEX, NULL, 0x0,
5063       "IP TOS Overwrite", HFILL}
5064      },
5065     {&hf_docsis_tlv_sflow_ugs_timeref,
5066      {".24 UGS Time Reference", "docsis_tlv.sflow.ugs_timeref",
5067       FT_UINT32, BASE_DEC, NULL, 0x0,
5068       "UGS Time Reference", HFILL}
5069      },
5070     {&hf_docsis_tlv_sflow_vendor_spec,
5071      {".43 Vendor Specific Encodings", "docsis_tlv.sflow.vendorspec",
5072       FT_BYTES, BASE_NONE, NULL, 0x0,
5073       "Vendor Specific Encodings", HFILL}
5074      },
5075     {&hf_docsis_tlv_phs,
5076      {"26 PHS Rules", "docsis_tlv.phs",
5077       FT_BYTES, BASE_NONE, NULL, 0x0,
5078       "PHS Rules", HFILL}
5079      },
5080     {&hf_docsis_tlv_phs_class_ref,
5081      {".1 Classifier Reference", "docsis_tlv.phs.classref",
5082       FT_UINT8, BASE_DEC, NULL, 0x0,
5083       "Classifier Reference", HFILL}
5084      },
5085     {&hf_docsis_tlv_phs_class_id,
5086      {".2 Classifier Id", "docsis_tlv.phs.classid",
5087       FT_UINT16, BASE_DEC, NULL, 0x0,
5088       "Classifier Id", HFILL}
5089      },
5090     {&hf_docsis_tlv_phs_sflow_ref,
5091      {".3 Service flow reference", "docsis_tlv.phs.sflowref",
5092       FT_UINT16, BASE_DEC, NULL, 0x0,
5093       "Service Flow Reference", HFILL}
5094      },
5095     {&hf_docsis_tlv_phs_sflow_id,
5096      {".4 Service flow Id", "docsis_tlv.phs.sflowid",
5097       FT_UINT16, BASE_DEC, NULL, 0x0,
5098       "Service Flow Id", HFILL}
5099      },
5100     {&hf_docsis_tlv_phs_dsc_action,
5101      {".5 DSC Action", "docsis_tlv.phs.dscaction",
5102       FT_UINT8, BASE_DEC, VALS (action_vals), 0x0,
5103       "Dynamic Service Change Action", HFILL}
5104      },
5105     {&hf_docsis_tlv_phs_err,
5106      {".6 Error Encodings", "docsis_tlv.phs.err",
5107       FT_BYTES, BASE_NONE, NULL, 0x0,
5108       "Error Encodings", HFILL}
5109      },
5110     {&hf_docsis_tlv_phs_err_param,
5111      {"..1 Param Subtype", "docsis_tlv.phs.err.param",
5112       FT_UINT8, BASE_DEC, NULL, 0x0,
5113       "Parameter Subtype", HFILL}
5114      },
5115     {&hf_docsis_tlv_phs_err_code,
5116      {"..2 Error Code", "docsis_tlv.phs.err.code",
5117       FT_UINT8, BASE_DEC, NULL, 0x0,
5118       "Error Code", HFILL}
5119      },
5120     {&hf_docsis_tlv_phs_err_msg,
5121      {"..3 Error Message", "docsis_tlv.phs.err.msg",
5122       FT_STRINGZ, BASE_NONE, NULL, 0x0,
5123       "Error Message", HFILL}
5124      },
5125     {&hf_docsis_tlv_phs_phsf,
5126      {".7 PHS Field", "docsis_tlv.phs.phsf",
5127       FT_BYTES, BASE_NONE, NULL, 0x0,
5128       "PHS Field", HFILL}
5129      },
5130     {&hf_docsis_tlv_phs_phsi,
5131      {".8 PHS Index", "docsis_tlv.phs.phsi",
5132       FT_UINT8, BASE_DEC, NULL, 0x0,
5133       "PHS Index", HFILL}
5134      },
5135     {&hf_docsis_tlv_phs_phsm,
5136      {".9 PHS Mask", "docsis_tlv.phs.phsm",
5137       FT_BYTES, BASE_NONE, NULL, 0x0,
5138       "PHS Mask", HFILL}
5139      },
5140     {&hf_docsis_tlv_phs_phss,
5141      {".10 PHS Size", "docsis_tlv.phs.phss",
5142       FT_UINT8, BASE_DEC, NULL, 0x0,
5143       "PHS Size", HFILL}
5144      },
5145     {&hf_docsis_tlv_phs_phsv,
5146      {".11 PHS Verify", "docsis_tlv.phs.phsv",
5147       FT_BOOLEAN, BASE_NONE, TFS (&verify_tfs), 0x0,
5148       "PHS Verify", HFILL}
5149      },
5150     {&hf_docsis_tlv_phs_vendorspec,
5151      {".43 PHS Vendor Specific", "docsis_tlv.phs.vendorspec",
5152       FT_BYTES, BASE_NONE, NULL, 0x0,
5153       "PHS Vendor Specific", HFILL}
5154      },
5155     {&hf_docsis_tlv_hmac_digest,
5156      {"27 HMAC Digest", "docsis_tlv.hmac_digest",
5157       FT_BYTES, BASE_NONE, NULL, 0x0,
5158       "HMAC Digest", HFILL}
5159      },
5160     {&hf_docsis_tlv_max_classifiers,
5161      {"28 Max # of Classifiers", "docsis_tlv.maxclass",
5162       FT_UINT16, BASE_DEC, NULL, 0x0,
5163       "Max # of Classifiers", HFILL}
5164      },
5165     {&hf_docsis_tlv_privacy_enable,
5166      {"29 Privacy Enable", "docsis_tlv.bpi_en",
5167       FT_BOOLEAN, BASE_NONE, TFS (&ena_dis_tfs), 0x0,
5168       "Privacy Enable", HFILL}
5169      },
5170     {&hf_docsis_tlv_auth_block,
5171      {"30 Auth Block", "docsis_tlv.auth_block",
5172       FT_BYTES, BASE_NONE, NULL, 0x0,
5173       "Auth Block", HFILL}
5174      },
5175     {&hf_docsis_tlv_key_seq_num,
5176      {"31 Key Sequence Number", "docsis_tlv.key_seq",
5177       FT_BYTES, BASE_NONE, NULL, 0x0,
5178       "Key Sequence Number", HFILL}
5179      },
5180     {&hf_docsis_tlv_mfgr_cvc,
5181      {"32 Manufacturer CVC", "docsis_tlv.mfgr_cvc",
5182       FT_BYTES, BASE_NONE, NULL, 0x0,
5183       "Manufacturer CVC", HFILL}
5184      },
5185     {&hf_docsis_tlv_cosign_cvc,
5186      {"33 Co-Signer CVC", "docsis_tlv.cosign_cvc",
5187       FT_BYTES, BASE_NONE, NULL, 0x0,
5188       "Co-Signer CVC", HFILL}
5189      },
5190     {&hf_docsis_tlv_snmpv3_kick,
5191      {"34 SNMPv3 Kickstart Value", "docsis_tlv.snmpv3",
5192       FT_BYTES, BASE_NONE, NULL, 0x0,
5193       "SNMPv3 Kickstart Value", HFILL}
5194      },
5195     {&hf_docsis_tlv_snmpv3_kick_name,
5196      {".1 SNMPv3 Kickstart Security Name", "docsis_tlv.snmpv3.secname",
5197       FT_STRING, BASE_NONE, NULL, 0x0,
5198       "SNMPv3 Kickstart Security Name", HFILL}
5199      },
5200     {&hf_docsis_tlv_snmpv3_kick_publicnum,
5201      {".2 SNMPv3 Kickstart Manager Public Number", "docsis_tlv.snmpv3.publicnum",
5202       FT_BYTES, BASE_NONE, NULL, 0x0,
5203       "SNMPv3 Kickstart Value Manager Public Number", HFILL}
5204      },
5205     {&hf_docsis_tlv_subs_mgmt_ctrl,
5206      {"35 Subscriber Management Control", "docsis_tlv.subsmgmtctrl",
5207       FT_BYTES, BASE_NONE, NULL, 0x0,
5208       "Subscriber Management Control", HFILL}
5209      },
5210     {&hf_docsis_tlv_subs_mgmt_ip_table,
5211      {"36 Subscriber Management CPE IP Table", "docsis_tlv.subsiptable",
5212       FT_BYTES, BASE_NONE, NULL, 0x0,
5213       "Subscriber Management CPE IP Table", HFILL}
5214      },
5215     {&hf_docsis_tlv_subs_mgmt_ip_entry,
5216      {"Subscriber Management CPE IP Entry", "docsis_tlv.subsipentry",
5217       FT_IPv4, BASE_NONE, NULL, 0x0,
5218       NULL, HFILL}
5219      },
5220     {&hf_docsis_tlv_subs_mgmt_filter_grps,
5221      {"37 Subscriber Management Filter Groups", "docsis_tlv.subsfltrgrps",
5222       FT_BYTES, BASE_NONE, NULL, 0x0,
5223       "Subscriber Management Filter Groups", HFILL}
5224      },
5225     {&hf_docsis_tlv_snmpv3_ntfy_rcvr,
5226      {"38 SNMPv3 Notification Receiver", "docsis_tlv.snmpv3ntfy",
5227       FT_BYTES, BASE_NONE, NULL, 0x0,
5228       "SNMPv3 Notification Receiver", HFILL}
5229      },
5230     {&hf_docsis_tlv_enable_20_mode,
5231      {"39 Enable 2.0 Mode", "docsis_tlv.enable20mode",
5232       FT_BOOLEAN, BASE_NONE, TFS (&ena_dis_tfs), 0x0,
5233       "Enable 2.0 Mode", HFILL}
5234      },
5235     {&hf_docsis_tlv_enable_test_modes,
5236      {"40 Enable Test Modes", "docsis_tlv.enabletestmodes",
5237       FT_BOOLEAN, BASE_NONE, TFS (&ena_dis_tfs), 0x0,
5238       "Enable Test Modes", HFILL}
5239      },
5240     {&hf_docsis_tlv_ds_ch_list,
5241      {"41 Downstream Channel List", "docsis_tlv.dschlist",
5242       FT_BYTES, BASE_NONE, NULL, 0x0,
5243       NULL, HFILL}
5244      },
5245     {&hf_docsis_tlv_ds_ch_list_single,
5246      {".1 Single Downstream Channel", "docsis_tlv.dschlist.single",
5247       FT_BYTES, BASE_NONE, NULL, 0x0,
5248       NULL, HFILL}
5249      },
5250     {&hf_docsis_tlv_single_ch_timeout,
5251      {"..1 Timeout", "docsis_tlv.dschlist.single.timeout",
5252       FT_UINT16, BASE_DEC, NULL, 0x0,
5253       "Timeout", HFILL}
5254      },
5255     {&hf_docsis_tlv_single_ch_freq,
5256      {"..2 Timeout", "docsis_tlv.dschlist.single.freq",
5257       FT_UINT32, BASE_DEC, NULL, 0x0,
5258       "Timeout", HFILL}
5259      },
5260     {&hf_docsis_tlv_ds_ch_list_range,
5261      {".2 Downstream Frequency Range", "docsis_tlv.dschlist.range",
5262       FT_BYTES, BASE_NONE, NULL, 0x0,
5263       NULL, HFILL}
5264      },
5265     {&hf_docsis_tlv_freq_rng_timeout,
5266      {"..1 Timeout", "docsis_tlv.dschlist.range.timeout",
5267       FT_UINT16, BASE_DEC, NULL, 0x0,
5268       "Timeout", HFILL}
5269      },
5270     {&hf_docsis_tlv_freq_rng_start,
5271      {"..2 Frequency Start", "docsis_tlv.dschlist.range.start",
5272       FT_UINT32, BASE_DEC, NULL, 0x0,
5273       "Frequency Start", HFILL}
5274      },
5275     {&hf_docsis_tlv_freq_rng_end,
5276      {"..3 Frequency Start", "docsis_tlv.dschlist.range.end",
5277       FT_UINT32, BASE_DEC, NULL, 0x0,
5278       "Frequency End", HFILL}
5279      },
5280     {&hf_docsis_tlv_freq_rng_step,
5281      {"..4 Frequency Step Size", "docsis_tlv.dschlist.range.step",
5282       FT_UINT32, BASE_DEC, NULL, 0x0,
5283       "Frequency Step Size", HFILL}
5284      },
5285     {&hf_docsis_tlv_ds_ch_list_default_timeout,
5286      {".3 Default Scanning Timeout", "docsis_tlv.dschlist.defaulttimeout",
5287       FT_UINT16, BASE_DEC, NULL, 0x0,
5288       "Default Scanning Timeout", HFILL}
5289      },
5290     {&hf_docsis_tlv_mc_mac_address,
5291      {"42 Static Multicast MAC Address", "docsis_tlv.mcmac",
5292       FT_ETHER, BASE_NONE, NULL, 0x0,
5293       "Static Multicast MAC Address", HFILL}
5294      },
5295     {&hf_docsis_tlv_vendor_spec,
5296      {"43 Vendor Specific Encodings", "docsis_tlv.vendorspec",
5297       FT_BYTES, BASE_NONE, NULL, 0x0,
5298       "Vendor Specific Encodings", HFILL}
5299      },
5300     {&hf_docsis_tlv_rng_tech,
5301      {"Ranging Technique", "docsis_tlv.rng_tech",
5302       FT_UINT8, BASE_DEC, VALS (rng_tech_vals), 0x0,
5303       NULL, HFILL}
5304      },
5305     {&hf_docsis_tlv_dut_filter,
5306      {"45 Downstream Unencrypted Traffic Filtering Encoding", "docsis_tlv.dut",
5307       FT_BYTES, BASE_NONE, NULL, 0x0,
5308       "Downstream Unencrypted Traffic Filtering Encoding", HFILL}
5309      },
5310     {&hf_docsis_tlv_dut_filter_control,
5311      {".1 DUT Control", "docsis_tlv.dut.control",
5312       FT_BOOLEAN, BASE_NONE, TFS (&ena_dis_tfs), 0x0,
5313       "DUT Control", HFILL}
5314      },
5315     {&hf_docsis_tlv_dut_filter_cmim,
5316      {".2 DUT CMIM", "docsis_tlv.dut.cmim",
5317       FT_BYTES, BASE_NONE, NULL, 0x0,
5318       "DUT CMIM", HFILL}
5319      },
5320     {&hf_docsis_tlv_tcc,
5321      {"46 Transmit Channel Configuration", "docsis_tlv.tcc",
5322       FT_BYTES, BASE_NONE, NULL, 0x0,
5323       "Transmit Channel Configuration", HFILL}
5324      },
5325     {&hf_docsis_tlv_tcc_refid,
5326      {".1 TCC Reference ID", "docsis_tlv.tcc.refid",
5327       FT_UINT8, BASE_DEC, NULL, 0x0,
5328       "TCC Reference ID", HFILL}
5329      },
5330     {&hf_docsis_tlv_tcc_us_ch_action,
5331      {".2 Upstream Channel Action", "docsis_tlv.tcc.uschact",
5332       FT_UINT8, BASE_DEC, VALS (us_ch_action_vals), 0x0,
5333       "Upstream Channel Action", HFILL}
5334      },
5335     {&hf_docsis_tlv_tcc_us_ch_id,
5336      {".3 Upstream Channel ID", "docsis_tlv.tcc.uschid",
5337       FT_UINT8, BASE_DEC, NULL, 0x0,
5338       "Upstream Channel ID", HFILL}
5339      },
5340     {&hf_docsis_tlv_tcc_new_us_ch_id,
5341      {".4 New Upstream Channel ID", "docsis_tlv.tcc.newuschid",
5342       FT_UINT8, BASE_DEC, NULL, 0x0,
5343       "New Upstream Channel ID", HFILL}
5344      },
5345     {&hf_docsis_tlv_tcc_ucd,
5346      {".5 Upstream Channel Decsriptor", "docsis_tlv.tcc.ucd",
5347       FT_BYTES, BASE_NONE, NULL, 0x0,
5348       "Upstream Channel Descriptor", HFILL}
5349      },
5350     {&hf_docsis_tlv_tcc_rng_sid,
5351      {".6 Ranging SID", "docsis_tlv.tcc.rngsid",
5352       FT_UINT16, BASE_DEC, NULL, 0x0,
5353       "Ranging SID", HFILL}
5354      },
5355     {&hf_docsis_tlv_tcc_init_tech,
5356      {".7 Initialization Technique", "docsis_tlv.tcc.inittech",
5357       FT_UINT8, BASE_DEC, VALS (init_tech_vals), 0x0,
5358       "Initialization Technique", HFILL}
5359      },
5360     {&hf_docsis_tlv_tcc_rng_parms,
5361      {".8 Ranging Parameters", "docsis_tlv.tcc.rngparms",
5362       FT_BYTES, BASE_NONE, NULL, 0x0,
5363       "Ranging Parameters", HFILL}
5364      },
5365     {&hf_docsis_rng_parms_us_ch_id,
5366      {"..1 Ranging Reference Channel ID", "docsis_tlv.tcc.rngparms.uschid",
5367       FT_UINT8, BASE_DEC, NULL, 0x0,
5368       "Upstream Channel ID", HFILL}
5369      },
5370     {&hf_docsis_rng_parms_time_off_int,
5371      {"..2 Timing Offset, Integer Part", "docsis_tlv.tcc.rngparms.timeoffint",
5372       FT_UINT32, BASE_DEC, NULL, 0x0,
5373       "Timing Offset, Integer Part", HFILL}
5374      },
5375     {&hf_docsis_rng_parms_time_off_frac,
5376      {"..3 Timing Offset, Fractional Part", "docsis_tlv.tcc.rngparms.timeofffrac",
5377       FT_UINT8, BASE_DEC, NULL, 0x0,
5378       "Timing Offset, Fractional Part", HFILL}
5379      },
5380     {&hf_docsis_rng_parms_power_off,
5381      {"..4 Power Offset", "docsis_tlv.tcc.rngparms.poweroff",
5382       FT_UINT8, BASE_DEC, NULL, 0x0,
5383       "Power Offset", HFILL}
5384      },
5385     {&hf_docsis_rng_parms_freq_off,
5386      {"..5 Frequency Offset", "docsis_tlv.tcc.rngparms.freqoff",
5387       FT_UINT16, BASE_DEC, NULL, 0x0,
5388       "Frequency Offset", HFILL}
5389      },
5390     {&hf_docsis_tlv_tcc_dyn_rng_win,
5391      {".9 Dynamic Range Window", "docsis_tlv.tcc.dynrngwin",
5392       FT_UINT8, BASE_DEC, NULL, 0x0,
5393       "Dynamic Range Window", HFILL}
5394      },
5395     {&hf_docsis_tlv_tcc_err,
5396      {".10 TCC Error Encodings", "docsis_tlv.tcc.err",
5397       FT_BYTES, BASE_NONE, NULL, 0x0,
5398       "TCC Error Encodings", HFILL}
5399      },
5400     {&hf_docsis_tcc_err_subtype,
5401      {"..1 TCC Subtype", "docsis_tlv.tcc.err.subtype",
5402       FT_BYTES, BASE_NONE, NULL, 0x0,
5403       "TCC Subtype", HFILL}
5404      },
5405     {&hf_docsis_tcc_err_code,
5406      {"..2 Error Code", "docsis_tlv.tcc.err.code",
5407       FT_UINT8, BASE_DEC, VALS(docsis_conf_code), 0x0,
5408       "Error Code", HFILL}
5409      },
5410     {&hf_docsis_tcc_err_msg,
5411      {"..3 Error Message", "docsis_tlv.tcc.err.msg",
5412       FT_STRINGZ, BASE_NONE, NULL, 0x0,
5413       "Error Message", HFILL}
5414      },
5415     {&hf_docsis_tlv_sid_cl,
5416      {"47 Service Flow SID Cluster Assignments", "docsis_tlv.sid",
5417       FT_BYTES, BASE_NONE, NULL, 0x0,
5418       "Service Flow SID Cluster Assignments", HFILL}
5419      },
5420     {&hf_docsis_sid_cl_sf_id,
5421      {".1 Service Flow ID", "docsis_tlv.sid.sfid",
5422       FT_UINT32, BASE_DEC, NULL, 0x0,
5423       "Upstream Channel ID", HFILL}
5424      },
5425     {&hf_docsis_sid_cl_enc,
5426      {".2 SID Cluster Encodings", "docsis_tlv.sid.enc",
5427       FT_BYTES, BASE_NONE, NULL, 0x0,
5428       "SID Cluster Encodings", HFILL}
5429      },
5430     {&hf_docsis_sid_cl_enc_id,
5431      {"..1 SID Cluster ID", "docsis_tlv.sid.enc.id",
5432       FT_UINT8, BASE_DEC, NULL, 0x0,
5433       "SID Cluster ID", HFILL}
5434      },
5435     {&hf_docsis_sid_cl_enc_map,
5436      {"..2 SID-to-Channel Mapping", "docsis_tlv.sid.enc.map",
5437       FT_BYTES, BASE_NONE, NULL, 0x0,
5438       "SID Cluster ID", HFILL}
5439      },
5440     {&hf_docsis_sid_cl_map_us_ch_id,
5441      {"...1 Upstraem Channel ID", "docsis_tlv.sid.enc.map.uschid",
5442       FT_UINT8, BASE_DEC, NULL, 0x0,
5443       "Upstream Channel ID", HFILL}
5444      },
5445     {&hf_docsis_sid_cl_map_sid,
5446      {"...2 SID", "docsis_tlv.sid.enc.map.sid",
5447       FT_UINT16, BASE_DEC, NULL, 0x0,
5448       "SID", HFILL}
5449      },
5450     {&hf_docsis_sid_cl_map_action,
5451      {"...3 SID-to-Channel Mapping Action", "docsis_tlv.sid.enc.map.action",
5452       FT_UINT8, BASE_DEC, VALS (sid_ch_map_vals), 0x0,
5453       "SID-to-Channel Mapping Action", HFILL}
5454      },
5455     {&hf_docsis_sid_cl_so_crit,
5456      {".3 SID Cluster Switchover Criteria", "docsis_tlv.sid.socrit",
5457       FT_BYTES, BASE_NONE, NULL, 0x0,
5458       "SID Cluster Switchover Criteria", HFILL}
5459      },
5460     {&hf_docsis_sid_cl_so_max_req,
5461      {"..1 Maximum Requests per SID Cluster", "docsis_tlv.sid.socrit.maxreq",
5462       FT_UINT8, BASE_DEC, NULL, 0x0,
5463       "Maximum Requests per SID Cluster", HFILL}
5464      },
5465     {&hf_docsis_sid_cl_so_max_out_bytes,
5466      {"..2 Maximum Outstanding Bytes per SID Cluster", "docsis_tlv.sid.socrit.maxoutbytes",
5467       FT_UINT32, BASE_DEC, NULL, 0x0,
5468       "Maximum Outstanding Bytes per SID Cluster", HFILL}
5469      },
5470     {&hf_docsis_sid_cl_so_max_req_bytes,
5471      {"..3 Maximum Total Bytes Requested per SID Cluster", "docsis_tlv.sid.socrit.maxreqbytes",
5472       FT_UINT32, BASE_DEC, NULL, 0x0,
5473       "Maximum Total Bytes Requested per SID Cluster", HFILL}
5474      },
5475     {&hf_docsis_sid_cl_so_max_time,
5476      {"..4 Maximum Time in the SID Cluster", "docsis_tlv.sid.socrit.maxtime",
5477       FT_UINT16, BASE_DEC, NULL, 0x0,
5478       "Maximum Time in the SID Cluster", HFILL}
5479      },
5480     {&hf_docsis_tlv_rcp,
5481      {"48 Receive Channel Profile", "docsis_tlv.rcp",
5482       FT_BYTES, BASE_NONE, NULL, 0x0,
5483       "Receive Channel Profile", HFILL}
5484      },
5485     {&hf_docsis_tlv_rcp_id,
5486      {".1 RCP-ID", "docsis_tlv.rcp.id",
5487       FT_BYTES, BASE_NONE, NULL, 0x0,
5488       "RCP-ID", HFILL}
5489      },
5490     {&hf_docsis_tlv_rcp_name,
5491      {".2 RCP Name", "docsis_tlv.rcp.name",
5492       FT_BYTES, BASE_NONE, NULL, 0x0,
5493       "RCP Name", HFILL}
5494      },
5495     {&hf_docsis_tlv_rcp_freq_spc,
5496      {".3 RCP Center Frequency Spacing", "docsis_tlv.rcp.freq_spc",
5497       FT_UINT8, BASE_DEC, NULL, 0x0,
5498       "RCP Center Frequency Spacing", HFILL}
5499      },
5500     {&hf_docsis_tlv_rcp_rcv_mod_enc,
5501      {".4 Receive Module Capability", "docsis_tlv.rcp.rcv_mod_enc",
5502       FT_BYTES, BASE_NONE, NULL, 0x0,
5503       "Receive Module Encoding", HFILL}
5504      },
5505     {&hf_docsis_rcv_mod_enc_idx,
5506      {"..1 Receive Module Index", "docsis_tlv.rcp.rcv_mod_enc.idx",
5507       FT_UINT8, BASE_DEC, NULL, 0x0,
5508       "Receive Module Index", HFILL}
5509      },
5510     {&hf_docsis_rcv_mod_enc_adj_ch,
5511      {"..2 Adjacent Channels", "docsis_tlv.rcp.rcv_mod_enc.adj_ch",
5512       FT_UINT8, BASE_DEC, NULL, 0x0,
5513       "Adjacent Channels", HFILL}
5514      },
5515     {&hf_docsis_rcv_mod_enc_ch_bl_rng,
5516      {"..3 Channel Block Range", "docsis_tlv.rcp.rcv_mod_enc.ch_bl_rng",
5517       FT_BYTES, BASE_NONE, NULL, 0x0,
5518       "Channel Block Range", HFILL}
5519      },
5520     {&hf_docsis_ch_bl_rng_min_ctr_freq,
5521      {"...1 Minimum Center Frequency", "docsis_tlv.rcp.rcv_mod_enc.ch_bl_rng.min_ctr_freq",
5522       FT_UINT32, BASE_DEC, NULL, 0x0,
5523       "Minimum Center Frequency", HFILL}
5524      },
5525     {&hf_docsis_ch_bl_rng_max_ctr_freq,
5526      {"...2 Maximum Center Frequency", "docsis_tlv.rcp.rcv_mod_enc.ch_bl_rng.max_ctr_freq",
5527       FT_UINT32, BASE_DEC, NULL, 0x0,
5528       "Maximum Center Frequency", HFILL}
5529      },
5530     {&hf_docsis_rcv_mod_enc_rsq_ch_subs_cap ,
5531      {"..5 Resequencing Channel Subset Capability", "docsis_tlv.rcp.rcv_mod_enc.rsq_ch_subs_cap",
5532       FT_BYTES, BASE_NONE, NULL, 0x0,
5533       "Resequencing Channel Subset Capability", HFILL}
5534      },
5535     {&hf_docsis_rcv_mod_enc_conn ,
5536      {"..6 Receive Module Connectivity", "docsis_tlv.rcp.rcv_mod_enc.conn",
5537       FT_BYTES, BASE_NONE, NULL, 0x0,
5538       "Receive Module Connectivity", HFILL}
5539      },
5540     {&hf_docsis_rcv_mod_enc_phy_layr_parms,
5541      {"..7 Physical Layer Parameter", "docsis_tlv.rcp.rcv_mod_enc.phy_layr_parms",
5542       FT_BYTES, BASE_NONE, NULL, 0x0,
5543       "Physical Layer Parameter", HFILL}
5544      },
5545     {&hf_docsis_tlv_rcp_rcv_ch,
5546      {".5 Receive Channel", "docsis_tlv.rcp.rcv_ch",
5547       FT_BYTES, BASE_NONE, NULL, 0x0,
5548       "Receive Channel", HFILL}
5549      },
5550     {&hf_docsis_rcv_ch_idx,
5551      {"..1 Receive Channel Index", "docsis_tlv.rcp.rcv_ch.idx",
5552       FT_UINT8, BASE_DEC, NULL, 0x0,
5553       "Receive Channel Index", HFILL}
5554      },
5555     {&hf_docsis_rcv_ch_conn,
5556      {"..2 Receive Channel Connectivity", "docsis_tlv.rcp.rcv_ch.conn",
5557       FT_BYTES, BASE_NONE, NULL, 0x0,
5558       "Receive Channel Connectivity", HFILL}
5559      },
5560     {&hf_docsis_rcv_ch_conn_off,
5561      {"..3 Receive Channel Connected Offset", "docsis_tlv.rcp.rcv_ch.conn_off",
5562       FT_UINT8, BASE_DEC, NULL, 0x0,
5563       "Receive Channel Connected Offset", HFILL}
5564      },
5565     {&hf_docsis_rcv_ch_prim_ds_ch_ind,
5566      {"..5 Primary Downstream Channel Indicator", "docsis_tlv.rcp.rcv_ch.prim_ds_ch_ind",
5567       FT_UINT8, BASE_DEC, NULL, 0x0,
5568       "Primary Downstream Channel Indicator", HFILL}
5569      },
5570     {&hf_docsis_tlv_rcp_ven_spec,
5571      {".43 Vendor Specific Encodings", "docsis_tlv.rcp.vendorspec",
5572       FT_BYTES, BASE_NONE, NULL, 0x0,
5573       "Vendor Specific Encodings", HFILL}
5574      },
5575     {&hf_docsis_tlv_rcc,
5576      {"49 Receive Channel Configuration", "docsis_tlv.rcc",
5577       FT_BYTES, BASE_NONE, NULL, 0x0,
5578       "Receive Channel Configuration", HFILL}
5579      },
5580     {&hf_docsis_tlv_rcc_id,
5581      {".1 Assigned RCP-ID", "docsis_tlv.rcc.id",
5582       FT_BYTES, BASE_NONE, NULL, 0x0,
5583       "Assigned RCP-ID", HFILL}
5584      },
5585     {&hf_docsis_tlv_rcc_rcv_mod_enc,
5586      {".4 Receive Module Assignment", "docsis_tlv.rcc.rcv_mod_enc",
5587       FT_BYTES, BASE_NONE, NULL, 0x0,
5588       "Receive Module Assignment", HFILL}
5589      },
5590     {&hf_docsis_rcc_rcv_mod_enc_idx,
5591      {"..1 Receive Module Index", "docsis_tlv.rcc.rcc_rcv_mod_enc.idx",
5592       FT_UINT8, BASE_DEC, NULL, 0x0,
5593       "Receive Module Index", HFILL}
5594      },
5595     {&hf_docsis_rcc_rcv_mod_enc_ctr_freq_asgn,
5596      {"..4 First Channel Center Frequency Assignment", "docsis_tlv.rcc.rcv_mod_enc.ctr_freq_asgn",
5597       FT_UINT32, BASE_DEC, NULL, 0x0,
5598       "First Channel Center Frequency Assignment", HFILL}
5599      },
5600     {&hf_docsis_rcc_rcv_mod_enc_conn ,
5601      {"..6 Receive Module Connectivity", "docsis_tlv.rcc.rcv_mod_enc.conn",
5602       FT_BYTES, BASE_NONE, NULL, 0x0,
5603       "Receive Module Connectivity", HFILL}
5604      },
5605     {&hf_docsis_tlv_rcc_rcv_ch,
5606      {".5 Receive Channel", "docsis_tlv.rcc.rcv_ch",
5607       FT_BYTES, BASE_NONE, NULL, 0x0,
5608       "Receive Channel", HFILL}
5609      },
5610     {&hf_docsis_rcc_rcv_ch_idx,
5611      {"..1 Receive Channel Index", "docsis_tlv.rcc.rcv_ch.idx",
5612       FT_UINT8, BASE_DEC, NULL, 0x0,
5613       "Receive Channel Index", HFILL}
5614      },
5615     {&hf_docsis_rcc_rcv_ch_conn,
5616      {"..2 Receive Channel Connectivity", "docsis_tlv.rcc.rcv_ch.conn",
5617       FT_BYTES, BASE_NONE, NULL, 0x0,
5618       "Receive Channel Connectivity", HFILL}
5619      },
5620     {&hf_docsis_rcc_rcv_ch_ctr_freq_asgn,
5621      {"..4 Receive Channel Center Frequency Assignment", "docsis_tlv.rcc.rcv_ch.ctr_freq_asgn",
5622       FT_UINT32, BASE_DEC, NULL, 0x0,
5623       "Receive Channel Center Frequency Assignment", HFILL}
5624      },
5625     {&hf_docsis_rcc_rcv_ch_prim_ds_ch_ind,
5626      {"..5 Primary Downstream Channel Indicator", "docsis_tlv.rcc.rcv_ch.prim_ds_ch_ind",
5627       FT_UINT8, BASE_DEC, NULL, 0x0,
5628       "Primary Downstream Channel Indicator", HFILL}
5629      },
5630     {&hf_docsis_tlv_rcc_part_serv_ds_ch,
5631      {".6 Partial Service Downstream Channels", "docsis_tlv.rcc.part_serv_ds_ch",
5632       FT_BYTES, BASE_NONE, NULL, 0x0,
5633       "Partial Service Downstream Channels", HFILL}
5634      },
5635     {&hf_docsis_tlv_rcc_ven_spec,
5636      {".43 Vendor Specific Encodings", "docsis_tlv.rcc.vendorspec",
5637       FT_BYTES, BASE_NONE, NULL, 0x0,
5638       "Vendor Specific Encodings", HFILL}
5639      },
5640     {&hf_docsis_tlv_rcc_err,
5641      {".254 RCC Error Encodings", "docsis_tlv.rcc.err",
5642       FT_BYTES, BASE_NONE, NULL, 0x0,
5643       "RCC Error Encodings", HFILL}
5644      },
5645     {&hf_docsis_tlv_rcc_err_mod_or_ch,
5646      {".1 Receive Modul or Receive Channel", "docsis_tlv.rcc.err.mod_or_ch",
5647       FT_UINT8, BASE_DEC, VALS (mod_or_ch_vals), 0x0,
5648       "Receive Modul or Receive Channel", HFILL}
5649      },
5650     {&hf_docsis_tlv_rcc_err_idx,
5651      {".2 Receive Modul/Channel Index", "docsis_tlv.rcc.err.idx",
5652       FT_UINT8, BASE_DEC, NULL, 0x0,
5653       "Receive Modul/Channel Index", HFILL}
5654      },
5655     {&hf_docsis_tlv_rcc_err_param,
5656      {".3 Reported Parameter", "docsis_tlv.rcc.err.param",
5657       FT_UINT8, BASE_DEC, NULL, 0x0,
5658       "Reported Parameter", HFILL}
5659      },
5660     {&hf_docsis_tlv_rcc_err_code,
5661      {".4 Error Code", "docsis_tlv.rcc.err.code",
5662       FT_UINT8, BASE_DEC, VALS (docsis_conf_code), 0x0,
5663       "Error Code", HFILL}
5664      },
5665     {&hf_docsis_tlv_rcc_err_msg,
5666      {".5 Error Message", "docsis_tlv.rcc.err.msg",
5667       FT_BYTES, BASE_NONE, NULL, 0x0,
5668       "Error Message", HFILL}
5669      },
5670     {&hf_docsis_tlv_dsid,
5671      {"50 DSID Encodings", "docsis_tlv.dsid",
5672       FT_BYTES, BASE_NONE, NULL, 0x0,
5673       "DSID Encodings", HFILL}
5674      },
5675     {&hf_docsis_tlv_dsid_id,
5676      {".1 Downstream Service Identifier (DSID)", "docsis_tlv.dsid.id",
5677       FT_UINT24, BASE_DEC, NULL, 0x0,
5678       "Downstream Service Identifier (DSID)", HFILL}
5679      },
5680     {&hf_docsis_tlv_dsid_action,
5681      {".2 DSID Action", "docsis_tlv.dsid.action",
5682       FT_UINT8, BASE_DEC, VALS (dsid_action_vals), 0x0,
5683       "DSID Action", HFILL}
5684      },
5685     {&hf_docsis_tlv_dsid_ds_reseq,
5686      {".3 Downstream Resequencing Encodings", "docsis_tlv.dsid.ds_reseq",
5687       FT_BYTES, BASE_NONE, NULL, 0x0,
5688       "Downstream Resequencing Encodings", HFILL}
5689      },
5690     {&hf_docsis_ds_reseq_dsid,
5691      {"..1 Resequencing DSID", "docsis_tlv.dsid.ds_reseq.dsid",
5692       FT_UINT8, BASE_DEC, NULL, 0x0,
5693       "Resequencing DSID", HFILL}
5694      },
5695     {&hf_docsis_ds_reseq_ch_lst,
5696      {"..2 Downstream Resequencing Channel List", "docsis_tlv.dsid.ds_reseq.ch_lst",
5697       FT_BYTES, BASE_NONE, NULL, 0x0,
5698       "Downstream Resequencing Channel List", HFILL}
5699      },
5700     {&hf_docsis_ds_reseq_wait_time,
5701      {"..3 Downstream Resequencing Wait Time", "docsis_tlv.dsid.ds_reseq.wait_time",
5702       FT_UINT8, BASE_DEC, NULL, 0x0,
5703       "Downstream Resequencing Wait Time", HFILL}
5704      },
5705     {&hf_docsis_ds_reseq_warn_thresh,
5706      {"..4 Resequencing Warn Threshold", "docsis_tlv.dsid.ds_reseq.warn_thresh",
5707       FT_UINT8, BASE_DEC, NULL, 0x0,
5708       "Resequencing Warn Threshold", HFILL}
5709      },
5710     {&hf_docsis_ds_reseq_ho_timer,
5711      {"..5 CM-Status max. Event Hold-Off Timer (Out-of-Range Events)", "docsis_tlv.dsid.ds_reseq.ho_timer",
5712       FT_UINT16, BASE_DEC, NULL, 0x0,
5713       "CM-Status max. Event Hold-Off Timer (Out-of-Range Events)", HFILL}
5714      },
5715     {&hf_docsis_tlv_dsid_mc,
5716      {".4 Multicast Encodings", "docsis_tlv.dsid.mc",
5717       FT_BYTES, BASE_NONE, NULL, 0x0,
5718       "Multicast Encodings", HFILL}
5719      },
5720     {&hf_docsis_tlv_dsid_mc_addr,
5721      {"..1 Client MAC Address Encodings", "docsis_tlv.dsid.mc.addr",
5722       FT_BYTES, BASE_NONE, NULL, 0x0,
5723       "Client MAC Address Encodings", HFILL}
5724      },
5725     {&hf_docsis_mc_addr_action,
5726      {"...1 Client MAC Address Action", "docsis_tlv.dsid.mc.addr.action",
5727       FT_UINT8, BASE_DEC, VALS (add_del_vals), 0x0,
5728       "Client MAC Address Action", HFILL}
5729      },
5730     {&hf_docsis_mc_addr_addr,
5731      {"...2 Client MAC Address", "docsis_tlv.dsid.mc.addr.addr",
5732       FT_BYTES, BASE_NONE, NULL, 0x0,
5733       "Client MAC Address", HFILL}
5734      },
5735     {&hf_docsis_tlv_dsid_mc_cmim,
5736      {"..2 Multicast CM Interface Mask", "docsis_tlv.dsid.mc.cmim",
5737       FT_BYTES, BASE_NONE, NULL, 0x0,
5738       "Multicast CM Interface Mask", HFILL}
5739      },
5740     {&hf_docsis_tlv_dsid_mc_group,
5741      {"..3 Multicast Group MAC Addresses", "docsis_tlv.dsid.mc.group",
5742       FT_BYTES, BASE_NONE, NULL, 0x0,
5743       "Multicast Group MAC Addresses", HFILL}
5744      },
5745     {&hf_docsis_tlv_dsid_mc_phs,
5746      {"..26 Payload Header Suppression Encodings", "docsis_tlv.dsid.mc.phs",
5747       FT_BYTES, BASE_NONE, NULL, 0x0,
5748       "Payload Header Suppression Encodings", HFILL}
5749      },
5750     {&hf_docsis_tlv_sec_assoc,
5751      {"51 Security Association Encodings", "docsis_tlv.sec_assoc",
5752       FT_BYTES, BASE_NONE, NULL, 0x0,
5753       "Security Association Encodings", HFILL}
5754      },
5755     {&hf_docsis_tlv_sec_assoc_action,
5756      {".1 SA Action", "docsis_tlv.sec_assoc.action",
5757       FT_UINT8, BASE_DEC, VALS (add_del_vals), 0x0,
5758       "SA Action", HFILL}
5759      },
5760     {&hf_docsis_tlv_sec_assoc_desc,
5761      {".23 SA Descriptor", "docsis_tlv.sec_assoc.desc",
5762       FT_BYTES, BASE_NONE, NULL, 0x0,
5763       "SA Descriptor", HFILL}
5764      },
5765     {&hf_docsis_tlv_init_ch_timeout,
5766      {"52 Intializing Channel Timeout", "docsis_tlv.init_ch_timeout",
5767       FT_UINT16, BASE_DEC, NULL, 0x0,
5768       "Intializing Channel Timeout", HFILL}
5769      },
5770     {&hf_docsis_tlv_ch_asgn,
5771      {"56 Channel Assignment Configuration Settings", "docsis_tlv.ch_asgn",
5772       FT_BYTES, BASE_NONE, NULL, 0x0,
5773       "Channel Assignment Configuration Settings", HFILL}
5774      },
5775     {&hf_docsis_ch_asgn_us_ch_id,
5776      {".1 Upstream Channel ID", "docsis_tlv.ch_asgn.us_ch_id",
5777       FT_UINT8, BASE_DEC, NULL, 0x0,
5778       "Upstream Channel ID", HFILL}
5779      },
5780     {&hf_docsis_ch_asgn_rx_freq,
5781      {".2 Rx Frequency", "docsis_tlv.ch_asgn.rx_freq",
5782       FT_UINT16, BASE_DEC, NULL, 0x0,
5783       "Rx Frequency", HFILL}
5784      },
5785     {&hf_docsis_tlv_cm_init_reason,
5786      {"57 CM Initialization Reason", "docsis_tlv.cm_init_reason",
5787       FT_UINT16, BASE_DEC, VALS (init_reason_vals), 0x0,
5788       "CM Initialization Reason", HFILL}
5789      },
5790     {&hf_docsis_tlv_sw_upg_srvr_ipv6,
5791      {"58 Software Upgrade Server IPv6", "docsis_tlv.sw_upg_srvr_ipv6",
5792       FT_IPv6, BASE_NONE, NULL, 0x0,
5793       "Software Upgrade Server IPv6", HFILL}
5794      },
5795     {&hf_docsis_tlv_tftp_prov_cm_ipv6_addr,
5796      {"59 TFTP Server Provisioned Modem IPv6 Address", "docsis_tlv.tftp_prov_cm_ipv6_addr",
5797       FT_IPv6, BASE_NONE, NULL, 0x0,
5798       "TFTP Server Provisioned Modem IPv6 Address", HFILL}
5799      },
5800     {&hf_docsis_tlv_us_drop_clfy,
5801      {"60 Upstream Drop Packet Classification Encoding", "docsis_tlv.us_drop_clfy",
5802       FT_BYTES, BASE_NONE, NULL, 0x0,
5803       "Upstream Drop Packet Classification Encoding", HFILL}
5804      },
5805     {&hf_docsis_tlv_subs_mgmt_ipv6_lst,
5806      {"61 Subscriber Management CPE IPv6 Prefix List", "docsis_tlv.subs_mgmt_ipv6_lst",
5807       FT_BYTES, BASE_NONE, NULL, 0x0,
5808       "Subscriber Management CPE IPv6 Prefix List", HFILL}
5809      },
5810     {&hf_docsis_tlv_us_drop_clfy_group_id,
5811      {"62 Upstream Drop Classifier Group ID", "docsis_tlv.us_drop_clfy_group_id",
5812       FT_BYTES, BASE_NONE, NULL, 0x0,
5813       "Upstream Drop Classifier Group ID", HFILL}
5814      },
5815     {&hf_docsis_tlv_subs_mgmt_ctrl_max_cpe_ipv6,
5816      {"63 Subscriber Management Control Max CPE IPv6 Prefix", "docsis_tlv.subs_mgmt_ctrl_max_cpe_ipv6",
5817       FT_UINT16, BASE_DEC, NULL, 0x0,
5818       "Subscriber Management Control Max CPE IPv6 Prefix", HFILL}
5819      },
5820     {&hf_docsis_tlv_cmts_mc_sess_enc,
5821      {"64 CMTS Static Multicast Session Encoding", "docsis_tlv.cmts_mc_sess_enc",
5822       FT_BYTES, BASE_NONE, NULL, 0x0,
5823       "CMTS Static Multicast Session Encoding", HFILL}
5824      },
5825     {&hf_docsis_cmts_mc_sess_enc_grp,
5826      {".1 Multicast Group Address", "docsis_tlv.cmts_mc_sess_enc.grp",
5827       FT_IPXNET, BASE_NONE, NULL, 0x0,
5828       "Multicast Group Address", HFILL}
5829      },
5830     {&hf_docsis_cmts_mc_sess_enc_src,
5831      {".2 Source IP Address", "docsis_tlv.cmts_mc_sess_enc.src",
5832       FT_IPXNET, BASE_NONE, NULL, 0x0,
5833       "Source IP Address", HFILL}
5834      },
5835   };
5836
5837 /* Setup protocol subtree array */
5838   static gint *ett[] = {
5839     &ett_docsis_tlv,
5840     &ett_docsis_tlv_cos,
5841     &ett_docsis_tlv_mcap,
5842     &ett_docsis_tlv_clsfr,
5843     &ett_docsis_tlv_clsfr_ip,
5844     &ett_docsis_tlv_clsfr_eth,
5845     &ett_docsis_tlv_clsfr_err,
5846     &ett_docsis_tlv_clsfr_dot1q,
5847     &ett_docsis_tlv_reqxmitpol,
5848     &ett_docsis_tlv_sflow_err,
5849     &ett_docsis_tlv_phs,
5850     &ett_docsis_tlv_phs_err,
5851     &ett_docsis_tlv_svc_unavail,
5852     &ett_docsis_tlv_snmpv3_kick,
5853     &ett_docsis_tlv_ds_ch_list,
5854     &ett_docsis_tlv_ds_ch_list_single,
5855     &ett_docsis_tlv_ds_ch_list_range,
5856     &ett_docsis_tlv_tcc,
5857     &ett_docsis_tlv_tcc_ucd,
5858     &ett_docsis_tlv_tcc_rng_parms,
5859     &ett_docsis_tlv_tcc_err,
5860     &ett_docsis_tlv_sid_cl,
5861     &ett_docsis_tlv_sid_cl_enc,
5862     &ett_docsis_tlv_sid_cl_enc_map,
5863     &ett_docsis_tlv_sid_cl_so,
5864     &ett_docsis_tlv_rcp,
5865     &ett_docsis_tlv_rcp_rcv_mod_enc,
5866     &ett_docsis_tlv_rcp_ch_bl_rng,
5867     &ett_docsis_tlv_rcp_rcv_ch,
5868     &ett_docsis_tlv_rcc,
5869     &ett_docsis_tlv_rcc_rcv_mod_enc,
5870     &ett_docsis_tlv_rcc_rcv_ch,
5871     &ett_docsis_tlv_rcc_err,
5872     &ett_docsis_tlv_dsid,
5873     &ett_docsis_tlv_dsid_ds_reseq,
5874     &ett_docsis_tlv_dsid_mc,
5875     &ett_docsis_tlv_dsid_mc_addr,
5876     &ett_docsis_tlv_sec_assoc,
5877     &ett_docsis_tlv_ch_asgn,
5878     &ett_docsis_cmts_mc_sess_enc,
5879   };
5880
5881 /* Register the protocol name and description */
5882   proto_docsis_tlv = proto_register_protocol ("DOCSIS Appendix C TLV's",
5883                                               "DOCSIS TLVs", "docsis_tlv");
5884
5885 /* Required function calls to register the header fields and subtrees used */
5886   proto_register_field_array (proto_docsis_tlv, hf, array_length (hf));
5887   proto_register_subtree_array (ett, array_length (ett));
5888
5889   register_dissector ("docsis_tlv", dissect_tlv, proto_docsis_tlv);
5890 }
5891
5892
5893 /* If this dissector uses sub-dissector registration add a registration routine.
5894    This format is required because a script is used to find these routines and
5895    create the code that calls these routines.
5896 */
5897 void
5898 proto_reg_handoff_docsis_tlv (void)
5899 {
5900 #if 0
5901   dissector_handle_t docsis_tlv_handle;
5902
5903   docsis_tlv_handle = find_dissector ("docsis_tlv");
5904   dissector_add_uint ("docsis", 0xFF, docsis_tlv_handle);
5905 #endif
5906
5907   docsis_vsif_handle = find_dissector("docsis_vsif");
5908   docsis_ucd_handle = find_dissector("docsis_ucd");
5909
5910 }