OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BgpPath Class Reference

#include <bgp_path.h>

Inheritance diagram for BgpPath:
Collaboration diagram for BgpPath:

Public Types

enum  PathFlag {
  AsPathLooped = 1 << 0, NoNeighborAs = 1 << 1, Stale = 1 << 2, NoTunnelEncap = 1 << 3,
  OriginatorIdLooped = 1 << 4, ResolveNexthop = 1 << 5, ResolvedPath = 1 << 6, RoutingPolicyReject = 1 << 7,
  LlgrStale = 1 << 8, ClusterListLooped = 1 << 9, AliasedPath = 1 << 10, CheckGlobalErmVpnRoute = 1 << 11
}
 
enum  PathSource {
  None = 0, BGP_XMPP = 1, ServiceChain = 2, StaticRoute = 3,
  Aggregate = 4, Local = 5
}
 

Public Member Functions

 BgpPath (const IPeer *peer, uint32_t path_id, PathSource src, const BgpAttrPtr ptr, uint32_t flags, uint32_t label, uint32_t l3_label=0)
 
 BgpPath (const IPeer *peer, PathSource src, const BgpAttrPtr attr, uint32_t flags, uint32_t label, uint32_t l3_label=0)
 
 BgpPath (uint32_t path_id, PathSource src, const BgpAttrPtr attr, uint32_t flags=0, uint32_t label=0, uint32_t l3_label=0)
 
 BgpPath (PathSource src, const BgpAttrPtr attr, uint32_t flags=0, uint32_t label=0, uint32_t l3_label=0)
 
virtual ~BgpPath ()
 
void AddExtCommunitySubCluster (uint32_t subcluster_id)
 
RouteDistinguisher GetSourceRouteDistinguisher () const
 
bool IsVrfOriginated () const
 
IPeerGetPeer ()
 
const IPeerGetPeer () const
 
const uint32_t GetPathId () const
 
void UpdatePeerRefCount (int count, Address::Family family) const
 
void SetAttr (const BgpAttrPtr attr, const BgpAttrPtr original_attr)
 
const BgpAttrGetAttr () const
 
const BgpAttrGetOriginalAttr () const
 
uint32_t GetLabel () const
 
uint32_t GetL3Label () const
 
virtual bool IsReplicated () const
 
bool IsFeasible () const
 
bool IsResolutionFeasible () const
 
bool IsAliased () const
 
bool IsResolved () const
 
uint32_t GetFlags () const
 
std::vector< std::string > GetFlagsStringList () const
 
PathSource GetSource () const
 
std::string GetSourceString (bool combine_bgp_and_xmpp=false) const
 
bool IsStale () const
 
bool IsLlgrStale () const
 
void SetPolicyReject ()
 
void ResetPolicyReject ()
 
bool IsPolicyReject () const
 
void SetStale ()
 
void ResetStale ()
 
void SetResolveNextHop ()
 
void ResetResolveNextHop ()
 
void SetLlgrStale ()
 
void ResetLlgrStale ()
 
bool NeedsResolution () const
 
bool CheckErmVpn () const
 
void ResetCheckErmVpn ()
 
void SetCheckErmVpn ()
 
virtual std::string ToString () const
 
int PathCompare (const BgpPath &rhs, bool allow_ecmp) const
 
bool PathSameNeighborAs (const BgpPath &rhs) const
 
- Public Member Functions inherited from Path
 Path ()
 
virtual ~Path ()
 
const uint64_t time_stamp_usecs () const
 
void set_time_stamp_usecs (uint64_t time_stamp_usecs)
 

Static Public Member Functions

static std::string PathIdString (uint32_t path_id)
 

Static Public Attributes

static const uint32_t INFEASIBLE_MASK
 

Private Attributes

const IPeerpeer_
 
const uint32_t path_id_
 
const PathSource source_
 
BgpAttrPtr attr_
 
BgpAttrPtr original_attr_
 
