Reference Guide
Table Of Contents
- 1 Introduction
- 2 Establishing Your Test and Development Environments
- 3 Developing Applications
- Introduction
- Authentication
- REST API
- Audit Logging
- Alert Logging
- Configuration
- High Availability
- OpenFlow
- Metrics Framework
- GUI
- SKI Framework - Overview
- SKI Framework - Navigation Tree
- SKI Framework - Hash Navigation
- SKI Framework - View Life-Cycle
- SKI Framework - Live Reference Application
- UI Extension
- Introduction
- Controller Teaming
- Distributed Coordination Service
- Persistence
- Backup and Restore
- Device Driver Framework
- 4 Application Security
- 5 Including Debian Packages with Applications
- 6 Sample Application
- Application Description
- Creating Application Development Workspace
- Application Generator (Automatic Workspace Creation)
- Creating Eclipse Projects
- Updating Project Dependencies
- Building the Application
- Installing the Application
- Application Code
- 7 Testing Applications
- 8 Built-In Applications
- Appendix A
- Appendix B
- Bibliography
Message Context
The MessageContext is the object which maintains the state of processing a PACKET_IN message,
and the formulation of the PACKET_OUT message to be returned to the source datapath. When a
PACKET_IN message is received by the controller, several things happen:
•
A new MessageContext is created
•
The PACKET_IN message event is attached
•
The packet data (if there is any) is decoded and the Packet model attached
•
A mutable PACKET_OUT message is created and attached (with appropriate fields set)
•
The MessageContext is passed from listener to listener down the processing chain
The MessageContext provides the following methods:
•
srcEvent() – returns the message event (immutable) containing the PACKET_IN message
received from the datapath.
•
getVersion() – returns the protocol version of the datapath / OpenFlow message.
•
getPacketIn() – returns the PACKET_IN message from the message event.
•
decodedPacket() – returns the network packet model (immutable) of the decoded packet data.
•
getProtocols() – returns an ordered list of protocol IDs for the protocol layers in the decoded
packet.
•
packetOut() returns the PacketOut API, through which actions may be applied to the
PACKET_OUT message under construction.
•
getCompletedPacketOut() – returns the PACKET_OUT message (immutable) that was sent
back to the datapath.
•
addHint(Hint) – adds a hint to the message context.
•
getHints() – returns the list of hints attached to the context.
•
isHandled() – returns true if a DIRECTOR has already instructed the sequencer to send or
block the PACKET_OUT message.
•
isBlocked() – returns true if a DIRECTOR has already instructed the sequencer to block the
PACKET_OUT message.
•
isSent() – returns true if a DIRECTOR has already instructed the sequencer to send the
PACKET_OUT message.
•
isTestPacket() – returns true if the associated packet has been determined to be a diagnostic
test packet.
•
requiresProcessing() – returns true if the associated packet is not a test packet, and has not
yet been blocked or sent.
•
failedToSend() – returns true if the attempt to send the PACKET_OUT message failed.
•
toDebugString() – returns a detailed, multi-line string representation of the message context.
42