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

#include <mvpn_table.h>

Inheritance diagram for MvpnTable:
Collaboration diagram for MvpnTable:

Classes

struct  RequestKey
 

Public Member Functions

 MvpnTable (DB *db, const std::string &name)
 
virtual std::unique_ptr< DBEntryAllocEntry (const DBRequestKey *key) const
 
virtual std::unique_ptr< DBEntryAllocEntryStr (const std::string &key) const
 
void CreateManager ()
 
void DestroyManager ()
 
virtual Address::Family family () const
 
bool IsMaster () const
 
virtual bool IsVpnTable () const
 
virtual size_t Hash (const DBEntry *entry) const
 
virtual size_t Hash (const DBRequestKey *key) const
 
virtual int PartitionCount () const
 
MvpnRouteFindSPMSIRoute (MvpnRoute *leaf_ad_rt)
 
const
ExtCommunity::ExtCommunityValue 
GetAutoVrfImportRouteTarget () const
 
virtual BgpRouteRouteReplicate (BgpServer *server, BgpTable *src_table, BgpRoute *src_rt, const BgpPath *path, ExtCommunityPtr ptr)
 
virtual bool Export (RibOut *ribout, Route *route, const RibPeerSet &peerset, UpdateInfoSList &info_slist)
 
size_t HashFunction (const MvpnPrefix &prefix) const
 
PathResolverCreatePathResolver ()
 
const MvpnManagermanager () const
 
MvpnManagermanager ()
 
bool RouteNotify (BgpServer *server, DBTablePartBase *root, DBEntryBase *e)
 
const MvpnProjectManagerGetProjectManager () const
 
MvpnProjectManagerGetProjectManager ()
 
const MvpnProjectManagerPartitionGetProjectManagerPartition (BgpRoute *route) const
 
void UpdateSecondaryTablesForReplication (BgpRoute *rt, TableSet *secondary_tables)
 
MvpnPrefix CreateType4LeafADRoutePrefix (const MvpnRoute *type3_rt)
 
MvpnPrefix CreateType3SPMSIRoutePrefix (const MvpnRoute *type7_rt)
 
MvpnPrefix CreateType2ADRoutePrefix ()
 
MvpnPrefix CreateType1ADRoutePrefix (const Ip4Address &originator_ip)
 
MvpnPrefix CreateType1ADRoutePrefix ()
 
MvpnPrefix CreateType7SourceTreeJoinRoutePrefix (MvpnRoute *rt) const
 
MvpnPrefix CreateLocalType7Prefix (MvpnRoute *rt) const
 
MvpnRouteFindType1ADRoute (const Ip4Address &originator_ip)
 
MvpnRouteFindType1ADRoute ()
 
const MvpnRouteFindType7SourceTreeJoinRoute (MvpnRoute *rt) const
 
MvpnRouteLocateType1ADRoute ()
 
MvpnRouteLocateType3SPMSIRoute (const MvpnRoute *type7_join_rt)
 
MvpnRouteLocateType4LeafADRoute (const MvpnRoute *type3_spmsi_rt)
 
MvpnRouteFindRoute (const MvpnPrefix &prefix)
 
const MvpnRouteFindRoute (const MvpnPrefix &prefix) const
 
void CreateMvpnManagers ()
 
bool IsProjectManagerUsable () const
 
- Public Member Functions inherited from BgpTable
 BgpTable (DB *db, const std::string &name)
 
 ~BgpTable ()
 
const RibOutMapribout_map ()
 
RibOutRibOutFind (const RibExportPolicy &policy)
 
RibOutRibOutLocate (BgpUpdateSender *sender, const RibExportPolicy &policy)
 
void RibOutDelete (const RibExportPolicy &policy)
 
virtual bool IsRoutingPolicySupported () const
 
virtual bool IsRouteAggregationSupported () const
 
void CheckAggregatorAttr (BgpAttr *attr) const
 
void CreateAsPath4Byte (BgpAttr *attr, as_t local_as) const
 
void CreateAsPath2Byte (BgpAttr *attr) const
 
void CreateAs4Path (BgpAttr *attr) const
 
bool Has4ByteAsn (BgpAttr *attr) const
 
void PrependAsToAsPath4Byte (BgpAttr *attr, as_t asn) const
 
void PrependAsToAsPath2Byte (BgpAttr *attr, as_t asn) const
 
void PrependAsToAsPath2Byte (BgpAttr *attr, as2_t asn) const
 
void PrependAsToAs4Path (BgpAttr *attr, as_t asn) const
 
