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

Forwarding Information Base. More...

#include <cfibtable.h>

Public Member Functions

Methods for CRUD operations on FIB entries
void clear ()
 Deletes all entries stored in this cfibtable instance.
 
cfibentryadd_fib_entry (const rofl::caddress_ll &hwaddr, uint32_t portno)
 Returns reference to empty cfibentry instance for given hardware address. More...
 
cfibentryset_fib_entry (const rofl::caddress_ll &hwaddr, uint32_t portno)
 Returns reference to existing cfibentry instance for given hardware address. More...
 
cfibentryset_fib_entry (const rofl::caddress_ll &hwaddr)
 Returns reference to existing cfibentry instance for given hardware address. More...
 
const cfibentryget_fib_entry (const rofl::caddress_ll &hwaddr) const
 Returns const reference to existing cfibentry instance for given hardware address. More...
 
void drop_fib_entry (const rofl::caddress_ll &hwaddr)
 Removes an existing cfibentry for given hardware address. More...
 
bool has_fib_entry (const rofl::caddress_ll &hwaddr) const
 Checks whether a cfibentry exists for given hardware address. More...
 
- Public Member Functions inherited from rofl::examples::ethswctld::cfibentry_env
virtual ~cfibentry_env ()
 cfibentry_env destructor
 

Static Public Member Functions

Methods for managing Forwarding Information Bases
static cfibtableadd_fib (const rofl::cdptid &dptid)
 Returns reference to new or existing and resetted cfibtable instance. More...
 
static cfibtableset_fib (const rofl::cdptid &dptid)
 Returns reference to existing cfibtable instance or creates a new empty one. More...
 
static const cfibtableget_fib (const rofl::cdptid &dptid)
 Returns const reference to existing cfibtable instance or throws exception. More...
 
static void drop_fib (const rofl::cdptid &dptid)
 Removes an existing cfibtable instance. More...
 
static bool has_fib (const rofl::cdptid &dptid)
 Checks existence of cfibtable for given identifier. More...
 

Friends

std::ostream & operator<< (std::ostream &os, cfibtable const &fib)
 

Additional Inherited Members

Detailed Description

Forwarding Information Base.

This class stores all active mappings between a host ethernet address and its associated port on the switch for reaching this host on a given datapath element. Class cfibentry defines the container for an active FIB entry. Class cfibtable defines two groups of methods:

  1. Static methods on CRUD operations for instances of class cfibtable
  2. Methods on CRUD operations for instances of class cfibentry in a cfibtable instance
See Also
cfibentry
cfibentry_env
Inheritance diagram for rofl::examples::ethswctld::cfibtable:
rofl::examples::ethswctld::cfibentry_env

Member Function Documentation

static cfibtable& rofl::examples::ethswctld::cfibtable::add_fib ( const rofl::cdptid dptid)
inlinestatic

Returns reference to new or existing and resetted cfibtable instance.

This method creates a new or resets an existing instance of class cfibtable for the given datapath handle.

Parameters
dptidrofl-common's internal handle for datapath element
cfibentry& rofl::examples::ethswctld::cfibtable::add_fib_entry ( const rofl::caddress_ll hwaddr,
uint32_t  portno 
)
inline

Returns reference to empty cfibentry instance for given hardware address.

Creates a new cfibentry instance or resets an already existing one for the given identifier.

Parameters
hwaddrethernet hardware address
portnohost is reachable via port using this OpenFlow port number
Exceptions
eFibInvalhardware address validation failed
static void rofl::examples::ethswctld::cfibtable::drop_fib ( const rofl::cdptid dptid)
inlinestatic

Removes an existing cfibtable instance.

Parameters
dptidrofl-common's internal handle for datapath element
void rofl::examples::ethswctld::cfibtable::drop_fib_entry ( const rofl::caddress_ll hwaddr)
inline

Removes an existing cfibentry for given hardware address.

Parameters
hwaddrethernet hardware address
static const cfibtable& rofl::examples::ethswctld::cfibtable::get_fib ( const rofl::cdptid dptid)
inlinestatic

Returns const reference to existing cfibtable instance or throws exception.

This method returns a const reference to an existing cfibtable instance. If no instance for the given identifier is found, an exception of type eFibNotFound is thrown.

Parameters
dptidrofl-common's internal handle for datapath element
Exceptions
eFibNotFound
const cfibentry& rofl::examples::ethswctld::cfibtable::get_fib_entry ( const rofl::caddress_ll hwaddr) const
inline

Returns const reference to existing cfibentry instance for given hardware address.

Returns const reference to existing cfibentry for given identifier or throw exception, if none exists.

Parameters
hwaddrethernet hardware address
Exceptions
eFibInvalhardware address validation failed
eFibNotFoundno cfibentry for hardware address found
static bool rofl::examples::ethswctld::cfibtable::has_fib ( const rofl::cdptid dptid)
inlinestatic

Checks existence of cfibtable for given identifier.

Parameters
dptidrofl-common's internal handle for datapath element
bool rofl::examples::ethswctld::cfibtable::has_fib_entry ( const rofl::caddress_ll hwaddr) const
inline

Checks whether a cfibentry exists for given hardware address.

Parameters
hwaddrethernet hardware address
static cfibtable& rofl::examples::ethswctld::cfibtable::set_fib ( const rofl::cdptid dptid)
inlinestatic

Returns reference to existing cfibtable instance or creates a new empty one.

This method returns a reference to an existing cfibtable instance. If no instance for the given identifier is found, a new instance is created.

Parameters
dptidrofl-common's internal handle for datapath element
cfibentry& rofl::examples::ethswctld::cfibtable::set_fib_entry ( const rofl::caddress_ll hwaddr,
uint32_t  portno 
)
inline

Returns reference to existing cfibentry instance for given hardware address.

Returns reference to existing cfibentry for given identifier or creates new one if non exists yet.

Parameters
hwaddrethernet hardware address
portnohost is reachable via port using this OpenFlow port number
Exceptions
eFibInvalhardware address validation failed
cfibentry& rofl::examples::ethswctld::cfibtable::set_fib_entry ( const rofl::caddress_ll hwaddr)
inline

Returns reference to existing cfibentry instance for given hardware address.

Returns reference to existing cfibentry for given identifier or throw exception, if none exists.

Parameters
hwaddrethernet hardware address
Exceptions
eFibInvalhardware address validation failed
eFibNotFoundno cfibentry for hardware address found

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