#include <OFServerSettings.hh>
Configuration parameters for an OFServer. These parameters specify the OpenFlow behavior of a class that deals with OFConnection objects.
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)
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
-
version | OpenFlow 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_interval | the 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_check | true 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
-
handshake | true 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_messages | true 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) | |
|
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_ownership | true 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: