adding a criterion for inner vlans
used by olt to match on the inner vlan
Change-Id: I7671b68d9860d598395cba134a589ca23f264c7e
diff --git a/core/api/src/main/java/org/onosproject/net/flow/criteria/Criteria.java b/core/api/src/main/java/org/onosproject/net/flow/criteria/Criteria.java
index c94b1e0..0c26b89 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/criteria/Criteria.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/criteria/Criteria.java
@@ -127,6 +127,16 @@
}
/**
+ * Creates a match on the inner VLAN ID field using the specified value.
+ *
+ * @param vlanId vlan id value
+ * @return match criterion
+ */
+ public static Criterion matchInnerVlanId(VlanId vlanId) {
+ return new VlanIdCriterion(vlanId, Type.INNER_VLAN_VID);
+ }
+
+ /**
* Creates a match on VLAN PCP field using the specified value.
*
* @param vlanPcp vlan pcp value (3 bits)
@@ -137,6 +147,16 @@
}
/**
+ * Creates a match on the inner VLAN PCP field using the specified value.
+ *
+ * @param vlanPcp vlan pcp value (3 bits)
+ * @return match criterion
+ */
+ public static Criterion matchInnerVlanPcp(byte vlanPcp) {
+ return new VlanPcpCriterion(vlanPcp, Type.INNER_VLAN_PCP);
+ }
+
+ /**
* Creates a match on IP DSCP field using the specified value.
*
* @param ipDscp ip dscp value (6 bits)