xorp

FeaDataPlaneManager Class Reference

FEA data plane manager base class. More...

#include <fea_data_plane_manager.hh>

Inheritance diagram for FeaDataPlaneManager:
FeaDataPlaneManagerDummy FeaDataPlaneManagerLinux FeaDataPlaneManagerWindows

List of all members.

Public Member Functions

 FeaDataPlaneManager (FeaNode &fea_node, const string &manager_name)
 Constructor.
virtual ~FeaDataPlaneManager ()
 Virtual destructor.
const string & manager_name () const
 Get the data plane manager name.
virtual int start_manager (string &error_msg)
 Start data plane manager operation.
virtual int stop_manager (string &error_msg)
 Stop data plane manager operation.
virtual int load_plugins (string &error_msg)=0
 Load the plugins.
virtual int unload_plugins (string &error_msg)
 Unload the plugins.
virtual int register_plugins (string &error_msg)=0
 Register the plugins.
virtual int unregister_plugins (string &error_msg)
 Unregister the plugins.
virtual int start_plugins (string &error_msg)
 Start plugins operation.
virtual int stop_plugins (string &error_msg)
 Stop plugins operation.
EventLoopeventloop ()
 Get the event loop this instance is added to.
virtual bool have_ipv4 () const
 Return true if the underlying system supports IPv4.
virtual bool have_ipv6 () const
 Return true if the underlying system supports IPv6.
IfConfigifconfig ()
 Get the IfConfig instance.
FirewallManagerfirewall_manager ()
 Get the FirewallManager instance.
FirewallGetfirewall_get ()
 Get the FirewallGet plugin.
FirewallSetfirewall_set ()
 Get the FirewallSet plugin.
FibConfigfibconfig ()
 Get the FibConfig instance.
IoLinkManagerio_link_manager ()
 Get the IoLinkManager instance.
IoIpManagerio_ip_manager ()
 Get the IoIpManager instance.
IoTcpUdpManagerio_tcpudp_manager ()
 Get the IoTcpUdpManager instance.
IfConfigPropertyifconfig_property ()
 Get the IfConfigProperty plugin.
IfConfigGetifconfig_get ()
 Get the IfConfigGet plugin.
IfConfigSetifconfig_set ()
 Get the IfConfigSet plugin.
IfConfigObserverifconfig_observer ()
 Get the IfConfigObserver plugin.
IfConfigVlanGetifconfig_vlan_get ()
 Get the IfConfigVlanGet plugin.
IfConfigVlanSetifconfig_vlan_set ()
 Get the IfConfigVlanSet plugin.
FibConfigForwardingfibconfig_forwarding ()
 Get the FibConfigForwarding plugin.
FibConfigEntryGetfibconfig_entry_get ()
 Get the FibConfigEntryGet plugin.
FibConfigEntrySetfibconfig_entry_set ()
 Get the FibConfigEntrySet plugin.
FibConfigEntryObserverfibconfig_entry_observer ()
 Get the FibConfigEntryObserver plugin.
FibConfigTableGetfibconfig_table_get ()
 Get the FibConfigTableGet plugin.
FibConfigTableSetfibconfig_table_set ()
 Get the FibConfigTableSet plugin.
FibConfigTableObserverfibconfig_table_observer ()
 Get the FibConfigTableObserver plugin.
virtual IoLinkallocate_io_link (const IfTree &iftree, const string &if_name, const string &vif_name, uint16_t ether_type, const string &filter_program)=0
 Allocate IoLink plugin instance.
virtual void deallocate_io_link (IoLink *io_link)
 De-allocate IoLink plugin.
virtual IoIpallocate_io_ip (const IfTree &iftree, int family, uint8_t ip_protocol)=0
 Allocate IoIp plugin instance.
virtual void deallocate_io_ip (IoIp *io_ip)
 De-allocate IoIp plugin.
virtual IoTcpUdpallocate_io_tcpudp (const IfTree &iftree, int family, bool is_tcp)=0
 Allocate IoTcpUdp plugin instance.
virtual void deallocate_io_tcpudp (IoTcpUdp *io_tcpudp)
 De-allocate IoTcpUdp plugin.

Protected Member Functions

int register_all_plugins (bool is_exclusive, string &error_msg)
 Register all plugins.
int stop_all_plugins (string &error_msg)
 Stop all plugins operation.

Protected Attributes

