From Guido Reismueller:
[obnox/wireshark/wip.git] / plugins / docsis / packet-tlv.h
1 /* packet-tlv.h
2  * Contains Definitions for Configuration types
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
27 /* Define Top Level TLV Types
28  * Please see http://www.cablemodem.com/Specs/SP-RFIv1.1-I08-020301.pdf
29  * Appendix C.
30  */
31 #ifndef __PACKET_TLV_H__
32 #define __PACKET_TLV_H__
33 #define TLV_DOWN_FREQ 1
34 #define TLV_CHNL_ID 2
35 #define TLV_NET_ACCESS 3
36 #define TLV_COS 4
37 #define TLV_MODEM_CAP 5
38 #define TLV_CM_MIC 6
39 #define TLV_CMTS_MIC 7
40 #define TLV_VENDOR_ID 8
41 #define TLV_SW_UPG_FILE 9
42 #define TLV_SNMP_WRITE_CTRL 10
43 #define TLV_SNMP_OBJECT 11
44 #define TLV_MODEM_IP 12
45 #define TLV_SVC_UNAVAIL 13
46 #define TLV_ETHERNET_MAC 14
47 #define TLV_TEL_SETTINGS 15
48 #define TLV_BPI_CONFIG 17
49 #define TLV_MAX_CPES 18
50 #define TLV_TFTP_TIME 19
51 #define TLV_TFTP_MODEM_ADDRESS 20
52 #define TLV_SW_UPG_SRVR 21
53 #define TLV_UPSTREAM_CLASSIFIER 22
54 #define TLV_DOWN_CLASSIFIER 23
55 #define TLV_UPSTREAM_SERVICE_FLOW 24
56 #define TLV_DOWN_SERVICE_FLOW 25
57 #define TLV_PHS 26
58 #define TLV_HMAC_DIGEST 27
59 #define TLV_MAX_CLASSIFIERS 28
60 #define TLV_PRIVACY_ENABLE 29
61 #define TLV_AUTH_BLOCK 30
62 #define TLV_KEY_SEQ_NUM 31
63 #define TLV_MFGR_CVC 32
64 #define TLV_COSIGN_CVC 33
65 #define TLV_SNMPV3_KICKSTART 34
66 #define TLV_SUBS_MGMT_CTRL 35
67 #define TLV_SUBS_MGMT_CPE 36
68 #define TLV_SUBS_MGMT_FLTR 37
69 #define TLV_SNMPV3_NTFY_RCVR 38
70 #define TLV_ENABLE_20_MODE 39
71 #define TLV_ENABLE_TEST_MODES 40
72 #define TLV_DS_CH_LIST 41
73 #define TLV_MC_MAC_ADDRESS 42
74 #define TLV_VENDOR_SPEC 43 /* Vendor Specific is actually 44 ? */
75 #define TLV_DUT_FILTER 45
76 #define TLV_TCC 46
77 #define TLV_SID_CL 47
78 #define TLV_RCP 48
79 #define TLV_RCC 49
80 #define TLV_DSID 50
81 #define TLV_SEC_ASSOC 51
82 #define TLV_INIT_CH_TIMEOUT 52
83 #define TLV_SNMPV1V2_COEX 53
84 #define TLV_SNMPV3_ACC_VIEW 54
85 #define TLV_SNMP_CPE_ACC_CTRL 55
86 #define TLV_CH_ASGN 56
87 #define TLV_CM_INIT_REASON 57
88 #define TLV_SW_UPG_SRVR_IPV6 58
89 #define TLV_TFTP_PROV_CM_IPV6_ADDR 59
90 #define TLV_US_DROP_CLFY 60
91 #define TLV_SUBS_MGMT_IPV6_LST 61
92 #define TLV_US_DROP_CLFY_GROUP_ID 62
93 #define TLV_SUBS_MGMT_CTRL_MAX_CPE_IPV6 63
94 #define TLV_CMTS_MC_SESS_ENC 64
95 #define TLV_L2VPN_MAC_AGING 65
96 #define TLV_MGMT_EVENT_CTRL 66
97 #define TLV_END 255
98
99 /* Define DOCSIS 1.0 Class Of Service Configuration Types
100  * These are subtypes of TLV_COS (4)
101  */
102 #define COS_CLASSID 1
103 #define COS_MAX_DOWN 2
104 #define COS_MAX_UP 3
105 #define COS_UP_CH_PRIO 4
106 #define COS_MIN_UP_RATE 5
107 #define COS_MAX_UP_BURST 6
108 #define COS_BP_ENABLE 7
109
110 /* Define SNMPV3 KickStart subtypes
111  * These are subtypes of TLV_SNMPV3_KICKSTART (34)
112  */
113 #define SNMPV3_SEC_NAME 1
114 #define SNMPV3_MGR_PUB_NUM 2
115
116 /* Define Modem Capabilities Subtypes
117  * These are subtypes of TLV_MODEM_CAP (5)
118  */
119 #define CAP_CONCAT 1
120 #define CAP_DOCSIS_VER 2
121 #define CAP_FRAG 3
122 #define CAP_PHS 4
123 #define CAP_IGMP 5
124 #define CAP_PRIVACY 6
125 #define CAP_DOWN_SAID 7
126 #define CAP_UP_SID 8
127 #define CAP_OPT_FILT 9
128 #define CAP_XMIT_EQPERSYM 10
129 #define CAP_NUM_XMIT_EQ_TAPS 11
130 #define CAP_DCC 12
131
132 /* Define Classifier subtypes
133  * These are subtypes of either:
134  * TLV_UPSTREAM_CLASSIFIER (22)
135  * TLV_DOWN_CLASSIFIER (23)
136  */
137 #define CFR_REF 1
138 #define CFR_ID 2
139 #define CFR_SFLOW_REF 3
140 #define CFR_SFLOW_ID 4
141 #define CFR_RULE_PRI 5
142 #define CFR_ACT_STATE 6
143 #define CFR_DSA_ACTION 7
144 #define CFR_ERROR 8
145 #define CFR_IP_CLASSIFIER 9
146 #define CFR_ETH_CLASSIFIER 10
147 #define CFR_8021Q_CLASSIFIER 11
148 #define CFR_VENDOR_SPEC 43
149
150 /* Define Classifier Error sub-subtypes
151  * These are subtypes of CFR_ERROR ([22/23].8)
152  */
153 #define CFR_ERR_PARAM 1
154 #define CFR_ERR_CODE 2
155 #define CFR_ERR_MSG 3
156
157 /* Define IP Classifier sub-subtypes
158  * These are subtypes of CFR_IP_CLASSIFIER ([22/23].9)
159  */
160 #define CFR_IP_TOS_RANGE_MASK 1
161 #define CFR_IP_PROTO 2
162 #define CFR_IP_SOURCE_ADDR 3
163 #define CFR_IP_SOURCE_MASK 4
164 #define CFR_IP_DEST_ADDR 5
165 #define CFR_IP_DEST_MASK 6
166 #define CFR_IP_SRCPORT_START 7
167 #define CFR_IP_SRCPORT_END 8
168 #define CFR_IP_DSTPORT_START 9
169 #define CFR_IP_DSTPORT_END 10
170
171 /* Define Ethertype Classifier sub-subtypes
172  * These are subtypes of CFR_ETH_CLASSIFIER ([22/23].10)
173  */
174 #define CFR_ETH_DST_MAC 1
175 #define CFR_ETH_SRC_MAC 2
176 #define CFR_ETH_DSAP 3
177
178 /* Define 802.1P/Q Classifier sub-subtypes
179  * These are subtypes of CFR_8021Q_CLASSIFIER ([22/23].11)
180  */
181 #define CFR_D1Q_USER_PRI 1
182 #define CFR_D1Q_VLAN_ID 2
183 #define CFR_D1Q_VENDOR_SPEC 43
184
185 /* Define Upstream/Downstream Service flow subtypes
186  * These are subtypes of:
187  * TLV_UPSTREAM_SERVICE_FLOW (24)
188  * TLV_DOWN_SERVICE_FLOW (25)
189  */
190 #define SFW_REF 1
191 #define SFW_ID 2
192 #define SFW_SID 3
193 #define SFW_SERVICE_CLASS_NAME 4
194 #define SFW_ERRORS 5
195 #define SFW_QOS_SET_TYPE 6
196 #define SFW_TRAF_PRI 7
197 #define SFW_MAX_SUSTAINED 8
198 #define SFW_MAX_BURST 9
199 #define SFW_MIN_RSVD_TRAF 10
200 #define SFW_MIN_RSVD_PACKETSIZE 11
201 #define SFW_ACTIVE_QOS_TIMEOUT 12
202 #define SFW_ADMITT_QOS_TIMEOUT 13
203 #define SFW_VENDOR_SPEC 43
204 /* The following types only apply to
205  * TLV_UPSTREAM_SERVICE_FLOW (24)
206  */
207 #define SFW_MAX_CONCAT_BURST 14
208 #define SFW_SCHEDULING_TYPE 15
209 #define SFW_REQ_XMIT_POL 16
210 #define SFW_NOM_POLL_INT 17
211 #define SFW_POLL_JTTR_TOL 18
212 #define SFW_UG_SIZE 19
213 #define SFW_NOM_GRNT_INTV 20
214 #define SFW_GRNT_JTTR_TOL 21
215 #define SFW_GRNTS_PER_INTV 22
216 #define SFW_IP_TOS_OVERWRITE 23
217 #define SFW_UG_TIME_REF 24
218
219 /* The following types only apply to
220  * TLV_DOWN_SERVICE_FLOW (25)
221  */
222 #define SFW_MAX_DOWN_LAT 14
223
224 /* Define Service Flow Error sub-subtypes
225  * These are subtypes of
226  * SFW_ERRORS ([24/25].5)
227  */
228 #define SFW_ERR_PARAM 1
229 #define SFW_ERR_CODE 2
230 #define SFW_ERR_MSG 3
231
232
233 /* Define Payload Header Supression subtypes
234  * These are subtypes of TLV_PHS (26)
235  */
236 #define PHS_CLSFR_REF 1
237 #define PHS_CLSFR_ID 2
238 #define PHS_SFLOW_REF 3
239 #define PHS_SFLOW_ID 4
240 #define PHS_DSC_ACTION 5
241 #define PHS_ERRORS 6
242 #define PHS_FIELD 7
243 #define PHS_INDEX 8
244 #define PHS_MASK 9
245 #define PHS_SUP_SIZE 10
246 #define PHS_VERIFICATION 11
247 #define PHS_VENDOR_SPEC 43
248
249 /* Define PHS Error sub-subtypes
250  * These are subtypes of PHS_ERRORS (26.6)
251  */
252 #define PHS_ERR_PARAM 1
253 #define PHS_ERR_CODE 2
254 #define PHS_ERR_MSG 3
255
256
257 /* Define DS Channel List sub-types
258  * These are subtypes of TLV_DS_CHANNEL_LIST (41)
259  */
260 #define DS_CH_LIST_SINGLE 1
261 #define DS_CH_LIST_RANGE 2
262 #define DS_CH_LIST_DEFAULT_TIMEOUT 3
263
264 /* Define Singe Downstream Channel sub-types
265  * These are subtypes of DS_CH_LIST_SINGLE (41.1)
266  */
267 #define SINGLE_CH_TIMEOUT 1
268 #define SINGLE_CH_FREQ 2
269
270 /* Define Singe Downstream Channel sub-types
271  * These are subtypes of DS_CH_LIST_RANGE (41.2)
272  */
273 #define FREQ_RNG_TIMEOUT 1
274 #define FREQ_RNG_START 2
275 #define FREQ_RNG_END 3
276 #define FREQ_RNG_STEP 4
277
278 /* Define DUT sub-types
279  * These are subtypes of TLV_DUT_FILTER (45)
280  */
281 #define DUT_CONTROL 1
282 #define DUT_CMIM 2
283
284 /* Define TCC sub-types
285  * These are subtypes of TLV_TCC (46)
286  */
287 #define TLV_TCC_REFID 1
288 #define TLV_TCC_US_CH_ACTION 2
289 #define TLV_TCC_US_CH_ID 3
290 #define TLV_TCC_NEW_US_CH_ID 4
291 #define TLV_TCC_UCD 5
292 #define TLV_TCC_RNG_SID 6
293 #define TLV_TCC_INIT_TECH 7
294 #define TLV_TCC_RNG_PARMS 8
295 #define TLV_TCC_DYN_RNG_WIN 9
296 #define TLV_TCC_ERR 254
297
298 /* Define TLV_TCC_RNG_PARMS sub-types
299  * These are subtypes of TLV_TCC_RNG_PARMS (46.8)
300  */
301 #define RNG_PARMS_US_CH_ID 1
302 #define RNG_PARMS_TIME_OFF_INT 2
303 #define RNG_PARMS_TIME_OFF_FRAC 3
304 #define RNG_PARMS_POWER_OFF 4
305 #define RNG_PARMS_FREQ_OFF 5
306
307 /* Define TLV_TCC_ERR sub-types
308  * These are subtypes of TLV_TCC_ERR (46.254)
309  */
310 #define TCC_ERR_SUBTYPE 1
311 #define TCC_ERR_CODE 2
312 #define TCC_ERR_MSG 3
313
314 /* Define TLV_SID_CLUSTER sub-types
315  * These are subtypes of TLV_SID_CLUSTER (47)
316  */
317 #define SID_CL_SF_ID 1
318 #define SID_CL_ENC 2
319 #define SID_CL_SO_CRIT 3
320
321 /* Define SID_CL_ENC sub-types
322  * These are subtypes of SID_CL_ENC (47.2)
323  */
324 #define SID_CL_ENC_ID 1
325 #define SID_CL_ENC_MAP 2
326
327 /* Define SID_CL_ENC_MAP sub-types
328  * These are subtypes of SID_CL_ENC_MAP (47.2.2)
329  */
330 #define SID_CL_MAP_US_CH_ID 1
331 #define SID_CL_MAP_SID 2
332 #define SID_CL_MAP_ACTION 3
333
334 /* Define SID_CL_SO_CRIT sub-types
335  * These are subtypes of SID_CL_SO_CRIT (47.3)
336  */
337 #define SID_CL_SO_MAX_REQ 1
338 #define SID_CL_SO_MAX_OUT_BYTES 2
339 #define SID_CL_SO_MAX_REQ_BYTES 3
340 #define SID_CL_SO_MAX_TIME 4
341
342 /* Define TLV_RCP sub-types
343  * These are subtypes of TLV_RCP (48)
344  */
345 #define TLV_RCP_ID 1
346 #define TLV_RCP_NAME 2
347 #define TLV_RCP_FREQ_SPC 3
348 #define TLV_RCP_RCV_MOD_ENC 4
349 #define TLV_RCP_RCV_CH 5
350 #define TLV_RCP_VEN_SPEC 43
351 #define TLV_RCC_ERR 254
352
353 /* Define TLV_RCP_RCV_MOD_ENC sub-types
354  * These are subtypes of TLV_RCP_RCV_MOD_ENC (48.4)
355  */
356 #define RCV_MOD_ENC_IDX 1
357 #define RCV_MOD_ENC_ADJ_CH 2
358 #define RCV_MOD_ENC_CH_BL_RNG 3
359 #define RCV_MOD_ENC_CTR_FREQ_ASGN 4
360 #define RCV_MOD_ENC_RSQ_CH_SUBS_CAP 5
361 #define RCV_MOD_ENC_CONN 6
362 #define RCV_MOD_ENC_PHY_LAYR_PARMS 7
363
364 /* Define RCV_MOD_ENC_CH_BL_RNG sub-types
365  * These are subtypes of RCV_MOD_ENC_CH_BL_RNG (48.4.3)
366  */
367 #define CH_BL_RNG_MIN_CTR_FREQ 1
368 #define CH_BL_RNG_MAX_CTR_FREQ 2
369
370 /* Define TLV_RCP_RCV_CH sub-types
371  * These are subtypes of TLV_RCP_RCV_CH (48.5)
372  */
373 #define RCV_CH_IDX 1
374 #define RCV_CH_CONN 2
375 #define RCV_CH_CONN_OFF 3
376 #define RCV_CH_CTR_FREQ_ASGN 4
377 #define RCV_CH_PRIM_DS_CH_IND 5
378
379 /* Define TLV_RCC_ERR sub-types
380  * These are subtypes of TLV_RCC_ERR (49.254)
381  */
382 #define RCC_ERR_MOD_OR_CH 1
383 #define RCC_ERR_IDX 2
384 #define RCC_ERR_PARAM 3
385 #define RCC_ERR_CODE 4
386 #define RCC_ERR_MSG 5
387
388
389 /* Define TLV_DSID sub-types
390  * These are subtypes of TLV_DSID (50)
391  */
392 #define TLV_DSID_ID 1
393 #define TLV_DSID_ACTION 2
394 #define TLV_DSID_DS_RESEQ 3
395 #define TLV_DSID_MC 4
396
397 /* Define TLV_DSID_DS_RESEQ sub-types
398  * These are subtypes of TLV_DSID_DS_RESEQ (50.3)
399  */
400 #define DS_RESEQ_DSID 1
401 #define DS_RESEQ_CH_LST 2
402 #define DS_RESEQ_WAIT_TIME 3
403 #define DS_RESEQ_WARN_THRESH 4
404 #define DS_RESEQ_HO_TIMER 5
405
406 /* Define TLV_DSID_MC sub-types
407  * These are subtypes of TLV_DSID_DS_MC (50.4)
408  */
409
410 #define TLV_DSID_MC_ADDR 1
411 #define TLV_DSID_MC_CMIM 2
412 #define TLV_DSID_MC_GROUP 3
413 #define TLV_DSID_MC_PHS 26
414
415 /* Define TLV_DSID_MC_ADDR sub-types
416  * These are subtypes of TLV_DSID_MC_ADDR (50.4.1)
417  */
418 #define MC_ADDR_ACTION 1
419 #define MC_ADDR_ADDR 2
420
421 /* Define TLV_SEC_ASSOC sub-types
422  * These are subtypes of TLV_SEC_ASSOC (51)
423  */
424 #define TLV_SEC_ASSOC_ACTION 1
425 #define TLV_SEC_ASSOC_DESC 2
426
427 /* Define TLV_CH_ASGN sub-types
428  * These are subtypes of TLV_CH_ASGN (56)
429  */
430 #define TLV_CH_ASGN_US_CH_ID 1
431 #define TLV_CH_ASGN_RX_FREQ 2
432
433 /* Define TLV_CMTS_MC_SESS_ENC sub-types
434  * These are subtypes of TLV_CMTS_MC_SESS_ENC (64)
435  */
436 #define CMTS_MC_SESS_ENC_GRP 1
437 #define CMTS_MC_SESS_ENC_SRC 2
438
439 #endif