Explorar o código

Added support for 3 of the subTLVs of 22.43.5.2.4

AdrianSimionov %!s(int64=10) %!d(string=hai) anos
pai
achega
e04b6eb47c

+ 1 - 1
src/docsis_common.h

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

+ 9 - 1
src/docsis_symtable.h

@@ -215,6 +215,14 @@ symbol_type symtable[NUM_IDENTIFIERS] =  {
 { 351,    "ServiceMultiplexingValueOther",     1,      350,    (encode_lenzero),        (decode_lenzero),        0,           0             }, /* TLV 22.43.5.2.1 L2VPN-I13 Annex B.3.2 */
 { 356,    "ServiceMultiplexingValueIEEE8021Q", 2,      350,    (encode_ushort),         (decode_ushort),         0,           4096          }, /* TLV 22.43.5.2.2 L2VPN-I13 Annex B.3.2 */
 { 357,    "ServiceMultiplexingValueIEEE8021ad", 3,     350,    (encode_hexstr),         (decode_hexstr),         4,           4             }, /* TLV 22.43.5.2.3 L2VPN-I13 Annex B.3.2 */
+{ 358,    "ServiceMultiplexingValueMPLSPW",    4,      350,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 22.43.5.2.4 L2VPN-I13 Annex B.3.2 */
+{ 359,    "MPLSPseudowireID",                  1,      358,    (encode_uint),           (decode_uint),           0,           0             }, /* TLV 22.43.5.2.4.1 L2VPN-I13 Annex B.3.2 */
+/* We need a new encode/decode function for TLV 22.43.5.2.4.2 */
+/* { 360,    "MPLSPeerIpAddress",                 2,      358,    (encode_ip_ip6),         (decode_ip_ip6),         0,           0             }, */ /* TLV 22.43.5.2.4.2 L2VPN-I13 Annex B.3.2 */
+{ 361,    "MPLSPseudowireType",                3,      358,    (encode_uchar),          (decode_uchar),          0,           0             }, /* TLV 22.43.5.2.4.3 L2VPN-I13 Annex B.3.2 */
+{ 362,    "MPLSBackupPseudowireID",            4,      358,    (encode_uint),           (decode_uint),           0,           0             }, /* TLV 22.43.5.2.4.4 L2VPN-I13 Annex B.3.2 */
+/* We need a new encode/decode function for TLV 22.43.5.2.4.5 */
+/* { 363,    "MPLSBackupPeerIpAddress",           5,      358,    (encode_ip_ip6),         (decode_ip_ip6),         0,           0             }, */ /* TLV 22.43.5.2.4.5 L2VPN-I13 Annex B.3.2 */
 { 201,    "VendorIdentifier",                  8,      200,    (encode_hexstr),         (decode_hexstr),         3,           3             }, /* TLV 22.43.8 */
 
 /* TODO: Vendor Specific support in the IEEE802Classifier */
@@ -458,7 +466,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 358 */
+/* A little more organized -> Start with 364 */
 
 /* Generic TLV ... we only use the limits, code and length don't matter ...*/
 { 998,    "GenericTLV",                        0,      0,      (encode_nothing),        (decode_special),        0,           0             },

BIN=BIN
tests/TLV_22_43_5_2_4_ServiceMultiplexingValueMPLSPW.cm


+ 38 - 0
tests/TLV_22_43_5_2_4_ServiceMultiplexingValueMPLSPW.conf

@@ -0,0 +1,38 @@
+Main 
+{
+	UsPacketClass
+	{
+		VendorSpecific
+		{
+			VendorIdentifier 0xffffff;
+			L2VPNEncoding
+			{
+				NSIEncapsulationSubtype
+				{
+					ServiceMultiplexingValueMPLSPW
+					{
+						MPLSPseudowireID 1;
+						MPLSPseudowireType 5;
+						MPLSBackupPseudowireID 1;
+					}
+				}
+			}
+		}
+		ClassifierRef 1;
+		ServiceFlowRef 1;
+	}
+	NetworkAccess 1;
+	UsServiceFlow
+	{
+		UsServiceFlowRef 1;
+		QosParamSetType 7;
+	}
+	DsServiceFlow
+	{
+		DsServiceFlowRef 2;
+		QosParamSetType 7;
+	}
+	/* CmMic 6ba9a973d44e471485da91e34ca55f38; */
+	/* CmtsMic 66b14b31e51eeecbeb290f65c8e273b5; */
+	/*EndOfDataMkr*/
+}

+ 35 - 0
tests/TLV_22_43_5_2_4_ServiceMultiplexingValueMPLSPW.txt

@@ -0,0 +1,35 @@
+Main 
+{
+UsPacketClass
+{
+VendorSpecific
+{
+VendorIdentifier 0xffffff;
+L2VPNEncoding
+{
+NSIEncapsulationSubtype
+{
+ServiceMultiplexingValueMPLSPW
+{
+MPLSPseudowireID 1;
+MPLSPseudowireType 5;
+MPLSBackupPseudowireID 1;
+}
+}
+}
+}
+ClassifierRef 1;
+ServiceFlowRef 1;
+}
+NetworkAccess 1;
+UsServiceFlow
+{
+UsServiceFlowRef 1;
+QosParamSetType 7;
+}
+DsServiceFlow
+{
+DsServiceFlowRef 2;
+QosParamSetType 7;
+}
+}