docsis_symtable.h 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. /*
  2. * DOCSIS configuration file encoder.
  3. * Copyright (c) 2001 Cornel Ciocirlan, ctrl@users.sourceforge.net.
  4. * Copyright (c) 2002,2003,2004,2005 Evvolve Media SRL,office@evvolve.com
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. *
  20. * DOCSIS is a registered trademark of Cablelabs, http://www.cablelabs.com
  21. */
  22. /*
  23. change history
  24. 2004-07-29 fix bug # 970994 ... SubMgmtControl had wrong docsis code
  25. 2003-01-10 added three new TLV types for BPI+ (courtesy of Adrian Kwong)
  26. */
  27. #ifndef _DOCSIS_SYMTABLE_H
  28. #include "docsis_common.h"
  29. #include "docsis_decode.h"
  30. #include "docsis_encode.h"
  31. /*
  32. * encode_nothing is used for non-trivial settings, where the encoding functions
  33. * must have prototypes that don't match symbol_type (i.e. generic TLV, SNMP, etc).
  34. *
  35. * This is a list and a tree at the same time. The "parent_id" of each entry is a pointer to the
  36. * parent row in this table; ClassId for example has "6" as parent ID which is the index
  37. * in the table of ClassOfService
  38. */
  39. /*id "identifier" docsis_code parent_id encode_func decode_func low_limit high_limit */
  40. symbol_type symtable[NUM_IDENTIFIERS] = {
  41. { 0, "/* Pad */", 0, 0, (encode_nothing), (decode_special), 0, 0 },
  42. { 1, "DownstreamFrequency", 1, 0, (encode_uint), (decode_uint), 88000000, 1008000000 }, /* MULPIv3.0-I24 Annex C.1.1.1 */
  43. { 2, "UpstreamChannelId", 2, 0, (encode_uchar), (decode_uchar), 0, 255 }, /* MULPIv3.0-I24 Annex C.1.1.2 */
  44. { 3, "NetworkAccess", 3, 0, (encode_uchar), (decode_uchar), 0, 1 }, /* MULPIv3.0-I24 Annex C.1.1.3 */
  45. /* Class of Service */
  46. { 6, "ClassOfService", 4, 0, (encode_nothing), (decode_aggregate), 0, 0 }, /* MULPIv3.0-I24 Annex C.1.1.4 */
  47. { 7, "ClassID", 1, 6, (encode_uchar), (decode_uchar), 1, 16 }, /* MULPIv3.0-I24 Annex C.1.1.4.1 */
  48. { 8, "MaxRateDown", 2, 6, (encode_uint), (decode_uint), 0, 1334880000 }, /* MULPIv3.0-I24 Annex C.1.1.4.2 */
  49. { 9, "MaxRateUp", 3, 6, (encode_uint), (decode_uint), 0, 183900000 }, /* MULPIv3.0-I24 Annex C.1.1.4.3 */
  50. { 10, "PriorityUp", 4, 6, (encode_uchar), (decode_uchar), 0, 7 }, /* MULPIv3.0-I24 Annex C.1.1.4.4 */
  51. { 11, "GuaranteedUp", 5, 6, (encode_uint), (decode_uint), 0, 183900000 }, /* MULPIv3.0-I24 Annex C.1.1.4.5 */
  52. { 12, "MaxBurstUp", 6, 6, (encode_ushort), (decode_ushort), 0, 65535 }, /* MULPIv3.0-I24 Annex C.1.1.4.6 */
  53. { 13, "PrivacyEnable", 7, 6, (encode_uchar), (decode_uchar), 0, 1 }, /* MULPIv3.0-I24 Annex C.1.1.4.7 */
  54. /* Modem Capabilities Encodings */
  55. { 144, "ModemCapabilities", 5, 0, (encode_nothing), (decode_aggregate), 0, 0 }, /* MULPIv3.0-I24 Annex C.1.3.1 */
  56. { 145, "ConcatenationSupport", 1, 144, (encode_uchar), (decode_uchar), 0, 1 }, /* MULPIv3.0-I24 Annex C.1.3.1.1 */
  57. { 146, "ModemDocsisVersion", 2, 144, (encode_uchar), (decode_uchar), 0, 3 }, /* MULPIv3.0-I24 Annex C.1.3.1.2 */
  58. { 147, "FragmentationSupport", 3, 144, (encode_uchar), (decode_uchar), 0, 1 }, /* MULPIv3.0-I24 Annex C.1.3.1.3 */
  59. { 148, "PHSSupport", 4, 144, (encode_uchar), (decode_uchar), 0, 1 }, /* MULPIv3.0-I24 Annex C.1.3.1.4 */
  60. { 149, "IGMPSupport", 5, 144, (encode_uchar), (decode_uchar), 0, 1 }, /* MULPIv3.0-I24 Annex C.1.3.1.5 */
  61. { 150, "BaselinePrivacySupport", 6, 144, (encode_uchar), (decode_uchar), 0, 1 }, /* MULPIv3.0-I24 Annex C.1.3.1.6 */
  62. { 151, "DownstreamSAIDSupport", 7, 144, (encode_uchar), (decode_uchar), 0, 255 }, /* MULPIv3.0-I24 Annex C.1.3.1.7 */
  63. { 152, "UpstreamSIDSupport", 8, 144, (encode_uchar), (decode_uchar), 0, 255 }, /* MULPIv3.0-I24 Annex C.1.3.1.8 */
  64. { 153, "DCCSupport", 12, 144, (encode_uchar), (decode_uchar), 0, 1 }, /* MULPIv3.0-I24 Annex C.1.3.1.12 */
  65. { 4, "CmMic", 6, 0, (encode_nothing), (decode_md5), 0, 0 }, /* MULPIv3.0-I24 Annex C.1.1.5 */
  66. { 5, "CmtsMic", 7, 0, (encode_nothing), (decode_md5), 0, 0 }, /* MULPIv3.0-I24 Annex C.1.1.6 */
  67. { 14, "SwUpgradeFilename", 9, 0, (encode_string), (decode_string), 0, 0 },
  68. { 15, "SnmpWriteControl", 10, 0, (encode_nothing), (decode_snmp_wd), 0, 0 },
  69. { 16, "SnmpMibObject", 11, 0, (encode_nothing), (decode_snmp_object), 0, 0 },
  70. { 17, "CpeMacAddress", 14, 0, (encode_ether), (decode_ether), 0, 0 },
  71. /* BPI+ */
  72. { 18, "BaselinePrivacy", 17, 0, (encode_nothing), (decode_aggregate), 0, 0 }, /* 17 */
  73. { 19, "AuthTimeout", 1, 18, (encode_uint), (decode_uint), 1, 30 },
  74. { 20, "ReAuthTimeout", 2, 18, (encode_uint), (decode_uint), 1, 30 },
  75. { 21, "AuthGraceTime", 3, 18, (encode_uint), (decode_uint), 1, 6047999 },
  76. { 22, "OperTimeout", 4, 18, (encode_uint), (decode_uint), 1, 10 },
  77. { 23, "ReKeyTimeout", 5, 18, (encode_uint), (decode_uint), 1, 10 },
  78. { 24, "TEKGraceTime", 6, 18, (encode_uint), (decode_uint), 1, 302399 },
  79. { 25, "AuthRejectTimeout", 7, 18, (encode_uint), (decode_uint), 1, 600 },
  80. { 127, "SAMapWaitTimeout", 8, 18, (encode_uint), (decode_uint), 1, 10 },
  81. { 128, "SAMapMaxRetries", 9, 18, (encode_uint), (decode_uint), 0, 10 },
  82. { 26, "MaxCPE", 18, 0, (encode_uchar), (decode_uchar), 1, 254 },
  83. { 168, "TftpTimestamp", 19, 0, (encode_uint), (decode_uint), 0, 0xFFFFFFFF },
  84. { 169, "TftpModemAddress", 20, 0, (encode_ip), (decode_ip), 0, 0 },
  85. { 27, "SwUpgradeServer", 21, 0, (encode_ip), (decode_ip), 0, 0 },
  86. /* DOCSIS 1.1-2.0 */
  87. { 28, "UsPacketClass", 22, 0, (encode_nothing), (decode_aggregate), 0, 0 },
  88. { 29, "ClassifierRef", 1, 28, (encode_uchar), (decode_uchar), 1, 255 } ,
  89. { 30, "ClassifierId", 2, 28, (encode_ushort), (decode_ushort), 1, 65535 },
  90. { 31, "ServiceFlowRef", 3, 28, (encode_ushort), (decode_ushort), 1, 65535 },
  91. { 32, "ServiceFlowId", 4, 28, (encode_uint), (decode_uint), 1, 0xFFFFFFFF },
  92. { 33, "RulePriority", 5, 28, (encode_uchar), (decode_uchar), 0, 255 },
  93. { 34, "ActivationState", 6, 28, (encode_uchar), (decode_uchar), 0, 1 },
  94. { 35, "DscAction", 7, 28, (encode_uchar), (decode_uchar), 0, 2 },
  95. { 36, "IpPacketClassifier", 9, 28, (encode_nothing), (decode_aggregate), 0, 0 },
  96. { 37, "IpTos", 1, 36, (encode_hexstr), (decode_hexstr), 3, 3 },
  97. { 38, "IpProto", 2, 36, (encode_ushort), (decode_ushort), 0, 257 },
  98. { 39, "IpSrcAddr", 3, 36, (encode_ip), (decode_ip), 0, 0 },
  99. { 40, "IpSrcMask", 4, 36, (encode_ip), (decode_ip), 0, 0 },
  100. { 41, "IpDstAddr", 5, 36, (encode_ip), (decode_ip), 0, 0 },
  101. { 42, "IpDstMask", 6, 36, (encode_ip), (decode_ip), 0, 0 },
  102. { 43, "SrcPortStart", 7, 36, (encode_ushort), (decode_ushort), 0, 65535 },
  103. { 44, "SrcPortEnd", 8, 36, (encode_ushort), (decode_ushort), 0, 65535 },
  104. { 45, "DstPortStart", 9, 36, (encode_ushort), (decode_ushort), 0, 65535 },
  105. { 46, "DstPortEnd", 10, 36, (encode_ushort), (decode_ushort), 0, 65535 },
  106. { 47, "LLCPacketClassifier", 10, 28, (encode_nothing), (decode_aggregate), 0, 0 },
  107. { 48, "DstMacAddress", 1, 47, (encode_ethermask), (decode_ethermask), 0, 0 },
  108. { 49, "SrcMacAddress", 2, 47, (encode_ether), (decode_ether), 0, 0 },
  109. { 50, "EtherType", 3, 47, (encode_hexstr), (decode_hexstr), 3, 3 },
  110. { 51, "IEEE802Classifier", 11, 28, (encode_nothing), (decode_aggregate), 0, 0 },
  111. { 52, "UserPriority", 1, 51, (encode_ushort), (decode_ushort), 0, 0 },
  112. { 53, "VlanID", 2, 51, (encode_ushort), (decode_ushort), 0, 0 },
  113. { 211, "PcIPv6PacketClassification", 12, 28, (encode_nothing), (decode_aggregate), 0, 0 }, /* 22.12 */
  114. { 212, "PcIPv6TrafficClassRangeAndMask", 1, 211, (encode_hexstr), (decode_hexstr), 0, 0 }, /* 22.12.1 */
  115. { 213, "PcIPv6FlowLabel", 2, 211, (encode_hexstr), (decode_hexstr), 4, 4 }, /* 22.12.2 */
  116. { 214, "PcIPv6NextHeaderType", 3, 211, (encode_ushort), (decode_ushort), 0, 257 }, /* 22.12.3 */
  117. { 215, "PcIPv6SourceAddress", 4, 211, (encode_ip6), (decode_ip6), 0, 0 }, /* 22.12.4 */
  118. { 216, "PcIPv6SourcePrefixLength", 5, 211, (encode_uchar), (decode_uchar), 0, 128 }, /* 22.12.5 */
  119. { 217, "PcIPv6DestAddress", 6, 211, (encode_ip6), (decode_ip6), 0, 0 }, /* 22.12.6 */
  120. { 218, "PcIPv6DestPrefixLength", 7, 211, (encode_uchar), (decode_uchar), 0, 128 }, /* 22.12.7 */
  121. { 219, "PcCMIMEncoding", 13, 28, (encode_hexstr), (decode_hexstr), 0, 0 }, /* 22.13 */
  122. /* TLV 22 - Upstream Packet Classification */
  123. { 200, "VendorSpecific", 43, 28, (encode_nothing), (decode_aggregate), 0, 0 }, /* 22.43 */
  124. { 201, "VendorIdentifier", 8, 200, (encode_hexstr), (decode_hexstr), 3, 3 }, /* 22.43.8 */
  125. { 202, "L2VPNEncoding", 5, 200, (encode_nothing), (decode_aggregate), 0, 0 }, /* 22.43.5 */
  126. { 203, "VPNIdentifier", 1, 202, (encode_string), (decode_string), 4, 255 }, /* 22.43.5.1 */
  127. /* TODO: Vendor Specific support in the IEEE802Classifier */
  128. { 54, "DsPacketClass", 23, 0, (encode_nothing), (decode_aggregate), 0, 0 },
  129. { 55, "ClassifierRef", 1, 54, (encode_uchar), (decode_uchar), 1, 255 },
  130. { 56, "ClassifierId", 2, 54, (encode_ushort), (decode_ushort), 1, 65535 },
  131. { 57, "ServiceFlowRef", 3, 54, (encode_ushort), (decode_ushort), 1, 65535 },
  132. { 58, "ServiceFlowId", 4, 54, (encode_uint), (decode_uint), 1, 0xFFFFFFFF },
  133. { 59, "RulePriority", 5, 54, (encode_uchar), (decode_uchar), 0, 255 },
  134. { 60, "ActivationState", 6, 54, (encode_uchar), (decode_uchar), 0, 1 },
  135. { 61, "DscAction", 7, 54, (encode_uchar), (decode_uchar), 0, 2 },
  136. { 62, "IpPacketClassifier", 9, 54, (encode_nothing), (decode_aggregate), 0, 0 },
  137. { 63, "IpTos", 1, 62, (encode_hexstr), (decode_hexstr), 3, 3 },
  138. { 64, "IpProto", 2, 62, (encode_ushort), (decode_ushort), 0, 257 },
  139. { 65, "IpSrcAddr", 3, 62, (encode_ip), (decode_ip), 0, 0 },
  140. { 66, "IpSrcMask", 4, 62, (encode_ip), (decode_ip), 0, 0 },
  141. { 67, "IpDstAddr", 5, 62, (encode_ip), (decode_ip), 0, 0 },
  142. { 68, "IpDstMask", 6, 62, (encode_ip), (decode_ip), 0, 0 },
  143. { 69, "SrcPortStart", 7, 62, (encode_ushort), (decode_ushort), 0, 65535 },
  144. { 70, "SrcPortEnd", 8, 62, (encode_ushort), (decode_ushort), 0, 65535 },
  145. { 71, "DstPortStart", 9, 62, (encode_ushort), (decode_ushort), 0, 65535 },
  146. { 72, "DstPortEnd", 10, 62, (encode_ushort), (decode_ushort), 0, 65535 },
  147. { 73, "LLCPacketClassifier", 10, 54, (encode_nothing), (decode_aggregate), 0, 0 },
  148. { 74, "DstMacAddress", 1, 73, (encode_ethermask), (decode_ethermask), 0, 0 },
  149. { 75, "SrcMacAddress", 2, 73, (encode_ether), (decode_ether), 0, 0 },
  150. { 76, "EtherType", 3, 73, (encode_hexstr), (decode_hexstr), 0, 255 },
  151. { 77, "IEEE802Classifier", 11, 54, (encode_nothing), (decode_aggregate), 0, 0 },
  152. { 78, "UserPriority", 1, 77, (encode_ushort), (decode_ushort), 0, 0 },
  153. { 79, "VlanID", 2, 77, (encode_ushort), (decode_ushort), 0, 0 },
  154. { 220, "PcIPv6PacketClassification", 12, 54, (encode_nothing), (decode_aggregate), 0, 0 }, /* 23.12 */
  155. { 221, "PcIPv6TrafficClassRangeAndMask", 1, 220, (encode_hexstr), (decode_hexstr), 0, 0 }, /* 23.12.1 */
  156. { 222, "PcIPv6FlowLabel", 2, 220, (encode_hexstr), (decode_hexstr), 4, 4 }, /* 23.12.2 */
  157. { 223, "PcIPv6NextHeaderType", 3, 220, (encode_ushort), (decode_ushort), 0, 257 }, /* 23.12.3 */
  158. { 224, "PcIPv6SourceAddress", 4, 220, (encode_ip6), (decode_ip6), 0, 0 }, /* 23.12.4 */
  159. { 225, "PcIPv6SourcePrefixLength", 5, 220, (encode_uchar), (decode_uchar), 0, 128 }, /* 23.12.5 */
  160. { 226, "PcIPv6DestAddress", 6, 220, (encode_ip6), (decode_ip6), 0, 0 }, /* 23.12.6 */
  161. { 227, "PcIPv6DestPrefixLength", 7, 220, (encode_uchar), (decode_uchar), 0, 128 }, /* 23.12.7 */
  162. /* TLV 23 - Downstream Packet Classification */
  163. { 204, "VendorSpecific", 43, 54, (encode_nothing), (decode_aggregate), 0, 0 }, /* 23.43 */
  164. { 205, "VendorIdentifier", 8, 204, (encode_hexstr), (decode_hexstr), 3, 3 }, /* 23.43.8 */
  165. { 206, "L2VPNEncoding", 5, 204, (encode_nothing), (decode_aggregate), 0, 0 }, /* 23.43.5 */
  166. { 207, "VPNIdentifier", 1, 206, (encode_string), (decode_string), 4, 255 }, /* 23.43.5.1 */
  167. /* Upstream Service Flow */
  168. { 80, "UsServiceFlow", 24, 0, (encode_nothing), (decode_aggregate), 0, 0 },
  169. { 81, "UsServiceFlowRef", 1, 80, (encode_ushort), (decode_ushort), 1, 65535 },
  170. { 82, "UsServiceFlowId", 2, 80, (encode_uint), (decode_uint), 1, 0xFFFFFFFF },
  171. { 83, "ServiceClassName", 4, 80, (encode_strzero), (decode_strzero), 2, 16 },
  172. { 84, "QosParamSetType", 6, 80, (encode_uchar), (decode_uchar), 0, 255 },
  173. { 85, "TrafficPriority", 7, 80, (encode_uchar), (decode_uchar), 0, 7 },
  174. { 86, "MaxRateSustained", 8, 80, (encode_uint), (decode_uint), 0, 0 },
  175. { 87, "MaxTrafficBurst", 9, 80, (encode_uint), (decode_uint), 0, 0 },
  176. { 88, "MinReservedRate", 10, 80, (encode_uint), (decode_uint), 0, 0 },
  177. { 89, "MinResPacketSize", 11, 80, (encode_ushort), (decode_ushort), 0, 65535 },
  178. { 90, "ActQosParamsTimeout", 12, 80, (encode_ushort), (decode_ushort), 0, 65535 },
  179. { 91, "AdmQosParamsTimeout", 13, 80, (encode_ushort), (decode_ushort), 0, 65535 },
  180. { 92, "MaxConcatenatedBurst", 14, 80, (encode_ushort), (decode_ushort), 0, 65535 },
  181. { 93, "SchedulingType", 15, 80, (encode_uchar), (decode_uchar), 0, 6 },
  182. { 94, "RequestOrTxPolicy", 16, 80, (encode_hexstr), (decode_hexstr), 4, 4 },
  183. { 95, "NominalPollInterval", 17, 80, (encode_uint), (decode_uint), 0, 0 },
  184. { 96, "ToleratedPollJitter", 18, 80, (encode_uint), (decode_uint), 0, 0 },
  185. { 97, "UnsolicitedGrantSize", 19, 80, (encode_ushort), (decode_ushort), 0, 65535 },
  186. { 98, "NominalGrantInterval", 20, 80, (encode_uint), (decode_uint), 0, 0 },
  187. { 99, "ToleratedGrantJitter", 21, 80, (encode_uint), (decode_uint), 0, 0 },
  188. { 100, "GrantsPerInterval", 22, 80, (encode_uchar), (decode_uchar), 0, 127 },
  189. { 101, "IpTosOverwrite", 23, 80, (encode_hexstr), (decode_hexstr), 2, 2 },
  190. /* TLV 24 Upstream Service Flow */
  191. { 192, "VendorSpecific", 43, 80, (encode_nothing), (decode_aggregate), 0, 0 }, /* 24.43 */
  192. { 194, "L2VPNEncoding", 5, 192, (encode_nothing), (decode_aggregate), 0, 0 }, /* 24.43.5 */
  193. { 195, "VPNIdentifier", 1, 194, (encode_string), (decode_string), 4, 255 }, /* 24.43.5.1 */
  194. { 193, "VendorIdentifier", 8, 192, (encode_hexstr), (decode_hexstr), 3, 3 }, /* 24.43.8 */
  195. /* Downstream Service Flow */
  196. { 102, "DsServiceFlow", 25, 0, (encode_nothing), (decode_aggregate), 0, 0 },
  197. { 103, "DsServiceFlowRef", 1, 102, (encode_ushort), (decode_ushort), 1, 65535 },
  198. { 104, "DsServiceFlowId", 2, 102, (encode_uint), (decode_uint), 1, 0xFFFFFFFF },
  199. { 105, "ServiceClassName", 4, 102, (encode_strzero), (decode_strzero), 2, 16 },
  200. { 106, "QosParamSetType", 6, 102, (encode_uchar), (decode_uchar), 0, 255 },
  201. { 107, "TrafficPriority", 7, 102, (encode_uchar), (decode_uchar), 0, 7 },
  202. { 108, "MaxRateSustained", 8, 102, (encode_uint), (decode_uint), 0, 0xFFFFFFFF },
  203. { 109, "MaxTrafficBurst", 9, 102, (encode_uint), (decode_uint), 0, 0xFFFFFFFF },
  204. { 110, "MinReservedRate", 10, 102, (encode_uint), (decode_uint), 0, 0xFFFFFFFF },
  205. { 111, "MinResPacketSize", 11, 102, (encode_ushort), (decode_ushort), 0, 65535 },
  206. { 112, "ActQosParamsTimeout", 12, 102, (encode_ushort), (decode_ushort), 0, 65535 },
  207. { 113, "AdmQosParamsTimeout", 13, 102, (encode_ushort), (decode_ushort), 0, 65535 },
  208. { 114, "MaxDsLatency", 14, 102, (encode_uint), (decode_uint), 0, 0 },
  209. /* TLV 25 - Downstream Service Flow */
  210. { 196, "VendorSpecific", 43, 102, (encode_nothing), (decode_aggregate), 0, 0 }, /* 25.43 */
  211. { 197, "VendorIdentifier", 8, 196, (encode_hexstr), (decode_hexstr), 3, 3 }, /* 25.43.8 */
  212. { 198, "L2VPNEncoding", 5, 196, (encode_nothing), (decode_aggregate), 0, 0 }, /* 25.43.5 */
  213. { 199, "VPNIdentifier", 1, 198, (encode_string), (decode_string), 4, 255 }, /* 25.43.5.1 */
  214. /* Payload Header Suppression - Appendix C.2.2.8 */
  215. { 115, "PHS", 26, 0, (encode_nothing), (decode_aggregate) , 0, 0 },
  216. { 116, "PHSClassifierRef", 1, 115, (encode_uchar), (decode_uchar), 1, 255 },
  217. { 117, "PHSClassifierId", 2, 115, (encode_ushort), (decode_ushort), 1, 65535 },
  218. { 118, "PHSServiceFlowRef", 3, 115, (encode_ushort), (decode_ushort), 1, 65535 },
  219. { 119, "PHSServiceFlowId", 4, 115, (encode_uint), (decode_uint), 1, 0xFFFFFFFF },
  220. { 120, "PHSField", 7, 115, (encode_hexstr), (decode_hexstr), 1, 255 },
  221. { 121, "PHSIndex", 8, 115, (encode_uchar), (decode_uchar), 1, 255 },
  222. { 122, "PHSMask", 9, 115, (encode_hexstr), (decode_hexstr), 1, 255 },
  223. { 123, "PHSSize", 10, 115, (encode_uchar), (decode_uchar), 1, 255 },
  224. { 124, "PHSVerify", 11, 115, (encode_uchar), (decode_uchar), 0, 1 },
  225. { 125, "MaxClassifiers", 28, 0, (encode_ushort), (decode_ushort), 0, 0 },
  226. { 126, "GlobalPrivacyEnable", 29, 0, (encode_uchar), (decode_uchar), 0, 0 },
  227. /* ManufacturerCVC */
  228. { 129, "MfgCVCData", 32, 0, (encode_hexstr), (decode_hexstr), 0, 255 },
  229. { 170, "ManufacturerCVC", 32, 0, (encode_nothing), (decode_hexstr), 0, 255 },
  230. { 171, "CoSignerCVCData", 33, 0, (encode_hexstr), (decode_hexstr), 0, 255 },
  231. { 172, "CoSignerCVC", 33, 0, (encode_nothing), (decode_hexstr), 0, 255 },
  232. /* SNMPv3 Kickstart */
  233. { 132, "SnmpV3Kickstart", 34, 0, (encode_nothing), (decode_aggregate), 0, 0 }, /* 34 */
  234. /* TODO: SP-RFI-v2.0 says the SecurityName is UTF8 encoded */
  235. { 133, "SnmpV3SecurityName", 1, 132, (encode_string), (decode_string), 1, 16 }, /* 34.1 */
  236. { 134, "SnmpV3MgrPublicNumber", 2, 132, (encode_hexstr), (decode_hexstr), 1, 514 }, /* 34.2 */
  237. { 154, "SubMgmtControl", 35, 0, (encode_hexstr), (decode_hexstr), 3, 3 },
  238. { 155, "SubMgmtFilters", 37, 0, (encode_ushort_list), (decode_ushort_list), 4, 4 },
  239. /* Snmpv3 Notification Receiver */
  240. { 135, "SnmpV3TrapReceiver", 38, 0, (encode_nothing), (decode_aggregate), 0, 0 }, /* 38 */
  241. { 136, "SnmpV3TrapRxIP", 1, 135, (encode_ip), (decode_ip), 0, 0 },
  242. { 137, "SnmpV3TrapRxPort", 2, 135, (encode_ushort), (decode_ushort), 0, 0 },
  243. { 138, "SnmpV3TrapRxType", 3, 135, (encode_ushort), (decode_ushort), 1, 5 },
  244. { 139, "SnmpV3TrapRxTimeout", 4, 135, (encode_ushort), (decode_ushort), 0, 65535 },
  245. { 140, "SnmpV3TrapRxRetries", 5, 135, (encode_ushort), (decode_ushort), 0, 65535 },
  246. { 141, "SnmpV3TrapRxFilterOID", 6, 135, (encode_oid), (decode_oid), 1, 5 },
  247. { 142, "SnmpV3TrapRxSecurityName", 7, 135, (encode_string), (decode_string), 1, 16 },
  248. { 143, "DocsisTwoEnable", 39, 0, (encode_uchar), (decode_uchar), 0, 1 },
  249. { 158, "DsChannelList", 41, 0, (encode_nothing), (decode_aggregate), 1, 255 },
  250. { 159, "SingleDsChannel", 1, 158, (encode_nothing), (decode_aggregate), 1, 255 },
  251. { 160, "SingleDsTimeout", 1, 159, (encode_ushort), (decode_ushort), 0, 65535 },
  252. { 161, "SingleDsFrequency", 2, 159, (encode_uint), (decode_uint), 0, 0xFFFFFFFF },
  253. { 162, "DsFreqRange", 2, 158, (encode_nothing), (decode_aggregate), 1, 255 },
  254. { 163, "DsFreqRangeTimeout", 1, 162, (encode_ushort), (decode_ushort), 0, 65535 },
  255. { 164, "DsFreqRangeStart", 2, 162, (encode_uint), (decode_uint), 0, 0xFFFFFFFF },
  256. { 165, "DsFreqRangeEnd", 3, 162, (encode_uint), (decode_uint), 0, 0xFFFFFFFF },
  257. { 166, "DsFreqRangeStepSize", 4, 162, (encode_uint), (decode_uint), 0, 0xFFFFFFFF },
  258. { 167, "DefaultScanTimeout", 3, 158, (encode_ushort), (decode_ushort), 0, 65535 },
  259. /* DOCSIS Extension Field - Vendor Specific */
  260. { 130, "VendorSpecific", 43, 0, (encode_nothing), (decode_aggregate), 0, 0 }, /* 43 */
  261. { 188, "L2VPNEncoding", 5, 130, (encode_nothing), (decode_aggregate), 0, 0 }, /* 43.5 */
  262. { 189, "VPNIdentifier", 1, 188, (encode_string), (decode_string), 4, 255 }, /* 43.5.1 */
  263. { 190, "NSIEncapsulation", 2, 188, (encode_nothing), (decode_aggregate), 0, 0 }, /* 43.5.2 */
  264. { 191, "NSIEncapsulationSingleQTag", 2, 190, (encode_ushort), (decode_ushort), 1, 4095 }, /* 43.5.2.2 */
  265. { 191, "NSIEncapsulationDualQTag", 3, 190, (encode_dual_qtag), (decode_dual_qtag), 0, 0 }, /* 43.5.2.3 */
  266. { 131, "VendorIdentifier", 8, 130, (encode_hexstr), (decode_hexstr), 3, 3 }, /* 43.8 */
  267. { 208, "DUTFiltering", 45, 0, (encode_nothing), (decode_aggregate), 0, 0 }, /* 45 */
  268. { 209, "DUTControl", 1, 208, (encode_uchar), (decode_uchar), 0, 1 }, /* 45.1 */
  269. { 210, "DUTCMIM", 2, 208, (encode_hexstr), (decode_hexstr), 0, 0 }, /* 45.2 */
  270. /* Channel Assignment Configuration Settings per Docsis3.1 CM-SP-MULPIv3.1-I01-131029 Annex C C.1.2.15 */
  271. { 185, "ChannelAssignmentConfig", 56, 0, (encode_nothing), (decode_aggregate), 0, 0 }, /* 56 */
  272. { 186, "CaTransmit", 1, 185, (encode_uchar), (decode_uchar), 0, 255 },
  273. { 187, "CaReceive", 2, 185, (encode_uint), (decode_uint), 88000000, 860000000 },
  274. /* IPv6 */
  275. { 173, "SwUpgradeServer6", 58, 0, (encode_ip6), (decode_ip6), 0, 0 },
  276. { 174, "SubMgmtControl6", 63, 0, (encode_hexstr), (decode_hexstr), 2, 2 },
  277. /*{ 156, "SnmpMibObject", 64, 0, (encode_nothing), (decode_snmp_object), 1, 2048 },*/
  278. /* eRouter TLVs */
  279. { 175, "eRouter", 202, 0, (encode_nothing), (decode_aggregate), 0, 0 }, /* TLV 202 eRouter-I12 */
  280. { 176, "InitializationMode", 1, 175, (encode_uchar), (decode_uchar), 0, 3 }, /* TLV 202.1 eRouter-I12 Annex B.4.2 */
  281. { 177, "TR69ManagementServer", 2, 175, (encode_nothing), (decode_aggregate), 0, 0 }, /* TLV 202.2 eRouter-I12 Annex B.4.3 */
  282. { 178, "EnableCWMP", 1, 177, (encode_uchar), (decode_uchar), 0, 1 }, /* TLV 202.2.1 eRouter-I12 Annex B.4.3.1 */
  283. { 179, "URL", 2, 177, (encode_string), (decode_string), 0, 0 }, /* TLV 202.2.2 eRouter-I12 Annex B.4.3.2 */
  284. { 180, "Username", 3, 177, (encode_string), (decode_string), 0, 0 }, /* TLV 202.2.3 eRouter-I12 Annex B.4.3.3 */
  285. { 181, "Password", 4, 177, (encode_string), (decode_string), 0, 0 }, /* TLV 202.2.4 eRouter-I12 Annex B.4.3.4 */
  286. { 182, "ConnectionRequestUsername", 5, 177, (encode_string), (decode_string), 0, 0 }, /* TLV 202.2.5 eRouter-I12 Annex B.4.3.5 */
  287. { 183, "ConnectionRequestPassword", 6, 177, (encode_string), (decode_string), 0, 0 }, /* TLV 202.2.6 eRouter-I12 Annex B.4.3.6 */
  288. { 184, "ACSOverride", 7, 177, (encode_uchar), (decode_uchar), 0, 1 }, /* TLV 202.2.7 eRouter-I12 Annex B.4.3.7 */
  289. { 227, "InitializationModeOverride", 3, 175, (encode_uchar), (decode_uchar), 0, 1 }, /* TLV 202.3 eRouter-I12 Annex B.4.4 */
  290. { 228, "SNMPv1v2cCoexistenceConfig", 53, 175, (encode_nothing), (decode_aggregate), 0, 0 }, /* TLV 202.53 eRouter-I12 Annex B.4.5 */
  291. { 229, "SNMPv1v2cCommunityName", 1, 228, (encode_string), (decode_string), 0, 0 }, /* TLV 202.53.1 eRouter-I12 Annex B.4.5.1 */
  292. { 230, "SNMPv1v2cTransportAddressAccess", 2, 228, (encode_nothing), (decode_aggregate), 0, 0 }, /* TLV 202.53.2 eRouter-I12 Annex B.4.5.2 */
  293. { 231, "SNMPv1v2cAccessViewType", 3, 228, (encode_uchar), (decode_uchar), 1, 2 }, /* TLV 202.53.3 eRouter-I12 Annex B.4.5.3 */
  294. { 232, "SNMPv1v2cAccessViewName", 4, 228, (encode_string), (decode_string), 0, 0 }, /* TLV 202.53.4 eRouter-I12 Annex B.4.5.4 */
  295. /* A little more organized -> Start with 233 */
  296. /* Generic TLV ... we only use the limits, code and length don't matter ...*/
  297. { 998, "GenericTLV", 0, 0, (encode_nothing), (decode_special), 0, 0 },
  298. /* PacketCable MTA Configuration File Delimiter */
  299. { 157, "MtaConfigDelimiter", 254, 0, (encode_uchar), (decode_uchar), 1, 255 },
  300. { 999, "/*EndOfDataMkr*/", 255, 0, (encode_nothing), (decode_special), 0, 0 }
  301. };
  302. #endif /* _DOCSIS_SYMTABLE_H */