3e34cb39f00d0d56a2e2d0007c9a584b9375ff84
[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 <anarwani@cisco.com>
4  *
5  * Ethereal - Network traffic analyzer
6  * By Gerald Combs <gerald@ethereal.com>
7  * Copyright 1998 Gerald Combs
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22  */
23
24
25 /* Define Top Level TLV Types
26  * Please see http://www.cablemodem.com/Specs/SP-RFIv1.1-I08-020301.pdf
27  * Appendix C.
28  */
29 #ifndef __PACKET_TLV_H__
30 #define __PACKET_TLV_H__
31 #define TLV_DOWN_FREQ 1
32 #define TLV_CHNL_ID 2
33 #define TLV_NET_ACCESS 3
34 #define TLV_COS 4
35 #define TLV_MODEM_CAP 5
36 #define TLV_CM_MIC 6
37 #define TLV_CMTS_MIC 7
38 #define TLV_VENDOR_ID 8
39 #define TLV_SW_UPG_FILE 9
40 #define TLV_SNMP_WRITE_CTRL 10
41 #define TLV_SNMP_OBJECT 11
42 #define TLV_MODEM_IP 12
43 #define TLV_SVC_UNAVAIL 13
44 #define TLV_ETHERNET_MAC 14
45 #define TLV_TEL_SETTINGS 15
46 #define TLV_BPI_CONFIG 17
47 #define TLV_MAX_CPES 18
48 #define TLV_TFTP_TIME 19
49 #define TLV_TFTP_MODEM_ADDRESS 20
50 #define TLV_SW_UPG_SRVR 21
51 #define TLV_UPSTREAM_CLASSIFIER 22
52 #define TLV_DOWN_CLASSIFIER 23
53 #define TLV_UPSTREAM_SERVICE_FLOW 24
54 #define TLV_DOWN_SERVICE_FLOW 25
55 #define TLV_PHS 26
56 #define TLV_HMAC_DIGEST 27
57 #define TLV_MAX_CLASSIFIERS 28
58 #define TLV_PRIVACY_ENABLE 29
59 #define TLV_AUTH_BLOCK 30
60 #define TLV_KEY_SEQ_NUM 31
61 #define TLV_MFGR_CVC 32
62 #define TLV_COSIGN_CVC 33
63 #define TLV_SNMPV3_KICKSTART 34
64 #define TLV_SUBS_MGMT_CTRL 35
65 #define TLV_SUBS_MGMT_CPE 36
66 #define TLV_SUBS_MGMT_FLTR 37
67 #define TLV_VENDOR_SPEC 43
68 #define TLV_END 255
69
70 /* Define DOCSIS 1.0 Class Of Service Configuration Types
71  * These are subtypes of TLV_COS (4)
72  */
73 #define COS_CLASSID 1
74 #define COS_MAX_DOWN 2
75 #define COS_MAX_UP 3
76 #define COS_UP_CH_PRIO 4
77 #define COS_MIN_UP_RATE 5
78 #define COS_MAX_UP_BURST 6
79 #define COS_BP_ENABLE 7
80
81 /* Define SNMPV3 KickStart subtypes
82  * These are subtypes of TLV_SNMPV3_KICKSTART (34)
83  */
84 #define SNMPV3_SEC_NAME 1
85 #define SNMPV3_MGR_PUB_NUM 2
86
87 /* Define Modem Capabilities Subtypes
88  * These are subtypes of TLV_MODEM_CAP (5)
89  */
90 #define CAP_CONCAT 1
91 #define CAP_DOCSIS_VER 2
92 #define CAP_FRAG 3
93 #define CAP_PHS 4
94 #define CAP_IGMP 5
95 #define CAP_PRIVACY 6
96 #define CAP_DOWN_SAID 7
97 #define CAP_UP_SID 8
98 #define CAP_OPT_FILT 9
99 #define CAP_XMIT_EQPERSYM 10
100 #define CAP_NUM_XMIT_EQ_TAPS 11
101 #define CAP_DCC 12
102
103 /* Define Classifier subtypes
104  * These are subtypes of either:
105  * TLV_UPSTREAM_CLASSIFIER (22)
106  * TLV_DOWN_CLASSIFIER (23)
107  */
108 #define CFR_REF 1
109 #define CFR_ID 2
110 #define CFR_SFLOW_REF 3
111 #define CFR_SFLOW_ID 4
112 #define CFR_RULE_PRI 5
113 #define CFR_ACT_STATE 6
114 #define CFR_DSA_ACTION 7
115 #define CFR_ERROR 8
116 #define CFR_IP_CLASSIFIER 9
117 #define CFR_ETH_CLASSIFIER 10
118 #define CFR_8021Q_CLASSIFIER 11
119 #define CFR_VENDOR_SPEC 43
120
121 /* Define Classifier Error sub-subtypes
122  * These are subtypes of CFR_ERROR ([22/23].8)
123  */
124 #define CFR_ERR_PARAM 1
125 #define CFR_ERR_CODE 2
126 #define CFR_ERR_MSG 3
127
128 /* Define IP Classifier sub-subtypes
129  * These are subtypes of CFR_IP_CLASSIFIER ([22/23].9)
130  */
131 #define CFR_IP_TOS_RANGE_MASK 1
132 #define CFR_IP_PROTO 2
133 #define CFR_IP_SOURCE_ADDR 3
134 #define CFR_IP_SOURCE_MASK 4
135 #define CFR_IP_DEST_ADDR 5
136 #define CFR_IP_DEST_MASK 6
137 #define CFR_IP_SRCPORT_START 7
138 #define CFR_IP_SRCPORT_END 8
139 #define CFR_IP_DSTPORT_START 9
140 #define CFR_IP_DSTPORT_END 10
141
142 /* Define Ethertype Classifier sub-subtypes
143  * These are subtypes of CFR_ETH_CLASSIFIER ([22/23].10)
144  */
145 #define CFR_ETH_DST_MAC 1
146 #define CFR_ETH_SRC_MAC 2
147 #define CFR_ETH_DSAP 3
148
149 /* Define 802.1P/Q Classifier sub-subtypes
150  * These are subtypes of CFR_8021Q_CLASSIFIER ([22/23].11)
151  */
152 #define CFR_D1Q_USER_PRI 1
153 #define CFR_D1Q_VLAN_ID 2
154 #define CFR_D1Q_VENDOR_SPEC 43
155
156 /* Define Upstream/Downstream Service flow subtypes
157  * These are subtypes of:
158  * TLV_UPSTREAM_SERVICE_FLOW (24)
159  * TLV_DOWN_SERVICE_FLOW (25)
160  */
161 #define SFW_REF 1
162 #define SFW_ID 2
163 #define SFW_SID 3
164 #define SFW_SERVICE_CLASS_NAME 4
165 #define SFW_ERRORS 5
166 #define SFW_QOS_SET_TYPE 6
167 #define SFW_TRAF_PRI 7
168 #define SFW_MAX_SUSTAINED 8
169 #define SFW_MAX_BURST 9
170 #define SFW_MIN_RSVD_TRAF 10
171 #define SFW_MIN_RSVD_PACKETSIZE 11
172 #define SFW_ACTIVE_QOS_TIMEOUT 12
173 #define SFW_ADMITT_QOS_TIMEOUT 13
174 #define SFW_VENDOR_SPEC 43
175 /* The following types only apply to
176  * TLV_UPSTREAM_SERVICE_FLOW (24)
177  */
178 #define SFW_MAX_CONCAT_BURST 14
179 #define SFW_SCHEDULING_TYPE 15
180 #define SFW_REQ_XMIT_POL 16
181 #define SFW_NOM_POLL_INT 17
182 #define SFW_POLL_JTTR_TOL 18
183 #define SFW_UG_SIZE 19
184 #define SFW_NOM_GRNT_INTV 20
185 #define SFW_GRNT_JTTR_TOL 21
186 #define SFW_GRNTS_PER_INTV 22
187 #define SFW_IP_TOS_OVERWRITE 23
188 #define SFW_UG_TIME_REF 24
189
190 /* The following types only apply to
191  * TLV_DOWN_SERVICE_FLOW (25)
192  */
193 #define SFW_MAX_DOWN_LAT 14
194
195 /* Define Service Flow Error sub-subtypes
196  * These are subtypes of
197  * SFW_ERRORS ([24/25].5)
198  */
199 #define SFW_ERR_PARAM 1
200 #define SFW_ERR_CODE 2
201 #define SFW_ERR_MSG 3
202
203
204 /* Define Payload Header Supression subtypes
205  * These are subtypes of TLV_PHS (26)
206  */
207 #define PHS_CLSFR_REF 1
208 #define PHS_CLSFR_ID 2
209 #define PHS_SFLOW_REF 3
210 #define PHS_SFLOW_ID 4
211 #define PHS_DSC_ACTION 5
212 #define PHS_ERRORS 6
213 #define PHS_FIELD 7
214 #define PHS_INDEX 8
215 #define PHS_MASK 9
216 #define PHS_SUP_SIZE 10
217 #define PHS_VERIFICATION 11
218 #define PHS_VENDOR_SPEC 43
219
220 /* Define PHS Error sub-subtypes
221  * These are subtypes of PHS_ERRORS (26.6)
222  */
223 #define PHS_ERR_PARAM 1
224 #define PHS_ERR_CODE 2
225 #define PHS_ERR_MSG 3
226
227 #endif