xorp

XrlStaticRoutesNode Class Reference

Inheritance diagram for XrlStaticRoutesNode:
StaticRoutesNode XrlStdRouter XrlStaticRoutesTargetBase IfMgrHintObserver ServiceBase ServiceChangeObserverBase XrlRouter BugCatcher XrlDispatcher XrlSender FinderClientObserver XrlCmdMap NONCOPYABLE

List of all members.

Public Member Functions

 XrlStaticRoutesNode (EventLoop &eventloop, const string &class_name, const string &finder_hostname, uint16_t finder_port, const string &finder_target, const string &fea_target, const string &rib_target)
int startup ()
 Startup the node operation.
int shutdown ()
 Shutdown the node operation.
XrlRouterxrl_router ()
 Get a reference to the XrlRouter instance.

Protected Member Functions

XrlCmdError common_0_1_get_target_name (string &name)
 Get name of Xrl Target.
XrlCmdError common_0_1_get_version (string &version)
 Get version string from Xrl Target.
XrlCmdError common_0_1_get_status (uint32_t &status, string &reason)
 Get status of Xrl Target.
XrlCmdError common_0_1_shutdown ()
 Request clean shutdown of Xrl Target.
XrlCmdError common_0_1_startup ()
 Request clean shutdown of Xrl Target.
XrlCmdError finder_event_observer_0_1_xrl_target_birth (const string &target_class, const string &target_instance)
 Announce target birth to observer.
XrlCmdError finder_event_observer_0_1_xrl_target_death (const string &target_class, const string &target_instance)
 Announce target death to observer.
XrlCmdError static_routes_0_1_enable_static_routes (const bool &enable)
 Enable/disable/start/stop StaticRoutes.
XrlCmdError static_routes_0_1_start_static_routes ()
XrlCmdError static_routes_0_1_stop_static_routes ()
XrlCmdError static_routes_0_1_add_route4 (const bool &unicast, const bool &multicast, const IPv4Net &network, const IPv4 &nexthop, const uint32_t &metric)
 Add/replace/delete a static route.
XrlCmdError static_routes_0_1_add_route6 (const bool &unicast, const bool &multicast, const IPv6Net &network, const IPv6 &nexthop, const uint32_t &metric)
XrlCmdError static_routes_0_1_replace_route4 (const bool &unicast, const bool &multicast, const IPv4Net &network, const IPv4 &nexthop, const uint32_t &metric)
XrlCmdError static_routes_0_1_replace_route6 (const bool &unicast, const bool &multicast, const IPv6Net &network, const IPv6 &nexthop, const uint32_t &metric)
XrlCmdError static_routes_0_1_delete_route4 (const bool &unicast, const bool &multicast, const IPv4Net &network, const IPv4 &nexthop)
XrlCmdError static_routes_0_1_delete_route6 (const bool &unicast, const bool &multicast, const IPv6Net &network, const IPv6 &nexthop)
XrlCmdError static_routes_0_1_add_backup_route4 (const bool &unicast, const bool &multicast, const IPv4Net &network, const IPv4 &nexthop, const uint32_t &metric)
 Add/replace/delete a backup static route.
XrlCmdError static_routes_0_1_add_backup_route6 (const bool &unicast, const bool &multicast, const IPv6Net &network, const IPv6 &nexthop, const uint32_t &metric)
XrlCmdError static_routes_0_1_replace_backup_route4 (const bool &unicast, const bool &multicast, const IPv4Net &network, const IPv4 &nexthop, const uint32_t &metric)
XrlCmdError static_routes_0_1_replace_backup_route6 (const bool &unicast, const bool &multicast, const IPv6Net &network, const IPv6 &nexthop, const uint32_t &metric)
XrlCmdError static_routes_0_1_delete_backup_route4 (const bool &unicast, const bool &multicast, const IPv4Net &network, const IPv4 &nexthop)
XrlCmdError static_routes_0_1_delete_backup_route6 (const bool &unicast, const bool &multicast, const IPv6Net &network, const IPv6 &nexthop)
XrlCmdError static_routes_0_1_add_interface_route4 (const bool &unicast, const bool &multicast, const IPv4Net &network, const IPv4 &nexthop, const string &ifname, const string &vifname, const uint32_t &metric)
 Add/replace/delete a static route by explicitly specifying the network interface toward the destination.
XrlCmdError static_routes_0_1_add_interface_route6 (const bool &unicast, const bool &multicast, const IPv6Net &network, const IPv6 &nexthop, const string &ifname, const string &vifname, const uint32_t &metric)
XrlCmdError static_routes_0_1_replace_interface_route4 (const bool &unicast, const bool &multicast, const IPv4Net &network, const IPv4 &nexthop, const string &ifname, const string &vifname, const uint32_t &metric)
XrlCmdError static_routes_0_1_replace_interface_route6 (const bool &unicast, const bool &multicast, const IPv6Net &network, const IPv6 &nexthop, const string &ifname, const string &vifname, const uint32_t &metric)
XrlCmdError static_routes_0_1_delete_interface_route4 (const bool &unicast, const bool &multicast, const IPv4Net &network, const IPv4 &nexthop, const string &ifname, const string &vifname)
XrlCmdError static_routes_0_1_delete_interface_route6 (const bool &unicast, const bool &multicast, const IPv6Net &network, const IPv6 &nexthop, const string &ifname, const string &vifname)
XrlCmdError static_routes_0_1_add_backup_interface_route4 (const bool &unicast, const bool &multicast, const IPv4Net &network, const IPv4 &nexthop, const string &ifname, const string &vifname, const uint32_t &metric)
 Add/replace/delete a backup static route by explicitly specifying the network interface toward the destination.
XrlCmdError static_routes_0_1_add_backup_interface_route6 (const bool &unicast, const bool &multicast, const IPv6Net &network, const IPv6 &nexthop, const string &ifname, const string &vifname, const uint32_t &metric)
XrlCmdError static_routes_0_1_replace_backup_interface_route4 (const bool &unicast, const bool &multicast, const IPv4Net &network, const IPv4 &nexthop, const string &ifname, const string &vifname, const uint32_t &metric)
XrlCmdError static_routes_0_1_replace_backup_interface_route6 (const bool &unicast, const bool &multicast, const IPv6Net &network, const IPv6 &nexthop, const string &ifname, const string &vifname, const uint32_t &metric)
XrlCmdError static_routes_0_1_delete_backup_interface_route4 (const bool &unicast, const bool &multicast, const IPv4Net &network, const IPv4 &nexthop, const string &ifname, const string &vifname)
XrlCmdError static_routes_0_1_delete_backup_interface_route6 (const bool &unicast, const bool &multicast, const IPv6Net &network, const IPv6 &nexthop, const string &ifname, const string &vifname)
XrlCmdError static_routes_0_1_enable_log_trace_all (const bool &enable)
 Enable/disable the StaticRoutes trace log for all operations.
XrlCmdError policy_backend_0_1_configure (const uint32_t &filter, const string &conf)
 Configure a policy filter.
XrlCmdError policy_backend_0_1_reset (const uint32_t &filter)
 Reset a policy filter.
XrlCmdError policy_backend_0_1_push_routes ()
 Push routes through policy filters for re-filtering.

Private Member Functions

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.
virtual void finder_connect_event ()
 Called when Finder connection is established.
virtual void finder_disconnect_event ()
 Called when Finder disconnect occurs.
void fea_register_startup ()
 Initiate registration with the FEA.
void finder_register_interest_fea_cb (const XrlError &xrl_error)
void fea_register_shutdown ()
 Initiate de-registration with the FEA.
void finder_deregister_interest_fea_cb (const XrlError &xrl_error)
void rib_register_startup ()
 Initiate registration with the RIB.
void finder_register_interest_rib_cb (const XrlError &xrl_error)
void rib_register_shutdown ()
 Initiate de-registration with the RIB.
void finder_deregister_interest_rib_cb (const XrlError &xrl_error)
void send_rib_add_tables ()
void rib_client_send_add_igp_table4_cb (const XrlError &xrl_error)
void send_rib_delete_tables ()
void rib_client_send_delete_igp_table4_cb (const XrlError &xrl_error)
void inform_rib_route_change (const StaticRoute &static_route)
 Inform the RIB about a route change.
void cancel_rib_route_change (const StaticRoute &static_route)
 Cancel a pending request to inform the RIB about a route change.
void send_rib_route_change ()
void send_rib_route_change_cb (const XrlError &xrl_error)

Private Attributes

EventLoop_eventloop
XrlRibV0p1Client _xrl_rib_client
const string _finder_target
const string _fea_target
const string _rib_target
IfMgrXrlMirror _ifmgr
list< StaticRoute_inform_rib_queue
XorpTimer _inform_rib_queue_timer
XrlFinderEventNotifierV0p1Client _xrl_finder_client
bool _is_finder_alive
bool _is_fea_alive
bool _is_fea_registered
bool _is_fea_registering
bool _is_fea_deregistering
XorpTimer _fea_register_startup_timer
XorpTimer _fea_register_shutdown_timer
bool _is_rib_alive
bool _is_rib_registered
bool _is_rib_registering
bool _is_rib_deregistering
bool _is_rib_igp_table4_registered
XorpTimer _rib_register_startup_timer
XorpTimer _rib_register_shutdown_timer
XorpTimer _rib_igp_table_registration_timer

Static Private Attributes

static const TimeVal RETRY_TIMEVAL = TimeVal(1, 0)

Member Function Documentation

void XrlStaticRoutesNode::cancel_rib_route_change ( const StaticRoute static_route) [private, virtual]

Cancel a pending request to inform the RIB about a route change.

Parameters:
static_routethe route with the request that would be canceled.

Implements StaticRoutesNode.

void XrlStaticRoutesNode::fea_register_shutdown ( ) [private, virtual]

Initiate de-registration with the FEA.

This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.

Implements StaticRoutesNode.

void XrlStaticRoutesNode::fea_register_startup ( ) [private, virtual]

Initiate registration with the FEA.

This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.

Implements StaticRoutesNode.

void XrlStaticRoutesNode::finder_connect_event ( ) [private, virtual]

Called when Finder connection is established.

Note that this method overwrites an XrlRouter virtual method.

Reimplemented from XrlRouter.

void XrlStaticRoutesNode::finder_disconnect_event ( ) [private, virtual]

Called when Finder disconnect occurs.

Note that this method overwrites an XrlRouter virtual method.

Reimplemented from XrlRouter.

XrlCmdError XrlStaticRoutesNode::finder_event_observer_0_1_xrl_target_birth ( const string &  target_class,
const string &  target_instance 
) [protected, virtual]

Announce target birth to observer.

Parameters:
target_classthe target class name.
target_instancethe target instance name.

Implements XrlStaticRoutesTargetBase.

XrlCmdError XrlStaticRoutesNode::finder_event_observer_0_1_xrl_target_death ( const string &  target_class,
const string &  target_instance 
) [protected, virtual]

Announce target death to observer.

Parameters:
target_classthe target class name.
target_instancethe target instance name.

Implements XrlStaticRoutesTargetBase.

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

Get a reference to the interface manager tree.

This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.

Returns:
a reference to the interface manager tree.

Implements StaticRoutesNode.

const ServiceBase* XrlStaticRoutesNode::ifmgr_mirror_service_base ( ) const [inline, private, virtual]

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

This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.

Returns:
a reference to the service base of the interface manager.

Implements StaticRoutesNode.

void XrlStaticRoutesNode::inform_rib_route_change ( const StaticRoute static_route) [private, virtual]

Inform the RIB about a route change.

Parameters:
static_routethe route with the information about the change.

Implements StaticRoutesNode.

XrlCmdError XrlStaticRoutesNode::policy_backend_0_1_configure ( const uint32_t &  filter,
const string &  conf 
) [protected, virtual]

Configure a policy filter.

Parameters:
filterId of filter to configure.
confConfiguration of filter.

Implements XrlStaticRoutesTargetBase.

XrlCmdError XrlStaticRoutesNode::policy_backend_0_1_reset ( const uint32_t &  filter) [protected, virtual]

Reset a policy filter.

Parameters:
filterId of filter to reset.

Implements XrlStaticRoutesTargetBase.

void XrlStaticRoutesNode::rib_register_shutdown ( ) [private, virtual]

Initiate de-registration with the RIB.

This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.

Implements StaticRoutesNode.

void XrlStaticRoutesNode::rib_register_startup ( ) [private, virtual]

Initiate registration with the RIB.

This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.

Implements StaticRoutesNode.

int XrlStaticRoutesNode::shutdown ( ) [virtual]

Shutdown the node operation.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from StaticRoutesNode.

int XrlStaticRoutesNode::startup ( ) [virtual]

Startup the node operation.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from StaticRoutesNode.

XrlCmdError XrlStaticRoutesNode::static_routes_0_1_add_backup_interface_route4 ( const bool &  unicast,
const bool &  multicast,
const IPv4Net network,
const IPv4 nexthop,
const string &  ifname,
const string &  vifname,
const uint32_t &  metric 
) [protected, virtual]

Add/replace/delete a backup static route by explicitly specifying the network interface toward the destination.

Parameters:
unicastif true, then the route would be used for unicast routing.
multicastif true, then the route would be used in the MRIB (Multicast Routing Information Base) for multicast purpose (e.g., computing the Reverse-Path Forwarding information).
networkthe network address prefix this route applies to.
nexthopthe address of the next-hop router for this route.
ifnameof the name of the physical interface toward the destination.
vifnameof the name of the virtual interface toward the destination.
metricthe metric distance for this route.

Implements XrlStaticRoutesTargetBase.

XrlCmdError XrlStaticRoutesNode::static_routes_0_1_add_backup_route4 ( const bool &  unicast,
const bool &  multicast,
const IPv4Net network,
const IPv4 nexthop,
const uint32_t &  metric 
) [protected, virtual]

Add/replace/delete a backup static route.

Parameters:
unicastif true, then the route would be used for unicast routing.
multicastif true, then the route would be used in the MRIB (Multicast Routing Information Base) for multicast purpose (e.g., computing the Reverse-Path Forwarding information).
networkthe network address prefix this route applies to.
nexthopthe address of the next-hop router for this route.
metricthe metric distance for this route.

Implements XrlStaticRoutesTargetBase.

XrlCmdError XrlStaticRoutesNode::static_routes_0_1_add_interface_route4 ( const bool &  unicast,
const bool &  multicast,
const IPv4Net network,
const IPv4 nexthop,
const string &  ifname,
const string &  vifname,
const uint32_t &  metric 
) [protected, virtual]

Add/replace/delete a static route by explicitly specifying the network interface toward the destination.

Add/replace a static route by explicitly specifying the network interface toward the destination.

Parameters:
unicastif true, then the route would be used for unicast routing.
multicastif true, then the route would be used in the MRIB (Multicast Routing Information Base) for multicast purpose (e.g., computing the Reverse-Path Forwarding information).
networkthe network address prefix this route applies to.
nexthopthe address of the next-hop router for this route.
ifnameof the name of the physical interface toward the destination.
vifnameof the name of the virtual interface toward the destination.
metricthe metric distance for this route.

Implements XrlStaticRoutesTargetBase.

XrlCmdError XrlStaticRoutesNode::static_routes_0_1_add_route4 ( const bool &  unicast,
const bool &  multicast,
const IPv4Net network,
const IPv4 nexthop,
const uint32_t &  metric 
) [protected, virtual]

Add/replace/delete a static route.

Parameters:
unicastif true, then the route would be used for unicast routing.
multicastif true, then the route would be used in the MRIB (Multicast Routing Information Base) for multicast purpose (e.g., computing the Reverse-Path Forwarding information).
networkthe network address prefix this route applies to.
nexthopthe address of the next-hop router for this route.
metricthe metric distance for this route.

Implements XrlStaticRoutesTargetBase.

XrlCmdError XrlStaticRoutesNode::static_routes_0_1_enable_log_trace_all ( const bool &  enable) [protected, virtual]

Enable/disable the StaticRoutes trace log for all operations.

Parameters:
enableif true, then enable the trace log, otherwise disable it.

Implements XrlStaticRoutesTargetBase.

XrlCmdError XrlStaticRoutesNode::static_routes_0_1_enable_static_routes ( const bool &  enable) [protected, virtual]

Enable/disable/start/stop StaticRoutes.

Parameters:
enableif true, then enable StaticRoutes, otherwise disable it.

Implements XrlStaticRoutesTargetBase.

XrlRouter& XrlStaticRoutesNode::xrl_router ( ) [inline]

Get a reference to the XrlRouter instance.

Returns:
a reference to the XrlRouter (XrlRouter) instance.

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