Environment expected by a rofl::crofctl instance. More...
#include <crofctl.h>
Public Member Functions | |
crofctl_env () | |
rofl::crofctl_env constructor | |
virtual | ~crofctl_env () |
rofl::crofctl_env destructor | |
Protected Member Functions | |
virtual void | role_request_rcvd (rofl::crofctl &ctl, uint32_t role, uint64_t rcvd_generation_id) |
called once a cofctl instance has received a role request | |
Event handlers for management notifications for controller entities | |
Overwrite any of these methods for receiving controller related event notifications. | |
virtual void | handle_chan_established (rofl::crofctl &ctl) |
Called after establishing the associated OpenFlow control channel. More... | |
virtual void | handle_chan_terminated (rofl::crofctl &ctl) |
Called after termination of associated OpenFlow control channel. More... | |
virtual void | handle_conn_established (rofl::crofctl &ctl, const rofl::cauxid &auxid) |
Called when a control connection (main or auxiliary) has been established. More... | |
virtual void | handle_conn_terminated (rofl::crofctl &ctl, const rofl::cauxid &auxid) |
Called when a control connection (main or auxiliary) has been terminated by the peer entity. More... | |
virtual void | handle_conn_refused (rofl::crofctl &ctl, const rofl::cauxid &auxid) |
Called when an attempt to establish a control connection has been refused. More... | |
virtual void | handle_conn_failed (rofl::crofctl &ctl, const rofl::cauxid &auxid) |
Called when an attempt to establish a control connection has been failed. More... | |
virtual void | handle_conn_writable (rofl::crofctl &ctl, const rofl::cauxid &auxid) |
Called when a congestion situation on the control connection has been solved. More... | |
Event handlers for OpenFlow message notifications received from controller entities | |
Overwrite any of these methods for receiving messages from the attached controller entity. Once this method terminates, rofl will destroy the message object. If you want to save a message or parts of it, you must create a local copy. All messages are internally allocated on the heap and both allocation and deallocation is handled by rofl-common. Do not delete any of these messages or its internals. Higher logic implemented on top of crofbase and acting in datapath role should handle incoming requests, e.g., sending back a reply to the controller entity. rofl-common does not generate reply messages automatically. You may throw any of the OpenFlow related exceptions defined by rofl-common within these handler methods. rofl-common will detect such exceptions and generate appropriate error messages for transmission to the peer entity. | |
virtual void | handle_features_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_features_request &msg) |
OpenFlow Features-Request message received. More... | |
virtual void | handle_get_config_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_get_config_request &msg) |
OpenFlow Get-Config-Request message received. More... | |
void | handle_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_stats_request &msg) |
OpenFlow Stats-Request message received. More... | |
virtual void | handle_desc_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_desc_stats_request &msg) |
OpenFlow Desc-Stats-Request message received. More... | |
virtual void | handle_table_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_table_stats_request &msg) |
OpenFlow Table-Stats-Request message received. More... | |
virtual void | handle_port_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_port_stats_request &msg) |
OpenFlow Port-Stats-Request message received. More... | |
virtual void | handle_flow_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_flow_stats_request &msg) |
OpenFlow Flow-Stats-Request message received. More... | |
virtual void | handle_aggregate_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_aggr_stats_request &msg) |
OpenFlow Aggregate-Stats-Request message received. More... | |
virtual void | handle_queue_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_queue_stats_request &msg) |
OpenFlow Queue-Stats-Request message received. More... | |
virtual void | handle_group_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_group_stats_request &msg) |
OpenFlow Group-Stats-Request message received. More... | |
virtual void | handle_group_desc_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_group_desc_stats_request &msg) |
OpenFlow Group-Desc-Stats-Request message received. More... | |
virtual void | handle_group_features_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_group_features_stats_request &msg) |
OpenFlow Group-Features-Stats-Request message received. More... | |
virtual void | handle_meter_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_meter_stats_request &msg) |
OpenFlow Meter-Stats-Request message received. More... | |
virtual void | handle_meter_config_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_meter_config_stats_request &msg) |
OpenFlow Meter-Config-Stats-Request message received. More... | |
virtual void | handle_meter_features_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_meter_features_stats_request &msg) |
OpenFlow Meter-Features-Stats-Request message received. More... | |
virtual void | handle_table_features_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_table_features_stats_request &msg) |
OpenFlow Table-Features-Stats-Request message received. More... | |
virtual void | handle_port_desc_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_port_desc_stats_request &msg) |
OpenFlow Port-Desc-Stats-Request message received. More... | |
virtual void | handle_experimenter_stats_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_experimenter_stats_request &msg) |
OpenFlow Experimenter-Stats-Request message received. More... | |
virtual void | handle_packet_out (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_packet_out &msg) |
OpenFlow Packet-Out message received. More... | |
virtual void | handle_barrier_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_barrier_request &msg) |
OpenFlow Barrier-Request message received. More... | |
virtual void | handle_flow_mod (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_flow_mod &msg) |
OpenFlow Flow-Mod message received. More... | |
virtual void | handle_group_mod (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_group_mod &msg) |
OpenFlow Group-Mod message received. More... | |
virtual void | handle_table_mod (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_table_mod &msg) |
OpenFlow Table-Mod message received. More... | |
virtual void | handle_port_mod (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_port_mod &msg) |
OpenFlow Port-Mod message received. More... | |
virtual void | handle_queue_get_config_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_queue_get_config_request &msg) |
OpenFlow Queue-Get-Config-Request message received. More... | |
virtual void | handle_set_config (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_set_config &msg) |
OpenFlow Set-Config message received. More... | |
virtual void | handle_experimenter_message (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_experimenter &msg) |
OpenFlow Experimenter message received. More... | |
virtual void | handle_error_message (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_error &msg) |
OpenFlow error message received. More... | |
virtual void | handle_role_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_role_request &msg) |
OpenFlow Role-Request message received. More... | |
virtual void | handle_get_async_config_request (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_get_async_config_request &msg) |
OpenFlow Get-Async-Config-Request message received. More... | |
virtual void | handle_set_async_config (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_set_async_config &msg) |
OpenFlow Set-Async-Config message received. More... | |
virtual void | handle_meter_mod (rofl::crofctl &ctl, const rofl::cauxid &auxid, rofl::openflow::cofmsg_meter_mod &msg) |
OpenFlow Meter-Mod message received. More... | |
Friends | |
class | crofctl |
Environment expected by a rofl::crofctl instance.
This class defines the interface to the environment required by an instance of class rofl::crofctl. Its API comprises two groups of methods:
Overwrite any of these methods for receiving certain event notifications from the associated rofl::crofctl instance.
|
inlineprotectedvirtual |
OpenFlow Aggregate-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Barrier-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
Called after establishing the associated OpenFlow control channel.
This method is called once the associated OpenFlow control channel has been established, i.e., its main connection has been accepted by the remote site.
ctl | controller instance |
|
inlineprotectedvirtual |
Called after termination of associated OpenFlow control channel.
This method is called once the associated OpenFlow control channel has been terminated, i.e., its main connection has been closed from the remote site. The rofl::crofctl instance itself is not destroyed, unless its 'remove_on_channel_close' flag has been set to true during its construction.
ctl | controller instance |
|
inlineprotectedvirtual |
Called when a control connection (main or auxiliary) has been established.
ctl | controller instance |
auxid | connection identifier (main: 0) |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
Called when an attempt to establish a control connection has been failed.
This event occurs when some failure occures while calling the underlying C-library connect() system call, e.g., no route to destination, etc. This may indicate a local configuration problem inside or outside of the application.
ctl | controller instance |
auxid | connection identifier (main: 0) |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
Called when an attempt to establish a control connection has been refused.
This event occurs when the C-library's connect() system call fails with the ECONNREFUSED error code. This indicates typically a problem on the remote site.
ctl | controller instance |
auxid | connection identifier (main: 0) |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
Called when a control connection (main or auxiliary) has been terminated by the peer entity.
ctl | controller instance |
auxid | connection identifier (main: 0) |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
Called when a congestion situation on the control connection has been solved.
A control channel may face congestion situations when insufficient bandwidth on the underlying IP path or some backpressuring by the remote site requires to throttle the overall message transmission rate on a control connection. A congestion situation is indicated by the return values obtained from the various send-methods defined within rofl::crofctl. A solved congestion situation is indicated by calling this method. Note that ROFL will store OpenFlow messages even under congestion, thus filling up its internal buffers until no further memory is available for doing so. It is up to the application designer to throttle transmission of further messages according to the channel capacity.
ctl | controller instance |
auxid | control connection identifier (main: 0) |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Desc-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow error message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Experimenter message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Experimenter-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Features-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Flow-Mod message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Flow-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Get-Async-Config-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Get-Config-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Group-Desc-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Group-Features-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Group-Mod message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Group-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Meter-Config-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Meter-Features-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Meter-Mod message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Meter-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Packet-Out message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Port-Desc-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Port-Mod message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Port-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Queue-Get-Config-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Queue-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Role-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Set-Async-Config message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Set-Config message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotected |
OpenFlow Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Table-Features-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Table-Mod message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.
|
inlineprotectedvirtual |
OpenFlow Table-Stats-Request message received.
ctl | controller instance |
auxid | control connection identifier |
msg | OpenFlow message instance |
Implemented in rofl::crofbase.