Browse Source

Added Single QTag L2VPN support.

AdrianSimionov 11 years ago
parent
commit
e2e3a69bd2

+ 67 - 0
examples/docsis2.0_L2VPN_SingleQTag.cfg

@@ -0,0 +1,67 @@
+Main {
+NetworkAccess 1;
+VendorSpecific {
+VendorIdentifier 0xffffff;
+L2VPNEncoding {
+VPNIdentifier "VLAN100";
+NSIEncapsulation {
+NSIEncapsulationSingleQTag 16;
+}
+}
+}
+UsServiceFlow {
+UsServiceFlowRef 1;
+QosParamSetType 7;
+MaxRateSustained 256000;
+MaxConcatenatedBurst 0;
+SchedulingType 2;
+RequestOrTxPolicy 0x00000000;
+VendorSpecific {
+VendorIdentifier 0xffffff;
+L2VPNEncoding {
+VPNIdentifier "VLAN100";
+}
+}
+}
+DsServiceFlow {
+DsServiceFlowRef 2;
+QosParamSetType 7;
+MaxRateSustained 2000000;
+VendorSpecific {
+VendorIdentifier 0xffffff;
+L2VPNEncoding {
+VPNIdentifier "VLAN100";
+}
+}
+}
+UsPacketClass {
+ClassifierRef 5;
+ServiceFlowRef 1;
+RulePriority 2;
+ActivationState 1;
+LLCPacketClassifier {
+EtherType 0x018864;
+}
+VendorSpecific {
+VendorIdentifier 0xffffff;
+L2VPNEncoding {
+VPNIdentifier "VLAN100";
+}
+}
+}
+DsPacketClass {
+ClassifierRef 6;
+ServiceFlowRef 2;
+RulePriority 2;
+ActivationState 1;
+LLCPacketClassifier {
+EtherType 0x040000;
+}
+VendorSpecific {
+VendorIdentifier 0xffffff;
+L2VPNEncoding {
+VPNIdentifier "VLAN100";
+}
+}
+}
+}

+ 88 - 0
examples/docsis2.0_L2VPN_SingleQTag.txt

@@ -0,0 +1,88 @@
+Main 
+{
+	NetworkAccess 1;
+	VendorSpecific
+	{
+		VendorIdentifier 0xffffff;
+		L2VPNEncoding
+		{
+			VPNIdentifier "VLAN100";
+			NSIEncapsulation
+			{
+				NSIEncapsulationSingleQTag 16;
+			}
+		}
+	}
+	UsServiceFlow
+	{
+		UsServiceFlowRef 1;
+		QosParamSetType 7;
+		MaxRateSustained 256000;
+		MaxConcatenatedBurst 0;
+		SchedulingType 2;
+		RequestOrTxPolicy 0x00000000;
+		VendorSpecific
+		{
+			VendorIdentifier 0xffffff;
+			L2VPNEncoding
+			{
+				VPNIdentifier "VLAN100";
+			}
+		}
+	}
+	DsServiceFlow
+	{
+		DsServiceFlowRef 2;
+		QosParamSetType 7;
+		MaxRateSustained 2000000;
+		VendorSpecific
+		{
+			VendorIdentifier 0xffffff;
+			L2VPNEncoding
+			{
+				VPNIdentifier "VLAN100";
+			}
+		}
+	}
+	UsPacketClass
+	{
+		ClassifierRef 5;
+		ServiceFlowRef 1;
+		RulePriority 2;
+		ActivationState 1;
+		LLCPacketClassifier
+		{
+			EtherType 0x018864;
+		}
+		VendorSpecific
+		{
+			VendorIdentifier 0xffffff;
+			L2VPNEncoding
+			{
+				VPNIdentifier "VLAN100";
+			}
+		}
+	}
+	DsPacketClass
+	{
+		ClassifierRef 6;
+		ServiceFlowRef 2;
+		RulePriority 2;
+		ActivationState 1;
+		LLCPacketClassifier
+		{
+			EtherType 0x040000;
+		}
+		VendorSpecific
+		{
+			VendorIdentifier 0xffffff;
+			L2VPNEncoding
+			{
+				VPNIdentifier "VLAN100";
+			}
+		}
+	}
+	/* CmMic e0c8990baedd2729d682dde0e4757cbf; */
+	/* CmtsMic 135a93614686b2f28d190d8adb1857a3; */
+	/*EndOfDataMkr*/
+}

+ 1 - 1
src/docsis_common.h

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

+ 27 - 1
src/docsis_symtable.h

@@ -208,7 +208,7 @@ symbol_type symtable[NUM_IDENTIFIERS] =  {
 { 129, "MfgCVCData",           		32,   0,  (encode_hexstr),    (decode_hexstr),      0,        255        },
 
 /* Vendor Specific */
-{ 130, "VendorSpecific",       		43,   0,  (encode_nothing),   (decode_vspecific),   0,        0          },
+{ 130, "VendorSpecific",       		43,   0,  (encode_nothing),   (decode_aggregate),   0,        0          },
 { 131, "VendorIdentifier",     		8,  130,  (encode_hexstr),    (decode_hexstr),      3,        3          },
 
 /* SNMPv3 Kickstart */
@@ -280,6 +280,32 @@ symbol_type symtable[NUM_IDENTIFIERS] =  {
 { 186,  "CaTransmit",                 1,    185,  (encode_uchar),    (decode_uchar),      0,         255        },
 { 187,  "CaReceive",                  2,    185,  (encode_uint),     (decode_uint),       88000000,  860000000  },
 
+/* L2VPN BSoD support  */
+{ 188,  "L2VPNEncoding",               5,    130,  (encode_nothing),  (decode_aggregate),  0,         0          }, /* 43.5 */
+{ 189,  "VPNIdentifier",               1,    188,  (encode_string),   (decode_string),     4,         255        }, /* 43.5.1 */
+{ 190,  "NSIEncapsulation",            2,    188,  (encode_nothing),  (decode_aggregate),  0,         0          }, /* 43.5.2 */
+{ 191,  "NSIEncapsulationSingleQTag",  2,    190,  (encode_ushort),   (decode_ushort),     1,         4095       }, /* 43.5.2.2 */
+/* TLV 24 Upstream Service Flow */
+{ 192,  "VendorSpecific",              43,   80,   (encode_nothing),  (decode_aggregate),  0,         0          }, /* 24.43 */
+{ 193,  "VendorIdentifier",    		   8,    192,  (encode_hexstr),   (decode_hexstr),     3,         3          }, /* 24.43.8 */
+{ 194,  "L2VPNEncoding",               5,    192,  (encode_nothing),  (decode_aggregate),  0,         0          }, /* 24.43.5 */
+{ 195,  "VPNIdentifier",               1,    194,  (encode_string),   (decode_string),     4,         255        }, /* 24.43.5.1 */
+/* TLV 25 - Downstream Service Flow */
+{ 196,  "VendorSpecific",              43,   102,  (encode_nothing),  (decode_aggregate),  0,         0          }, /* 25.43 */
+{ 197,  "VendorIdentifier",    		   8,    196,  (encode_hexstr),   (decode_hexstr),     3,         3          }, /* 25.43.8 */
+{ 198,  "L2VPNEncoding",               5,    196,  (encode_nothing),  (decode_aggregate),  0,         0          }, /* 25.43.5 */
+{ 199,  "VPNIdentifier",               1,    198,  (encode_string),   (decode_string),     4,         255        }, /* 25.43.5.1 */
+/* TLV 22 - Upstream Packet Classification */
+{ 200,  "VendorSpecific",              43,   28,   (encode_nothing),  (decode_aggregate),  0,         0          }, /* 22.43 */
+{ 201,  "VendorIdentifier",    		   8,    200,  (encode_hexstr),   (decode_hexstr),     3,         3          }, /* 22.43.8 */
+{ 202,  "L2VPNEncoding",               5,    200,  (encode_nothing),  (decode_aggregate),  0,         0          }, /* 22.43.5 */
+{ 203,  "VPNIdentifier",               1,    202,  (encode_string),   (decode_string),     4,         255        }, /* 22.43.5.1 */
+/* TLV 23 - Downstream Packet Classification */
+{ 204,  "VendorSpecific",              43,   54,   (encode_nothing),  (decode_aggregate),  0,         0          }, /* 23.43 */
+{ 205,  "VendorIdentifier",    		   8,    204,  (encode_hexstr),   (decode_hexstr),     3,         3          }, /* 23.43.8 */
+{ 206,  "L2VPNEncoding",               5,    204,  (encode_nothing),  (decode_aggregate),  0,         0          }, /* 23.43.5 */
+{ 207,  "VPNIdentifier",               1,    206,  (encode_string),   (decode_string),     4,         255        }, /* 23.43.5.1 */
+
 /* Generic TLV ... we only use the limits, code and length don't matter ...*/
 { 998, "GenericTLV",           		0, 0,     (encode_nothing),   (decode_special),  0,        0        },
 { 999, "/*EndOfDataMkr*/",     		255, 0,   (encode_nothing),   (decode_special),  0,        0          }