libfluid
The ONF OpenFlow driver
Public Member Functions | Friends | List of all members
fluid_base::OFServerSettings Class Reference

#include <OFServerSettings.hh>

Public Member Functions

 OFServerSettings ()
 
OFServerSettingssupported_version (const uint8_t version)
 
uint32_t * supported_versions ()
 
uint8_t max_supported_version ()
 
OFServerSettingsecho_interval (const int echo_interval)
 
int echo_interval ()
 
OFServerSettingsliveness_check (const bool liveness_check)
 
bool liveness_check ()
 
OFServerSettingshandshake (const bool handshake)
 
bool handshake ()
 
OFServerSettingsdispatch_all_messages (const bool dispatch_all_messages)
 
bool dispatch_all_messages ()
 
OFServerSettingsuse_hello_elements (const bool use_hello_elements)
 
bool use_hello_elements ()
 
OFServerSettingskeep_data_ownership (const bool keep_data_ownership)
 
bool keep_data_ownership ()
 

Friends

class OFServer
 

Detailed Description

Configuration parameters for an OFServer. These parameters specify the OpenFlow behavior of a class that deals with OFConnection objects.

Constructor & Destructor Documentation

fluid_base::OFServerSettings::OFServerSettings ( )

Create an OFServerSettings with default configuration values.

Settings will have the following values by default:

  • Only OpenFlow 1.0 is supported (a sane value for the most compatibility)
  • echo_interval: 15
  • liveness_check: true
  • handshake: true
  • dispatch_all_messages: false
  • use_hello_elems: false (to avoid compatibility issues with existing software and hardware)
  • keep_data_ownership: true (to simplify things)

Member Function Documentation

OFServerSettings& fluid_base::OFServerSettings::supported_version ( const uint8_t  version)

Add a supported version to the set of supported versions.

Using this method will override the default version (1, OpenFlow 1.0). If you call this method with version 4, only version 4 will be supported. If you want to add support for version 1, you will need to do so explicitly, so that you can choose only the versions you want, while still having a nice default.

Parameters
versionOpenFlow protocol version number (e.g.: 4 for OpenFlow 1.3)
uint32_t* fluid_base::OFServerSettings::supported_versions ( )

Return an array of OpenFlow versions bitmaps with the supported versions.

uint8_t fluid_base::OFServerSettings::max_supported_version ( )

Return the largest version number supported.

OFServerSettings& fluid_base::OFServerSettings::echo_interval ( const int  echo_interval)

Set the OpenFlow echo interval (in seconds). A connection will be closed if no echo replies arrive in this interval, and echo requests will be periodically sent using the same interval.

Parameters
echo_intervalthe echo interval (in seconds)
int fluid_base::OFServerSettings::echo_interval ( )

Return the echo interval.

OFServerSettings& fluid_base::OFServerSettings::liveness_check ( const bool  liveness_check)

Set whether the OFServer instance should perform liveness checks (timed echo requests and replies).

Parameters
liveness_checktrue for liveness checking
bool fluid_base::OFServerSettings::liveness_check ( )

Return whether liveness check should be performed.

OFServerSettings& fluid_base::OFServerSettings::handshake ( const bool  handshake)

Set whether the OFServer instance should perform OpenFlow handshakes (hello messages, version negotiation and features request).

Parameters
handshaketrue for automatic OpenFlow handshakes
bool fluid_base::OFServerSettings::handshake ( )

Return whether handshake should be performed.

OFServerSettings& fluid_base::OFServerSettings::dispatch_all_messages ( const bool  dispatch_all_messages)

Set whether the OFServer instance should forward all OpenFlow messages to the user callback (OFHandler::message_callback), including those treated for handshake and liveness check.

Parameters
dispatch_all_messagestrue to enable forwarding for all messages
bool fluid_base::OFServerSettings::dispatch_all_messages ( )

Return whether all messages should be dispatched.

OFServerSettings& fluid_base::OFServerSettings::use_hello_elements ( const bool  use_hello_elements)

Set whether the OFServer instance should send and treat OpenFlow 1.3.1 hello elements.

See OFServerSettings::OFServerSettings for more details.

Parameters
use_hello_elementstrue to enable hello elems
bool fluid_base::OFServerSettings::use_hello_elements ( )

Return whether hello elements should be used.

OFServerSettings& fluid_base::OFServerSettings::keep_data_ownership ( const bool  keep_data_ownership)

Set whether the OFServer instance should own and manage the message data passed to its message callback (true) or if your application should be responsible for it (false).

See OFServerSettings::OFServerSettings for more details.

Parameters
keep_data_ownershiptrue if OFServer is responsible for managing message data, false if your application is.
bool fluid_base::OFServerSettings::keep_data_ownership ( )

Return whether message data pointer ownership belongs to OFServer (true) or your application (false).


The documentation for this class was generated from the following file: