class IfMgrXrlMirror

Maintainer of a local mirror of central IfMgr configuration state via Xrls sent by the IfMgr. More...

Definition#include <ifmgr_xrl_mirror.hh>
InheritsIfMgrHintObserver [protected ], IfMgrXrlMirrorRouterObserver [protected ], ServiceBase (libxorp) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public Members

Protected Methods

Protected Members


Detailed Description

The IfMgrXrlMirror contains a copy of the central interface configuration state. The IfMgrXrlMirror class implements the ServiceBase interface. When startup() is called it attempts to register with the IfMgrXrlReplicationManager instance running within the FEA. If registration succeeds it will receive the complete configuration tree and receive future configuration tree. Once the configuration tree is received it transitions into the RUNNING state and is considered operational.

When the status of the IfMgrXrlMirror is RUNNING, then a copy of the interface configuration state is accessible through the iftree() method. If the instance is another state then configuration tree available through the IfMgrXrlMirror will be empty.

For parties that are interested in receiving synchronous configuration tree change notifications, they can register as hint observers. Hints provide coarse indication that a change has occured - they announce the which item in the tree has changed and should be checked. Hint observers express interest through the attach_hint_observer() and detach_hint_observer() methods.

typedef IfMgrCommandSinkBase::Cmd Cmd

Cmd

static const char* DEFAULT_REGISTRATION_TARGET

DEFAULT_REGISTRATION_TARGET

 IfMgrXrlMirror (EventLoop& e, IPv4 finder_host = FINDER_DEFAULT_HOST, uint16_t finder_port = FINDER_DEFAULT_PORT, const char* reg_tgt = DEFAULT_REGISTRATION_TARGET)

IfMgrXrlMirror

Constructor

Parameters:
eventloopto use for events.
finder_hostaddress to route finder messages to.
finder_portport to direct finder messages to.
reg_tgtname of Xrl class or target to supply interface configuration updates.

 ~IfMgrXrlMirror ()

~IfMgrXrlMirror

void  startup ()

startup

Start running. Attempt to register instance with the registration target supplied in the constructor and await interface configuration tree data. When data is received transition into the RUNNING state (see ServiceBase for states).

Reimplemented from ServiceBase.

void  shutdown ()

shutdown

Stop running and shutdown. Deregister with the registration target and transition to SHUTDOWN state when complete.

Reimplemented from ServiceBase.

inline const IfMgrIfTree&  iftree ()

iftree

[const]

Returns: interface configuration tree. Should only be trusted when status() is READY.

bool  attach_hint_observer (IfMgrHintObserver* o)

attach_hint_observer

Attach an observer interested in receiving IfMgr hints.

Parameters:
oobserver to be attached.

Returns: true on success, false if observer is already registered.

bool  detach_hint_observer (IfMgrHintObserver* o)

detach_hint_observer

Detach an observer interested in receiving IfMgr hints.

Parameters:
oobserver to be detached.

Returns: true on success, false if observer was not registered.

void  finder_ready_event ()

finder_ready_event

[protected]

Reimplemented from IfMgrXrlMirrorRouterObserver.

void  finder_disconnect_event ()

finder_disconnect_event

[protected]

Reimplemented from IfMgrXrlMirrorRouterObserver.

void  register_with_ifmgr ()

register_with_ifmgr

[protected]

void  unregister_with_ifmgr ()

unregister_with_ifmgr

[protected]

void  tree_complete ()

tree_complete

[protected]

Reimplemented from IfMgrHintObserver.

void  updates_made ()

updates_made

[protected]

Reimplemented from IfMgrHintObserver.

void  register_cb (const XrlError& e)

register_cb

[protected]

void  unregister_cb (const XrlError& e)

unregister_cb

[protected]

EventLoop& _e

_e

[protected]

IPv4 _finder_host

_finder_host

[protected]

uint16_t _finder_port

_finder_port

[protected]

IfMgrIfTree _iftree

_iftree

[protected]

IfMgrCommandDispatcher _dispatcher

_dispatcher

[protected]

string _rtarget

_rtarget

[protected]

IfMgrXrlMirrorRouter* _rtr

_rtr

[protected]

IfMgrXrlMirrorTarget* _xrl_tgt

_xrl_tgt

[protected]

list<IfMgrHintObserver*> _hint_observers

_hint_observers

[protected]

XorpTimer _reg_timer

_reg_timer

[protected]


Generated by: pavlin on possum.icir.org on Thu Nov 6 23:46:59 2003, using kdoc 2.0a54+XORP.