xorp

VifManager Class Reference

VifManager keeps track of the VIFs currently enabled in the FEA. More...

#include <vifmanager.hh>

Inheritance diagram for VifManager:
IfMgrHintObserver ServiceChangeObserverBase ProtoState ServiceBase BugCatcher

List of all members.

Public Member Functions

 VifManager (XrlRouter &xrl_router, EventLoop &eventloop, RibManager *rib_manager, const string &fea_target)
 VifManager constructor.
 ~VifManager ()
 VifManager destructor.
int start ()
 Start operation.
int stop ()
 Stop operation.
int final_start ()
 Completely start the node operation.
int final_stop ()
 Completely stop the node operation.

Protected Member Functions

void tree_complete ()
void updates_made ()
void incr_startup_requests_n ()
void decr_startup_requests_n ()
void incr_shutdown_requests_n ()
void decr_shutdown_requests_n ()
void update_status ()

Private Member Functions

void status_change (ServiceBase *service, ServiceStatus old_status, ServiceStatus new_status)
 A method invoked when the status of a service changes.
const ServiceBaseifmgr_mirror_service_base () const
 Get a reference to the service base of the interface manager.
const IfMgrIfTreeifmgr_iftree () const
 Get a reference to the interface manager tree.
int ifmgr_startup ()
 Initiate startup of the interface manager.
int ifmgr_shutdown ()
 Initiate shutdown of the interface manager.

Private Attributes

XrlRouter_xrl_router
EventLoop_eventloop
RibManager_rib_manager
IfMgrXrlMirror _ifmgr
IfMgrIfTree _iftree
IfMgrIfTree _old_iftree
size_t _startup_requests_n
size_t _shutdown_requests_n

Detailed Description

VifManager keeps track of the VIFs currently enabled in the FEA.

The RIB process has a single VifManager instance, which registers with the FEA process to discover the VIFs on this router and their IP addresses and prefixes. When the VIFs or their configuration in the FEA change, the VifManager will be notified, and it will update the RIBs appropriately. The RIBs need to know about VIFs and VIF addresses to decide which routes have nexthops that are on directly connected subnets, and which are nexthops that need to be resolved using other routes to figure out where next to send the packet. Only routes with nexthops that are on directly connected subnets can be sent to the FEA.


Constructor & Destructor Documentation

VifManager::VifManager ( XrlRouter xrl_router,
EventLoop eventloop,
RibManager rib_manager,
const string &  fea_target 
)

VifManager constructor.

Parameters:
xrl_routerthis process's XRL router.
eventloopthis process's EventLoop.
rib_managerthis class contains the actual RIBs for IPv4 and IPv6, unicast and multicast.
fea_targetthe FEA target name.

Member Function Documentation

int VifManager::final_start ( )

Completely start the node operation.

This method should be called internally after VifManager::start() to complete the job.

Returns:
XORP_OK on success, otherwise XORP_ERROR.
int VifManager::final_stop ( )

Completely stop the node operation.

This method should be called internally after VifManager::stop() to complete the job.

Returns:
XORP_OK on success, otherwise XORP_ERROR.
const IfMgrIfTree& VifManager::ifmgr_iftree ( ) const [inline, private]

Get a reference to the interface manager tree.

Returns:
a reference to the interface manager tree.
const ServiceBase* VifManager::ifmgr_mirror_service_base ( ) const [inline, private]

Get a reference to the service base of the interface manager.

Returns:
a reference to the service base of the interface manager.
int VifManager::ifmgr_shutdown ( ) [private]

Initiate shutdown of the interface manager.

Returns:
XORP_OK on success, otherwise XORP_ERROR.
int VifManager::ifmgr_startup ( ) [private]

Initiate startup of the interface manager.

Returns:
XORP_OK on success, otherwise XORP_ERROR.
int VifManager::start ( )

Start operation.

Start the process of registering with the FEA, etc. After the startup operations are completed, VifManager::final_start() is called internally to complete the job.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoState.

void VifManager::status_change ( ServiceBase service,
ServiceStatus  old_status,
ServiceStatus  new_status 
) [private, virtual]

A method invoked when the status of a service changes.

Parameters:
servicethe service whose status has changed.
old_statusthe old status.
new_statusthe new status.

Implements ServiceChangeObserverBase.

int VifManager::stop ( )

Stop operation.

Gracefully stop operation. After the shutdown operations are completed, VifManager::final_stop() is called internally to complete the job.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoState.


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