UpdateInfoGetUpdateInfo (RibOut *ribout, BgpRoute *route, const RibPeerSet &peerset)
 
void ProcessDefaultTunnelEncapsulation (const RibOut *ribout, ExtCommunityDB *extcomm_db, BgpAttr *attr) const
 
void ManagedDelete ()
 
virtual void RetryDelete ()
 
void Shutdown ()
 
virtual bool MayDelete () const
 
bool IsDeleted () const
 
void LocatePathResolver ()
 
void DestroyPathResolver ()
 
RoutingInstancerouting_instance ()
 
const RoutingInstancerouting_instance () const
 
virtual void set_routing_instance (RoutingInstance *rtinstance)
 
BgpServerserver ()
 
const BgpServerserver () const
 
PathResolverpath_resolver ()
 
const PathResolverpath_resolver () const
 
LifetimeActordeleter ()
 
const LifetimeActordeleter () const
 
size_t GetPendingRiboutsCount (size_t *markers) const
 
void UpdatePathCount (const BgpPath *path, int count)
 
const uint64_t GetPrimaryPathCount () const
 
const uint64_t GetSecondaryPathCount () const
 
const uint64_t GetInfeasiblePathCount () const
 
const uint64_t GetStalePathCount () const
 
const uint64_t GetLlgrStalePathCount () const
 
void UpdateStalePathCount (int count)
 
void UpdateLlgrStalePathCount (int count)
 
bool IsAggregateRoute (const BgpRoute *route) const
 
bool IsContributingRoute (const BgpRoute *route) const
 
bool DeletePath (DBTablePartBase *root, BgpRoute *rt, BgpPath *path)
 
virtual void Input (DBTablePartition *root, DBClient *client, DBRequest *req)
 
bool InputCommon (DBTablePartBase *root, BgpRoute *rt, BgpPath *path, const IPeer *peer, DBRequest *req, DBRequest::DBOperation oper, BgpAttrPtr attrs, uint32_t path_id, uint32_t flags, uint32_t label, uint32_t l3_label)
 
void InputCommonPostProcess (DBTablePartBase *root, BgpRoute *rt, bool notify_rt)
 
void FillRibOutStatisticsInfo (std::vector< ShowRibOutStatistics > *sros_list) const
 
virtual BgpAttrPtr GetAttributes (BgpRoute *rt, BgpAttrPtr attrp, const IPeer *peer)
 
- Public Member Functions inherited from RouteTable
 RouteTable (DB *db, const std::string &name)
 
- Public Member Functions inherited from DBTable
 DBTable (DB *db, const std::string &name)
 
virtual ~DBTable ()
 
void Init ()
 
virtual DBTablePartitionAllocPartition (int index)
 
virtual DBEntryAdd (const DBRequest *req)
 
virtual bool OnChange (DBEntry *entry, const DBRequest *req)
 
virtual bool Delete (DBEntry *entry, const DBRequest *req)
 
void NotifyAllEntries ()
 
DBEntryFind (const DBEntry *entry)
 
const DBEntryFind (const DBEntry *entry) const
 
DBEntryFind (const DBRequestKey *key, int id=-1)
 
const DBEntryFind (const DBRequestKey *key, int id=-1) const
 
DBEntryFindNoLock (const DBEntry *entry)
 
DBEntryFindNoLock (const DBRequestKey *key)
 
virtual DBTablePartBaseGetTablePartition (const DBRequestKey *key)
 
virtual const DBTablePartBaseGetTablePartition (const DBRequestKey *key) const
 
virtual DBTablePartBaseGetTablePartition (const DBEntryBase *entry)
 
virtual const DBTablePartBaseGetTablePartition (const DBEntryBase *entry) const
 
virtual DBTablePartBaseGetTablePartition (const int index)
 
virtual const DBTablePartBaseGetTablePartition (const int index) const
 
virtual void Change (DBEntryBase *entry)
 
virtual size_t Size () const
 
DBTableWalkRef AllocWalker (WalkFn walk_fn, WalkCompleteFn walk_complete)
 
void ReleaseWalker (DBTableWalkRef &walk)
 
void WalkTable (DBTableWalkRef walk)
 
void WalkAgain (DBTableWalkRef walk)
 
void SetWalkIterationToYield (int count)
 
int GetWalkIterationToYield ()
 
void SetWalkTaskId (int task_id)
 
int GetWalkerTaskId ()
 
- Public Member Functions inherited from DBTableBase
 DBTableBase (DB *db, const std::string &name)
 
virtual ~DBTableBase ()
 
bool Enqueue (DBRequest *req)
 
void EnqueueRemove (DBEntryBase *db_entry)
 
virtual void AddRemoveCallback (const DBEntryBase *entry, bool add) const
 
ListenerId Register (ChangeCallback callback, const std::string &name="unspecified")
 
void Unregister (ListenerId listener)
 
void RunNotify (DBTablePartBase *tpart, DBEntryBase *entry)
 
void AddToDBStateCount (ListenerId listener, int count)
 
uint64_t GetDBStateCount (ListenerId listener)
 
bool empty () const
 
DBdatabase ()
 
const DBdatabase () const
 
const std::string & name () const
 
bool HasListeners () const
 
size_t GetListenerCount () const
 
void FillListeners (std::vector< ShowTableListener > *listeners) const
 
uint64_t enqueue_count () const
 
void incr_enqueue_count ()
 
void reset_enqueue_count ()
 
uint64_t input_count () const
 
void incr_input_count ()
 
void reset_input_count ()
 
uint64_t notify_count () const
 
void incr_notify_count ()
 
void reset_notify_count ()
 
bool HasWalkers () const
 
uint64_t walker_count () const
 
void incr_walker_count ()
 
uint64_t decr_walker_count ()
 
uint64_t walk_request_count () const
 
uint64_t walk_complete_count () const
 
uint64_t walk_cancel_count () const
 
uint64_t walk_again_count () const
 
uint64_t walk_count () const
 
void incr_walk_request_count ()
 
void incr_walk_complete_count ()
 
void incr_walk_cancel_count ()
 
void incr_walk_again_count ()
 
void incr_walk_count ()
 

Static Public Member Functions

static DBTableBaseCreateTable (DB *db, const std::string &name)
 
- Static Public Member Functions inherited from BgpTable
static bool PathSelection (const Path &path1, const Path &path2)
 
- Static Public Member Functions inherited from DBTable
static void DBStateClear (DBTable *table, ListenerId id)
 

Static Public Attributes

static const int kPartitionCount = 1
 
- Static Public Attributes inherited from DBTable
static const int kIterationToYield = 256
 
- Static Public Attributes inherited from DBTableBase
static const int kInvalidId = -1
 

Private Types

typedef std::set< std::string > MvpnManagerNetworks
 
typedef std::map< std::string,
MvpnManagerNetworks
MvpnProjectManagerNetworks
 

Private Member Functions

void DeleteMvpnManager ()
 
virtual BgpRouteTableFind (DBTablePartition *rtp, const DBRequestKey *prefix)
 
MvpnRouteLocateRoute (const MvpnPrefix &prefix)
 
UpdateInfoGetMvpnUpdateInfo (RibOut *ribout, MvpnRoute *route, const RibPeerSet &peerset)
 
void GetPeerSet (RibOut *ribout, MvpnRoute *route, const RibPeerSet &peerset, RibPeerSet *new_peerset)
 
BgpRouteReplicateType7SourceTreeJoin (BgpServer *server, MvpnTable *src_table, MvpnRoute *src_rt, const BgpPath *src_path, ExtCommunityPtr ext_community)
 
BgpRouteReplicatePath (BgpServer *server, const MvpnPrefix &mprefix, MvpnTable *src_table, MvpnRoute *src_rt, const BgpPath *src_path, ExtCommunityPtr comm)
 
const MvpnTabletable () const
 
 DISALLOW_COPY_AND_ASSIGN (MvpnTable)
 

Private Attributes

MvpnManagermanager_
 

Friends

class BgpMulticastTest
 

Additional Inherited Members

- Public Types inherited from BgpTable
typedef std::map
< RibExportPolicy, RibOut * > 
RibOutMap
 
typedef std::set< BgpTable * > TableSet
 
- Public Types inherited from DBTable
typedef boost::intrusive_ptr
< DBTableWalk
DBTableWalkRef
 
typedef boost::function< bool(DBTablePartBase
*, DBEntryBase *)> 
WalkFn
 
typedef boost::function< void(DBTableWalkRef,
DBTableBase *)> 
WalkCompleteFn
 
- Public Types inherited from DBTableBase
typedef boost::function< void(DBTablePartBase
*, DBEntryBase *)> 
ChangeCallback
 
typedef int ListenerId
 

Detailed Description

Definition at line 24 of file mvpn_table.h.

Member Typedef Documentation

typedef std::set<std::string> MvpnTable::MvpnManagerNetworks
private

Definition at line 94 of file mvpn_table.h.