uint32_t flags_
 
uint32_t label_
 
uint32_t l3_label_
 

Detailed Description

Definition at line 19 of file bgp_path.h.

Member Enumeration Documentation

Enumerator
AsPathLooped 
NoNeighborAs 
Stale 
NoTunnelEncap 
OriginatorIdLooped 
ResolveNexthop 
ResolvedPath 
RoutingPolicyReject 
LlgrStale 
ClusterListLooped 
AliasedPath 
CheckGlobalErmVpnRoute 

Definition at line 21 of file bgp_path.h.

Enumerator
None 
BGP_XMPP 
ServiceChain 
StaticRoute 
Aggregate 
Local 

Definition at line 37 of file bgp_path.h.

Constructor & Destructor Documentation

BgpPath::BgpPath ( const IPeer peer,
uint32_t  path_id,
PathSource  src,
const BgpAttrPtr  ptr,
uint32_t  flags,
uint32_t  label,
uint32_t  l3_label = 0 
)

Definition at line 23 of file bgp_path.cc.

BgpPath::BgpPath ( const IPeer peer,
PathSource  src,
const BgpAttrPtr  attr,
uint32_t  flags,
uint32_t  label,
uint32_t  l3_label = 0 
)

Definition at line 30 of file bgp_path.cc.

BgpPath::BgpPath ( uint32_t  path_id,
PathSource  src,
const BgpAttrPtr  attr,
uint32_t  flags = 0,
uint32_t  label = 0,
uint32_t  l3_label = 0 
)

Definition at line 36 of file bgp_path.cc.

BgpPath::BgpPath ( PathSource  src,
const BgpAttrPtr  attr,
uint32_t  flags = 0,
uint32_t  label = 0,
uint32_t  l3_label = 0 
)

Definition at line 42 of file bgp_path.cc.

virtual BgpPath::~BgpPath ( )
inlinevirtual

Definition at line 61 of file bgp_path.h.

Member Function Documentation

void BgpPath::AddExtCommunitySubCluster ( uint32_t  subcluster_id)

Definition at line 304 of file bgp_path.cc.

Here is the call graph for this function:

bool BgpPath::CheckErmVpn ( ) const
inline

Definition at line 136 of file bgp_path.h.

const BgpAttr* BgpPath::GetAttr ( ) const
inline

Definition at line 87 of file bgp_path.h.

uint32_t BgpPath::GetFlags ( ) const
inline

Definition at line 100 of file bgp_path.h.

vector< string > BgpPath::GetFlagsStringList ( ) const

Definition at line 191 of file bgp_path.cc.

uint32_t BgpPath::GetL3Label ( ) const
inline

Definition at line 90 of file bgp_path.h.

uint32_t BgpPath::GetLabel ( ) const
inline

Definition at line 89 of file bgp_path.h.

const BgpAttr* BgpPath::GetOriginalAttr ( ) const
inline

Definition at line 88 of file bgp_path.h.

const uint32_t BgpPath::GetPathId ( ) const
inline

Definition at line 78 of file bgp_path.h.

IPeer* BgpPath::GetPeer ( )
inline

Definition at line 76 of file bgp_path.h.

const IPeer* BgpPath::GetPeer ( ) const
inline

Definition at line 77 of file bgp_path.h.

PathSource BgpPath::GetSource ( ) const
inline

Definition at line 103 of file bgp_path.h.

RouteDistinguisher BgpPath::GetSourceRouteDistinguisher ( ) const

Definition at line 181 of file bgp_path.cc.

Here is the call graph for this function:

string BgpPath::GetSourceString ( bool  combine_bgp_and_xmpp = false) const

Definition at line 270 of file bgp_path.cc.

Here is the call graph for this function:

bool BgpPath::IsAliased ( ) const
inline

Definition at line 98 of file bgp_path.h.

bool BgpPath::IsFeasible ( ) const
inline

