Revised OpenFlow Library  v0.6.0dev
 All Classes Files Functions Variables Friends Groups Pages
Static Public Member Functions | Friends | List of all members
rofl::examples::ethswctld::cetherswitch Class Reference

A very simple controller for forwarding Ethernet flows. More...

#include <cetherswitch.h>

Static Public Member Functions

static int run (int argc, char **argv)
 Static main routine for class cetherswitch. More...
 
- Static Public Member Functions inherited from rofl::crofbase
static uint32_t get_ofp_no_buffer (uint8_t ofp_version)
 Returns OpenFlow's NO_BUFFER constant for various OpenFlow versions.
 
static uint32_t get_ofp_controller_port (uint8_t ofp_version)
 Returns OpenFlow's OFPP_CONTROLLER constant for various OpenFlow versions.
 
static uint32_t get_ofp_flood_port (uint8_t ofp_version)
 Returns OpenFlow's OFPP_FLOOD constant for various OpenFlow versions.
 
static uint8_t get_ofp_command (uint8_t ofp_version, const enum openflow::ofp_flow_mod_command &cmd)
 Returns OpenFlow's OFPFC constants for various OpenFlow versions.
 
- Static Public Member Functions inherited from rofl::crofconn_env
static crofconn_envset_env (crofconn_env *env)
 
static bool has_env (crofconn_env *env)
 

Friends

std::ostream & operator<< (std::ostream &os, const cetherswitch &sw)
 

Additional Inherited Members

- Public Member Functions inherited from rofl::crofbase
 crofbase (const rofl::openflow::cofhello_elem_versionbitmap &versionbitmap=rofl::openflow::cofhello_elem_versionbitmap())
 crofbase constructor More...
 
virtual ~crofbase ()
 crofbase destructor More...
 
void close_dpt_listening ()
 Closes all listening csocket instances.
 
rofl::csocketadd_dpt_listening (unsigned int sockid, enum rofl::csocket::socket_type_t socket_type, const rofl::cparams &params)
 Creates a new listening rofl::csocket instance for accepting incoming OpenFlow connections. More...
 
rofl::csocketset_dpt_listening (unsigned int sockid, enum rofl::csocket::socket_type_t socket_type, const rofl::cparams &params)
 Returns a reference to the listening csocket object specified by identifier sockid. More...
 
const rofl::csocketget_dpt_listening (unsigned int sockid) const
 Returns a const reference to the listening csocket object specified by identifier sockid. More...
 
void drop_dpt_listening (unsigned int sockid)
 Removes a listening socket identified by sockid. More...
 
bool has_dpt_listening (unsigned int sockid)
 Checks for existence of a listening socket identified by sockid. More...
 
void close_ctl_listening ()
 Closes all listening csocket instances.
 
rofl::csocketadd_ctl_listening (unsigned int sockid, enum rofl::csocket::socket_type_t socket_type, const rofl::cparams &params)
 Creates a new listening rofl::csocket instance for accepting incoming OpenFlow connections. More...
 
rofl::csocketset_ctl_listening (unsigned int sockid, enum rofl::csocket::socket_type_t socket_type, const rofl::cparams &params)
 Returns a reference to the listening csocket object specified by identifier sockid. More...
 
const rofl::csocketget_ctl_listening (unsigned int sockid) const
 Returns a const reference to the listening csocket object specified by identifier sockid. More...
 
void drop_ctl_listening (unsigned int sockid)
 Removes a listening socket identified by sockid. More...
 
bool has_ctl_listening (unsigned int sockid)
 Checks for existence of a listening socket identified by sockid. More...
 
rofl::cdptid get_idle_dptid () const
 Returns the next idle identifier for a new rofl::crofdpt instance. More...
 
void drop_dpts ()
 Deletes all existing rofl::crofdpt instances.
 
rofl::crofdptadd_dpt (const rofl::cdptid &dptid, const rofl::openflow::cofhello_elem_versionbitmap &versionbitmap, bool remove_on_channel_close=false, const rofl::cdpid &dpid=rofl::cdpid(0))
 Creates new rofl::crofdpt instance for given identifier. More...
 
rofl::crofdptset_dpt (const rofl::cdptid &dptid, const rofl::openflow::cofhello_elem_versionbitmap &versionbitmap, bool remove_on_channel_close=false, const rofl::cdpid &dpid=rofl::cdpid(0))
 Returns existing or creates new rofl::crofdpt instance for given identifier. More...
 