typedef std::map<std::string, MvpnManagerNetworks> MvpnTable::MvpnProjectManagerNetworks
private

Definition at line 96 of file mvpn_table.h.

Constructor & Destructor Documentation

MvpnTable::MvpnTable ( DB db,
const std::string &  name 
)

Definition at line 45 of file mvpn_table.cc.

Member Function Documentation

unique_ptr< DBEntry > MvpnTable::AllocEntry ( const DBRequestKey key) const
virtual

Implements DBTable.

Definition at line 57 of file mvpn_table.cc.

unique_ptr< DBEntry > MvpnTable::AllocEntryStr ( const std::string &  key) const
virtual

Implements BgpTable.

Definition at line 63 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnPrefix MvpnTable::CreateLocalType7Prefix ( MvpnRoute rt) const

Definition at line 319 of file mvpn_table.cc.

Here is the call graph for this function:

void MvpnTable::CreateManager ( )

Definition at line 96 of file mvpn_table.cc.

Here is the call graph for this function:

void MvpnTable::CreateMvpnManagers ( )

Definition at line 123 of file mvpn_table.cc.

Here is the call graph for this function:

PathResolver * MvpnTable::CreatePathResolver ( )
virtual

Reimplemented from BgpTable.

Definition at line 49 of file mvpn_table.cc.

Here is the call graph for this function:

DBTableBase * MvpnTable::CreateTable ( DB db,
const std::string &  name 
)
static

Definition at line 90 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnPrefix MvpnTable::CreateType1ADRoutePrefix ( const Ip4Address originator_ip)

Definition at line 354 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnPrefix MvpnTable::CreateType1ADRoutePrefix ( )

Definition at line 362 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnPrefix MvpnTable::CreateType2ADRoutePrefix ( )

Definition at line 347 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnPrefix MvpnTable::CreateType3SPMSIRoutePrefix ( const MvpnRoute type7_rt)

Definition at line 308 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnPrefix MvpnTable::CreateType4LeafADRoutePrefix ( const MvpnRoute type3_rt)

Definition at line 295 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnPrefix MvpnTable::CreateType7SourceTreeJoinRoutePrefix ( MvpnRoute rt) const

Definition at line 328 of file mvpn_table.cc.

Here is the call graph for this function:

void MvpnTable::DeleteMvpnManager ( )
private

Definition at line 160 of file mvpn_table.cc.

Here is the call graph for this function:

void MvpnTable::DestroyManager ( )

Definition at line 113 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnTable::DISALLOW_COPY_AND_ASSIGN ( MvpnTable  )
private
bool MvpnTable::Export ( RibOut ribout,
Route route,
const RibPeerSet peerset,
UpdateInfoSList info_slist 
)
virtual

Implements BgpTable.

Definition at line 593 of file mvpn_table.cc.

Here is the call graph for this function:

virtual Address::Family MvpnTable::family ( ) const
inlinevirtual

Implements BgpTable.

Definition at line 43 of file mvpn_table.h.

MvpnRoute * MvpnTable::FindRoute ( const MvpnPrefix prefix)

Definition at line 266 of file mvpn_table.cc.

Here is the call graph for this function:

const MvpnRoute * MvpnTable::FindRoute ( const MvpnPrefix prefix) const

Definition at line 273 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnRoute* MvpnTable::FindSPMSIRoute ( MvpnRoute leaf_ad_rt)
inline

Definition at line 50 of file mvpn_table.h.

MvpnRoute * MvpnTable::FindType1ADRoute ( const Ip4Address originator_ip)

Definition at line 371 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnRoute * MvpnTable::FindType1ADRoute ( )

Definition at line 376 of file mvpn_table.cc.

Here is the call graph for this function:

const MvpnRoute * MvpnTable::FindType7SourceTreeJoinRoute ( MvpnRoute rt) const

Definition at line 381 of file mvpn_table.cc.

Here is the call graph for this function:

const ExtCommunity::ExtCommunityValue MvpnTable::GetAutoVrfImportRouteTarget ( ) const
inline

Definition at line 51 of file mvpn_table.h.

UpdateInfo * MvpnTable::GetMvpnUpdateInfo ( RibOut ribout,
MvpnRoute route,
const RibPeerSet peerset 
)
private

Definition at line 634 of file mvpn_table.cc.

Here is the call graph for this function:

void MvpnTable::GetPeerSet ( RibOut ribout,
MvpnRoute route,
const RibPeerSet peerset,
RibPeerSet new_peerset 
)
private

Definition at line 616 of file mvpn_table.cc.

