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

Class representing a remote controller entity. More...

#include <crofctl.h>

Classes

class  crofctl_find_by_ctlid
 

Public Member Functions

 crofctl (crofctl_env *env, const cctlid &ctlid, bool remove_on_channel_close, const rofl::openflow::cofhello_elem_versionbitmap &versionbitmap)
 crofctl constructor More...
 
virtual ~crofctl ()
 crofctl destructor More...
 
const rofl::cctlidget_ctlid () const
 Returns rofl-common's internal rofl::cctlid identifier for this instance. More...
 
std::string str () const
 
Methods for connection management

This is a group of methods for typical CRUD like operations on control connections for the OpenFlow control channel. You may create an arbitrary number of control connections to a controller entity. Control connections may be closed or reconnected.

std::list< rofl::cauxidget_conn_index () const
 Returns a list of connection identifiers of all existing control connections. More...
 
void connect (const rofl::cauxid &auxid, enum rofl::csocket::socket_type_t socket_type, const rofl::cparams &socket_params)
 Establishes a new control connection to a remote controller entity with the given control connection identifier. More...
 
void disconnect (const rofl::cauxid &auxid)
 Terminates an existing control connection with given identifier. More...
 
void add_connection (crofconn *conn)
 Add an existing rofl::crofconn instance created on heap to this object. More...
 
Methods related to control channel state
bool is_established () const
 Returns true, when the control handshake (HELLO) has been completed.
 
uint8_t get_version_negotiated () const
 Returns the OpenFlow protocol version used for this control connection. More...
 
const
rofl::openflow::cofhello_elem_versionbitmap
get_versions_available () const
 Returns the defined OpenFlow version bitmap for this instance. More...
 
bool remove_on_channel_termination () const
 Returns true, when this instance should be destroyed when its crofchan has closed.
 
rofl::caddress get_peer_addr (const rofl::cauxid &auxid) const
 Returns caddress of connected remote entity for given connection identifier. More...
 
Methods granting access to the controller entity's basic properties
rofl::openflow::cofroleset_role ()
 Returns a reference to the current role object of this controller entity.
 
const rofl::openflow::cofroleget_role () const
 Returns a const reference to the current role object of this controller entity.
 
bool is_slave () const
 Returns true, when the control entity is in role -slave-.
 
rofl::openflow::cofasync_configset_async_config ()
 Returns a reference to the current asynchronous event configuration of this controller entity.
 
const
rofl::openflow::cofasync_config
get_async_config () const
 Returns a const reference to the current asynchronous event configuration of this controller entity.
 
const
rofl::openflow::cofasync_config
get_async_config_role_default_template () const
 Returns a const reference to the default asynchronous event configuration for controller entities defined by OpenFlow.
 
Methods for sending OpenFlow messages

These methods may be called by a derived class for sending a specific OpenFlow message.

void send_features_reply (const rofl::cauxid &auxid, uint32_t xid, uint64_t dpid, uint32_t n_buffers, uint8_t n_tables, uint32_t capabilities, uint8_t of13_auxiliary_id=0, uint32_t of10_actions_bitmap=0, const rofl::openflow::cofports &ports=rofl::openflow::cofports())
 Sends OpenFlow Features-Reply message to attached controller entity. More...
 
void send_get_config_reply (const rofl::cauxid &auxid, uint32_t xid, uint16_t flags, uint16_t miss_send_len)
 Sends OpenFlow Get-Config-Reply message to attached controller entity. More...
 
void send_stats_reply (const rofl::cauxid &auxid, uint32_t xid, uint16_t stats_type, uint16_t stats_flags, uint8_t *body=NULL, size_t bodylen=0)
 Sends OpenFlow Stats-Reply message to attached controller entity. More...
 
void send_desc_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofdesc_stats_reply &desc_stats, uint16_t stats_flags=0)
 Sends OpenFlow Desc-Stats-Reply message to attached controller entity. More...
 
void send_flow_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofflowstatsarray &flow_stats, uint16_t stats_flags=0)
 Sends OpenFlow Flow-Stats-Reply message to attached controller entity. More...
 
void send_aggr_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofaggr_stats_reply &aggr_stats, uint16_t stats_flags=0)
 Sends OpenFlow Aggregate-Stats-Reply message to attached controller entity. More...
 
void send_table_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::coftablestatsarray &tablestatsarray, uint16_t stats_flags=0)
 Sends OpenFlow Table-Stats-Reply message to attached controller entity. More...
 
void send_port_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofportstatsarray &portstatsarray, uint16_t stats_flags=0)
 Sends OpenFlow Port-Stats-Reply message to attached controller entity. More...
 
void send_queue_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofqueuestatsarray &queuestatsarray, uint16_t stats_flags=0)
 Sends OpenFlow Queue-Stats-Reply message to attached controller entity. More...
 
void send_group_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofgroupstatsarray &groupstatsarray, uint16_t stats_flags=0)
 Sends OpenFlow Group-Stats-Reply message to attached controller entity. More...
 
void send_group_desc_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofgroupdescstatsarray &groupdescs, uint16_t stats_flags=0)
 Sends OpenFlow Group-Desc-Stats-Reply message to attached controller entity. More...
 
void send_group_features_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofgroup_features_stats_reply &group_features_stats, uint16_t stats_flags=0)
 Sends OpenFlow Group-Features-Stats-Reply message to attached controller entity. More...
 
void send_table_features_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::coftables &tables, uint16_t stats_flags=0)
 Sends OpenFlow Table-Features-Stats-Reply message to attached controller entity. More...
 
void send_port_desc_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofports &ports, uint16_t stats_flags=0)
 Sends OpenFlow Port-Desc-Stats-Reply message to attached controller entity. More...
 
void send_experimenter_stats_reply (const rofl::cauxid &auxid, uint32_t xid, uint32_t exp_id, uint32_t exp_type, const cmemory &body, uint16_t stats_flags=0)
 Sends OpenFlow Experimenter-Stats-Reply message to attached controller entity. More...
 
void send_meter_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofmeterstatsarray &meter_stats_array, uint16_t stats_flags=0)
 Sends OpenFlow Meter-Stats-Reply message to attached controller entity. More...
 
void send_meter_config_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofmeterconfigarray &meter_config_array, uint16_t stats_flags=0)
 Sends OpenFlow Meter-Config-Stats-Reply message to attached controller entity. More...
 
void send_meter_features_stats_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofmeter_features &meter_features, uint16_t stats_flags=0)
 Sends OpenFlow Meter-Features-Stats-Reply message to attached controller entity. 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, const rofl::openflow::cofmatch &match, uint8_t *data, size_t datalen)
 Sends OpenFlow Packet-In message to attached controller entity. More...
 
void send_barrier_reply (const rofl::cauxid &auxid, uint32_t xid)
 Sends OpenFlow Barrier-Reply message to attached controller entity. More...
 
void send_error_message (const rofl::cauxid &auxid, uint32_t xid, uint16_t type, uint16_t code, uint8_t *data=NULL, size_t datalen=0)
 Sends OpenFlow Error message to attached controller entity. More...
 
void send_experimenter_message (const rofl::cauxid &auxid, uint32_t xid, uint32_t experimenter_id, uint32_t exp_type, uint8_t *body=NULL, size_t bodylen=0)
 Sends OpenFlow Experimenter message to attached controller entity. More...
 
void send_flow_removed_message (const rofl::cauxid &auxid, const 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 attached 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 attached controller entity. More...
 
void send_queue_get_config_reply (const rofl::cauxid &auxid, uint32_t xid, uint32_t portno, const rofl::openflow::cofpacket_queues &queues)
 Sends OpenFlow Queue-Get-Config-Reply message to attached controller entity. More...
 
void send_role_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofrole &role)
 Sends OpenFlow Role-Reply message to attached controller entity. More...
 
void send_get_async_config_reply (const rofl::cauxid &auxid, uint32_t xid, const rofl::openflow::cofasync_config &async_config)
 Sends OpenFlow Get-Async-Config-Reply message to attached controller entity. More...
 
- Public Member Functions inherited from rofl::crofchan_env
 crofchan_env ()
 crofchan_env constructor
 
virtual ~crofchan_env ()
 crofchan_env destructor
 
- 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...
 

Static Public Member Functions

static rofl::crofctlget_ctl (const rofl::cctlid &ctlid)
 Returns reference to rofl::crofctl instance identified by rofl-common's internal identifier. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const crofctl &ctl)
 

Additional Inherited Members

- 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.
 

Detailed Description

Class representing a remote controller entity.

This class encapsulates properties of a single remote controller entity including the OpenFlow control channel, its role and the set of asynchronous event notifications to be sent to this controller. Its public API offers methods to manage the OpenFlow control channel, i.e. CRUD methods for individual control connections.

rofl::crofctl expects an instance of class rofl::crofctl_env as surrounding environment and sends various notifications via this interface. Class rofl::crofbase implements this interface and may be used as base class for advanced applications. However, you may implement rofl::crofctl_env directly as well.

Inheritance diagram for rofl::crofctl:
rofl::crofchan_env rofl::ctransactions_env rofl::ciosrv rofl::ctimer_env

Constructor & Destructor Documentation

rofl::crofctl::crofctl ( crofctl_env env,
const cctlid ctlid,
bool  remove_on_channel_close,
const rofl::openflow::cofhello_elem_versionbitmap versionbitmap 
)
inline

crofctl constructor

Parameters
envpointer to rofl::crofctl_env instance defining the environment for this object
ctlidrofl-common's internal identifier for this instance
remove_on_channel_closewhen set to true, this indicates to remove this object after the control channel has been terminated
versionbitmapOpenFlow version bitmap
virtual rofl::crofctl::~crofctl ( )
inlinevirtual

crofctl destructor

Closes all control connections and does a general clean-up.

Member Function Documentation

void rofl::crofctl::add_connection ( crofconn conn)
inline

Add an existing rofl::crofconn instance created on heap to this object.

This method is used for attaching an already existing rofl::crofconn instance to this rofl::crofctl instance. Do not call this method, unless you know what you are doing.

Parameters
connpointer to rofl::crofconn instance allocated on heap
void rofl::crofctl::connect ( const rofl::cauxid auxid,
enum rofl::csocket::socket_type_t  socket_type,
const rofl::cparams socket_params 
)
inline

Establishes a new control connection to a remote controller entity with the given control connection identifier.

An already existing control connection with the specified control connection identifier is replaced by this new control connection instance. You may select any arbitrary control connection identifier. However, care must be taken for the main connection (auxid: 0): (Re-)Connecting the main connection leads to an implicit termination of all existing control connections in OpenFlow.

Parameters
auxidcontrol connection identifier
socket_typeone of the socket types defined in rofl::csocket
socket_paramsa set of parameters for the selected socket type
void rofl::crofctl::disconnect ( const rofl::cauxid auxid)
inline

Terminates an existing control connection with given identifier.

When the main control connection (auxid: 0) is closed, this also terminates all other existing control connections.

Parameters
auxidcontrol connection identifier
std::list<rofl::cauxid> rofl::crofctl::get_conn_index ( ) const
inline

Returns a list of connection identifiers of all existing control connections.

The list contains all connections independent from their current status.

Returns
list of connection identifiers
crofctl & crofctl::get_ctl ( const rofl::cctlid ctlid)
static

Returns reference to rofl::crofctl instance identified by rofl-common's internal identifier.

Parameters
ctlidrofl-common's internal datapath identifier
Exceptions
eRofCtlNotFoundwhen no object matches the controller identifier
Returns
reference to rofl::crofctl instance for given identifier
const rofl::cctlid& rofl::crofctl::get_ctlid ( ) const
inline

Returns rofl-common's internal rofl::cctlid identifier for this instance.

Returns
internal controller entity identifier
rofl::caddress rofl::crofctl::get_peer_addr ( const rofl::cauxid auxid) const
inline

Returns caddress of connected remote entity for given connection identifier.

Returns
caddress object obtained from this->socket
uint8_t rofl::crofctl::get_version_negotiated ( ) const
inline

Returns the OpenFlow protocol version used for this control connection.

Returns
OpenFlow version used for this control connection
const rofl::openflow::cofhello_elem_versionbitmap& rofl::crofctl::get_versions_available ( ) const
inline

Returns the defined OpenFlow version bitmap for this instance.

Returns
OpenFlow version bitmap
void crofctl::send_aggr_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofaggr_stats_reply aggr_stats,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Aggregate-Stats-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
aggr_statsaggr_stats body
moreflag if multiple STATS replies will be sent
void crofctl::send_barrier_reply ( const rofl::cauxid auxid,
uint32_t  xid 
)

Sends OpenFlow Barrier-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
void crofctl::send_desc_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofdesc_stats_reply desc_stats,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Desc-Stats-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
desc_statsbody of DESC-STATS.reply
moreflag if multiple STATS replies will be sent
void crofctl::send_error_message ( const rofl::cauxid auxid,
uint32_t  xid,
uint16_t  type,
uint16_t  code,
uint8_t *  data = NULL,
size_t  datalen = 0 
)

Sends OpenFlow Error message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
typeone of OpenFlow's OFPET_* flags
codeone of OpenFlow's error codes
datafirst (at least 64) bytes of failed request
datalenlength of failed request appended to error message
void crofctl::send_experimenter_message ( const rofl::cauxid auxid,
uint32_t  xid,
uint32_t  experimenter_id,
uint32_t  exp_type,
uint8_t *  body = NULL,
size_t  bodylen = 0 
)

Sends OpenFlow Experimenter message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
experimenter_idexp_id as assigned by ONF
exp_typeexp_type as defined by the ONF member
bodypointer to opaque experimenter message body (optional)
bodylenlength of body (optional)
Returns
transaction ID assigned to this request
void crofctl::send_experimenter_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
uint32_t  exp_id,
uint32_t  exp_type,
const cmemory body,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Experimenter-Stats-Reply message to attached controller entity.

Parameters
auxidauxiliary connection id
xidOpenFlow transaction identifier
exp_idexperimenter ID
exp_typeuser defined type
bodystart of user defined body
bodylenlength of user defined body
moreflag if multiple STATS replies will be sent
void crofctl::send_features_reply ( const rofl::cauxid auxid,
uint32_t  xid,
uint64_t  dpid,
uint32_t  n_buffers,
uint8_t  n_tables,
uint32_t  capabilities,
uint8_t  of13_auxiliary_id = 0,
uint32_t  of10_actions_bitmap = 0,
const rofl::openflow::cofports ports = rofl::openflow::cofports() 
)

Sends OpenFlow Features-Reply message to attached controller entity.

Parameters
auxidcontroller connection identifier
xidOpenFlow transaction identifier
dpidOpenFlow datapath identifier
n_buffersnumber of buffers available in this datapath element's I/O subsystem
n_tablesnumber of tables available in this datapath element's pipeline
capabilitiesOpenFlow capabilities
of13_auxiliary_idcontrol connection identifier since OpenFlow 1.3
of10_actions_bitmapset of available actions for OpenFlow 1.0 only
portsOpenFlow list of ports
Exceptions
rofl::eRofBaseNotConnected
rofl::eRofBaseCongested
void crofctl::send_flow_removed_message ( const rofl::cauxid auxid,
const 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 attached controller entity.

Parameters
matchmatch structure defined in FlowMod entry
cookiecookie defined in FlowMod entry
prioritypriority level defined in FlowMOd entry
reasonone of OpenFlow's OFPRR_* constants
table_idID of table from which the FlowMod entry was removed
duration_sectime flow was alive in seconds
duration_nsectime flow was alive in nanoseconds beyond duration_sec
idle_timeoutidle timeout from original flow mod
idle_timeouthard timeout from original flow mod
packet_countnumber of packets handled by this flow mod
byte_countnumber of bytes handled by this flow mod
void crofctl::send_flow_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofflowstatsarray flow_stats,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Flow-Stats-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
flow_statsarray of flow_stats bodies
moreflag if multiple STATS replies will be sent
void crofctl::send_get_async_config_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofasync_config async_config 
)

Sends OpenFlow Get-Async-Config-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
void crofctl::send_get_config_reply ( const rofl::cauxid auxid,
uint32_t  xid,
uint16_t  flags,
uint16_t  miss_send_len 
)

Sends OpenFlow Get-Config-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
flagsdatapath element flags
miss_send_lendefault miss_send_len value
void crofctl::send_group_desc_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofgroupdescstatsarray groupdescs,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Group-Desc-Stats-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
group_desc_statsarray of group_desc_stats bodies
moreflag if multiple STATS replies will be sent
void crofctl::send_group_features_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofgroup_features_stats_reply group_features_stats,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Group-Features-Stats-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
group_features_statsgroup_features_stats body
moreflag if multiple STATS replies will be sent
void crofctl::send_group_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofgroupstatsarray groupstatsarray,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Group-Stats-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
group_statsarray of group_stats bodies
moreflag if multiple STATS replies will be sent
void crofctl::send_meter_config_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofmeterconfigarray meter_config_array,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Meter-Config-Stats-Reply message to attached controller entity.

Parameters
auxidauxiliary connection id
xidOpenFlow transaction identifier
meter_config_arrayinstance of type cofmeterconfigarray
stats_flagsflags for OpenFlow statistics messages, if any (default: 0)
void crofctl::send_meter_features_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofmeter_features meter_features,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Meter-Features-Stats-Reply message to attached controller entity.

Parameters
auxidauxiliary connection id
xidOpenFlow transaction identifier
meter_config_arrayinstance of type cofmeterfeatures
stats_flagsflags for OpenFlow statistics messages, if any (default: 0)
void crofctl::send_meter_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofmeterstatsarray meter_stats_array,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Meter-Stats-Reply message to attached controller entity.

Parameters
auxidauxiliary connection id
xidOpenFlow transaction identifier
meter_stats_arrayinstance of type cofmeterstatsarray
stats_flagsflags for OpenFlow statistics messages, if any (default: 0)
void crofctl::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,
const rofl::openflow::cofmatch match,
uint8_t *  data,
size_t  datalen 
)

Sends OpenFlow Packet-In message to attached controller entity.

Parameters
buffer_idbuffer ID assigned by data path
total_lenFull length of frame
reasonreason packet is being sent (one of OFPR_* flags)
table_idID of table that generated the PACKET-IN event
cookiecookie of FlowMod entry that generated the PACKET-IN event
in_portport on which frame was received
matchmatch structure generated by data path element for data packet
datadata packet
datalenlength of data packet
void crofctl::send_port_desc_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofports ports,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Port-Desc-Stats-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
portsports body
moreflag if multiple STATS replies will be sent
void crofctl::send_port_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofportstatsarray portstatsarray,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Port-Stats-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
port_statsarray of port_stats bodies
moreflag if multiple STATS replies will be sent
void crofctl::send_port_status_message ( const rofl::cauxid auxid,
uint8_t  reason,
const rofl::openflow::cofport port 
)

Sends OpenFlow Port-Status message to attached controller entity.

Parameters
reasonone of OpenFlow's OFPPR_* constants
portrofl::openflow::cofport instance that changed its status
void crofctl::send_queue_get_config_reply ( const rofl::cauxid auxid,
uint32_t  xid,
uint32_t  portno,
const rofl::openflow::cofpacket_queues queues 
)

Sends OpenFlow Queue-Get-Config-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
portnoOpenFlow number assigned to port
void crofctl::send_queue_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofqueuestatsarray queuestatsarray,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Queue-Stats-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
port_statsarray of port_stats bodies
moreflag if multiple STATS replies will be sent
void crofctl::send_role_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::cofrole role 
)

Sends OpenFlow Role-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
roledefined role from data path
generation_idgen_id as defined by OpenFlow
void crofctl::send_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
uint16_t  stats_type,
uint16_t  stats_flags,
uint8_t *  body = NULL,
size_t  bodylen = 0 
)

Sends OpenFlow Stats-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
stats_typeone of the OFPST_* constants
bodybody of a STATS.reply
bodylenlength of STATS.reply body
moreflag if multiple STATS.reply messages will be sent
void crofctl::send_table_features_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::coftables tables,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Table-Features-Stats-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
tablestables body
moreflag if multiple STATS replies will be sent
void crofctl::send_table_stats_reply ( const rofl::cauxid auxid,
uint32_t  xid,
const rofl::openflow::coftablestatsarray tablestatsarray,
uint16_t  stats_flags = 0 
)

Sends OpenFlow Table-Stats-Reply message to attached controller entity.

Parameters
xidOpenFlow transaction identifier
table_statsarray of table_stats bodies
moreflag if multiple STATS replies will be sent

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