浏览代码

Bulk TLVs addition.

AdrianSimionov 10 年之前
父节点
当前提交
ad29c14e8a

+ 1 - 1
src/docsis_common.h

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

+ 42 - 1
src/docsis_symtable.h

@@ -650,6 +650,47 @@ symbol_type symtable[NUM_IDENTIFIERS] =  {
 { 639,    "BDEIEncapsulation",                 11,     628,    (encode_hexstr),         (decode_hexstr),         1,           1             }, /* TLV 60.43.5.2.6.11 L2VPN-I13 Annex B.3.2.2.11 */
 { 640,    "BVIDEncapsulation",                 12,     628,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.2.6.12 L2VPN-I13 Annex B.3.2.2.11 */
 { 641,    "ServiceMultiplexingValueIEEE8021adSTPID", 8, 617,   (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.2.8 L2VPN-I13 Annex B.3.2.1 */
+{ 642,    "eSAFEDHCPSnooping",                 3,      615,    (encode_hexstr),         (decode_hexstr),         0,           0             }, /* TLV 60.43.5.3 L2VPN-I13 Annex B.3.3 */
+{ 643,    "CMInterfaceMaskCMIMSubtype",        4,      615,    (encode_hexstr),         (decode_hexstr),         0,           0             }, /* TLV 60.43.5.4 L2VPN-I13 Annex B.3.4 */
+{ 644,    "AttachmentGroupID",                 5,      615,    (encode_hexstr),         (decode_hexstr),         0,           0             }, /* TLV 60.43.5.5 L2VPN-I13 Annex B.3.5 */
+{ 645,    "SourceAttachmentIndividualID",      6,      615,    (encode_hexstr),         (decode_hexstr),         0,           0             }, /* TLV 60.43.5.6 L2VPN-I13 Annex B.3.6 */
+{ 646,    "TargetAttachmentIndividualID",      7,      615,    (encode_hexstr),         (decode_hexstr),         0,           0             }, /* TLV 60.43.5.7 L2VPN-I13 Annex B.3.7 */
+{ 647,    "IngressUserPriority",               8,      615,    (encode_uchar),          (decode_uchar),          0,           7             }, /* TLV 60.43.5.8 L2VPN-I13 Annex B.3.8 */
+{ 648,    "UserPriorityRange",                 9,      615,    (encode_char_list),      (decode_char_list),      0,           0             }, /* TLV 60.43.5.9 L2VPN-I13 Annex B.3.9 */
+{ 649,    "L2VPNSADescriptorSubtype",          10,     615,    (encode_hexstr),         (decode_hexstr),         14,          14            }, /* TLV 60.43.5.10 L2VPN-I13 Annex B.3.10 */
+{ 650,    "PseudowireType",                    12,     615,    (encode_uchar),          (decode_uchar),          4,           5             }, /* TLV 60.43.5.12 L2VPN-I13 Annex B.3.13 */
+{ 651,    "L2VPNMode",                         13,     615,    (encode_uchar),          (decode_uchar),          0,           1             }, /* TLV 60.43.5.13 L2VPN-I13 Annex B.3.14 */
+{ 658,    "TPIDTranslation",                   14,     615,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 60.43.5.14 L2VPN-I13 Annex B.3.15 */
+{ 659,    "UpstreamTPIDTranslation",           1,      658,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.14.1 L2VPN-I13 Annex B.3.15.1 */
+{ 660,    "DownstreamTPIDTranslation",         2,      658,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.14.2 L2VPN-I13 Annex B.3.15.1 */
+{ 661,    "UpstreamSTPIDTranslation",          3,      658,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.14.3 L2VPN-I13 Annex B.3.15.1 */
+{ 662,    "DownstreamSTPIDTranslation",        4,      658,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.14.4 L2VPN-I13 Annex B.3.15.1 */
+{ 663,    "UpstreamBTPIDTranslation",          5,      658,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.14.5 L2VPN-I13 Annex B.3.15.1 */
+{ 664,    "DownstreamBTPIDTranslation",        6,      658,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.14.6 L2VPN-I13 Annex B.3.15.1 */
+{ 665,    "UpstreamITPIDTranslation",          7,      658,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.14.7 L2VPN-I13 Annex B.3.15.1 */
+{ 666,    "DownstreamITPIDTranslation",        8,      658,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.14.8 L2VPN-I13 Annex B.3.15.1 */
+{ 667,    "L2CPProcessing",                    15,     615,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 60.43.5.15 L2VPN-I13 Annex B.3.16 */
+{ 668,    "L2CPTunnelMode",                    1,      667,    (encode_uchar),          (decode_uchar),          0,           1             }, /* TLV 60.43.5.15.1 L2VPN-I13 Annex B.3.16.1 */
+{ 669,    "L2CPDMACAddress",                   2,      667,    (encode_ether),          (decode_ether),          0,           0             }, /* TLV 60.43.5.15.2 L2VPN-I13 Annex B.3.16.1 */
+{ 670,    "L2CPOverwrotingDMACAddress",        3,      667,    (encode_ether),          (decode_ether),          0,           0             }, /* TLV 60.43.5.15.3 L2VPN-I13 Annex B.3.16.1 */
+{ 671,    "DACDisableEnableConfiguration",     16,     615,    (encode_uchar),          (decode_uchar),          0,           1             }, /* TLV 60.43.5.16 L2VPN-I13 Annex B.3.17 */
+{ 672,    "PseudowireClass",                   18,     615,    (encode_hexstr),         (decode_hexstr),         0,           0             }, /* TLV 60.43.5.18 L2VPN-I13 Annex B.3.18 */
+{ 673,    "ServiceDelimiter",                  19,     615,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 60.43.5.19 L2VPN-I13 Annex B.3.19 */
+{ 674,    "CVIDDelimiter",                     1,      673,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.19.1 L2VPN-I13 Annex B.3.19.1 */
+{ 675,    "SVIDDelimiter",                     2,      673,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.19.2 L2VPN-I13 Annex B.3.19.2 */
+{ 676,    "ISIDDelimiter",                     3,      673,    (encode_hexstr),         (decode_hexstr),         3,           3             }, /* TLV 60.43.5.19.3 L2VPN-I13 Annex B.3.19.3 */
+{ 677,    "BVIDDelimiter",                     4,      673,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.19.4 L2VPN-I13 Annex B.3.19.4 */
+{ 678,    "VirtualSwitchInstanceEncoding",     20,     615,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 60.43.5.20 L2VPN-I13 Annex B.3.20 */
+{ 679,    "VPLSClass",                         1,      678,    (encode_hexstr),         (decode_hexstr),         0,           0             }, /* TLV 60.43.5.20.1 L2VPN-I13 Annex B.3.20.1 */
+{ 680,    "ETreeRole",                         2,      678,    (encode_uchar),          (decode_uchar),          0,           1             }, /* TLV 60.43.5.20.2 L2VPN-I13 Annex B.3.20.2 */
+{ 681,    "ETreeRootVID",                      3,      678,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.20.3 L2VPN-I13 Annex B.3.20.3 */
+{ 682,    "ETreeLeafVID",                      4,      678,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.20.4 L2VPN-I13 Annex B.3.20.4 */
+{ 652,    "BGPAttribute",                      21,     615,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 60.43.5.21 L2VPN-I13 Annex B.3.21 */
+{ 653,    "BGPVPNID",                          1,      652,    (encode_uint),           (decode_uint),           0,           0             }, /* TLV 60.43.5.21.1 L2VPN-I13 Annex B.3.21.1 */
+{ 654,    "RouteDistinguisher",                2,      652,    (encode_hexstr),         (decode_hexstr),         8,           8             }, /* TLV 60.43.5.21.2 L2VPN-I13 Annex B.3.21.2 */
+{ 655,    "RouteTargetImport",                 3,      652,    (encode_hexstr),         (decode_hexstr),         0,           0             }, /* TLV 60.43.5.21.3 L2VPN-I13 Annex B.3.21.3 */
+{ 656,    "RouteTargetExport",                 4,      652,    (encode_hexstr),         (decode_hexstr),         0,           0             }, /* TLV 60.43.5.21.4 L2VPN-I13 Annex B.3.21.4 */
+{ 657,    "CEIDVEID",                          5,      652,    (encode_ushort),         (decode_ushort),         0,           0             }, /* TLV 60.43.5.21.5 L2VPN-I13 Annex B.3.21.5 */
 
 { 614,    "VendorIdentifier",                  8,      609,    (encode_hexstr),         (decode_hexstr),         3,           3             }, /* TLV 60.43.8 MULPIv3.0-I24 Annex C.2.1.11 */
 
@@ -741,7 +782,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 */
 { 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 642 */
+/* A little more organized -> Start with 683 */
 
 /* Generic TLV ... we only use the limits, code and length don't matter ...*/
 { 998,    "GenericTLV",                        0,      0,      (encode_nothing),        (decode_special),        0,           0             },

二进制
tests/TLV_43_5_3_to_13.cm


+ 37 - 0
tests/TLV_43_5_3_to_13.conf

@@ -0,0 +1,37 @@
+Main 
+{
+	NetworkAccess 1;
+	UsServiceFlow
+	{
+		UsServiceFlowRef 1;
+		QosParamSetType 7;
+	}
+	DsServiceFlow
+	{
+		DsServiceFlowRef 2;
+		QosParamSetType 7;
+	}
+	UpstreamDropPacketClassification
+	{
+		VendorSpecific
+		{
+			VendorIdentifier 0xffffff;
+			L2VPNEncoding
+			{
+				eSAFEDHCPSnooping 0x000000;
+				CMInterfaceMaskCMIMSubtype 0x000080;
+				AttachmentGroupID 0x0102;
+				SourceAttachmentIndividualID 0x0102;
+				TargetAttachmentIndividualID 0x0102;
+				IngressUserPriority 1;
+				UserPriorityRange 1,2;
+				L2VPNSADescriptorSubtype 0x0102030405060708091011121314;
+				PseudowireType 4;
+				L2VPNMode 1;
+			}
+		}
+	}
+	/* CmMic ddc38b3a5de8fa8f85ef910911342f1d; */
+	/* CmtsMic 0c5f464d3d663a8fa6751d7cb016da63; */
+	/*EndOfDataMkr*/
+}

+ 34 - 0
tests/TLV_43_5_3_to_13.txt

@@ -0,0 +1,34 @@
+Main 
+{
+NetworkAccess 1;
+UsServiceFlow
+{
+UsServiceFlowRef 1;
+QosParamSetType 7;
+}
+DsServiceFlow
+{
+DsServiceFlowRef 2;
+QosParamSetType 7;
+}
+UpstreamDropPacketClassification
+{
+VendorSpecific
+{
+VendorIdentifier 0xffffff;
+L2VPNEncoding
+{
+eSAFEDHCPSnooping 0x000000;
+CMInterfaceMaskCMIMSubtype 0x000080;
+AttachmentGroupID 0x0102;
+SourceAttachmentIndividualID 0x0102;
+TargetAttachmentIndividualID 0x0102;
+IngressUserPriority 1;
+UserPriorityRange 1,2;
+L2VPNSADescriptorSubtype 0x0102030405060708091011121314;
+PseudowireType 4;
+L2VPNMode 1;
+}
+}
+}
+}

二进制
tests/TLV_60_43_5_14_TPIDTranslation.cm


+ 38 - 0
tests/TLV_60_43_5_14_TPIDTranslation.conf

@@ -0,0 +1,38 @@
+Main 
+{
+	UpstreamDropPacketClassification
+	{
+		VendorSpecific
+		{
+			VendorIdentifier 0xffffff;
+			L2VPNEncoding
+			{
+				TPIDTranslation
+				{
+					UpstreamTPIDTranslation 0x0102;
+					DownstreamTPIDTranslation 0x0102;
+					UpstreamSTPIDTranslation 0x0102;
+					DownstreamSTPIDTranslation 0x0102;
+					UpstreamBTPIDTranslation 0x0102;
+					DownstreamBTPIDTranslation 0x0102;
+					UpstreamITPIDTranslation 0x0102;
+					DownstreamITPIDTranslation 0x0102;
+				}
+			}
+		}
+	}
+	NetworkAccess 1;
+	UsServiceFlow
+	{
+		UsServiceFlowRef 1;
+		QosParamSetType 7;
+	}
+	DsServiceFlow
+	{
+		DsServiceFlowRef 2;
+		QosParamSetType 7;
+	}
+	/* CmMic 65591e7b7e89f0be5d85e8c0e20c323b; */
+	/* CmtsMic 8611d8649ce15bb01614a53e3fd41623; */
+	/*EndOfDataMkr*/
+}

+ 35 - 0
tests/TLV_60_43_5_14_TPIDTranslation.txt

@@ -0,0 +1,35 @@
+Main 
+{
+UpstreamDropPacketClassification
+{
+VendorSpecific
+{
+VendorIdentifier 0xffffff;
+L2VPNEncoding
+{
+TPIDTranslation
+{
+UpstreamTPIDTranslation 0x0102;
+DownstreamTPIDTranslation 0x0102;
+UpstreamSTPIDTranslation 0x0102;
+DownstreamSTPIDTranslation 0x0102;
+UpstreamBTPIDTranslation 0x0102;
+DownstreamBTPIDTranslation 0x0102;
+UpstreamITPIDTranslation 0x0102;
+DownstreamITPIDTranslation 0x0102;
+}
+}
+}
+}
+NetworkAccess 1;
+UsServiceFlow
+{
+UsServiceFlowRef 1;
+QosParamSetType 7;
+}
+DsServiceFlow
+{
+DsServiceFlowRef 2;
+QosParamSetType 7;
+}
+}

二进制
tests/TLV_60_43_5_15_L2CPProcessing.cm


+ 50 - 0
tests/TLV_60_43_5_15_L2CPProcessing.conf

@@ -0,0 +1,50 @@
+Main 
+{
+	NetworkAccess 1;
+	UsServiceFlow
+	{
+		UsServiceFlowRef 1;
+		QosParamSetType 7;
+	}
+	DsServiceFlow
+	{
+		DsServiceFlowRef 2;
+		QosParamSetType 7;
+	}
+	UpstreamDropPacketClassification
+	{
+		VendorSpecific
+		{
+			VendorIdentifier 0xffffff;
+			L2VPNEncoding
+			{
+				L2CPProcessing
+				{
+					L2CPTunnelMode 1;
+					L2CPDMACAddress 00:11:22:33:44:55;
+					L2CPOverwrotingDMACAddress 55:44:33:22:11:00;
+				}
+				DACDisableEnableConfiguration 1;
+				PseudowireClass 0x010203;
+				ServiceDelimiter
+				{
+					CVIDDelimiter 0x0102;
+					SVIDDelimiter 0x0102;
+					ISIDDelimiter 0x010203;
+					BVIDDelimiter 0x0102;
+				}
+				VirtualSwitchInstanceEncoding
+				{
+					VPLSClass 0x0102;
+					ETreeRole 1;
+					ETreeRootVID 0x0102;
+					ETreeLeafVID 0x0304;
+				}
+			}
+		}
+	}
+	/* CmMic 68529086e9df3e426d3cb8cd9312c4f2; */
+	/* CmtsMic 31f0d56bc5f92cf1ad9948898b331284; */
+	/*EndOfDataMkr*/
+	/* Pad */
+}

+ 46 - 0
tests/TLV_60_43_5_15_L2CPProcessing.txt

@@ -0,0 +1,46 @@
+Main 
+{
+NetworkAccess 1;
+UsServiceFlow
+{
+UsServiceFlowRef 1;
+QosParamSetType 7;
+}
+DsServiceFlow
+{
+DsServiceFlowRef 2;
+QosParamSetType 7;
+}
+UpstreamDropPacketClassification
+{
+VendorSpecific
+{
+VendorIdentifier 0xffffff;
+L2VPNEncoding
+{
+L2CPProcessing
+{
+L2CPTunnelMode 1;
+L2CPDMACAddress 00:11:22:33:44:55;
+L2CPOverwrotingDMACAddress 55:44:33:22:11:00;
+}
+DACDisableEnableConfiguration 1;
+PseudowireClass 0x010203;
+ServiceDelimiter
+{
+CVIDDelimiter 0x0102;
+SVIDDelimiter 0x0102;
+ISIDDelimiter 0x010203;
+BVIDDelimiter 0x0102;
+}
+VirtualSwitchInstanceEncoding
+{
+VPLSClass 0x0102;
+ETreeRole 1;
+ETreeRootVID 0x0102;
+ETreeLeafVID 0x0304;
+}
+}
+}
+}
+}

二进制
tests/TLV_60_43_5_21_BGPAttribute.cm


+ 35 - 0
tests/TLV_60_43_5_21_BGPAttribute.conf

@@ -0,0 +1,35 @@
+Main 
+{
+	UpstreamDropPacketClassification
+	{
+		VendorSpecific
+		{
+			VendorIdentifier 0xffffff;
+			L2VPNEncoding
+			{
+				BGPAttribute
+				{
+					BGPVPNID 1;
+					RouteDistinguisher 0x0101010100000001;
+					RouteTargetImport 0x0000000101010101;
+					RouteTargetExport 0x0000000101010101;
+					CEIDVEID 5;
+				}
+			}
+		}
+	}
+	NetworkAccess 1;
+	UsServiceFlow
+	{
+		UsServiceFlowRef 1;
+		QosParamSetType 7;
+	}
+	DsServiceFlow
+	{
+		DsServiceFlowRef 2;
+		QosParamSetType 7;
+	}
+	/* CmMic a242bf8795aa3c886bab0a15aade358c; */
+	/* CmtsMic 995808f5938a77a8653143a29b5eee5f; */
+	/*EndOfDataMkr*/
+}

+ 32 - 0
tests/TLV_60_43_5_21_BGPAttribute.txt

@@ -0,0 +1,32 @@
+Main 
+{
+UpstreamDropPacketClassification
+{
+VendorSpecific
+{
+VendorIdentifier 0xffffff;
+L2VPNEncoding
+{
+BGPAttribute
+{
+BGPVPNID 1;
+RouteDistinguisher 0x0101010100000001;
+RouteTargetImport 0x0000000101010101;
+RouteTargetExport 0x0000000101010101;
+CEIDVEID 5;
+}
+}
+}
+}
+NetworkAccess 1;
+UsServiceFlow
+{
+UsServiceFlowRef 1;
+QosParamSetType 7;
+}
+DsServiceFlow
+{
+DsServiceFlowRef 2;
+QosParamSetType 7;
+}
+}