Interface OpenFlowPacketContext
-
- All Known Implementing Classes:
DefaultOpenFlowPacketContext
public interface OpenFlowPacketContextA representation of a packet context which allows any provider to view a packet in event, but may block the response to the event if blocked has been called. This packet context can be used to react to the packet in event with a packet out.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanblock()Blocks further responses (ie.voidbuild(org.onlab.packet.Ethernet ethFrame, org.projectfloodlight.openflow.types.OFPort outPort)Build the packet out in response to this packet in event.voidbuild(org.projectfloodlight.openflow.types.OFPort outPort)Build the packet out in response to this packet in event.java.util.Optional<java.lang.Long>cookie()Provide the cookie in the packet in message.Dpiddpid()Provide the dpid of the switch where the packet in arrived.java.lang.IntegerinPort()Provide the port on which the packet arrived.booleanisBuffered()Indicates that this packet is buffered at the switch.booleanisHandled()Checks whether the packet has been handled.org.onlab.packet.Ethernetparsed()Provided a handle onto the parsed payload.voidsend()Provided build has been called send the packet out the switch it came in on.byte[]unparsed()Provide an unparsed copy of the data.
-
-
-
Method Detail
-
block
boolean block()
Blocks further responses (ie. send() calls) on this packet in event.- Returns:
- true if blocks
-
isHandled
boolean isHandled()
Checks whether the packet has been handled.- Returns:
- true if handled, false otherwise.
-
send
void send()
Provided build has been called send the packet out the switch it came in on.
-
build
void build(org.projectfloodlight.openflow.types.OFPort outPort)
Build the packet out in response to this packet in event.- Parameters:
outPort- the out port to send to packet out of.
-
build
void build(org.onlab.packet.Ethernet ethFrame, org.projectfloodlight.openflow.types.OFPort outPort)Build the packet out in response to this packet in event.- Parameters:
ethFrame- the actual packet to send out.outPort- the out port to send to packet out of.
-
parsed
org.onlab.packet.Ethernet parsed()
Provided a handle onto the parsed payload.- Returns:
- the parsed form of the payload.
-
unparsed
byte[] unparsed()
Provide an unparsed copy of the data.- Returns:
- the unparsed form of the payload.
-
dpid
Dpid dpid()
Provide the dpid of the switch where the packet in arrived.- Returns:
- the dpid of the switch.
-
inPort
java.lang.Integer inPort()
Provide the port on which the packet arrived.- Returns:
- the port
-
isBuffered
boolean isBuffered()
Indicates that this packet is buffered at the switch.- Returns:
- buffer indication
-
cookie
java.util.Optional<java.lang.Long> cookie()
Provide the cookie in the packet in message.- Returns:
- optional flow cookie
-
-