rofl::crofdptset_dpt (const rofl::cdptid &dptid)
 Returns reference to existing rofl::crofdpt instance. More...
 
const rofl::crofdptget_dpt (const rofl::cdptid &dptid) const
 Returns const reference to existing rofl::crofdpt instance. More...
 
void drop_dpt (rofl::cdptid dptid)
 Deletes a rofl::crofdpt instance given by identifier. More...
 
bool has_dpt (const rofl::cdptid &dptid) const
 Checks for existence of rofl::crofdpt instance with given identifier. More...
 
rofl::cctlid get_idle_ctlid () const
 Returns the next idle identifier for a new rofl::crofctl instance. More...
 
void drop_ctls ()
 Deletes all existing rofl::crofctl instances.
 
rofl::crofctladd_ctl (const rofl::cctlid &ctlid, const rofl::openflow::cofhello_elem_versionbitmap &versionbitmap, bool remove_on_channel_close=false)
 Creates new rofl::crofctl instance for given identifier. More...
 
rofl::crofctlset_ctl (const rofl::cctlid &ctlid, const rofl::openflow::cofhello_elem_versionbitmap &versionbitmap, bool remove_on_channel_close=false)
 Returns existing or creates new rofl::crofctl instance for given identifier. More...
 
rofl::crofctlset_ctl (const rofl::cctlid &ctlid)
 Returns reference to existing rofl::crofctl instance. More...
 
const rofl::crofctlget_ctl (const rofl::cctlid &ctlid) const
 Returns const reference to existing rofl::crofctl instance. More...
 
void drop_ctl (rofl::cctlid ctlid)
 Deletes a rofl::crofctl instance given by identifier. More...
 
bool has_ctl (const rofl::cctlid &ctlid) const
 Checks for existence of rofl::crofctl instance with given identifier. More...
 
rofl::openflow::cofhello_elem_versionbitmapset_versionbitmap ()
 Returns reference to OpenFlow version bitmap used for incoming connections.
 
const
rofl::openflow::cofhello_elem_versionbitmap
get_versionbitmap () const
 Returns const reference to OpenFlow version bitmap used for incoming connections.
 
uint8_t get_highest_supported_ofp_version () const
 Returns highest OpenFlow version supported for incoming connections.
 
bool is_ofp_version_supported (uint8_t ofp_version) const
 Returns true, when the given OpenFlow version is supported by this crofbase instance.
 
- Public Member Functions inherited from rofl::ciosrv
 ciosrv (pthread_t tid=0)
 Initializes all structures for this ciosrv object.
 
virtual ~ciosrv ()
 Deallocates resources for this ciosrv object.
 
 ciosrv (const ciosrv &iosrv)
 Initializes all structures for this ciosrv object.
 
ciosrvoperator= (const ciosrv &iosrv)
 
void notify (const cevent &event)
 Sends a notification to this ciosrv instance. More...
 
pthread_t get_thread_id () const
 Returns thread-id of local thread. More...
 
- Public Member Functions inherited from rofl::csocket_env
virtual ~csocket_env ()
 Destructor.
 
- Public Member Functions inherited from rofl::crofctl_env
 crofctl_env ()
 rofl::crofctl_env constructor
 
virtual ~crofctl_env ()
 rofl::crofctl_env destructor
 
- Public Member Functions inherited from rofl::crofdpt_env
 crofdpt_env ()
 rofl::crofdpt_env constructor
 
virtual ~crofdpt_env ()
 rofl::crofdpt_env destructor
 
- Protected Member Functions inherited from rofl::crofbase
virtual void handle_conn_established (rofl::crofdpt &dpt, const rofl::cauxid &auxid)
 Called when a control connection (main or auxiliary) has been established. More...
 
virtual void handle_conn_terminated (rofl::crofdpt &dpt, 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::crofdpt &dpt, const rofl::cauxid &auxid)
 Called when an attempt to establish a control connection has been refused. More...
 
virtual void handle_conn_failed (rofl::crofdpt &dpt, const rofl::cauxid &auxid)
 Called when an attempt to establish a control connection has been failed. More...
 
virtual void handle_conn_writable (rofl::crofdpt &dpt, const rofl::cauxid &auxid)
 Called when a congestion situation on the control connection has been solved. More...
 
virtual void handle_ctl_open (rofl::crofctl &ctl)
 Called after establishing the associated OpenFlow control channel. More...
 
virtual void handle_ctl_close (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...
 
virtual void handle_features_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_features_reply &msg)
 OpenFlow Features-Reply message received. More...
 
virtual void handle_features_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Features-Reply message. More...
 
virtual void handle_get_config_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_get_config_reply &msg)
 OpenFlow Get-Config-Reply message received. More...
 
virtual void handle_get_config_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Get-Config-Reply message. More...
 
virtual void handle_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_stats_reply &msg)
 OpenFlow Stats-Reply message received. More...
 
virtual void handle_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid, uint8_t stats_type)
 Timer expired while waiting for OpenFlow Stats-Reply message. More...
 
virtual void handle_desc_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_desc_stats_reply &msg)
 OpenFlow Desc-Stats-Reply message received. More...
 
virtual void handle_desc_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Desc-Stats-Reply message. More...
 
virtual void handle_table_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_table_stats_reply &msg)
 OpenFlow Table-Stats-Reply message received. More...
 
virtual void handle_table_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Table-Stats-Reply message. More...
 
virtual void handle_port_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_port_stats_reply &msg)
 OpenFlow Port-Stats-Reply message received. More...
 
virtual void handle_port_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Port-Stats-Reply message. More...
 
virtual void handle_aggregate_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_aggr_stats_reply &msg)
 OpenFlow Aggregate-Stats-Reply message received. More...
 
virtual void handle_aggregate_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Aggregate-Stats-Reply message. More...
 
virtual void handle_queue_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_queue_stats_reply &msg)
 OpenFlow Queue-Stats-Reply message received. More...
 
virtual void handle_queue_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Queue-Stats-Reply message. More...
 
virtual void handle_group_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_group_stats_reply &msg)
 OpenFlow Group-Stats-Reply message received. More...
 
virtual void handle_group_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Group-Stats-Reply message. More...
 
virtual void handle_group_desc_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_group_desc_stats_reply &msg)
 OpenFlow Group-Desc-Stats-Reply message received. More...
 
virtual void handle_group_desc_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Group-Desc-Stats-Reply message. More...
 
virtual void handle_group_features_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_group_features_stats_reply &msg)
 OpenFlow Group-Features-Stats-Reply message received. More...
 
virtual void handle_group_features_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Group-Features-Stats-Reply message. More...
 
virtual void handle_meter_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_meter_stats_reply &msg)
 OpenFlow Meter-Stats-Reply message received. More...
 
virtual void handle_meter_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Meter-Stats-Reply message. More...
 
virtual void handle_meter_config_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_meter_config_stats_reply &msg)
 OpenFlow Meter-Config-Stats-Reply message received. More...
 
virtual void handle_meter_config_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Meter-Config-Stats-Reply message. More...
 
virtual void handle_meter_features_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_meter_features_stats_reply &msg)
 OpenFlow Meter-Features-Stats-Reply message received. More...
 
virtual void handle_meter_features_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Meter-Features-Stats-Reply message. More...
 
virtual void handle_table_features_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_table_features_stats_reply &msg)
 OpenFlow Table-Features-Stats-Reply message received. More...
 
virtual void handle_table_features_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Table-Features-Stats-Reply message. More...
 
virtual void handle_port_desc_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_port_desc_stats_reply &msg)
 OpenFlow Port-Desc-Stats-Reply message received. More...
 
virtual void handle_port_desc_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Port-Desc-Stats-Reply message. More...
 
virtual void handle_experimenter_stats_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_experimenter_stats_reply &msg)
 OpenFlow Experimenter-Stats-Reply message received. More...
 
virtual void handle_experimenter_stats_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Experimenter-Stats-Reply message. More...
 
virtual void handle_barrier_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_barrier_reply &msg)
 OpenFlow Barrier-Reply message received. More...
 
virtual void handle_barrier_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Barrier-Reply message. More...
 
virtual void handle_flow_removed (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_flow_removed &msg)
 OpenFlow Flow-Removed message received. More...
 
virtual void handle_port_status (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_port_status &msg)
 OpenFlow Port-Status-Reply message received. More...
 
virtual void handle_queue_get_config_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_queue_get_config_reply &msg)
 OpenFlow Queue-Get-Config-Reply message received. More...
 
virtual void handle_queue_get_config_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Table-Stats-Reply message. More...
 
virtual void handle_error_message (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_error &msg)
 OpenFlow Error message received. More...
 
virtual void handle_experimenter_message (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_experimenter &msg)
 OpenFlow Experimenter message received. More...
 
virtual void handle_experimenter_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Experimenter message. More...
 
virtual void handle_role_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_role_reply &msg)
 OpenFlow Role-Reply message received. More...
 
virtual void handle_role_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Role-Reply message. More...
 
virtual void handle_get_async_config_reply (rofl::crofdpt &dpt, const rofl::cauxid &auxid, rofl::openflow::cofmsg_get_async_config_reply &msg)
 OpenFlow Get-Async-Config-Reply message received. More...
 
virtual void handle_get_async_config_reply_timeout (rofl::crofdpt &dpt, uint32_t xid)
 Timer expired while waiting for OpenFlow Get-Async-Config-Reply message. More...
 
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...
 
virtual 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...
 
void send_packet_in_message (const rofl::cauxid &auxid, uint32_t buffer_id, uint16_t total_len, uint8_t reason, uint8_t table_id, uint64_t cookie, uint16_t in_port, rofl::openflow::cofmatch &match, uint8_t *data, size_t datalen)
 Sends OpenFlow Packet-In message to controller entity. More...
 
void send_flow_removed_message (const rofl::cauxid &auxid, rofl::openflow::cofmatch &match, uint64_t cookie, uint16_t priority, uint8_t reason, uint8_t table_id, uint32_t duration_sec, uint32_t duration_nsec, uint16_t idle_timeout, uint16_t hard_timeout, uint64_t packet_count, uint64_t byte_count)
 Sends OpenFlow Flow-Removed message to controller entity. More...
 
void send_port_status_message (const rofl::cauxid &auxid, uint8_t reason, const rofl::openflow::cofport &port)
 Sends OpenFlow Port-Status message to controller entity. More...
 
- Protected Member Functions inherited from rofl::ciosrv
ctimer get_next_timer ()
 
virtual void handle_event (const rofl::cevent &event)
 Handler for event notifications using cevent instances. More...
 
virtual void handle_revent (int fd)
 Handler for read events on file descriptors. More...
 
virtual void handle_wevent (int fd)
 Handler for write events on file descriptors. More...
 
virtual void handle_xevent (int fd)
 Handler for exceptions on file descriptors. More...
 
void register_filedesc_r (int fd)
 Registers a file descriptor for read events. More...
 
void deregister_filedesc_r (int fd)
 Deregisters a file descriptor from read events. More...
 
void register_filedesc_w (int fd)
 Registers a file descriptor for write events. More...
 
void deregister_filedesc_w (int fd)
 Deregisters a file descriptor from write events. More...
 
const rofl::ctimeridregister_timer (int opaque, const rofl::ctimespec &timespec)
 Installs a new timer to fire in t seconds. More...
 
const rofl::ctimeridreset_timer (const rofl::ctimerid &timer_id, const rofl::ctimespec &timespec)
 Resets a running timer of type opaque. More...
 
ctimeridrestart_timer (rofl::ctimerid &timer_id, int opaque, const rofl::ctimespec &timespec)
 Resets an existing or creates a new timer. More...
 
bool pending_timer (const rofl::ctimerid &timer_id)
 Checks for a pending timer of type opaque. More...
 
void cancel_timer (const rofl::ctimerid &timer_id)
 Cancels a pending timer. More...
 
void cancel_all_timers ()
 Cancels all pending timers of this instance.
 
void cancel_all_events ()
 Cancels all pending events of this instance.
 
Event handlers for management notifications for controller entities

Overwrite any of these methods for receiving controller related event notifications.

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.

Event handlers for receiving datapath related event notifications.
Event handlers for OpenFlow message notifications received from datapath elements

Overwrite any of these methods for receiving messages from the attached datapath element. 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.

Detailed Description

A very simple controller for forwarding Ethernet flows.

A simple controller application capable of switching Ethernet frames in a flow-based manner.

Inheritance diagram for rofl::examples::ethswctld::cetherswitch:
rofl::crofbase rofl::ciosrv rofl::csocket_env rofl::crofconn_env rofl::ctransactions_env rofl::crofctl_env rofl::crofdpt_env rofl::ctimer_env

Member Function Documentation

int cetherswitch::run ( int  argc,
char **  argv 
)
static

Static main routine for class cetherswitch.

Runs main event loop. Does not return.

Parameters
argcnumber of arguments given to main function
argvarray of pointers to arguments given to main function

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