xorp

InterfaceMonitor Class Reference

Inheritance diagram for InterfaceMonitor:
IfMgrHintObserver ServiceBase ServiceChangeObserverBase BugCatcher

List of all members.

Public Member Functions

 InterfaceMonitor (EventLoop &eventloop, const string &class_name, const string &finder_hostname, uint16_t finder_port, const string &fea_target)
 InterfaceMonitor constructor.
 ~InterfaceMonitor ()
 InterfaceMonitor destructor.
int startup ()
 Startup operation.
int shutdown ()
 Shutdown operation.
void print_interfaces (const string &print_iface_name) const
 Print information about network interfaces that was received from the FEA.

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

EventLoop_eventloop
IfMgrXrlMirror _ifmgr
size_t _startup_requests_n
size_t _shutdown_requests_n

Constructor & Destructor Documentation

InterfaceMonitor::InterfaceMonitor ( EventLoop eventloop,
const string &  class_name,
const string &  finder_hostname,
uint16_t  finder_port,
const string &  fea_target 
)

InterfaceMonitor constructor.

Parameters:
eventloopthis process's EventLoop.
class_namethe XRL class name of this target.
finder_hostnamethe finder's host name.
finder_portthe finder's port.
fea_targetthe FEA target name.

Member Function Documentation

const IfMgrIfTree& InterfaceMonitor::ifmgr_iftree ( ) const [inline, private]

Get a reference to the interface manager tree.

Returns:
a reference to the interface manager tree.
const ServiceBase* InterfaceMonitor::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 InterfaceMonitor::ifmgr_shutdown ( ) [private]

Initiate shutdown of the interface manager.

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

Initiate startup of the interface manager.

Returns:
XORP_OK on success, otherwise XORP_ERROR.
void InterfaceMonitor::print_interfaces ( const string &  print_iface_name) const

Print information about network interfaces that was received from the FEA.

Parameters:
print_iface_namethe name of the interface to print. If it is the empty string, then print information about all configured interfaces.
int InterfaceMonitor::shutdown ( ) [virtual]

Shutdown operation.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements ServiceBase.

int InterfaceMonitor::startup ( ) [virtual]

Startup operation.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements ServiceBase.

void InterfaceMonitor::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.


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