Revised OpenFlow Library  v0.6.0dev
 All Classes Files Functions Variables Friends Groups Pages
Classes

Classes

class  rofl::cctlid
 rofl-common's internal remote controller handle. More...
 
class  rofl::cdptid
 rofl-common's internal remote datapath handle. More...
 
class  rofl::crofbase
 Base class for revised OpenFlow library. More...
 
class  rofl::crofchan
 An OpenFlow control channel grouping multiple control connections. More...
 
class  rofl::crofconn
 A single OpenFlow control connection. More...
 
class  rofl::crofctl
 Class representing a remote controller entity. More...
 
class  rofl::crofdpt
 Class representing a remote datapath element. More...
 
class  rofl::crofsock
 A socket capable of talking OpenFlow via TCP and vice versa. More...
 
interface  rofl::crofchan_env
 Environment expected by a rofl::crofchan instance. More...
 
interface  rofl::crofconn_env
 Environment expected by a rofl::crofconn instance. More...
 
interface  rofl::crofctl_env
 Environment expected by a rofl::crofctl instance. More...
 
interface  rofl::crofdpt_env
 Environment expected by a rofl::crofdpt instance. More...
 
interface  rofl::crofsock_env
 Environment expected by a rofl::crofsock instance. More...
 

Detailed Description

Let's have a look on the classes in rofl-common defining the actual workflow and how messages traverse the protocol stack. rofl-common defines a set of classes for implementing the protocol's core logic actually building a hierarchy starting at a plain socket instance.

All workflow related classes in rofl-common come with their own environment class (e.g., rofl::crofsock_env for rofl::crofsock) that defines the interface expected. A class on layer n+1 implements the interface defined by the class located on layer n.

a) Class rofl::csocket_plain provides an C++ abstraction for the BSD sockets offered by the underlying operating system. ROFL allows building of various socket types and a common base class for all sockets named rofl::csocket. Class csocket_plain provides support for UDP and TCP based unencrypted sockets. Class socket_openssl uses the OpenSSL toolkit [1] to add TLS based encryption to TCP sockets.

b) Class rofl::crofsock maps OpenFlow messages from their wire representation into the associated OpenFlow classes defined by rofl-common and provides support for basic message validation. Class rofl::crofsock implements a weighted fair queueing scheduling for sending out OpenFlow messages and defines four classes for sending OAM messages (Echo-Request/Reply, highest priority 1), management messages (e.g., Features-Request/Reply, priority 2), control messages (e.g., all Modify messages including Flow-Removed, priority 3) and user data related messages (Packet-In and Packet-Out, lowest priority 4). While this may lead to a reordering of OpenFlow messages on the peer side, class rofl::crofsock does not drop any messages queued for transmission.

c) Class rofl::crofconn provides the abstraction of an OpenFlow control connection as defined since OpenFlow v1.3. It negotiates the OpenFlow protocol version to be used with the connected peer entity and detects the datapath identifier when acting in controller mode. Further, class rofl::crofconn implements OAM management and sends periodic Echo-Requests (when no messages have been received for some time from the peer entity) and Echo-Replies (when an Echo-Request has been received). Similar to class rofl::crofsock, rofconn's reception process provides a weighted fair queueing scheduler for handling certain messages (like OAM) with a higher priority.

d) Class rofl::crofchan binds multiple control connections into an OpenFlow control channel and defines the mutual dependencies between the main control connection using control connection identifier 0 and the remaining auxiliary control connections.

e) Class rofl::crofctl represents a remote controller entity and provides various methods for sending OpenFlow messages to this controller entity over any of the defined control connections.

f) Class rofl::crofdpt represents a remote datapath element and provides various methods for sending OpenFlow messages to this datapath element over any of the defined control connections.

g) Class rofl::crofbase defines rofl-common's main class, as any advanced application logic requiring OpenFlow support should derive from this class. It implements all handlers for receiving various notification events from instances of classes rofl::crofctl and rofl::crofdpt, respectively. Further, it manages an entire set of controllers and their associated roles properly and offers methods for the asynchronous notifications defined by the OpenFlow specification

Each layer in the hierarchy adds certain functionality to the overall OpenFlow protocol stack. However, one may split this stack at any layer and use lower layers as required, e.g., for constructing transparent OpenFlow proxies, class rofl::crofsock may be used directly for mapping OpenFlow messages between C++ and TCP while skipping all additional logic like version negotiation via OpenFlow Hello messages or management if OAM related messages like Echo-Request/Reply.