@Beta public interface PiPipelineInterpreter extends HandlerBehaviour
| Modifier and Type | Interface and Description |
|---|---|
static class |
PiPipelineInterpreter.PiInterpreterException
Signals that an error was encountered while executing the interpreter.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<PiHeaderFieldId> |
mapCriterionType(Criterion.Type type)
Returns the protocol-independent header field identifier that is equivalent to the given criterion type, if
present.
|
Optional<PiTableId> |
mapFlowRuleTableId(int flowRuleTableId)
Returns a protocol-independent table id equivalent to the given numeric table id (as in
FlowRule.tableId()). |
InboundPacket |
mapInboundPacket(DeviceId deviceId,
PiPacketOperation packetInOperation)
Returns a InboundPacket equivalent to the given packet operation.
|
Collection<PiPacketOperation> |
mapOutboundPacket(OutboundPacket packet)
Returns a collection of packet operations equivalent to the given OutboundPacket.
|
Optional<Criterion.Type> |
mapPiHeaderFieldId(PiHeaderFieldId headerFieldId)
Returns the criterion type that is equivalent to the given protocol-independent header field identifier, if
present.
|
Optional<Integer> |
mapPiTableId(PiTableId piTableId)
Returns a numeric table id (as in
FlowRule.tableId()) equivalent to the given
protocol-independent table id. |
PiAction |
mapTreatment(TrafficTreatment treatment,
PiTableId piTableId)
Returns an action of a protocol-independent pipeline that is functionally equivalent to the given ONOS traffic
treatment for the given table.
|
handler, setHandlerOptional<PiHeaderFieldId> mapCriterionType(Criterion.Type type)
type - criterion typeOptional<Criterion.Type> mapPiHeaderFieldId(PiHeaderFieldId headerFieldId)
headerFieldId - header field identifierOptional<PiTableId> mapFlowRuleTableId(int flowRuleTableId)
FlowRule.tableId()). If not present, it means that the given numeric table id cannot be
mapped to any table of the pipeline model.flowRuleTableId - a numeric table idOptional<Integer> mapPiTableId(PiTableId piTableId)
FlowRule.tableId()) equivalent to the given
protocol-independent table id. If not present, it means that the given protocol-independent table id refers to a
table that does not exist, or that cannot be used for flow rule operations.piTableId - protocol-independent table idPiAction mapTreatment(TrafficTreatment treatment, PiTableId piTableId) throws PiPipelineInterpreter.PiInterpreterException
treatment - a ONOS traffic treatmentpiTableId - PI table identifierPiPipelineInterpreter.PiInterpreterException - if the treatment cannot be mapped to any table actionCollection<PiPacketOperation> mapOutboundPacket(OutboundPacket packet) throws PiPipelineInterpreter.PiInterpreterException
packet - a ONOS outbound packetPiPipelineInterpreter.PiInterpreterException - if the packet treatments cannot be mapped to any metadataInboundPacket mapInboundPacket(DeviceId deviceId, PiPacketOperation packetInOperation) throws PiPipelineInterpreter.PiInterpreterException
deviceId - the device that originated the packet-inpacketInOperation - the packet operationPiPipelineInterpreter.PiInterpreterException - if the port can't be extracted from the packet metadata