OpenSDN source code
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
 
IPeer * GetPeer ()
 
const IPeer * GetPeer () const
 
const uint32_t GetPathId () const
 
void UpdatePeerRefCount (int count, Address::Family family) const
 
void SetAttr (const BgpAttrPtr attr, const BgpAttrPtr original_attr)
 
const BgpAttr * GetAttr () const
 
const BgpAttr * GetOriginalAttr () 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 IPeer * peer_
 
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 20 of file bgp_path.h.

Member Enumeration Documentation

◆ PathFlag

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

Definition at line 22 of file bgp_path.h.

◆ PathSource

Enumerator
None 
BGP_XMPP 
ServiceChain 
StaticRoute 
Aggregate 
Local 

Definition at line 38 of file bgp_path.h.

Constructor & Destructor Documentation

◆ BgpPath() [1/4]

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 24 of file bgp_path.cc.

◆ BgpPath() [2/4]

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

Definition at line 31 of file bgp_path.cc.

◆ BgpPath() [3/4]

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 37 of file bgp_path.cc.

◆ BgpPath() [4/4]

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

Definition at line 43 of file bgp_path.cc.

◆ ~BgpPath()

virtual BgpPath::~BgpPath ( )
inlinevirtual

Definition at line 62 of file bgp_path.h.

Member Function Documentation

◆ AddExtCommunitySubCluster()

void BgpPath::AddExtCommunitySubCluster ( uint32_t  subcluster_id)

Definition at line 305 of file bgp_path.cc.

Here is the call graph for this function:

◆ CheckErmVpn()

bool BgpPath::CheckErmVpn ( ) const
inline

Definition at line 137 of file bgp_path.h.

◆ GetAttr()

const BgpAttr* BgpPath::GetAttr ( ) const
inline

Definition at line 88 of file bgp_path.h.

◆ GetFlags()

uint32_t BgpPath::GetFlags ( ) const
inline

Definition at line 101 of file bgp_path.h.

◆ GetFlagsStringList()

vector< string > BgpPath::GetFlagsStringList ( ) const

Definition at line 192 of file bgp_path.cc.

◆ GetL3Label()

uint32_t BgpPath::GetL3Label ( ) const
inline

Definition at line 91 of file bgp_path.h.

◆ GetLabel()

uint32_t BgpPath::GetLabel ( ) const
inline

Definition at line 90 of file bgp_path.h.

◆ GetOriginalAttr()

const BgpAttr* BgpPath::GetOriginalAttr ( ) const
inline

Definition at line 89 of file bgp_path.h.

◆ GetPathId()

const uint32_t BgpPath::GetPathId ( ) const
inline

Definition at line 79 of file bgp_path.h.

◆ GetPeer() [1/2]

IPeer* BgpPath::GetPeer ( )
inline

Definition at line 77 of file bgp_path.h.

◆ GetPeer() [2/2]

const IPeer* BgpPath::GetPeer ( ) const
inline

Definition at line 78 of file bgp_path.h.

◆ GetSource()

PathSource BgpPath::GetSource ( ) const
inline

Definition at line 104 of file bgp_path.h.

◆ GetSourceRouteDistinguisher()

RouteDistinguisher BgpPath::GetSourceRouteDistinguisher ( ) const

Definition at line 182 of file bgp_path.cc.

Here is the call graph for this function:

◆ GetSourceString()

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

Definition at line 271 of file bgp_path.cc.

Here is the call graph for this function:

◆ IsAliased()

bool BgpPath::IsAliased ( ) const
inline

Definition at line 99 of file bgp_path.h.

◆ IsFeasible()

bool BgpPath::IsFeasible ( ) const
inline

Definition at line 93 of file bgp_path.h.

◆ IsLlgrStale()

bool BgpPath::IsLlgrStale ( ) const
inline

Definition at line 111 of file bgp_path.h.

◆ IsPolicyReject()

bool BgpPath::IsPolicyReject ( ) const
inline

Definition at line 119 of file bgp_path.h.

◆ IsReplicated()

virtual bool BgpPath::IsReplicated ( ) const
inlinevirtual

