Bladeren bron

Added support for TLV 72 MetroEthernetServiceProfile.

AdrianSimionov 10 jaren geleden
bovenliggende
commit
52825ed49a

+ 1 - 1
src/docsis_common.h

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

+ 16 - 1
src/docsis_symtable.h

@@ -552,6 +552,21 @@ symbol_type symtable[NUM_IDENTIFIERS] =  {
 
 
 { 478,    "SubscriberManagementCPEIPv6Table",  67,     0,      (encode_ip6_list),       (decode_ip6_list),       0,           0             }, /* TLV 67 MULPIv3.0-I24 Annex C.1.1.19.6 */
 { 478,    "SubscriberManagementCPEIPv6Table",  67,     0,      (encode_ip6_list),       (decode_ip6_list),       0,           0             }, /* TLV 67 MULPIv3.0-I24 Annex C.1.1.19.6 */
 
 
+{ 498,    "MetroEthernetServiceProfile",       72,     0,      (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 72 MULPIv3.0-I24 Annex C.2.2.10 */
+{ 499,    "MESPReference",                     1,      498,    (encode_uchar),          (decode_uchar),          1,           255           }, /* TLV 72.1 MULPIv3.0-I24 Annex C.2.2.10.1 */
+{ 500,    "MESPBandwidthProfile",              2,      498,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 72.2 MULPIv3.0-I24 Annex C.2.2.10.2 */
+{ 501,    "CIR",                               1,      500,    (encode_uint),           (decode_uint),           0,           0             }, /* TLV 72.2.1 MULPIv3.0-I24 Annex C.2.2.10.2.1 */
+{ 502,    "CBR",                               2,      500,    (encode_uint),           (decode_uint),           0,           0             }, /* TLV 72.2.2 MULPIv3.0-I24 Annex C.2.2.10.2.2 */
+{ 503,    "EIR",                               3,      500,    (encode_uint),           (decode_uint),           0,           0             }, /* TLV 72.2.3 MULPIv3.0-I24 Annex C.2.2.10.2.3 */
+{ 504,    "EBS",                               4,      500,    (encode_uint),           (decode_uint),           0,           0             }, /* TLV 72.2.4 MULPIv3.0-I24 Annex C.2.2.10.2.4 */
+{ 505,    "CouplingFlag",                      5,      500,    (encode_uchar),          (decode_uchar),          0,           1             }, /* TLV 72.2.5 MULPIv3.0-I24 Annex C.2.2.10.2.5 */
+{ 506,    "ColorMode",                         6,      500,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 72.2.6 MULPIv3.0-I24 Annex C.2.2.10.2.6 */
+{ 507,    "ColorIdentificationField",          1,      506,    (encode_uchar),          (decode_uchar),          0,           9             }, /* TLV 72.2.6.1 MULPIv3.0-I24 Annex C.2.2.10.2.6.1 */
+{ 508,    "ColorIdentificationFieldValue",     2,      506,    (encode_hexstr),         (decode_hexstr),         1,           1             }, /* TLV 72.2.6.2 MULPIv3.0-I24 Annex C.2.2.10.2.6.2 */
+{ 509,    "ColorMarking",                      7,      500,    (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 72.2.7 MULPIv3.0-I24 Annex C.2.2.10.2.7 */
+{ 510,    "ColorMarkingField",                 1,      509,    (encode_uchar),          (decode_uchar),          0,           5             }, /* TLV 72.2.7.1 MULPIv3.0-I24 Annex C.2.2.10.2.7.1 */
+{ 511,    "ColorMarkingFieldValue",            2,      509,    (encode_hexstr),         (decode_hexstr),         1,           1             }, /* TLV 72.2.7.2 MULPIv3.0-I24 Annex C.2.2.10.2.7.2 */
+{ 512,    "MESPName",                          3,      498,    (encode_strzero),        (decode_strzero),        2,           254           }, /* TLV 72.3 MULPIv3.0-I24 Annex C.2.2.10.3 */
 { 495,    "NetworkTimingProfile",              73,     0,      (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 73 MULPIv3.0-I24 Annex C.1.2.19 */
 { 495,    "NetworkTimingProfile",              73,     0,      (encode_nothing),        (decode_aggregate),      0,           0             }, /* TLV 73 MULPIv3.0-I24 Annex C.1.2.19 */
 { 496,    "NetworkTimingProfileReference",     1,      495,    (encode_ushort),         (decode_ushort),         1,           65536         }, /* TLV 73.1 MULPIv3.0-I24 Annex C.1.2.19.1 */
 { 496,    "NetworkTimingProfileReference",     1,      495,    (encode_ushort),         (decode_ushort),         1,           65536         }, /* TLV 73.1 MULPIv3.0-I24 Annex C.1.2.19.1 */
 { 497,    "NetworkTimingProfileName",          2,      495,    (encode_strzero),        (decode_strzero),        2,           16            }, /* TLV 73.2 MULPIv3.0-I24 Annex C.1.2.19.2 */
 { 497,    "NetworkTimingProfileName",          2,      495,    (encode_strzero),        (decode_strzero),        2,           16            }, /* TLV 73.2 MULPIv3.0-I24 Annex C.1.2.19.2 */
@@ -602,7 +617,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 498 */
+/* A little more organized -> Start with 513 */
 
 
 /* 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_72_MetroEthernetServiceProfile.cm


+ 40 - 0
tests/TLV_72_MetroEthernetServiceProfile.conf

@@ -0,0 +1,40 @@
+Main 
+{
+	NetworkAccess 1;
+	UsServiceFlow
+	{
+		UsServiceFlowRef 1;
+		QosParamSetType 7;
+	}
+	DsServiceFlow
+	{
+		DsServiceFlowRef 2;
+		QosParamSetType 7;
+	}
+	MetroEthernetServiceProfile
+	{
+		MESPReference 1;
+		MESPBandwidthProfile
+		{
+			CIR 1024;
+			CBR 2048;
+			EIR 512;
+			EBS 256;
+			CouplingFlag 1;
+			ColorMode
+			{
+				ColorIdentificationField 8;
+				ColorIdentificationFieldValue 0x01;
+			}
+			ColorMarking
+			{
+				ColorMarkingField 4;
+				ColorMarkingFieldValue 0x01;
+			}
+		}
+		MESPName "MESPName";
+	}
+	/* CmMic 23a551574da818b393b4aa59280b2b2f; */
+	/* CmtsMic d60d8e64bee620566eb384cd7458308c; */
+	/*EndOfDataMkr*/
+}

+ 37 - 0
tests/TLV_72_MetroEthernetServiceProfile.txt

@@ -0,0 +1,37 @@
+Main 
+{
+NetworkAccess 1;
+UsServiceFlow
+{
+UsServiceFlowRef 1;
+QosParamSetType 7;
+}
+DsServiceFlow
+{
+DsServiceFlowRef 2;
+QosParamSetType 7;
+}
+MetroEthernetServiceProfile
+{
+MESPReference 1;
+MESPBandwidthProfile
+{
+CIR 1024;
+CBR 2048;
+EIR 512;
+EBS 256;
+CouplingFlag 1;
+ColorMode
+{
+ColorIdentificationField 8;
+ColorIdentificationFieldValue 0x01;
+}
+ColorMarking
+{
+ColorMarkingField 4;
+ColorMarkingFieldValue 0x01;
+}
+}
+MESPName "MESPName";
+}
+}