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

Stores an active flow entry. More...

#include <cflowentry.h>

Public Member Functions

 cflowentry (cflowentry_env *flowenv, const rofl::cdptid &dptid, const rofl::caddress_ll &src, const rofl::caddress_ll &dst, uint32_t port_no)
 cflowentry constructor More...
 
virtual ~cflowentry ()
 cflowentry destructor
 
Access to class parameters
uint32_t get_out_port_no () const
 Returns outgoing port number stored for this flow. More...
 
void set_out_port_no (uint32_t out_port_no)
 Update port number stored for this flow. More...
 
const rofl::caddress_llget_dst () const
 Returns ethernet hardware address identifying the destination host. More...
 
const rofl::caddress_llget_src () const
 Returns ethernet hardware address identifying the source host. More...
 
- 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...
 

Friends

std::ostream & operator<< (std::ostream &os, const cflowentry &entry)
 Output operator.
 

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

Stores an active flow entry.

This class stores and controls an active flow entry on the attached datapath element. A flow entry is unidirectional and consists of a source and a destination host identified by their respective ethernet hardware addresses. The installed flow entry on the datapath element forwards frames via the specified outgoing port. Class cflowentry_env defines the environment expected by an instance of class cflowentry. A flow entry is a soft-state entity and installs a timer upon creation

See Also
cflowentry_env
Inheritance diagram for rofl::examples::ethswctld::cflowentry:
rofl::ciosrv rofl::ctimer_env

Constructor & Destructor Documentation

cflowentry::cflowentry ( cflowentry_env flowenv,
const rofl::cdptid dptid,
const rofl::caddress_ll src,
const rofl::caddress_ll dst,
uint32_t  port_no 
)

cflowentry constructor

Parameters
envenvironment for this cflowentry instance
dptidrofl-common's internal datapath handle
srcethernet hardware address used by source station
dstethernet hardware address used by destination station
port_noOpenFlow port number of port pointing towards the station

Member Function Documentation

const rofl::caddress_ll& rofl::examples::ethswctld::cflowentry::get_dst ( ) const
inline

Returns ethernet hardware address identifying the destination host.

Returns
host ethernet hardware address of destination host
uint32_t rofl::examples::ethswctld::cflowentry::get_out_port_no ( ) const
inline

Returns outgoing port number stored for this flow.

Returns
OpenFlow port number of port pointing towards destination
const rofl::caddress_ll& rofl::examples::ethswctld::cflowentry::get_src ( ) const
inline

Returns ethernet hardware address identifying the source host.

Returns
host ethernet hardware address of source host
void cflowentry::set_out_port_no ( uint32_t  out_port_no)

Update port number stored for this flow.

Parameters
port_nonew OpenFlow port number of port pointing towards destination

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