Reimplemented in BgpSecondaryPath.

Definition at line 92 of file bgp_path.h.

◆ IsResolutionFeasible()

bool BgpPath::IsResolutionFeasible ( ) const
inline

Definition at line 95 of file bgp_path.h.

◆ IsResolved()

bool BgpPath::IsResolved ( ) const
inline

Definition at line 100 of file bgp_path.h.

◆ IsStale()

bool BgpPath::IsStale ( ) const
inline

Definition at line 108 of file bgp_path.h.

◆ IsVrfOriginated()

bool BgpPath::IsVrfOriginated ( ) const
inline

Definition at line 69 of file bgp_path.h.

Here is the call graph for this function:

◆ NeedsResolution()

bool BgpPath::NeedsResolution ( ) const
inline

Definition at line 136 of file bgp_path.h.

◆ PathCompare()

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

Definition at line 59 of file bgp_path.cc.

Here is the call graph for this function:

◆ PathIdString()

string BgpPath::PathIdString ( uint32_t  path_id)
static

Definition at line 19 of file bgp_path.cc.

◆ PathSameNeighborAs()

bool BgpPath::PathSameNeighborAs ( const BgpPath &  rhs) const

Definition at line 160 of file bgp_path.cc.

Here is the call graph for this function:

◆ ResetCheckErmVpn()

void BgpPath::ResetCheckErmVpn ( )
inline

Definition at line 140 of file bgp_path.h.

◆ ResetLlgrStale()

void BgpPath::ResetLlgrStale ( )
inline

Definition at line 134 of file bgp_path.h.

◆ ResetPolicyReject()

void BgpPath::ResetPolicyReject ( )
inline

Definition at line 117 of file bgp_path.h.

◆ ResetResolveNextHop()

void BgpPath::ResetResolveNextHop ( )
inline

Definition at line 131 of file bgp_path.h.

◆ ResetStale()

void BgpPath::ResetStale ( )
inline

Definition at line 127 of file bgp_path.h.

◆ SetAttr()

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

Definition at line 83 of file bgp_path.h.

◆ SetCheckErmVpn()

void BgpPath::SetCheckErmVpn ( )
inline

Definition at line 141 of file bgp_path.h.

◆ SetLlgrStale()

void BgpPath::SetLlgrStale ( )
inline

Definition at line 133 of file bgp_path.h.

◆ SetPolicyReject()

void BgpPath::SetPolicyReject ( )
inline

Definition at line 114 of file bgp_path.h.

◆ SetResolveNextHop()

void BgpPath::SetResolveNextHop ( )
inline

Definition at line 130 of file bgp_path.h.

◆ SetStale()

void BgpPath::SetStale ( )
inline

Definition at line 124 of file bgp_path.h.

◆ ToString()

string BgpPath::ToString ( ) const
virtual

Implements Path.

Definition at line 178 of file bgp_path.cc.

Here is the call graph for this function:

◆ UpdatePeerRefCount()

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

Definition at line 169 of file bgp_path.cc.

Here is the call graph for this function:

Member Data Documentation

◆ attr_

BgpAttrPtr BgpPath::attr_
private

Definition at line 155 of file bgp_path.h.

◆ flags_

uint32_t BgpPath::flags_
private

Definition at line 158 of file bgp_path.h.

◆ INFEASIBLE_MASK

const uint32_t BgpPath::INFEASIBLE_MASK
static
Initial value:

Definition at line 47 of file bgp_path.h.

◆ l3_label_

uint32_t BgpPath::l3_label_
private

Definition at line 160 of file bgp_path.h.

◆ label_

uint32_t BgpPath::label_
private

Definition at line 159 of file bgp_path.h.

◆ original_attr_

BgpAttrPtr BgpPath::original_attr_
private

Definition at line 157 of file bgp_path.h.

◆ path_id_

const uint32_t BgpPath::path_id_
private

Definition at line 151 of file bgp_path.h.

◆ peer_

const IPeer* BgpPath::peer_
private

Definition at line 150 of file bgp_path.h.

◆ source_

const PathSource BgpPath::source_
private

Definition at line 152 of file bgp_path.h.


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