Implement support for packetIn through p4Runtime
Change-Id: I92cc1a2bd7edde8916aad61c20d7411f93368612
diff --git a/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineInterpreter.java b/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineInterpreter.java
index 394b787..a85d80c 100644
--- a/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineInterpreter.java
+++ b/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineInterpreter.java
@@ -17,9 +17,11 @@
package org.onosproject.net.pi.model;
import com.google.common.annotations.Beta;
+import org.onosproject.net.DeviceId;
import org.onosproject.net.driver.HandlerBehaviour;
import org.onosproject.net.flow.TrafficTreatment;
import org.onosproject.net.flow.criteria.Criterion;
+import org.onosproject.net.packet.InboundPacket;
import org.onosproject.net.packet.OutboundPacket;
import org.onosproject.net.pi.runtime.PiAction;
import org.onosproject.net.pi.runtime.PiHeaderFieldId;
@@ -86,6 +88,17 @@
throws PiInterpreterException;
/**
+ * Returns a InboundPacket equivalent to the given packet operation.
+ *
+ * @param deviceId the device that originated the packet-in
+ * @param packetInOperation the packet operation
+ * @return an ONOS inbound packet
+ * @throws PiInterpreterException if the port can't be extracted from the packet metadata
+ */
+ InboundPacket mapInboundPacket(DeviceId deviceId, PiPacketOperation packetInOperation)
+ throws PiInterpreterException;
+
+ /**
* Signals that an error was encountered while executing the interpreter.
*/
@Beta