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

#include <peer_manager.h>

Collaboration diagram for PeerManager:

Public Types

typedef std::multimap
< BgpPeerKey, BgpPeer * > 
BgpPeerKeyMap
 
typedef std::map< std::string,
BgpPeer * > 
BgpPeerNameMap
 

Public Member Functions

 PeerManager (RoutingInstance *instance)
 
virtual ~PeerManager ()
 
virtual BgpPeerPeerFind (std::string address) const
 
virtual BgpPeerPeerLookup (std::string name) const
 
virtual BgpPeerPeerLookup (TcpSession::Endpoint remote_endpoint) const
 
virtual BgpPeerPeerLocate (BgpServer *server, const BgpNeighborConfig *config)
 
void PeerResurrect (std::string name)
 
BgpPeerTriggerPeerDeletion (const BgpNeighborConfig *config)
 
virtual void DestroyIPeer (IPeer *ipeer)
 
void ClearAllPeers ()
 
void ClearAllInternalPeers ()
 
const BgpPeerNextPeer (const BgpPeerKey &key) const
 
size_t GetNeighborCount (std::string up_or_down)
 
size_t size ()
 
const std::string & name () const
 
const RoutingInstanceinstance () const
 
RoutingInstanceinstance ()
 
BgpServerserver () const
 
const BgpPeerKeyMappeer_map () const
 
BgpPeerKeyMappeer_map_mutable ()
 

Private Member Functions

void InsertPeerByKey (BgpPeerKey key, BgpPeer *peer)
 
void RemovePeerByKey (BgpPeerKey key, BgpPeer *peer)
 
void InsertPeerByName (const std::string name, BgpPeer *peer)
 
void RemovePeerByName (const std::string name, BgpPeer *peer)
 

Private Attributes

BgpPeerKeyMap peers_by_key_
 
BgpPeerNameMap peers_by_name_
 
RoutingInstanceinstance_
 

Friends

class PeerManagerTest
 
class BgpServerTest
 

Detailed Description

Definition at line 24 of file peer_manager.h.

Member Typedef Documentation

typedef std::multimap<BgpPeerKey, BgpPeer *> PeerManager::BgpPeerKeyMap

Definition at line 26 of file peer_manager.h.

typedef std::map<std::string, BgpPeer *> PeerManager::BgpPeerNameMap

Definition at line 27 of file peer_manager.h.

Constructor & Destructor Documentation

PeerManager::PeerManager ( RoutingInstance instance)
inlineexplicit

Definition at line 29 of file peer_manager.h.

virtual PeerManager::~PeerManager ( )
inlinevirtual

Definition at line 30 of file peer_manager.h.

Member Function Documentation

void PeerManager::ClearAllInternalPeers ( )

Definition at line 211 of file peer_manager.cc.

Here is the call graph for this function:

void PeerManager::ClearAllPeers ( )

Definition at line 202 of file peer_manager.cc.

Here is the call graph for this function:

void PeerManager::DestroyIPeer ( IPeer ipeer)
virtual

Definition at line 114 of file peer_manager.cc.

Here is the call graph for this function:

size_t PeerManager::GetNeighborCount ( std::string  up_or_down)

Definition at line 186 of file peer_manager.cc.

Here is the call graph for this function:

void PeerManager::InsertPeerByKey ( BgpPeerKey  key,
BgpPeer peer 
)
private

Definition at line 133 of file peer_manager.cc.

void PeerManager::InsertPeerByName ( const std::string  name,
BgpPeer peer 
)
private

Definition at line 155 of file peer_manager.cc.

const RoutingInstance* PeerManager::instance ( ) const
inline

Definition at line 48 of file peer_manager.h.

RoutingInstance* PeerManager::instance ( )
inline

Definition at line 49 of file peer_manager.h.

const string & PeerManager::name ( ) const

Definition at line 263 of file peer_manager.cc.

Here is the call graph for this function:

const BgpPeer * PeerManager::NextPeer ( const BgpPeerKey key) const

Definition at line 253 of file peer_manager.cc.

const BgpPeerKeyMap& PeerManager::peer_map ( ) const
inline

Definition at line 52 of file peer_manager.h.

BgpPeerKeyMap* PeerManager::peer_map_mutable ( )
inline

Definition at line 53 of file peer_manager.h.

BgpPeer * PeerManager::PeerFind ( std::string  address) const
virtual

Definition at line 168 of file peer_manager.cc.

Here is the call graph for this function:

BgpPeer * PeerManager::PeerLocate ( BgpServer server,
const BgpNeighborConfig config 
)
virtual

Definition at line 28 of file peer_manager.cc.

Here is the call graph for this function:

virtual BgpPeer* PeerManager::PeerLookup ( std::string  name) const
virtual
BgpPeer * PeerManager::PeerLookup ( TcpSession::Endpoint  remote_endpoint) const
virtual

Definition at line 224 of file peer_manager.cc.

Here is the call graph for this function:

void PeerManager::PeerResurrect ( std::string  name)

Definition at line 64 of file peer_manager.cc.

Here is the call graph for this function:

void PeerManager::RemovePeerByKey ( BgpPeerKey  key,
BgpPeer peer 
)
private

Definition at line 141 of file peer_manager.cc.

void PeerManager::RemovePeerByName ( const std::string  name,
BgpPeer peer 
)
private

Definition at line 162 of file peer_manager.cc.

BgpServer * PeerManager::server ( ) const

Definition at line 267 of file peer_manager.cc.

Here is the call graph for this function:

size_t PeerManager::size ( )
inline

Definition at line 46 of file peer_manager.h.

BgpPeer * PeerManager::TriggerPeerDeletion ( const BgpNeighborConfig config)

Definition at line 85 of file peer_manager.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class BgpServerTest
friend

Definition at line 57 of file peer_manager.h.

friend class PeerManagerTest
friend

Definition at line 56 of file peer_manager.h.

Member Data Documentation

RoutingInstance* PeerManager::instance_
private

Definition at line 66 of file peer_manager.h.

BgpPeerKeyMap PeerManager::peers_by_key_
private

Definition at line 64 of file peer_manager.h.

BgpPeerNameMap PeerManager::peers_by_name_
private

Definition at line 65 of file peer_manager.h.


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