public class OfmMutablePacketIn extends OfmPacketIn implements MutableMessage
OfmPacketIn
.length
Modifier and Type | Method and Description |
---|---|
OfmMutablePacketIn |
bufferId(BufferId bufferId)
Sets the buffer id; Since 1.0.
|
void |
clearXid()
Clears the transaction ID field of this message (sets it to 0).
|
OfmMutablePacketIn |
cookie(long cookie)
Sets the cookie value; Since 1.3.
|
OfmMutablePacketIn |
data(byte[] data)
Sets the packet frame data; Since 1.0.
|
OfmMutablePacketIn |
inPort(BigPortNumber inPort)
Sets the ingress port; Since 1.0.
|
OfmMutablePacketIn |
match(Match match)
Sets the match (frame meta data); Since 1.2.
|
OfmMutablePacketIn |
reason(PacketInReason reason)
Sets the reason for the packet-in message; Since 1.0.
|
OfmMutablePacketIn |
tableId(TableId tableId)
Sets the table ID; Since 1.1.
|
OpenflowMessage |
toImmutable()
Returns an immutable instance of this message.
|
String |
toString() |
OfmMutablePacketIn |
totalLen(int totalLen)
Sets the frame total length value; Since 1.0.
|
boolean |
writable()
Returns true if this mutable object is still writable.
|
getBufferId, getCookie, getData, getInPhyPort, getInPort, getMatch, getReason, getTableId, getTotalLen, toDebugString, validate
decodeHeader, getType, getVersion, getXid, hex, hex, length
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getVersion, toDebugString
public void clearXid()
MutableMessage
clearXid
in interface MutableMessage
public OpenflowMessage toImmutable()
MutableMessage
It is expected that the reference to this mutable message will be
dropped. Note that all method calls invoked on a
MutableMessage
after toImmutable()
has been invoked
will result in an InvalidMutableException
being thrown.
toImmutable
in interface MutableMessage
public boolean writable()
MutableObject
#toImmutable()
method (defined on a sub-interface)
has not yet been invoked.writable
in interface MutableObject
public String toString()
toString
in class OfmPacketIn
public OfmMutablePacketIn bufferId(BufferId bufferId)
bufferId
- the buffer idInvalidMutableException
- if this instance is no longer writableNullPointerException
- if bufferId is nullpublic OfmMutablePacketIn inPort(BigPortNumber inPort)
Note that in 1.0, port numbers are u16.
inPort
- the ingress portInvalidMutableException
- if this instance is no longer writableVersionMismatchException
- if version is > 1.1NullPointerException
- if inPort is nullIllegalArgumentException
- if the port number is invalidpublic OfmMutablePacketIn totalLen(int totalLen)
totalLen
- the total length valueInvalidMutableException
- if this instance is no longer writablepublic OfmMutablePacketIn reason(PacketInReason reason)
reason
- the reasonInvalidMutableException
- if this instance is no longer writableNullPointerException
- if reason is nullpublic OfmMutablePacketIn tableId(TableId tableId)
This should be set to the ID of the table that was looked up.
tableId
- the table idInvalidMutableException
- if this instance is no longer writableVersionMismatchException
- if version is < 1.1NullPointerException
- if reason is nullpublic OfmMutablePacketIn cookie(long cookie)
This should be set to the cookie of the flow entry that was looked up.
cookie
- the cookieInvalidMutableException
- if this instance is no longer writableVersionMismatchException
- if version is < 1.3public OfmMutablePacketIn match(Match match)
The match field reflects the packet's headers and context when the event that triggers the packet-in message occurred and contains a set of OXM TLVs. This context includes any changes applied to the packet in previous processing, including actions already executed, if any, but not any changes in the action set.
The OXM TLVs must include context fields, that is, fields whose values
cannot be determined from the packet data. The standard context fields
are IN_PORT
,
IN_PHY_PORT
,
METADATA
and
TUNNEL_ID
. Fields whose values are
all-bits-zero should be omitted.
Optionally, the OXM TLVs may also include packet header fields that were previously extracted from the packet, including any modifications of those in the course of processing.
When a packet is received directly on a physical port and not
processed by a logical port, IN_PORT
and IN_PHY_PORT
have the same
value - the OpenFlow port number of this physical port - in this case
IN_PHY_PORT
should be omitted.
match
- the matchInvalidMutableException
- if this instance is no longer writableVersionMismatchException
- if version is < 1.2NullPointerException
- if match is nullIllegalArgumentException
- if match is mutablepublic OfmMutablePacketIn data(byte[] data)
data
- the frame dataInvalidMutableException
- if this instance is no longer writableNullPointerException
- if data is nullCopyright © 2015. All Rights Reserved.