Stores a FIB entry mapping host hwaddr to switch port number. More...
#include <cfibentry.h>
Public Member Functions | |
| cfibentry (cfibentry_env *env, const rofl::cdptid &dptid, const rofl::caddress_ll &hwaddr, uint32_t port_no) | |
| cfibentry constructor More... | |
| virtual | ~cfibentry () |
| cfibentry destructor | |
Access to class parameters | |
| uint32_t | get_port_no () const |
| Returns port number stored for this host. More... | |
| void | set_port_no (uint32_t port_no) |
| Update port number stored for this host. More... | |
| const rofl::caddress_ll & | get_hwaddr () const |
| Returns ethernet hardware address identifying this 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. | |
| ciosrv & | operator= (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, cfibentry const &entry) |
| output operator for class cfibentry | |
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::ctimerid & | register_timer (int opaque, const rofl::ctimespec ×pec) |
| Installs a new timer to fire in t seconds. More... | |
| const rofl::ctimerid & | reset_timer (const rofl::ctimerid &timer_id, const rofl::ctimespec ×pec) |
| Resets a running timer of type opaque. More... | |
| ctimerid & | restart_timer (rofl::ctimerid &timer_id, int opaque, const rofl::ctimespec ×pec) |
| 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. | |
Stores a FIB entry mapping host hwaddr to switch port number.
This class stores an entry for a Forwarding Information Base (FIB) and stores a single mapping between a host hardware address used for ethernet based communication and the physical port on the datapath element pointing towards this station. An entry is a soft-state entity running a timer of length 60 seconds. Once expired, a notification method is called in cfibentry's environment to indicate that is entry has become stale. For timer support, cfibentry derives from class rofl::ciosrv.
| cfibentry::cfibentry | ( | cfibentry_env * | env, |
| const rofl::cdptid & | dptid, | ||
| const rofl::caddress_ll & | hwaddr, | ||
| uint32_t | port_no | ||
| ) |
cfibentry constructor
| env | environment for this cfibentry instance |
| dptid | rofl-common's internal datapath handle |
| hwaddr | ethernet hardware address used by station |
| port_no | OpenFlow port number of port pointing towards the station |
|
inline |
Returns ethernet hardware address identifying this host.
|
inline |
Returns port number stored for this host.
| void cfibentry::set_port_no | ( | uint32_t | port_no | ) |
Update port number stored for this host.
| port_no | new OpenFlow port number of port pointing towards station |
1.8.6