OpenSDN source code
AsPathSpec Struct Reference

#include <bgp_aspath.h>

Inheritance diagram for AsPathSpec:
Collaboration diagram for AsPathSpec:

Classes

struct  PathSegment
 

Public Member Functions

 AsPathSpec ()
 
 AsPathSpec (const BgpAttribute &rhs)
 
 AsPathSpec (const AsPathSpec &rhs)
 
 ~AsPathSpec ()
 
as2_t AsLeftMost () const
 
bool AsLeftMostMatch (as2_t as) const
 
as2_t AsLeftMostPublic () const
 
bool AsPathLoop (as2_t as, uint8_t max_loop_count=0) const
 
virtual int CompareTo (const BgpAttribute &rhs_attr) const
 
virtual void ToCanonical (BgpAttr *attr)
 
virtual size_t EncodeLength () const
 
virtual std::string ToString () const
 
AsPathSpecAdd (as2_t asn) const
 
AsPathSpecAdd (const std::vector< as2_t > &asn_list) const
 
AsPathSpecAdd (const std::vector< as_t > &asn_list) const
 
AsPathSpecReplace (as2_t old_asn, as2_t asn) const
 
AsPathSpecRemovePrivate (bool all, as2_t asn, as2_t peer_as) const
 
- Public Member Functions inherited from BgpAttribute
 BgpAttribute ()
 
 BgpAttribute (uint8_t code, uint8_t flags)
 
 BgpAttribute (uint8_t code, uint8_t subcode, uint8_t flags)
 
uint8_t GetEncodeFlags () const
 
- Public Member Functions inherited from ParseObject
virtual ~ParseObject ()
 

Static Public Member Functions

static bool AsIsPrivate (as2_t as)
 

Public Attributes

std::vector< PathSegment * > path_segments
 
- Public Attributes inherited from BgpAttribute
uint8_t code
 
uint8_t subcode
 
uint8_t flags
 

Static Public Attributes

static const int kSize = -1
 
static const uint8_t kFlags = Transitive
 
static const as2_t kMinPrivateAs = 64512
 
static const as2_t kMaxPrivateAs = 65534
 
- Static Public Attributes inherited from BgpAttribute
static const uint8_t FLAG_MASK = Optional|Transitive
 

Additional Inherited Members

- Public Types inherited from BgpAttribute
enum  Flag { Optional = 1 << 7 , Transitive = 1 << 6 , Partial = 1 << 5 , ExtendedLength = 1 << 4 }
 
enum  Code {
  Reserved = 0 , Origin = 1 , AsPath = 2 , NextHop = 3 ,
  MultiExitDisc = 4 , LocalPref = 5 , AtomicAggregate = 6 , Aggregator = 7 ,
  Communities = 8 , OriginatorId = 9 , ClusterList = 10 , MPReachNlri = 14 ,
  MPUnreachNlri = 15 , ExtendedCommunities = 16 , As4Path = 17 , As4Aggregator = 18 ,
  PmsiTunnel = 22 , McastEdgeDiscovery = 241 , McastEdgeForwarding = 242 , OriginVnPath = 243
}
 
enum  Subcode {
  OList = 1 , LabelBlock = 2 , SourceRd = 3 , Esi = 4 ,
  Params = 5 , LeafOList = 6 , SubProtocol = 7
}
 

Detailed Description

Definition at line 27 of file bgp_aspath.h.

Constructor & Destructor Documentation

◆ AsPathSpec() [1/3]

AsPathSpec::AsPathSpec ( )
inline

Definition at line 33 of file bgp_aspath.h.

◆ AsPathSpec() [2/3]

AsPathSpec::AsPathSpec ( const BgpAttribute rhs)
inlineexplicit

Definition at line 34 of file bgp_aspath.h.

◆ AsPathSpec() [3/3]

AsPathSpec::AsPathSpec ( const AsPathSpec rhs)
inlineexplicit

Definition at line 35 of file bgp_aspath.h.

◆ ~AsPathSpec()

AsPathSpec::~AsPathSpec ( )
inline

Definition at line 43 of file bgp_aspath.h.

Here is the call graph for this function:

Member Function Documentation

◆ Add() [1/3]

AsPathSpec * AsPathSpec::Add ( as2_t  asn) const

Definition at line 130 of file bgp_aspath.cc.

◆ Add() [2/3]

AsPathSpec* AsPathSpec::Add ( const std::vector< as2_t > &  asn_list) const

◆ Add() [3/3]

AsPathSpec* AsPathSpec::Add ( const std::vector< as_t > &  asn_list) const

◆ AsIsPrivate()

static bool AsPathSpec::AsIsPrivate ( as2_t  as)
inlinestatic

Definition at line 65 of file bgp_aspath.h.

◆ AsLeftMost()

as2_t AsPathSpec::AsLeftMost ( ) const

Definition at line 21 of file bgp_aspath.cc.

◆ AsLeftMostMatch()

bool AsPathSpec::AsLeftMostMatch ( as2_t  as) const

Definition at line 34 of file bgp_aspath.cc.

◆ AsLeftMostPublic()

as2_t AsPathSpec::AsLeftMostPublic ( ) const

Definition at line 45 of file bgp_aspath.cc.

Here is the call graph for this function:

◆ AsPathLoop()

bool AsPathSpec::AsPathLoop ( as2_t  as,
uint8_t  max_loop_count = 0 
) const

Definition at line 114 of file bgp_aspath.cc.

◆ CompareTo()

int AsPathSpec::CompareTo ( const BgpAttribute rhs_attr) const
virtual

Reimplemented from BgpAttribute.

Definition at line 56 of file bgp_aspath.cc.

Here is the call graph for this function:

◆ EncodeLength()

size_t AsPathSpec::EncodeLength ( ) const
virtual

Reimplemented from BgpAttribute.

Definition at line 101 of file bgp_aspath.cc.

◆ RemovePrivate()

AsPathSpec * AsPathSpec::RemovePrivate ( bool  all,
as2_t  asn,
as2_t  peer_as 
) const

Definition at line 228 of file bgp_aspath.cc.

Here is the call graph for this function:

◆ Replace()

AsPathSpec * AsPathSpec::Replace ( as2_t  old_asn,
as2_t  asn 
) const

Definition at line 206 of file bgp_aspath.cc.

Here is the call graph for this function:

◆ ToCanonical()

void AsPathSpec::ToCanonical ( BgpAttr attr)
virtual

Reimplemented from BgpAttribute.

Definition at line 69 of file bgp_aspath.cc.

Here is the call graph for this function:

◆ ToString()

string AsPathSpec::ToString ( ) const
virtual

Reimplemented from BgpAttribute.

Definition at line 73 of file bgp_aspath.cc.

Member Data Documentation

◆ kFlags

const uint8_t AsPathSpec::kFlags = Transitive
static

Definition at line 29 of file bgp_aspath.h.

◆ kMaxPrivateAs

const as2_t AsPathSpec::kMaxPrivateAs = 65534
static

Definition at line 31 of file bgp_aspath.h.

◆ kMinPrivateAs

const as2_t AsPathSpec::kMinPrivateAs = 64512
static

Definition at line 30 of file bgp_aspath.h.

◆ kSize

const int AsPathSpec::kSize = -1
static

Definition at line 28 of file bgp_aspath.h.

◆ path_segments

std::vector<PathSegment *> AsPathSpec::path_segments

Definition at line 79 of file bgp_aspath.h.


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