xorp

RouteMetaData Class Reference

List of all members.

Public Member Functions

 RouteMetaData (const RouteMetaData &metadata)
bool in_use () const
void set_in_use (bool used)
 Record whether or not this route is in use.
bool is_winner () const
 returns true if the route was chosen by the routing decision process as the winning route for this subnet.
void set_is_winner (uint32_t igp_metric)
 when a route is chosen by the routing decision process as the winning route for this subnet, set_is_winner should be called to record this fact and to record the igp_metric at the time the route was chosen.
void set_is_not_winner ()
 when a route fails to be chosen by the routing decision process as the winning route for this subnet, set_is_not_winner should be called to record this fact.
void set_nexthop_resolved (bool resolvable)
 record whether or not a route's nexthop resolved
bool nexthop_resolved () const
 did the route's nexthop resolve when it was passed through the NextHop resolver table.
bool is_filtered () const
 is_filtered returns true if the route was filtered out by the incoming filter bank, false otherwise.
void set_filtered (bool filtered)
 set_filtered record whether or not the route was filtered out by the incoming filter bank.
bool is_deleted () const
 is_deleted returns true if the route has already been deleted (but the class instance representing it has not been because it's reference count is non-zero)
void set_deleted ()
uint32_t igp_metric () const
void set_igp_metric (uint32_t igp_metric)
void dont_aggregate ()
uint16_t refcount () const
void reset_flags ()
const PolicyTagspolicytags () const
void set_policytags (const PolicyTags &tags)
 Replaced policy tags of route.
const RefPfpolicyfilter (uint32_t i) const
void set_policyfilter (uint32_t i, const RefPf &pf)
void set_aggr_brief_mode ()
 Set the "brief" mode flag on an candidate for aggregation.
void clear_aggr_brief_mode ()
 Clear the "brief" mode flag on an candidate for aggregation.
bool aggr_brief_mode () const
 Read the "brief" aggregation mode flag.
void set_aggr_prefix_len (uint32_t preflen)
 Set the target prefix length on an candidate for aggregation.
uint32_t aggr_prefix_len () const
 Read the aggregation prefix length marker.
bool bump_refcount (int delta)

Private Attributes

uint32_t _flags
 Flag definitions:
uint32_t _igp_metric
 If the route is a winner (SRF_WINNER is set), then DecisionTable will fill in the IGP metric that was used in deciding the route was a winner.
PolicyTags _policytags
RefPf _pfilter [3]

Member Function Documentation

uint32_t RouteMetaData::aggr_prefix_len ( ) const [inline]

Read the aggregation prefix length marker.

The field is also used for storing aggregation markers.

uint32_t RouteMetaData::igp_metric ( ) const [inline]
Returns:
the IGP routing protocol metric that applied when the route won the decision process. If the route has not won, this value is undefined.
bool RouteMetaData::in_use ( ) const [inline]
Returns:
whether or not this route is in use. "in use" here does not mean the route won the decision process, but rather that it was at least a contender for decision, and was not filtered in the incoming filter bank.
bool RouteMetaData::is_filtered ( ) const [inline]

is_filtered returns true if the route was filtered out by the incoming filter bank, false otherwise.

As such it only makes sense calling this on routes that are stored in the RibIn.

bool RouteMetaData::is_winner ( ) const [inline]

returns true if the route was chosen by the routing decision process as the winning route for this subnet.

is_winner should NOT be called by anything other than the DecisionTable because caching means that it may not return the right answer anywhere else

const PolicyTags& RouteMetaData::policytags ( ) const [inline]
Returns:
policy tags associated with route.
void RouteMetaData::set_aggr_prefix_len ( uint32_t  preflen) [inline]

Set the target prefix length on an candidate for aggregation.

The field is also used for storing aggregation markers.

Parameters:
preflenprefix length of the requested aggregate route.
void RouteMetaData::set_filtered ( bool  filtered) [inline]

set_filtered record whether or not the route was filtered out by the incoming filter bank.

As such it only makes sense calling this on routes that are stored in the RibIn.

Parameters:
filteredtrue if the route was filtered, false otherwise.
void RouteMetaData::set_in_use ( bool  used) [inline]

Record whether or not this route is in use.

"in use" here does not mean the route won the decision process, but rather that it was at least a contender for decision, and was not filtered in the incoming filter bank.

Parameters:
usedtrue if the route is "in use".
void RouteMetaData::set_is_winner ( uint32_t  igp_metric) [inline]

when a route is chosen by the routing decision process as the winning route for this subnet, set_is_winner should be called to record this fact and to record the igp_metric at the time the route was chosen.

set_is_winner should NOT be called by anything other than the DecisionTable because caching means that it may not return the right answer anywhere else

void RouteMetaData::set_policytags ( const PolicyTags tags) [inline]

Replaced policy tags of route.

Parameters:
tagsnew policy tags for route.

Member Data Documentation

uint32_t RouteMetaData::_flags [private]

Flag definitions:

SRF_IN_USE indicates whether this route is currently used for anything. The route might not be used if it wasn't chosen by the BGP decision mechanism, or if a downstream filter caused a modified version of this route to be installed in a cache table

SRF_WINNER indicates that the route won the decision process.

SRF_FILTERED indicates that the route was filtered downstream. Currently this is only used for RIB-IN routes that are filtered in the inbound filter bank

SRF_REFCOUNT (16 bits) maintains a reference count of the number of objects depending on this SubnetRoute instance. Deletion will be delayed until the reference count reaches zero


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