浏览代码

Added support for multiple new TLVs.

AdrianSimionov 10 年之前
父节点
当前提交
4a3fa706ef

+ 1 - 1
src/docsis_common.h

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

+ 28 - 1
src/docsis_symtable.h

@@ -623,6 +623,33 @@ symbol_type symtable[NUM_IDENTIFIERS] =  {
 { 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 */
+{ 615,    "L2VPNEncoding",                     5,      609,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 60.43.5 MULPIv3.0-I24 Annex C.1.1.18.1.5 */
+{ 616,    "VPNIdentifier",                     1,      615,    (encode_hexstr),         (decode_hexstr),         4,           255           }, /* TLV 60.43.5.1 L2VPN-I13 Annex B.3.1 */
+{ 617,    "NSIEncapsulationSubtype",           2,      615,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 60.43.5.2 L2VPN-I13 Annex B.3.2 */
+{ 618,    "ServiceMultiplexingValueOther",     1,      617,    (encode_lenzero),        (decode_lenzero),        0,           0             }, /* TLV 60.43.5.2.1 L2VPN-I13 Annex B.3.2 */
+{ 619,    "ServiceMultiplexingValueIEEE8021Q", 2,      617,    (encode_ushort),         (decode_ushort),         0,           4096          }, /* TLV 60.43.5.2.2 L2VPN-I13 Annex B.3.2 */
+{ 620,    "ServiceMultiplexingValueIEEE8021ad", 3,     617,    (encode_hexstr),         (decode_hexstr),         4,           4             }, /* TLV 60.43.5.2.3 L2VPN-I13 Annex B.3.2 */
+{ 621,    "ServiceMultiplexingValueMPLSPW",    4,      617,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 60.43.5.2.4 L2VPN-I13 Annex B.3.2 */
+{ 622,    "MPLSPseudowireID",                  1,      621,    (encode_uint),           (decode_uint),           0,           0             }, /* TLV 60.43.5.2.4.1 L2VPN-I13 Annex B.3.2 */
+{ 623,    "MPLSPeerIpAddress",                 2,      621,    (encode_char_ip_ip6),    (decode_char_ip_ip6),    0,           0             }, /* TLV 60.43.5.2.4.2 L2VPN-I13 Annex B.3.2 */
+{ 624,    "MPLSPseudowireType",                3,      621,    (encode_uchar),          (decode_uchar),          0,           0             }, /* TLV 60.43.5.2.4.3 L2VPN-I13 Annex B.3.2 */
+{ 625,    "MPLSBackupPseudowireID",            4,      621,    (encode_uint),           (decode_uint),           0,           0             }, /* TLV 60.43.5.2.4.4 L2VPN-I13 Annex B.3.2 */
+{ 626,    "MPLSBackupPeerIpAddress",           5,      621,    (encode_char_ip_ip6),    (decode_char_ip_ip6),    0,           0             }, /* TLV 60.43.5.2.4.5 L2VPN-I13 Annex B.3.2 */
+{ 627,    "ServiceMultiplexingValueL2TPv3Peer", 5,     617,    (encode_char_ip_ip6),    (decode_char_ip_ip6),    0,           0             }, /* TLV 60.43.5.2.5 L2VPN-I13 Annex B.3.2 */
+{ 628,    "IEEE8021ahEncapsulation",           6,      617,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 60.43.5.2.6 L2VPN-I13 Annex B.3.2.2 */
+{ 629,    "ITCIEncapsulation",                 1,      628,    (encode_hexstr),         (decode_hexstr),         4,           4             }, /* TLV 60.43.5.2.6.1 L2VPN-I13 Annex B.3.2.2.1 */
+{ 630,    "BDAEncapsulation",                  2,      628,    (encode_hexstr),         (decode_hexstr),         6,           6             }, /* TLV 60.43.5.2.6.2 L2VPN-I13 Annex B.3.2.2.2 */
+{ 631,    "BTCIEncapsulation",                 3,      628,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.2.6.3 L2VPN-I13 Annex B.3.2.2.3 */
+{ 632,    "ITPIDEncapsulation",                4,      628,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.2.6.4 L2VPN-I13 Annex B.3.2.2.4 */
+{ 633,    "IPCPEncapsulation",                 5,      628,    (encode_hexstr),         (decode_hexstr),         1,           1             }, /* TLV 60.43.5.2.6.5 L2VPN-I13 Annex B.3.2.2.5 */
+{ 634,    "IDEIEncapsulation",                 6,      628,    (encode_hexstr),         (decode_hexstr),         1,           1             }, /* TLV 60.43.5.2.6.6 L2VPN-I13 Annex B.3.2.2.6 */
+{ 635,    "IUCAEncapsulation",                 7,      628,    (encode_hexstr),         (decode_hexstr),         1,           1             }, /* TLV 60.43.5.2.6.7 L2VPN-I13 Annex B.3.2.2.7 */
+{ 636,    "ISIDEncapsulation",                 8,      628,    (encode_hexstr),         (decode_hexstr),         3,           3             }, /* TLV 60.43.5.2.6.8 L2VPN-I13 Annex B.3.2.2.8 */
+{ 637,    "BTPIDEncapsulation",                9,      628,    (encode_hexstr),         (decode_hexstr),         2,           2             }, /* TLV 60.43.5.2.6.9 L2VPN-I13 Annex B.3.2.2.9 */
+{ 638,    "BPCPEncapsulation",                 10,     628,    (encode_hexstr),         (decode_hexstr),         1,           1             }, /* TLV 60.43.5.2.6.10 L2VPN-I13 Annex B.3.2.2.10 */
+{ 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 */
 
 { 614,    "VendorIdentifier",                  8,      609,    (encode_hexstr),         (decode_hexstr),         3,           3             }, /* TLV 60.43.8 MULPIv3.0-I24 Annex C.2.1.11 */
 
@@ -714,7 +741,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 615 */
+/* A little more organized -> Start with 642 */
 
 /* 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_60_43_5_2_NSIEncapsulationSubtype.cm


+ 59 - 0
tests/TLV_60_43_5_2_NSIEncapsulationSubtype.conf

@@ -0,0 +1,59 @@
+Main 
+{
+	UpstreamDropPacketClassification
+	{
+		VendorSpecific
+		{
+			VendorIdentifier 0xffffff;
+			L2VPNEncoding
+			{
+				VPNIdentifier 0x01020304;
+				NSIEncapsulationSubtype
+				{
+					ServiceMultiplexingValueOther 0x00;
+					ServiceMultiplexingValueIEEE8021Q 258;
+					ServiceMultiplexingValueIEEE8021ad 0x01020304;
+					ServiceMultiplexingValueMPLSPW
+					{
+						MPLSPseudowireID 1;
+						MPLSPeerIpAddress 1.1.1.1;
+						MPLSPseudowireType 5;
+						MPLSBackupPseudowireID 1;
+						MPLSBackupPeerIpAddress 1.1.1.1;
+					}
+					ServiceMultiplexingValueL2TPv3Peer 1.2.3.4;
+					IEEE8021ahEncapsulation
+					{
+						ITCIEncapsulation 0x00000001;
+						BDAEncapsulation 0x0a0b0c0d0e0f;
+						BTCIEncapsulation 0x0001;
+						ITPIDEncapsulation 0x0001;
+						IPCPEncapsulation 0x01;
+						IDEIEncapsulation 0x01;
+						IUCAEncapsulation 0x01;
+						ISIDEncapsulation 0x000001;
+						BTPIDEncapsulation 0x0001;
+						BPCPEncapsulation 0x01;
+						BDEIEncapsulation 0x01;
+						BVIDEncapsulation 0x0001;
+					}
+					ServiceMultiplexingValueIEEE8021adSTPID 0x88a8;
+				}
+			}
+		}
+	}
+	NetworkAccess 1;
+	UsServiceFlow
+	{
+		UsServiceFlowRef 1;
+		QosParamSetType 7;
+	}
+	DsServiceFlow
+	{
+		DsServiceFlowRef 2;
+		QosParamSetType 7;
+	}
+	/* CmMic ffe66672799c655e56675adb647cd3a9; */
+	/* CmtsMic 02e03b017d034944d49dfec4e1ad6428; */
+	/*EndOfDataMkr*/
+}

+ 56 - 0
tests/TLV_60_43_5_2_NSIEncapsulationSubtype.txt

@@ -0,0 +1,56 @@
+Main 
+{
+UpstreamDropPacketClassification
+{
+VendorSpecific
+{
+VendorIdentifier 0xffffff;
+L2VPNEncoding
+{
+VPNIdentifier 0x01020304;
+NSIEncapsulationSubtype
+{
+ServiceMultiplexingValueOther 0x00;
+ServiceMultiplexingValueIEEE8021Q 258;
+ServiceMultiplexingValueIEEE8021ad 0x01020304;
+ServiceMultiplexingValueMPLSPW
+{
+MPLSPseudowireID 1;
+MPLSPeerIpAddress 1.1.1.1;
+MPLSPseudowireType 5;
+MPLSBackupPseudowireID 1;
+MPLSBackupPeerIpAddress 1.1.1.1;
+}
+ServiceMultiplexingValueL2TPv3Peer 1.2.3.4;
+IEEE8021ahEncapsulation
+{
+ITCIEncapsulation 0x00000001;
+BDAEncapsulation 0x0a0b0c0d0e0f;
+BTCIEncapsulation 0x0001;
+ITPIDEncapsulation 0x0001;
+IPCPEncapsulation 0x01;
+IDEIEncapsulation 0x01;
+IUCAEncapsulation 0x01;
+ISIDEncapsulation 0x000001;
+BTPIDEncapsulation 0x0001;
+BPCPEncapsulation 0x01;
+BDEIEncapsulation 0x01;
+BVIDEncapsulation 0x0001;
+}
+ServiceMultiplexingValueIEEE8021adSTPID 0x88a8;
+}
+}
+}
+}
+NetworkAccess 1;
+UsServiceFlow
+{
+UsServiceFlowRef 1;
+QosParamSetType 7;
+}
+DsServiceFlow
+{
+DsServiceFlowRef 2;
+QosParamSetType 7;
+}
+}