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

#include <community.h>

Collaboration diagram for ExtCommunity:

Public Types

typedef boost::array< uint8_t, 8 > ExtCommunityValue
 
typedef std::vector
< ExtCommunityValue
ExtCommunityList
 

Public Member Functions

 ExtCommunity (ExtCommunityDB *extcomm_db)
 
 ExtCommunity (const ExtCommunity &rhs)
 
 ExtCommunity (ExtCommunityDB *extcomm_db, const ExtCommunitySpec spec)
 
virtual ~ExtCommunity ()
 
virtual void Remove ()
 
int CompareTo (const ExtCommunity &rhs) const
 
bool ContainsRTarget (const ExtCommunityValue &val) const
 
bool ContainsOriginVn (as_t asn, uint32_t vn_index) const
 
bool ContainsOriginVn (const ExtCommunityValue &val) const
 
bool ContainsOriginVn4 (const ExtCommunityValue &val) const
 
bool ContainsVrfRouteImport (const ExtCommunityValue &val) const
 
bool ContainsSourceAs (const ExtCommunityValue &val) const
 
uint32_t GetSubClusterId () const
 
const ExtCommunityListcommunities () const
 
std::vector< std::string > GetTunnelEncap () const
 
std::vector< int > GetTagList (as2_t asn=0) const
 
std::vector< int > GetTag4List (as_t asn=0) const
 
bool ContainsTunnelEncapVxlan () const
 
int GetOriginVnIndex () const
 

Static Public Member Functions

static ExtCommunityList ExtCommunityFromString (const std::string &comm)
 
static ExtCommunityValue FromHexString (const std::string &comm, boost::system::error_code *errorp)
 
static bool is_origin_vn (const ExtCommunityValue &val)
 
static bool is_default_gateway (const ExtCommunityValue &val)
 
static bool is_es_import (const ExtCommunityValue &val)
 
static bool is_esi_label (const ExtCommunityValue &val)
 
static bool is_mac_mobility (const ExtCommunityValue &val)
 
static bool is_local_sequence_number (const ExtCommunityValue &val)
 
static bool is_etree (const ExtCommunityValue &val)
 
static bool is_multicast_flags (const ExtCommunityValue &val)
 
static bool is_router_mac (const ExtCommunityValue &val)
 
static bool is_route_target (const ExtCommunityValue &val)
 
static uint32_t get_rtarget_val (const ExtCommunityValue &val)
 
static bool is_security_group (const ExtCommunityValue &val)
 
static bool is_security_group4 (const ExtCommunityValue &val)
 
static bool is_site_of_origin (const ExtCommunityValue &val)
 
static bool is_source_as (const ExtCommunityValue &val)
 
static bool is_sub_cluster (const ExtCommunityValue &val)
 
static bool is_vrf_route_import (const ExtCommunityValue &val)
 
static bool is_tunnel_encap (const ExtCommunityValue &val)
 
static bool is_load_balance (const ExtCommunityValue &val)
 
static bool is_tag (const ExtCommunityValue &val)
 
static bool is_tag4 (const ExtCommunityValue &val)
 
static std::string ToString (const ExtCommunityValue &val)
 
static std::string ToHexString (const ExtCommunityValue &val)
 

Private Member Functions

void Append (const ExtCommunityValue &value)
 
void Append (const ExtCommunityList &list)
 
void Remove (const ExtCommunityList &list)
 
void RemoveMFlags ()
 
void RemoveRTarget ()
 
void RemoveSGID ()
 
void RemoveTag ()
 
void RemoveSiteOfOrigin ()
 
void RemoveSourceAS ()
 
void RemoveVrfRouteImport ()
 
void RemoveOriginVn ()
 
void RemoveTunnelEncapsulation ()
 
void RemoveLoadBalance ()
 
void RemoveSubCluster ()
 
void Set (const ExtCommunityList &list)
 

Private Attributes

tbb::atomic< int > refcount_
 
ExtCommunityDBextcomm_db_
 
ExtCommunityList communities_
 

Friends

class ExtCommunityDB
 
class BgpAttrTest
 
std::size_t hash_value (ExtCommunity const &comm)
 
int intrusive_ptr_add_ref (const ExtCommunity *cextcomm)
 
int intrusive_ptr_del_ref (const ExtCommunity *cextcomm)
 
void intrusive_ptr_release (const ExtCommunity *cextcomm)
 

Detailed Description

Definition at line 150 of file community.h.

Member Typedef Documentation

Definition at line 153 of file community.h.

typedef boost::array<uint8_t, 8> ExtCommunity::ExtCommunityValue

Definition at line 152 of file community.h.

Constructor & Destructor Documentation

ExtCommunity::ExtCommunity ( ExtCommunityDB extcomm_db)
inlineexplicit

Definition at line 155 of file community.h.

ExtCommunity::ExtCommunity ( const ExtCommunity rhs)
inlineexplicit

Definition at line 159 of file community.h.

ExtCommunity::ExtCommunity ( ExtCommunityDB extcomm_db,
const ExtCommunitySpec  spec 
)
explicit

Definition at line 678 of file community.cc.

Here is the call graph for this function:

virtual ExtCommunity::~ExtCommunity ( )
inlinevirtual

Definition at line 167 of file community.h.

Member Function Documentation

void ExtCommunity::Append ( const ExtCommunityValue value)
private

Definition at line 264 of file community.cc.

void ExtCommunity::Append ( const ExtCommunityList list)
private

Definition at line 256 of file community.cc.

const ExtCommunityList& ExtCommunity::communities ( ) const
inline

Definition at line 180 of file community.h.

int ExtCommunity::CompareTo ( const ExtCommunity rhs) const

Definition at line 221 of file community.cc.

bool ExtCommunity::ContainsOriginVn ( as_t  asn,
uint32_t  vn_index 
) const

Definition at line 435 of file community.cc.

Here is the call graph for this function:

bool ExtCommunity::ContainsOriginVn ( const ExtCommunityValue val) const

Definition at line 426 of file community.cc.

Here is the call graph for this function:

bool ExtCommunity::ContainsOriginVn4 ( const ExtCommunityValue val) const
bool ExtCommunity::ContainsRTarget ( const ExtCommunityValue val) const

Definition at line 417 of file community.cc.

Here is the call graph for this function:

bool ExtCommunity::ContainsSourceAs ( const ExtCommunityValue val) const

Definition at line 446 of file community.cc.

Here is the call graph for this function:

bool ExtCommunity::ContainsTunnelEncapVxlan ( ) const

Definition at line 655 of file community.cc.

Here is the call graph for this function:

bool ExtCommunity::ContainsVrfRouteImport ( const ExtCommunityValue val) const

Definition at line 466 of file community.cc.

Here is the call graph for this function:

ExtCommunity::ExtCommunityList ExtCommunity::ExtCommunityFromString ( const std::string &  comm)
static

Definition at line 305 of file community.cc.

Here is the call graph for this function:

ExtCommunity::ExtCommunityValue ExtCommunity::FromHexString ( const std::string &  comm,
boost::system::error_code *  errorp 
)
static

Definition at line 272 of file community.cc.

Here is the call graph for this function:

static uint32_t ExtCommunity::get_rtarget_val ( const ExtCommunityValue val)
inlinestatic

Definition at line 278 of file community.h.

Here is the call graph for this function:

int ExtCommunity::GetOriginVnIndex ( ) const

Definition at line 667 of file community.cc.

Here is the call graph for this function:

uint32_t ExtCommunity::GetSubClusterId ( ) const

Definition at line 455 of file community.cc.

Here is the call graph for this function:

vector< int > ExtCommunity::GetTag4List ( as_t  asn = 0) const

Definition at line 632 of file community.cc.

Here is the call graph for this function:

vector< int > ExtCommunity::GetTagList ( as2_t  asn = 0) const

Definition at line 614 of file community.cc.

Here is the call graph for this function:

vector< string > ExtCommunity::GetTunnelEncap ( ) const

Definition at line 595 of file community.cc.

Here is the call graph for this function:

static bool ExtCommunity::is_default_gateway ( const ExtCommunityValue val)
inlinestatic

Definition at line 203 of file community.h.

static bool ExtCommunity::is_es_import ( const ExtCommunityValue val)
inlinestatic

Definition at line 211 of file community.h.

static bool ExtCommunity::is_esi_label ( const ExtCommunityValue val)
inlinestatic

Definition at line 219 of file community.h.

static bool ExtCommunity::is_etree ( const ExtCommunityValue val)
inlinestatic

Definition at line 240 of file community.h.

static bool ExtCommunity::is_load_balance ( const ExtCommunityValue val)
inlinestatic

Definition at line 372 of file community.h.

static bool ExtCommunity::is_local_sequence_number ( const ExtCommunityValue val)
inlinestatic

Definition at line 235 of file community.h.

static bool ExtCommunity::is_mac_mobility ( const ExtCommunityValue val)
inlinestatic

Definition at line 227 of file community.h.

static bool ExtCommunity::is_multicast_flags ( const ExtCommunityValue val)
inlinestatic

Definition at line 248 of file community.h.

static bool ExtCommunity::is_origin_vn ( const ExtCommunityValue val)
inlinestatic

Definition at line 193 of file community.h.

static bool ExtCommunity::is_route_target ( const ExtCommunityValue val)
inlinestatic

Definition at line 265 of file community.h.

static bool ExtCommunity::is_router_mac ( const ExtCommunityValue val)
inlinestatic

Definition at line 257 of file community.h.

static bool ExtCommunity::is_security_group ( const ExtCommunityValue val)
inlinestatic

Definition at line 304 of file community.h.

static bool ExtCommunity::is_security_group4 ( const ExtCommunityValue val)
inlinestatic

Definition at line 313 of file community.h.

static bool ExtCommunity::is_site_of_origin ( const ExtCommunityValue val)
inlinestatic

Definition at line 322 of file community.h.

static bool ExtCommunity::is_source_as ( const ExtCommunityValue val)
inlinestatic

Definition at line 335 of file community.h.

static bool ExtCommunity::is_sub_cluster ( const ExtCommunityValue val)
inlinestatic

Definition at line 346 of file community.h.

static bool ExtCommunity::is_tag ( const ExtCommunityValue val)
inlinestatic

Definition at line 378 of file community.h.

static bool ExtCommunity::is_tag4 ( const ExtCommunityValue val)
inlinestatic

Definition at line 384 of file community.h.

static bool ExtCommunity::is_tunnel_encap ( const ExtCommunityValue val)
inlinestatic

Definition at line 366 of file community.h.

static bool ExtCommunity::is_vrf_route_import ( const ExtCommunityValue val)
inlinestatic

Definition at line 357 of file community.h.

void ExtCommunity::Remove ( )
virtual

Definition at line 244 of file community.cc.

Here is the call graph for this function:

void ExtCommunity::Remove ( const ExtCommunityList list)
private

Definition at line 237 of file community.cc.

void ExtCommunity::RemoveLoadBalance ( )
private

Definition at line 573 of file community.cc.

Here is the call graph for this function:

void ExtCommunity::RemoveMFlags ( )
private

Definition at line 475 of file community.cc.

Here is the call graph for this function:

void ExtCommunity::RemoveOriginVn ( )
private

Definition at line 552 of file community.cc.

Here is the call graph for this function:

void ExtCommunity::RemoveRTarget ( )
private

Definition at line 486 of file community.cc.

Here is the call graph for this function:

void ExtCommunity::RemoveSGID ( )
private

Definition at line 497 of file community.cc.

Here is the call graph for this function:

void ExtCommunity::RemoveSiteOfOrigin ( )
private

Definition at line 520 of file community.cc.

Here is the call graph for this function:

void ExtCommunity::RemoveSourceAS ( )
private

Definition at line 531 of file community.cc.

Here is the call graph for this function:

void ExtCommunity::RemoveSubCluster ( )
private

Definition at line 584 of file community.cc.

Here is the call graph for this function:

void ExtCommunity::RemoveTag ( )
private

Definition at line 509 of file community.cc.

Here is the call graph for this function:

void ExtCommunity::RemoveTunnelEncapsulation ( )
private

Definition at line 562 of file community.cc.

Here is the call graph for this function:

void ExtCommunity::RemoveVrfRouteImport ( )
private

Definition at line 541 of file community.cc.

Here is the call graph for this function:

void ExtCommunity::Set ( const ExtCommunityList list)
private

Definition at line 248 of file community.cc.

string ExtCommunity::ToHexString ( const ExtCommunityValue val)
static

Definition at line 352 of file community.cc.

string ExtCommunity::ToString ( const ExtCommunityValue val)
static

Definition at line 361 of file community.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class BgpAttrTest
friend

Definition at line 407 of file community.h.

friend class ExtCommunityDB
friend

Definition at line 406 of file community.h.

std::size_t hash_value ( ExtCommunity const &  comm)
friend

Definition at line 390 of file community.h.

int intrusive_ptr_add_ref ( const ExtCommunity cextcomm)
friend

Definition at line 430 of file community.h.

int intrusive_ptr_del_ref ( const ExtCommunity cextcomm)
friend

Definition at line 434 of file community.h.

void intrusive_ptr_release ( const ExtCommunity cextcomm)
friend

Definition at line 438 of file community.h.

Member Data Documentation

ExtCommunityList ExtCommunity::communities_
private

Definition at line 427 of file community.h.

ExtCommunityDB* ExtCommunity::extcomm_db_
private

Definition at line 426 of file community.h.

tbb::atomic<int> ExtCommunity::refcount_
mutableprivate

Definition at line 425 of file community.h.


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