Definition at line 92 of file bgp_path.h.

bool BgpPath::IsLlgrStale ( ) const
inline

Definition at line 110 of file bgp_path.h.

bool BgpPath::IsPolicyReject ( ) const
inline

Definition at line 118 of file bgp_path.h.

virtual bool BgpPath::IsReplicated ( ) const
inlinevirtual

Reimplemented in BgpSecondaryPath.

Definition at line 91 of file bgp_path.h.

bool BgpPath::IsResolutionFeasible ( ) const
inline

Definition at line 94 of file bgp_path.h.

bool BgpPath::IsResolved ( ) const
inline

Definition at line 99 of file bgp_path.h.

bool BgpPath::IsStale ( ) const
inline

Definition at line 107 of file bgp_path.h.

bool BgpPath::IsVrfOriginated ( ) const
inline

Definition at line 68 of file bgp_path.h.

Here is the call graph for this function:

bool BgpPath::NeedsResolution ( ) const
inline

Definition at line 135 of file bgp_path.h.

int BgpPath::PathCompare ( const BgpPath rhs,
bool  allow_ecmp 
) const

Definition at line 58 of file bgp_path.cc.

Here is the call graph for this function:

string BgpPath::PathIdString ( uint32_t  path_id)
static

Definition at line 18 of file bgp_path.cc.

bool BgpPath::PathSameNeighborAs ( const BgpPath rhs) const

Definition at line 159 of file bgp_path.cc.

Here is the call graph for this function:

void BgpPath::ResetCheckErmVpn ( )
inline

Definition at line 139 of file bgp_path.h.

void BgpPath::ResetLlgrStale ( )
inline

Definition at line 133 of file bgp_path.h.

void BgpPath::ResetPolicyReject ( )
inline

Definition at line 116 of file bgp_path.h.

void BgpPath::ResetResolveNextHop ( )
inline

Definition at line 130 of file bgp_path.h.

void BgpPath::ResetStale ( )
inline

Definition at line 126 of file bgp_path.h.

void BgpPath::SetAttr ( const BgpAttrPtr  attr,
const BgpAttrPtr  original_attr 
)
inline

Definition at line 82 of file bgp_path.h.

void BgpPath::SetCheckErmVpn ( )
inline

Definition at line 140 of file bgp_path.h.

void BgpPath::SetLlgrStale ( )
inline

Definition at line 132 of file bgp_path.h.

void BgpPath::SetPolicyReject ( )
inline

Definition at line 113 of file bgp_path.h.

void BgpPath::SetResolveNextHop ( )
inline

Definition at line 129 of file bgp_path.h.

void BgpPath::SetStale ( )
inline

Definition at line 123 of file bgp_path.h.

string BgpPath::ToString ( ) const
virtual

Implements Path.

Definition at line 177 of file bgp_path.cc.

Here is the call graph for this function:

void BgpPath::UpdatePeerRefCount ( int  count,
Address::Family  family 
) const

Definition at line 168 of file bgp_path.cc.

Here is the call graph for this function:

Member Data Documentation

BgpAttrPtr BgpPath::attr_
private

Definition at line 154 of file bgp_path.h.

uint32_t BgpPath::flags_
private

Definition at line 157 of file bgp_path.h.

const uint32_t BgpPath::INFEASIBLE_MASK
static
uint32_t BgpPath::l3_label_
private

Definition at line 159 of file bgp_path.h.

uint32_t BgpPath::label_
private

Definition at line 158 of file bgp_path.h.

BgpAttrPtr BgpPath::original_attr_
private

Definition at line 156 of file bgp_path.h.

const uint32_t BgpPath::path_id_
private

Definition at line 150 of file bgp_path.h.

const IPeer* BgpPath::peer_
private

Definition at line 149 of file bgp_path.h.

const PathSource BgpPath::source_
private

Definition at line 151 of file bgp_path.h.


The documentation for this class was generated from the following files: