class StaticRoutesNode

The StaticRoutes node class. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Protected Methods


Detailed Description

There should be one node per StaticRoutes instance.

typedef multimap<IPvXNet, StaticRoute> Table

Table

 StaticRoutesNode (EventLoop& eventloop)

StaticRoutesNode

Constructor for a given event loop.

Parameters:

eventloopthe event loop to use.
 ~StaticRoutesNode ()

~StaticRoutesNode

[virtual]

Destructor

EventLoop&  eventloop ()

eventloop

Get the event loop this node is added to.

Returns: the event loop this node is added to.

const string&  protocol_name ()

protocol_name

[const]

Get the protocol name.

Returns: a string with the protocol name.

bool  startup ()

startup

Startup the node operation.

Returns: true on success, false on failure.

Reimplemented from ServiceBase.

bool  shutdown ()

shutdown

Shutdown the node operation.

Returns: true on success, false on failure.

Reimplemented from ServiceBase.

ProcessStatus  node_status (string& reason_msg)

node_status

Get the node status (see ProcessStatus).

Parameters:

reason_msgreturn-by-reference string that contains human-readable information about the status.

Returns: the node status (see ProcessStatus).

bool  is_done ()

is_done

[const]

Test if the node processing is done.

Returns: true if the node processing is done, otherwise false.

bool  is_enabled ()

is_enabled

[const]

Test whether the node operation is enabled.

Returns: true if the node operation is enabled, otherwise false.

void  set_enabled (bool enable)

set_enabled

Enable/disable node operation.

Note that for the time being it affects only whether the routes are installed into RIB. In the future it may affect the interaction with other modules as well.

Parameters:

enableif true then enable node operation, otherwise disable it.
int  add_route4 (bool unicast, bool multicast, const IPv4Net& network, const IPv4& nexthop, const string& ifname, const string& vifname, uint32_t metric, bool is_backup_route, string& error_msg)

add_route4

Add a static IPv4 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.
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.
is_backup_routeif true, then this is a backup route operation.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  add_route6 (bool unicast, bool multicast, const IPv6Net& network, const IPv6& nexthop, const string& ifname, const string& vifname, uint32_t metric, bool is_backup_route, string& error_msg)

add_route6

Add a static IPv6 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.
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.
is_backup_routeif true, then this is a backup route operation.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  replace_route4 (bool unicast, bool multicast, const IPv4Net& network, const IPv4& nexthop, const string& ifname, const string& vifname, uint32_t metric, bool is_backup_route, string& error_msg)

replace_route4

Replace a static IPv4 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.
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.
is_backup_routeif true, then this is a backup route operation.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  replace_route6 (bool unicast, bool multicast, const IPv6Net& network, const IPv6& nexthop, const string& ifname, const string& vifname, uint32_t metric, bool is_backup_route, string& error_msg)

replace_route6

Replace a static IPv6 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.
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.
is_backup_routeif true, then this is a backup route operation.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  delete_route4 (bool unicast, bool multicast, const IPv4Net& network, const IPv4& nexthop, const string& ifname, const string& vifname, bool is_backup_route, string& error_msg)

delete_route4

Delete a static IPv4 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.
ifnameof the name of the physical interface toward the destination.
vifnameof the name of the virtual interface toward the destination.
is_backup_routeif true, then this is a backup route operation.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  delete_route6 (bool unicast, bool multicast, const IPv6Net& network, const IPv6& nexthop, const string& ifname, const string& vifname, bool is_backup_route, string& error_msg)

delete_route6

Delete a static IPv6 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.
ifnameof the name of the physical interface toward the destination.
vifnameof the name of the virtual interface toward the destination.
is_backup_routeif true, then this is a backup route operation.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

StaticRoutesNode::Table::iterator  find_route ( StaticRoutesNode::Table& table, const StaticRoute& key_route)

find_route

Find a route from the routing table.

Parameters:

tablethe routing table to seach.
key_routethe route information to search for.

Returns: a table iterator to the route. If the route is not found, the iterator will point to the end of the table.

StaticRoutesNode::Table::iterator  find_best_accepted_route ( StaticRoutesNode::Table& table, const StaticRoute& key_route)

find_best_accepted_route

Find the best accepted route from the routing table.

Parameters:

tablethe routing table to seach.
key_routethe route information to search for.

Returns: a table iterator to the route. If the route is not found, the iterator will point to the end of the table.

bool  is_log_trace ()

is_log_trace

[const]

Test if trace log is enabled.

This method is used to test whether to output trace log debug messges.

Returns: true if trace log is enabled, otherwise false.

void  set_log_trace (bool is_enabled)

set_log_trace

Enable/disable trace log.

This method is used to enable/disable trace log debug messages output.

Parameters:

is_enabledif true, trace log is enabled, otherwise is disabled.
void  configure_filter (const uint32_t& filter, const string& conf)

configure_filter

Configure a policy filter.

Will throw an exception on error.

Export filter is not supported by static routes.

Parameters:

filteridentifier of filter to configure.
confconfiguration of the filter.
void  reset_filter (const uint32_t& filter)

reset_filter

Reset a policy filter.

Parameters:

filteridentifier of filter to reset.
void  push_routes ()

push_routes

Push all the routes through the policy filters for re-filtering.

void  push_pull_rib_routes (bool is_push)

push_pull_rib_routes

Push or pull all the routes to/from the RIB.

Parameters:

is_pushif true, then push the routes, otherwise pull them
void  tree_complete ()

tree_complete

[protected]

Reimplemented from IfMgrHintObserver.

void  updates_made ()

updates_made

[protected]

Reimplemented from IfMgrHintObserver.

void  incr_startup_requests_n ()

incr_startup_requests_n

[protected]

void  decr_startup_requests_n ()

decr_startup_requests_n

[protected]

void  incr_shutdown_requests_n ()

incr_shutdown_requests_n

[protected]

void  decr_shutdown_requests_n ()

decr_shutdown_requests_n

[protected]

void  update_status ()

update_status

[protected]


Generated by: pavlin on possum.icir.org on Wed Mar 21 11:24:14 2007, using kdoc $.