Revised OpenFlow Library
v0.6.0dev
|
Classes | |
class | rofl::examples::ethswctld::cetherswitch |
A very simple controller for forwarding Ethernet flows. More... | |
class | rofl::examples::ethswctld::exceptions::eFibBase |
Base class for all exceptions thrown by class cfibtable. More... | |
class | rofl::examples::ethswctld::exceptions::eFibInval |
Invalid parameter specified. More... | |
class | rofl::examples::ethswctld::exceptions::eFibNotFound |
Element not found. More... | |
class | rofl::examples::ethswctld::cfibentry |
Stores a FIB entry mapping host hwaddr to switch port number. More... | |
class | rofl::examples::ethswctld::cfibtable |
Forwarding Information Base. More... | |
class | rofl::examples::ethswctld::exceptions::eFlowBase |
Base class for all exceptions thrown by class cflowtable. More... | |
class | rofl::examples::ethswctld::exceptions::eFlowInval |
Invalid parameter specified. More... | |
class | rofl::examples::ethswctld::exceptions::eFlowNotFound |
Element not found. More... | |
class | rofl::examples::ethswctld::cflowentry |
Stores an active flow entry. More... | |
class | rofl::examples::ethswctld::cflowtable |
Flow Table of active flows. More... | |
interface | rofl::examples::ethswctld::cfibentry_env |
Defines the environment expected by an instance of class cfibentry. More... | |
interface | rofl::examples::ethswctld::cflowentry_env |
Defines the environment expected by an instance of class cflowentry. More... | |
As previously outlined, rofl-common is a collection of C++ classes of OpenFlow data structures each capable of mapping its internal state to a simple-to-use C++ interface or the associated TCP wire representation required for sending OpenFlow messages to a peer entity. In addition, rofl-common implements behaviour of OpenFlow endpoints in a set of workflow and auxiliary classes. All workflow classes build on top of each other, effectively creating a hierarchy of functional layers. At its top, class rofl::crofbase provides a high level simple-to-use interface that serves as main class in rofl-common. Deriving from rofl::crofbase is the most simple and convenient way for adding OpenFlow support to an application.
Class cetherswitch defines the main class of ethswctld and derives from class rofl::crofbase. OpenFlow is a control protocol and requires support for TCP/IP connectivity from the underlying operating system. rofl-common provides its own I/O subsystem for driving associated socket or timer objects. The ethswctld control application uses ROFL's I/O subsystem as its main loop for running its discrete event loop. However, you may build your own for your main function and run ROFL in a separate thread. ROFL's I/O subsystem supports multi-threaded operations and each class defined in ROFL may be assigned to any of the execution threads dedicated to ROFL. Whatever strategy you adopt, when assigning a ROFL class instance to a specific thread, you must run ROFL's I/O loop in this specific execution thread in order to work on the event queue. See method rofl::cioloop::run() for details.
The ethswctld control application supports an arbitrary number of datapath elements. It defines two main classes: a) Class rofl::examples::ethswctld::cfibtable defines a Forwarding Information Base that stores mappings between individual Ethernet hosts (to be precise: their ethernet hardware addresses) and the port to be used on the datapath element for sending frames towards this station. Class rofl::examples::ethswctld::cfibentry stores individual FIB entries. b) Class rofl::examples::ethswctld::cflowtable defines an Active Flows Table for storing unidirectional flows between a pair of ethernet hosts. An active flow is characterized by an OpenFlow flow table entry installed on the datapath element and is represented by an instance of class rofl::examples::ethswctld::cflowentry.
Both FIB and flow entries are soft-state entities and demonstrate use of the timer management methods provided by class rofl::ciosrv. They also demonstrate two recurring patterns frequently used in rofl-common:
a) Interface definitions for organizing notification exchange between related classes using so-called environment classes.
b) Naming of management methods for typical CRUD operations on various objects.