Here is the call graph for this function:

const MvpnProjectManager * MvpnTable::GetProjectManager ( ) const

Definition at line 185 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnProjectManager * MvpnTable::GetProjectManager ( )

Definition at line 177 of file mvpn_table.cc.

Here is the call graph for this function:

const MvpnProjectManagerPartition * MvpnTable::GetProjectManagerPartition ( BgpRoute route) const

Definition at line 222 of file mvpn_table.cc.

Here is the call graph for this function:

size_t MvpnTable::Hash ( const DBEntry entry) const
virtual

Reimplemented from DBTable.

Definition at line 69 of file mvpn_table.cc.

Here is the call graph for this function:

size_t MvpnTable::Hash ( const DBRequestKey key) const
virtual

Reimplemented from DBTable.

Definition at line 76 of file mvpn_table.cc.

Here is the call graph for this function:

size_t MvpnTable::HashFunction ( const MvpnPrefix prefix) const

Definition at line 32 of file mvpn_table.cc.

Here is the call graph for this function:

bool MvpnTable::IsMaster ( ) const

Definition at line 664 of file mvpn_table.cc.

Here is the call graph for this function:

bool MvpnTable::IsProjectManagerUsable ( ) const

Definition at line 200 of file mvpn_table.cc.

Here is the call graph for this function:

virtual bool MvpnTable::IsVpnTable ( ) const
inlinevirtual

Reimplemented from BgpTable.

Definition at line 45 of file mvpn_table.h.

Here is the call graph for this function:

MvpnRoute * MvpnTable::LocateRoute ( const MvpnPrefix prefix)
private

Definition at line 281 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnRoute * MvpnTable::LocateType1ADRoute ( )

Definition at line 366 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnRoute * MvpnTable::LocateType3SPMSIRoute ( const MvpnRoute type7_join_rt)

Definition at line 342 of file mvpn_table.cc.

Here is the call graph for this function:

MvpnRoute * MvpnTable::LocateType4LeafADRoute ( const MvpnRoute type3_spmsi_rt)

Definition at line 303 of file mvpn_table.cc.

Here is the call graph for this function:

const MvpnManager* MvpnTable::manager ( ) const
inline

Definition at line 64 of file mvpn_table.h.

MvpnManager* MvpnTable::manager ( )
inline

Definition at line 65 of file mvpn_table.h.

virtual int MvpnTable::PartitionCount ( ) const
inlinevirtual

Reimplemented from DBTable.

Definition at line 49 of file mvpn_table.h.

BgpRoute * MvpnTable::ReplicatePath ( BgpServer server,
const MvpnPrefix mprefix,
MvpnTable src_table,
MvpnRoute src_rt,
const BgpPath src_path,
ExtCommunityPtr  comm 
)
private

Definition at line 516 of file mvpn_table.cc.

Here is the call graph for this function:

BgpRoute * MvpnTable::ReplicateType7SourceTreeJoin ( BgpServer server,
MvpnTable src_table,
MvpnRoute src_rt,
const BgpPath src_path,
ExtCommunityPtr  ext_community 
)
private

Definition at line 431 of file mvpn_table.cc.

Here is the call graph for this function:

bool MvpnTable::RouteNotify ( BgpServer server,
DBTablePartBase root,
DBEntryBase e 
)
BgpRoute * MvpnTable::RouteReplicate ( BgpServer server,
BgpTable src_table,
BgpRoute src_rt,
const BgpPath path,
ExtCommunityPtr  ptr 
)
virtual

Implements BgpTable.

Definition at line 391 of file mvpn_table.cc.

Here is the call graph for this function:

const MvpnTable* MvpnTable::table ( ) const
inlineprivate

Definition at line 112 of file mvpn_table.h.

BgpRoute * MvpnTable::TableFind ( DBTablePartition rtp,
const DBRequestKey prefix 
)
privatevirtual

Implements BgpTable.

Definition at line 83 of file mvpn_table.cc.

Here is the call graph for this function:

void MvpnTable::UpdateSecondaryTablesForReplication ( BgpRoute rt,
TableSet secondary_tables 
)
virtual

Reimplemented from BgpTable.

Definition at line 238 of file mvpn_table.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class BgpMulticastTest
friend

Definition at line 93 of file mvpn_table.h.

Member Data Documentation

const int MvpnTable::kPartitionCount = 1
static

Definition at line 26 of file mvpn_table.h.

MvpnManager* MvpnTable::manager_
private

Definition at line 114 of file mvpn_table.h.


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