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

#include <peer.h>

Inheritance diagram for Peer:
Collaboration diagram for Peer:

Public Types

enum  Type {
  MULTICAST_PEER, EVPN_PEER, BGP_PEER, EVPN_ROUTING_PEER,
  LINKLOCAL_PEER, ECMP_PEER, VXLAN_BGP_PEER, LOCAL_VM_PORT_PEER,
  LOCAL_VM_PEER, LOCAL_PEER, NOVA_PEER, VGW_PEER,
  MULTICAST_FABRIC_TREE_BUILDER, OVS_PEER, MULTICAST_TOR_PEER, MAC_VM_BINDING_PEER,
  INET_EVPN_PEER, MAC_LEARNING_PEER
}
 
typedef std::map< std::string,
Peer * > 
PeerMap
 
typedef std::pair< std::string,
Peer * > 
PeerPair
 

Public Member Functions

 Peer (Type type, const std::string &name, bool controller_export)
 
virtual ~Peer ()
 
bool IsLess (const Peer *rhs) const
 
virtual bool Compare (const Peer *rhs) const
 
virtual bool export_to_controller () const
 
virtual const Ip4AddressNexthopIp (Agent *agent, const AgentPath *path) const
 
const std::string & GetName () const
 
const Type GetType () const
 
virtual bool SkipAddChangeRequest () const
 
virtual bool IsDeleted () const
 
uint32_t refcount () const
 
uint64_t sequence_number () const
 
void incr_sequence_number ()
 

Private Member Functions

virtual bool DeleteOnZeroRefcount () const
 
 DISALLOW_COPY_AND_ASSIGN (Peer)
 

Private Attributes

Type type_
 
std::string name_
 
bool export_to_controller_
 
tbb::atomic< uint32_t > refcount_
 
uint64_t sequence_number_
 

Friends

void intrusive_ptr_add_ref (const Peer *p)
 
void intrusive_ptr_release (const Peer *p)
 

Detailed Description

Definition at line 44 of file peer.h.

Member Typedef Documentation

typedef std::map<std::string, Peer *> Peer::PeerMap

Definition at line 46 of file peer.h.

typedef std::pair<std::string, Peer *> Peer::PeerPair

Definition at line 47 of file peer.h.

Member Enumeration Documentation

enum Peer::Type
Enumerator
MULTICAST_PEER 
EVPN_PEER 
BGP_PEER 
EVPN_ROUTING_PEER 
LINKLOCAL_PEER 
ECMP_PEER 
VXLAN_BGP_PEER 
LOCAL_VM_PORT_PEER 
LOCAL_VM_PEER 
LOCAL_PEER 
NOVA_PEER 
VGW_PEER 
MULTICAST_FABRIC_TREE_BUILDER 
OVS_PEER 
MULTICAST_TOR_PEER 
MAC_VM_BINDING_PEER 
INET_EVPN_PEER 
MAC_LEARNING_PEER 

Definition at line 48 of file peer.h.

Constructor & Destructor Documentation

Peer::Peer ( Type  type,
const std::string &  name,
bool  controller_export 
)

Definition at line 18 of file peer.cc.

Peer::~Peer ( )
virtual

Definition at line 24 of file peer.cc.

Member Function Documentation

virtual bool Peer::Compare ( const Peer rhs) const
inlinevirtual

Reimplemented in VxlanBgpPeer, EvpnRoutingPeer, InetEvpnPeer, EvpnPeer, EcmpPeer, LocalVmPortPeer, BgpPeer, and OvsPeer.

Definition at line 80 of file peer.h.

bool Peer::DeleteOnZeroRefcount ( ) const
privatevirtual

Reimplemented in DynamicPeer.

Definition at line 27 of file peer.cc.

Peer::DISALLOW_COPY_AND_ASSIGN ( Peer  )
private
virtual bool Peer::export_to_controller ( ) const
inlinevirtual

Definition at line 82 of file peer.h.

const std::string& Peer::GetName ( ) const
inline

Definition at line 86 of file peer.h.

const Type Peer::GetType ( ) const
inline

Definition at line 87 of file peer.h.

void Peer::incr_sequence_number ( )
inline

Definition at line 95 of file peer.h.

virtual bool Peer::IsDeleted ( ) const
inlinevirtual

Reimplemented in BgpPeer, and DynamicPeer.

Definition at line 91 of file peer.h.

bool Peer::IsLess ( const Peer rhs) const
inline

Definition at line 73 of file peer.h.

Here is the call graph for this function:

const Ip4Address * Peer::NexthopIp ( Agent agent,
const AgentPath path 
) const
virtual

Reimplemented in OvsPeer.

Definition at line 98 of file peer.cc.

uint32_t Peer::refcount ( ) const
inline

Definition at line 93 of file peer.h.

uint64_t Peer::sequence_number ( ) const
inline

Definition at line 94 of file peer.h.

virtual bool Peer::SkipAddChangeRequest ( ) const
inlinevirtual

Reimplemented in DynamicPeer.

Definition at line 89 of file peer.h.

Friends And Related Function Documentation

void intrusive_ptr_add_ref ( const Peer p)
friend

Definition at line 31 of file peer.cc.

void intrusive_ptr_release ( const Peer p)
friend

Definition at line 37 of file peer.cc.

Member Data Documentation

bool Peer::export_to_controller_
private

Definition at line 105 of file peer.h.

std::string Peer::name_
private

Definition at line 104 of file peer.h.

tbb::atomic<uint32_t> Peer::refcount_
mutableprivate

Definition at line 106 of file peer.h.

uint64_t Peer::sequence_number_
private

Definition at line 109 of file peer.h.

Type Peer::type_
private

Definition at line 103 of file peer.h.


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