Browse Source

Added support for TLV 60.43, subTLV from 1 to 4

AdrianSimionov 10 năm trước cách đây
mục cha
commit
e8a42d03b8

+ 1 - 1
src/docsis_common.h

@@ -31,7 +31,7 @@
 
 
 
 
 #ifndef NUM_IDENTIFIERS
 #ifndef NUM_IDENTIFIERS
-#define NUM_IDENTIFIERS 615
+#define NUM_IDENTIFIERS 621
 #endif /*  NUM_IDENTIFIERS, needed in docsis_symtable.h  */
 #endif /*  NUM_IDENTIFIERS, needed in docsis_symtable.h  */
 
 
 #define MAXINT 2000000000
 #define MAXINT 2000000000

+ 8 - 1
src/docsis_symtable.h

@@ -618,6 +618,13 @@ symbol_type symtable[NUM_IDENTIFIERS] =  {
 { 606,    "MPLSClassificationEncoding",        17,     546,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 60.17 MULPIv3.0-I24 Annex C.2.1.15 */
 { 606,    "MPLSClassificationEncoding",        17,     546,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 60.17 MULPIv3.0-I24 Annex C.2.1.15 */
 { 607,    "MPLSTCbits",                        1,      606,    (encode_hexstr),         (decode_hexstr),         1,           1             }, /* TLV 60.17.1 MULPIv3.0-I24 Annex C.2.1.15.1 */
 { 607,    "MPLSTCbits",                        1,      606,    (encode_hexstr),         (decode_hexstr),         1,           1             }, /* TLV 60.17.1 MULPIv3.0-I24 Annex C.2.1.15.1 */
 { 608,    "MPLSLabel",                         2,      606,    (encode_hexstr),         (decode_hexstr),         3,           3             }, /* TLV 60.17.2 MULPIv3.0-I24 Annex C.2.1.15.2 */
 { 608,    "MPLSLabel",                         2,      606,    (encode_hexstr),         (decode_hexstr),         3,           3             }, /* TLV 60.17.2 MULPIv3.0-I24 Annex C.2.1.15.2 */
+{ 609,    "VendorSpecific",                    43,     546,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 60.43 MULPIv3.0-I24 Annex C.2.1.11 */
+{ 610,    "CMLoadBalancingPolicyID",           1,      609,    (encode_uint),           (decode_uint),           0,           0             }, /* TLV 60.43.1 MULPIv3.0-I24 Annex C.1.1.18.1.1 */
+{ 611,    "CMLoadBalancingPriority",           2,      609,    (encode_uint),           (decode_uint),           0,           0             }, /* TLV 60.43.2 MULPIv3.0-I24 Annex C.1.1.18.1.2 */
+{ 612,    "CMLoadBalancingGroupID",            3,      609,    (encode_uint),           (decode_uint),           0,           0             }, /* TLV 60.43.3 MULPIv3.0-I24 Annex C.1.1.18.1.3 */
+{ 613,    "CMRangingClassIDExtension",         4,      609,    (encode_ushort),         (decode_ushort),         0,           0             }, /* TLV 60.43.4 MULPIv3.0-I24 Annex C.1.1.18.1.4 */
+
+{ 614,    "VendorIdentifier",                  8,      609,    (encode_hexstr),         (decode_hexstr),         3,           3             }, /* TLV 60.43.8 MULPIv3.0-I24 Annex C.2.1.11 */
 
 
 { 528,    "SubMgmtCPEIPv6PrefixList",          61,     0,      (encode_ip6_prefix_list), (decode_ip6_prefix_list), 0,         0             }, /* TLV 61 MULPIv3.0-I24 Annex C.1.1.19.3 */
 { 528,    "SubMgmtCPEIPv6PrefixList",          61,     0,      (encode_ip6_prefix_list), (decode_ip6_prefix_list), 0,         0             }, /* TLV 61 MULPIv3.0-I24 Annex C.1.1.19.3 */
 { 529,    "UpstreamDropClassifierGroupID",     62,     0,      (encode_char_list),      (decode_char_list),      0,           0             }, /* TLV 62 MULPIv3.0-I24 Annex C.1.1.26 */
 { 529,    "UpstreamDropClassifierGroupID",     62,     0,      (encode_char_list),      (decode_char_list),      0,           0             }, /* TLV 62 MULPIv3.0-I24 Annex C.1.1.26 */
@@ -707,7 +714,7 @@ symbol_type symtable[NUM_IDENTIFIERS] =  {
 { 236,    "SNMPv3AccessViewMask",              3,      233,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 202.54.3 eRouter-I12 Annex B.4.6.3 */
 { 236,    "SNMPv3AccessViewMask",              3,      233,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 202.54.3 eRouter-I12 Annex B.4.6.3 */
 { 237,    "SNMPv3AccessViewType",              4,      233,    (encode_uchar),          (decode_uchar),          1,           2             }, /* TLV 202.54.4 eRouter-I12 Annex B.4.6.4 */
 { 237,    "SNMPv3AccessViewType",              4,      233,    (encode_uchar),          (decode_uchar),          1,           2             }, /* TLV 202.54.4 eRouter-I12 Annex B.4.6.4 */
 
 
-/* A little more organized -> Start with 609 */
+/* A little more organized -> Start with 615 */
 
 
 /* Generic TLV ... we only use the limits, code and length don't matter ...*/
 /* Generic TLV ... we only use the limits, code and length don't matter ...*/
 { 998,    "GenericTLV",                        0,      0,      (encode_nothing),        (decode_special),        0,           0             },
 { 998,    "GenericTLV",                        0,      0,      (encode_nothing),        (decode_special),        0,           0             },

BIN
tests/TLV_60_43_1_to_4.cm


+ 29 - 0
tests/TLV_60_43_1_to_4.conf

@@ -0,0 +1,29 @@
+Main 
+{
+	NetworkAccess 1;
+	UsServiceFlow
+	{
+		UsServiceFlowRef 1;
+		QosParamSetType 7;
+	}
+	DsServiceFlow
+	{
+		DsServiceFlowRef 2;
+		QosParamSetType 7;
+	}
+	UpstreamDropPacketClassification
+	{
+		VendorSpecific
+		{
+			VendorIdentifier 0xffffff;
+			CMLoadBalancingPolicyID 1;
+			CMLoadBalancingPriority 1;
+			CMLoadBalancingGroupID 1;
+			CMRangingClassIDExtension 1;
+		}
+	}
+	/* CmMic 0ab99a3f153dc8e89939cfe73210c48d; */
+	/* CmtsMic 455fde8dd0f7f4c0cf1fb445225a74d0; */
+	/*EndOfDataMkr*/
+	/* Pad */
+}

+ 25 - 0
tests/TLV_60_43_1_to_4.txt

@@ -0,0 +1,25 @@
+Main 
+{
+NetworkAccess 1;
+UsServiceFlow
+{
+UsServiceFlowRef 1;
+QosParamSetType 7;
+}
+DsServiceFlow
+{
+DsServiceFlowRef 2;
+QosParamSetType 7;
+}
+UpstreamDropPacketClassification
+{
+VendorSpecific
+{
+VendorIdentifier 0xffffff;
+CMLoadBalancingPolicyID 1;
+CMLoadBalancingPriority 1;
+CMLoadBalancingGroupID 1;
+CMRangingClassIDExtension 1;
+}
+}
+}