FeaNode_fea_node
IfConfigProperty_ifconfig_property
IfConfigGet_ifconfig_get
IfConfigSet_ifconfig_set
IfConfigObserver_ifconfig_observer
IfConfigVlanGet_ifconfig_vlan_get
IfConfigVlanSet_ifconfig_vlan_set
FirewallGet_firewall_get
FirewallSet_firewall_set
FibConfigForwarding_fibconfig_forwarding
FibConfigEntryGet_fibconfig_entry_get
FibConfigEntrySet_fibconfig_entry_set
FibConfigEntryObserver_fibconfig_entry_observer
FibConfigTableGet_fibconfig_table_get
FibConfigTableSet_fibconfig_table_set
FibConfigTableObserver_fibconfig_table_observer
list< IoLink * > _io_link_list
list< IoIp * > _io_ip_list
list< IoTcpUdp * > _io_tcpudp_list
const string _manager_name
bool _is_loaded_plugins
bool _is_running_manager
bool _is_running_plugins

Detailed Description

FEA data plane manager base class.


Constructor & Destructor Documentation

FeaDataPlaneManager::FeaDataPlaneManager ( FeaNode fea_node,
const string &  manager_name 
)

Constructor.

Parameters:
fea_nodethe FeaNode this manager belongs to.
manager_namethe data plane manager name.

Member Function Documentation

virtual IoIp* FeaDataPlaneManager::allocate_io_ip ( const IfTree iftree,
int  family,
uint8_t  ip_protocol 
) [pure virtual]

Allocate IoIp plugin instance.

Parameters:
iftreethe interface tree to use.
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
ip_protocolthe IP protocol number (IPPROTO_*).
Returns:
a new instance of IoIp plugin on success, otherwise NULL.

Implemented in FeaDataPlaneManagerDummy, FeaDataPlaneManagerLinux, and FeaDataPlaneManagerWindows.

virtual IoLink* FeaDataPlaneManager::allocate_io_link ( const IfTree iftree,
const string &  if_name,
const string &  vif_name,
uint16_t  ether_type,
const string &  filter_program 
) [pure virtual]

Allocate IoLink plugin instance.

Parameters:
iftreethe interface tree to use.
if_namethe interface name.
vif_namethe vif name.
ether_typethe EtherType protocol number. If it is 0 then it is unused.
filter_programthe option filter program to be applied on the received packets. The program uses tcpdump(1) style expression.
Returns:
a new instance of IoLink plugin on success, otherwise NULL.

Implemented in FeaDataPlaneManagerDummy, FeaDataPlaneManagerLinux, and FeaDataPlaneManagerWindows.

virtual IoTcpUdp* FeaDataPlaneManager::allocate_io_tcpudp ( const IfTree iftree,
int  family,
bool  is_tcp 
) [pure virtual]

Allocate IoTcpUdp plugin instance.

Parameters:
iftreethe interface tree to use.
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
is_tcpif true allocate a TCP entry, otherwise UDP.
Returns:
a new instance of IoTcpUdp plugin on success, otherwise NULL.

Implemented in FeaDataPlaneManagerDummy, FeaDataPlaneManagerLinux, and FeaDataPlaneManagerWindows.

void FeaDataPlaneManager::deallocate_io_ip ( IoIp io_ip) [virtual]

De-allocate IoIp plugin.

Parameters:
io_ipthe IoIp plugin to deallocate.
void FeaDataPlaneManager::deallocate_io_link ( IoLink io_link) [virtual]

De-allocate IoLink plugin.

Parameters:
io_linkthe IoLink plugin to deallocate.
void FeaDataPlaneManager::deallocate_io_tcpudp ( IoTcpUdp io_tcpudp) [virtual]

De-allocate IoTcpUdp plugin.

Parameters:
io_tcpudpthe IoTcpUdp plugin to deallocate.
EventLoop & FeaDataPlaneManager::eventloop ( )

Get the event loop this instance is added to.

Returns:
the event loop this instance is added to.
FibConfig & FeaDataPlaneManager::fibconfig ( )

Get the FibConfig instance.

Returns:
the FibConfig instance.
FibConfigEntryGet* FeaDataPlaneManager::fibconfig_entry_get ( ) [inline]

Get the FibConfigEntryGet plugin.

Returns:
the FibConfigEntryGet plugin.
FibConfigEntryObserver* FeaDataPlaneManager::fibconfig_entry_observer ( ) [inline]
FibConfigEntrySet* FeaDataPlaneManager::fibconfig_entry_set ( ) [inline]

Get the FibConfigEntrySet plugin.

Returns:
the FibConfigEntrySet plugin.
FibConfigForwarding* FeaDataPlaneManager::fibconfig_forwarding ( ) [inline]

Get the FibConfigForwarding plugin.

Returns:
the FibConfigForwarding plugin.
FibConfigTableGet* FeaDataPlaneManager::fibconfig_table_get ( ) [inline]

Get the FibConfigTableGet plugin.

Returns:
the FibConfigEntryGet plugin.
FibConfigTableObserver* FeaDataPlaneManager::fibconfig_table_observer ( ) [inline]
FibConfigTableSet* FeaDataPlaneManager::fibconfig_table_set ( ) [inline]

Get the FibConfigTableSet plugin.

Returns:
the FibConfigEntryGet plugin.
FirewallGet* FeaDataPlaneManager::firewall_get ( ) [inline]

Get the FirewallGet plugin.

Returns:
the FirewallGet plugin.
FirewallManager & FeaDataPlaneManager::firewall_manager ( )

Get the FirewallManager instance.

Returns:
the FirewallManager instance.
FirewallSet* FeaDataPlaneManager::firewall_set ( ) [inline]

Get the FirewallSet plugin.

Returns:
the FirewallSet plugin.
bool FeaDataPlaneManager::have_ipv4 ( ) const [virtual]

Return true if the underlying system supports IPv4.

Returns:
true if the underlying system supports IPv4, otherwise false.
bool FeaDataPlaneManager::have_ipv6 ( ) const [virtual]

Return true if the underlying system supports IPv6.

Returns:
true if the underlying system supports IPv6, otherwise false.
IfConfig & FeaDataPlaneManager::ifconfig ( )

Get the IfConfig instance.

Returns:
the IfConfig instance.
IfConfigGet* FeaDataPlaneManager::ifconfig_get ( ) [inline]

Get the IfConfigGet plugin.

Returns:
the IfConfigGet plugin.
IfConfigObserver* FeaDataPlaneManager::ifconfig_observer ( ) [inline]

Get the IfConfigObserver plugin.

Returns:
the IfConfigObserver plugin.
IfConfigProperty* FeaDataPlaneManager::ifconfig_property ( ) [inline]

Get the IfConfigProperty plugin.

Returns:
the IfConfigGet plugin.
IfConfigSet* FeaDataPlaneManager::ifconfig_set ( ) [inline]

Get the IfConfigSet plugin.

Returns:
the IfConfigSet plugin.
IfConfigVlanGet* FeaDataPlaneManager::ifconfig_vlan_get ( ) [inline]

Get the IfConfigVlanGet plugin.

Returns:
the IfConfigVlanGet plugin.
IfConfigVlanSet* FeaDataPlaneManager::ifconfig_vlan_set ( ) [inline]

Get the IfConfigVlanSet plugin.

Returns:
the IfConfigVlanSet plugin.
IoIpManager & FeaDataPlaneManager::io_ip_manager ( )

Get the IoIpManager instance.

Returns:
the IoIpManager instance.
IoLinkManager & FeaDataPlaneManager::io_link_manager ( )

Get the IoLinkManager instance.

Returns:
the IoLinkManager instance.
IoTcpUdpManager & FeaDataPlaneManager::io_tcpudp_manager ( )

Get the IoTcpUdpManager instance.

Returns:
the IoTcpUdpManager instance.
virtual int FeaDataPlaneManager::load_plugins ( string &  error_msg) [pure virtual]

Load the plugins.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in FeaDataPlaneManagerDummy, FeaDataPlaneManagerLinux, and FeaDataPlaneManagerWindows.

const string& FeaDataPlaneManager::manager_name ( ) const [inline]

Get the data plane manager name.

Returns:
the data plane name.
int FeaDataPlaneManager::register_all_plugins ( bool  is_exclusive,
string &  error_msg 
) [protected]

Register all plugins.

Parameters:
is_exclusiveif true, the plugins are registered as the exclusive plugins, otherwise are added to the lists of plugins.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
virtual int FeaDataPlaneManager::register_plugins ( string &  error_msg) [pure virtual]

Register the plugins.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in FeaDataPlaneManagerDummy, FeaDataPlaneManagerLinux, and FeaDataPlaneManagerWindows.

int FeaDataPlaneManager::start_manager ( string &  error_msg) [virtual]

Start data plane manager operation.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented in FeaDataPlaneManagerWindows.

int FeaDataPlaneManager::start_plugins ( string &  error_msg) [virtual]

Start plugins operation.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
int FeaDataPlaneManager::stop_all_plugins ( string &  error_msg) [protected]

Stop all plugins operation.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
int FeaDataPlaneManager::stop_manager ( string &  error_msg) [virtual]

Stop data plane manager operation.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
int FeaDataPlaneManager::stop_plugins ( string &  error_msg) [virtual]

Stop plugins operation.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
int FeaDataPlaneManager::unload_plugins ( string &  error_msg) [virtual]

Unload the plugins.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented in FeaDataPlaneManagerLinux.

int FeaDataPlaneManager::unregister_plugins ( string &  error_msg) [virtual]

Unregister the plugins.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations