|
xorp
|
A StaticRoute helper class. More...
#include <static_routes_node.hh>
Public Member Functions | |
| StaticRoute (bool unicast, bool multicast, const IPv4Net &network, const IPv4 &nexthop, const string &ifname, const string &vifname, uint32_t metric, bool is_backup_route) | |
| Constructor for a given IPv4 static 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) | |
| Constructor for a given IPv6 static route. | |
| bool | operator== (const StaticRoute &other) const |
| Equality Operator. | |
| bool | is_same_route (const StaticRoute &other) const |
| Test whether both routes contain same routing information. | |
| bool | is_ipv4 () const |
| Test if this is an IPv4 route. | |
| bool | is_ipv6 () const |
| Test if this is an IPv6 route. | |
| bool | unicast () const |
| Test if this route would be used for unicast routing. | |
| bool | multicast () const |
| Test if this route would be used for multicast routing. | |
| const IPvXNet & | network () const |
| Get the network address prefix this route applies to. | |
| const IPvX & | nexthop () const |
| Get the address of the next-hop router for this route. | |
| void | set_nexthop (const IPvX &v) |
| Set the address of the next-hop router for this route. | |
| const string & | ifname () const |
| Get the name of the physical interface toward the destination. | |
| void | set_ifname (const string &v) |
| Set the name of the physical interface toward the destination. | |
| const string & | vifname () const |
| Get the name of the virtual interface toward the destination. | |
| void | set_vifname (const string &v) |
| Set the name of the virtual interface toward the destination. | |
| uint32_t | metric () const |
| Get the metric distance for this route. | |
| bool | is_backup_route () const |
| Test if this is a backup route. | |
| bool | is_add_route () const |
| Test if this is a route to add. | |
| bool | is_replace_route () const |
| Test if this is a replacement route. | |
| bool | is_delete_route () const |
| Test if this is a route to delete. | |
| void | set_add_route () |
| Set the type of this route to "a route to add". | |
| void | set_replace_route () |
| Set the type of this route to "a replacement route". | |
| void | set_delete_route () |
| Set the type of this route to "a route to delete". | |
| bool | is_interface_route () const |
| Test if the route is interface-specific (e.g., if the interface is explicitly specified). | |
| bool | is_valid_entry (string &error_msg) const |
| Check whether the route entry is valid. | |
| bool | is_ignored () const |
| Test if the route is to be ignored. | |
| void | set_ignored (bool v) |
| Set whether the route is to be ignored. | |
| PolicyTags & | policytags () |
| bool | is_filtered () const |
| Test whether the route has been rejected by a policy filter. | |
| void | set_filtered (bool v) |
| Set a flag that indicates whether the route is to be considered filtered [rejected by the policy filter]. | |
| bool | is_accepted_by_nexthop () const |
| Test whether the route is accepted based on its next-hop information. | |
| void | set_accepted_by_nexthop (bool v) |
| Set a flag that indicates whether the route is accepted based on its next-hop information. | |
| bool | is_accepted_by_rib () const |
| Test whether the route is accepted for transmission to the RIB. | |
Private Types | |
| enum | RouteType { IDLE_ROUTE, ADD_ROUTE, REPLACE_ROUTE, DELETE_ROUTE } |
Private Attributes | |
| bool | _unicast |
| bool | _multicast |
| IPvXNet | _network |
| IPvX | _nexthop |
| string | _ifname |
| string | _vifname |
| uint32_t | _metric |
| bool | _is_backup_route |
| RouteType | _route_type |
| bool | _is_ignored |
| bool | _is_filtered |
| bool | _is_accepted_by_nexthop |
| PolicyTags | _policytags |
A StaticRoute helper class.
This class is used to store a routing entry.
| StaticRoute::StaticRoute | ( | bool | unicast, |
| bool | multicast, | ||
| const IPv4Net & | network, | ||
| const IPv4 & | nexthop, | ||
| const string & | ifname, | ||
| const string & | vifname, | ||
| uint32_t | metric, | ||
| bool | is_backup_route | ||
| ) | [inline] |
Constructor for a given IPv4 static route.
| unicast | if true, then the route would be used for unicast routing. |
| multicast | if 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). |
| network | the network address prefix this route applies to. |
| nexthop | the address of the next-hop router for this route. |
| ifname | of the name of the physical interface toward the destination. |
| vifname | of the name of the virtual interface toward the destination. |
| metric | the metric distance for this route. |
| is_backup_route | if true, then this is a backup route. |
| StaticRoute::StaticRoute | ( | bool | unicast, |
| bool | multicast, | ||
| const IPv6Net & | network, | ||
| const IPv6 & | nexthop, | ||
| const string & | ifname, | ||
| const string & | vifname, | ||
| uint32_t | metric, | ||
| bool | is_backup_route | ||
| ) | [inline] |
Constructor for a given IPv6 static route.
| unicast | if true, then the route would be used for unicast routing. |
| multicast | if 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). |
| network | the network address prefix this route applies to. |
| nexthop | the address of the next-hop router for this route. |
| ifname | of the name of the physical interface toward the destination. |
| vifname | of the name of the virtual interface toward the destination. |
| metric | the metric distance for this route. |
| is_backup_route | if true, then this is a backup route. |
| const string& StaticRoute::ifname | ( | ) | const [inline] |
| bool StaticRoute::is_accepted_by_nexthop | ( | ) | const [inline] |
| bool StaticRoute::is_accepted_by_rib | ( | ) | const |
| bool StaticRoute::is_add_route | ( | ) | const [inline] |
Test if this is a route to add.
| bool StaticRoute::is_backup_route | ( | ) | const [inline] |
Test if this is a backup route.
| bool StaticRoute::is_delete_route | ( | ) | const [inline] |
Test if this is a route to delete.
| bool StaticRoute::is_filtered | ( | ) | const [inline] |
Test whether the route has been rejected by a policy filter.
| bool StaticRoute::is_ignored | ( | ) | const [inline] |
| bool StaticRoute::is_interface_route | ( | ) | const [inline] |
| bool StaticRoute::is_ipv4 | ( | ) | const [inline] |
| bool StaticRoute::is_ipv6 | ( | ) | const [inline] |
| bool StaticRoute::is_replace_route | ( | ) | const [inline] |
Test if this is a replacement route.
| bool StaticRoute::is_same_route | ( | const StaticRoute & | other | ) | const [inline] |
Test whether both routes contain same routing information.
| other | the route to compare against. |
| bool StaticRoute::is_valid_entry | ( | string & | error_msg | ) | const |
| uint32_t StaticRoute::metric | ( | ) | const [inline] |
| bool StaticRoute::multicast | ( | ) | const [inline] |
Test if this route would be used for multicast routing.
| const IPvXNet& StaticRoute::network | ( | ) | const [inline] |
| const IPvX& StaticRoute::nexthop | ( | ) | const [inline] |
| bool StaticRoute::operator== | ( | const StaticRoute & | other | ) | const [inline] |
| PolicyTags& StaticRoute::policytags | ( | ) | [inline] |
| void StaticRoute::set_accepted_by_nexthop | ( | bool | v | ) | [inline] |
| void StaticRoute::set_filtered | ( | bool | v | ) | [inline] |
| void StaticRoute::set_ifname | ( | const string & | v | ) | [inline] |
| void StaticRoute::set_ignored | ( | bool | v | ) | [inline] |
| void StaticRoute::set_nexthop | ( | const IPvX & | v | ) | [inline] |
| void StaticRoute::set_vifname | ( | const string & | v | ) | [inline] |
| bool StaticRoute::unicast | ( | ) | const [inline] |
Test if this route would be used for unicast routing.
| const string& StaticRoute::vifname | ( | ) | const [inline] |