class StaticRoute

A StaticRoute helper class. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods


Detailed Description

This class is used to store a routing entry.

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

StaticRoute

Constructor for a given IPv4 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.
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.
 StaticRoute (bool unicast, bool multicast, const IPv6Net& network, const IPv6& nexthop, const string& ifname, const string& vifname, uint32_t metric, bool is_backup_route)

StaticRoute

Constructor for a given IPv6 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.
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.
bool  operator== (const StaticRoute& other)

operator==

[const]

Equality Operator

Parameters:

otherthe right-hand operand to compare against.

Returns: true if the left-hand operand is numerically same as the right-hand operand.

bool  is_same_route (const StaticRoute& other)

is_same_route

[const]

Test whether both routes contain same routing information.

Parameters:

otherthe route to compare against.

Returns: true if both routes contain same routing information, otherwise false.

bool  is_ipv4 ()

is_ipv4

[const]

Test if this is an IPv4 route.

Returns: true if this is an IPv4 route, otherwise false.

bool  is_ipv6 ()

is_ipv6

[const]

Test if this is an IPv6 route.

Returns: true if this is an IPv6 route, otherwise false.

bool  unicast ()

unicast

[const]

Test if this route would be used for unicast routing.

Returns: true if this route would be used for unicast routing, otherwise false.

bool  multicast ()

multicast

[const]

Test if this route would be used for multicast routing.

Returns: true if this route would be used for multicast routing, otherwise false.

const IPvXNet&  network ()

network

[const]

Get the network address prefix this route applies to.

Returns: the network address prefix this route appies to.

const IPvX&  nexthop ()

nexthop

[const]

Get the address of the next-hop router for this route.

Returns: the address of the next-hop router for this route.

void  set_nexthop (const IPvX& v)

set_nexthop

Set the address of the next-hop router for this route.

Parameters:

vthe address of the next-hop router for this route.
const string&  ifname ()

ifname

[const]

Get the name of the physical interface toward the destination.

Returns: the name of the physical interface toward the destination.

void  set_ifname (const string& v)

set_ifname

Set the name of the physical interface toward the destination.

Parameters:

vthe name of the physical interface toward the destination.
const string&  vifname ()

vifname

[const]

Get the name of the virtual interface toward the destination.

Returns: the name of the virtual interface toward the destination.

void  set_vifname (const string& v)

set_vifname

Set the name of the virtual interface toward the destination.

Parameters:

vthe name of the virtual interface toward the destination.
uint32_t  metric ()

metric

[const]

Get the metric distance for this route.

Returns: the metric distance for this route.

bool  is_backup_route ()

is_backup_route

[const]

Test if this is a backup route.

Returns: truf if this is a backup route, otherwise false.

bool  is_add_route ()

is_add_route

[const]

Test if this is a route to add.

Returns: true if this is a route to add, otherwise false.

bool  is_replace_route ()

is_replace_route

[const]

Test if this is a replacement route.

Returns: true if this is a replacement route, otherwise false.

bool  is_delete_route ()

is_delete_route

[const]

Test if this is a route to delete.

Returns: true if this is a route to delete, otherwise false.

void  set_add_route ()

set_add_route

Set the type of this route to "a route to add".

void  set_replace_route ()

set_replace_route

Set the type of this route to "a replacement route".

void  set_delete_route ()

set_delete_route

Set the type of this route to "a route to delete".

bool  is_interface_route ()

is_interface_route

[const]

Test if the route is interface-specific (e.g., if the interface is explicitly specified).

Returns: true if the route is interface-specific, otherwise false.

bool  is_valid_entry (string& error_msg)

is_valid_entry

[const]

Check whether the route entry is valid.

Parameters:

error_msgthe error message (if error).

Returns: true if the route entry is valid, otherwise false.

bool  is_ignored ()

is_ignored

[const]

Test if the route is to be ignored.

This method is used only for internal purpose when passing the route around.

Returns: true if the route is to be ignored, otherwise false.

void  set_ignored (bool v)

set_ignored

Set whether the route is to be ignored.

This method is used only for internal purpose when passing the route around.

Parameters:

vtrue if the route is to be ignored, otherwise false.
const PolicyTags&  policytags ()

policytags

[const]

Returns: policy-tags for this route.

void  set_policytags (const PolicyTags& tags)

set_policytags

Set policy-tags for route.

Parameters:

tagsthe new policy-tags for this route.
bool  is_filtered ()

is_filtered

[const]

Test whether the route has been rejected by a policy filter.

Returns: true if route has been rejected by a policy filter, otherwise false.

void  set_filtered (bool v)

set_filtered

Set a flag that indicates whether the route is to be considered filtered [rejected by the policy filter].

Parameters:

vtrue if the route should be considered filtered, otherwise false.
bool  is_accepted_by_nexthop ()

is_accepted_by_nexthop

[const]

Test whether the route is accepted based on its next-hop information.

Returns: true if the route is accepted based on its next-hop information, otherwise false.

void  set_accepted_by_nexthop (bool v)

set_accepted_by_nexthop

Set a flag that indicates whether the route is accepted based on its next-hop information.

Parameters:

vtrue if the route is accepted based on its next-hop information, otherwise false.
bool  is_accepted_by_rib ()

is_accepted_by_rib

[const]

Test whether the route is accepted for transmission to the RIB.

Returns: true if route is accepted for transmission to the RIB, otherwise false.


Generated by: bms on anglepoise.lon.incunabulum.net on Wed Jul 23 10:06:12 2008, using kdoc 2.0a54+XORP.