Support double-tagged host
Change-Id: Ie4041a0b5159e7a8b3a9ed82b55ce3c26b520a3b
diff --git a/core/api/src/main/java/org/onosproject/net/Host.java b/core/api/src/main/java/org/onosproject/net/Host.java
index b47f843..1c2e50a 100644
--- a/core/api/src/main/java/org/onosproject/net/Host.java
+++ b/core/api/src/main/java/org/onosproject/net/Host.java
@@ -15,6 +15,7 @@
*/
package org.onosproject.net;
+import org.onlab.packet.EthType;
import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
@@ -77,6 +78,24 @@
default boolean configured() {
return false;
}
+
+ /**
+ * Returns the inner VLAN ID tied to this host.
+ *
+ * @return VLAN ID value; VlanId.NONE if only one VLAN ID is tied to this host
+ */
+ default VlanId innerVlan() {
+ return VlanId.NONE;
+ }
+
+ /**
+ * Returns the TPID of the outermost VLAN associated with this host.
+ *
+ * @return TPID of the outermost VLAN header
+ */
+ default EthType tpid() {
+ return EthType.EtherType.UNKNOWN.ethType();
+ }
// TODO: explore capturing list of recent locations to aid in mobility
}