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

#include <nexthop.h>

Inheritance diagram for NextHop:
Collaboration diagram for NextHop:

Public Types

enum  Type {
  INVALID, DISCARD, L2_RECEIVE, RECEIVE,
  RESOLVE, ARP, VRF, INTERFACE,
  TUNNEL, MIRROR, COMPOSITE, VLAN,
  PBB, NDP
}
 
- Public Types inherited from AgentDBEntry
typedef boost::intrusive_ptr
< AgentDBEntry
AgentDBEntyRef
 
- Public Types inherited from DBEntryBase
typedef DBTableBase::ListenerId ListenerId
 
typedef std::unique_ptr
< DBRequestKey
KeyPtr
 

Public Member Functions

 NextHop (Type type, bool policy)
 
 NextHop (Type type, bool valid, bool policy)
 
virtual ~NextHop ()
 
virtual std::string ToString () const
 
virtual void Add (Agent *agent, const DBRequest *req)
 
virtual bool ChangeEntry (const DBRequest *req)=0
 
virtual void Change (const DBRequest *req)
 
virtual void Delete (const DBRequest *req)
 
virtual void SetKey (const DBRequestKey *key)
 
virtual bool NextHopIsLess (const DBEntry &rhs) const =0
 
virtual void SendObjectLog (const NextHopTable *table, AgentLogEvent::type event) const
 
virtual bool CanAdd () const =0
 
virtual bool IsLess (const DBEntry &rhs) const
 
virtual bool DeleteOnZeroRefCount () const
 
virtual void OnZeroRefCount ()
 
uint32_t GetRefCount () const
 
void ResetMplsRef ()
 
Type GetType () const
 
bool IsValid () const
 
bool PolicyEnabled () const
 
uint32_t id () const
 
void set_id (uint32_t index)
 
void set_etree_leaf (bool val)
 
bool etree_leaf () const
 
void set_learning_flag (bool val)
 
bool learning_enabled () const
 
bool DBEntrySandesh (Sandesh *sresp, std::string &name) const
 
void SetNHSandeshData (NhSandeshData &data) const
 
bool NexthopToInterfacePolicy () const
 
const MplsLabelmpls_label () const
 
virtual bool MatchEgressData (const NextHop *nh) const =0
 
MplsLabelAllocateLabel (Agent *agent, const NextHopKey *key)
 
virtual bool NeedMplsLabel ()=0
 
void PostAdd ()
 
void EnqueueResync () const
 
- Public Member Functions inherited from AgentDBEntry
 AgentDBEntry ()
 
virtual ~AgentDBEntry ()
 
void SetRefState () const
 
void ClearRefState () const
 
bool IsActive () const
 
DBStateGetAgentDBEntryState (int listener_id)
 
const DBStateGetAgentDBEntryState (int listener_id) const
 
virtual void AllocateResources (ResourceManager *resource_manager)
 
virtual void FreeResources (ResourceManager *resource_manager)
 
- Public Member Functions inherited from DBEntry
 DBEntry ()
 
virtual ~DBEntry ()
 
bool operator< (const DBEntry &rhs) const
 
- Public Member Functions inherited from DBEntryBase
 DBEntryBase ()
 
virtual ~DBEntryBase ()
 
virtual KeyPtr GetDBRequestKey () const =0
 
virtual bool IsMoreSpecific (const std::string &match) const
 
virtual bool IsLessSpecific (const std::string &match) const
 
void SetState (DBTableBase *tbl_base, ListenerId listener, DBState *state)
 
void ClearState (DBTableBase *tbl_base, ListenerId listener)
 
DBStateGetState (DBTableBase *tbl_base, ListenerId listener) const
 
const DBStateGetState (const DBTableBase *tbl_base, ListenerId listener) const
 
bool is_state_empty (DBTablePartBase *tpart)
 
bool is_state_empty_unlocked (DBTablePartBase *tpart)
 
void Delete ()
 
void MarkDelete ()
 
void ClearDelete ()
 
bool IsDeleted () const
 
void set_onlist ()
 
void clear_onlist ()
 
bool is_onlist ()
 
void SetOnRemoveQ ()
 
bool IsOnRemoveQ ()
 
void ClearOnRemoveQ ()
 
void set_last_change_at (uint64_t time)
 
void set_last_change_at_to_now ()
 
const uint64_t last_change_at () const
 
const std::string last_change_at_str () const
 
void set_last_update_at (uint64_t time)
 
void set_last_update_at_to_now ()
 
const uint64_t last_update_at () const
 
DBTablePartBaseget_table_partition () const
 
void set_table_partition (DBTablePartBase *tpart)
 
DBTableBaseget_table () const
 
void Notify ()
 

Static Public Member Functions

static void FillObjectLogIntf (const Interface *intf, NextHopObjectLogInfo &info)
 
static void FillObjectLogMac (const unsigned char *m, NextHopObjectLogInfo &info)
 

Static Public Attributes

static const uint32_t kInvalidIndex = 0xFFFFFFFF
 

Protected Member Functions

void FillObjectLog (AgentLogEvent::type event, NextHopObjectLogInfo &info) const
 

Protected Attributes

Type type_
 
bool valid_
 
bool policy_
 
uint32_t id_
 
MplsLabelRef mpls_label_
 
bool learning_enabled_
 
bool etree_leaf_
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (NextHop)
 
- Private Member Functions inherited from AgentRefCount< NextHop >
uint32_t GetRefCount () const
 
 AgentRefCount ()
 
 AgentRefCount (const AgentRefCount &)
 
AgentRefCountoperator= (const AgentRefCount &)
 
virtual ~AgentRefCount ()
 
void swap (AgentRefCount &)
 

Additional Inherited Members

- Public Attributes inherited from DBEntryBase
boost::intrusive::list_member_hook chg_list_
 
- Private Attributes inherited from AgentRefCount< NextHop >
tbb::mutex back_ref_mutex_
 
std::set< IntrusiveReferrerback_ref_set_
 

Detailed Description

Definition at line 340 of file nexthop.h.

Member Enumeration Documentation

Enumerator
INVALID 
DISCARD 
L2_RECEIVE 
RECEIVE 
RESOLVE 
ARP 
VRF 
INTERFACE 
TUNNEL 
MIRROR 
COMPOSITE 
VLAN 
PBB 
NDP 

Definition at line 343 of file nexthop.h.

Constructor & Destructor Documentation

NextHop::NextHop ( Type  type,
bool  policy 
)
inline

Definition at line 360 of file nexthop.h.

NextHop::NextHop ( Type  type,
bool  valid,
bool  policy 
)
inline

Definition at line 363 of file nexthop.h.

NextHop::~NextHop ( )
virtual

Definition at line 92 of file nexthop.cc.

Member Function Documentation

void NextHop::Add ( Agent agent,
const DBRequest req 
)
virtual

Definition at line 109 of file nexthop.cc.

MplsLabel * NextHop::AllocateLabel ( Agent agent,
const NextHopKey key 
)

Definition at line 105 of file nexthop.cc.

Here is the call graph for this function:

virtual bool NextHop::CanAdd ( ) const
pure virtual
void NextHop::Change ( const DBRequest req)
virtual

Definition at line 113 of file nexthop.cc.

virtual bool NextHop::ChangeEntry ( const DBRequest req)
pure virtual
bool NextHop::DBEntrySandesh ( Sandesh sresp,
std::string &  name 
) const
virtual

Implements AgentDBEntry.

Definition at line 3455 of file nexthop.cc.

Here is the call graph for this function:

virtual void NextHop::Delete ( const DBRequest req)
inlinevirtual

Reimplemented in CompositeNH, VlanNH, VrfNH, InterfaceNH, PBBNH, NdpNH, ArpNH, ResolveNH, ReceiveNH, L2ReceiveNH, DiscardNH, MirrorNH, and TunnelNH.

Definition at line 372 of file nexthop.h.

virtual bool NextHop::DeleteOnZeroRefCount ( ) const
inlinevirtual

Reimplemented in CompositeNH, VrfNH, InterfaceNH, PBBNH, NdpNH, ArpNH, ResolveNH, MirrorNH, LabelledTunnelNH, and TunnelNH.

Definition at line 390 of file nexthop.h.

NextHop::DISALLOW_COPY_AND_ASSIGN ( NextHop  )
private
void NextHop::EnqueueResync ( ) const

Definition at line 135 of file nexthop.cc.

bool NextHop::etree_leaf ( ) const
inline

Definition at line 415 of file nexthop.h.

void NextHop::FillObjectLog ( AgentLogEvent::type  event,
NextHopObjectLogInfo &  info 
) const
protected

Definition at line 142 of file nexthop.cc.

void NextHop::FillObjectLogIntf ( const Interface intf,
NextHopObjectLogInfo &  info 
)
static

Definition at line 226 of file nexthop.cc.

Here is the call graph for this function:

void NextHop::FillObjectLogMac ( const unsigned char *  m,
NextHopObjectLogInfo &  info 
)
static

Definition at line 253 of file nexthop.cc.

uint32_t NextHop::GetRefCount ( ) const
inlinevirtual

Implements AgentDBEntry.

Definition at line 395 of file nexthop.h.

Here is the call graph for this function:

Type NextHop::GetType ( ) const
inline

Definition at line 405 of file nexthop.h.

uint32_t NextHop::id ( ) const
inline

Definition at line 408 of file nexthop.h.

virtual bool NextHop::IsLess ( const DBEntry rhs) const
inlinevirtual

Implements DBEntry.

Definition at line 378 of file nexthop.h.

Here is the call graph for this function:

bool NextHop::IsValid ( ) const
inline

Definition at line 406 of file nexthop.h.

bool NextHop::learning_enabled ( ) const
inline

Definition at line 423 of file nexthop.h.

virtual bool NextHop::MatchEgressData ( const NextHop nh) const
pure virtual
const MplsLabel* NextHop::mpls_label ( ) const
inline

Definition at line 434 of file nexthop.h.

virtual bool NextHop::NeedMplsLabel ( )
pure virtual
virtual bool NextHop::NextHopIsLess ( const DBEntry rhs) const
pure virtual
bool NextHop::NexthopToInterfacePolicy ( ) const

Definition at line 262 of file nexthop.cc.

Here is the call graph for this function:

virtual void NextHop::OnZeroRefCount ( )
inlinevirtual

Reimplemented in CompositeNH.

Definition at line 393 of file nexthop.h.

bool NextHop::PolicyEnabled ( ) const
inline

Definition at line 407 of file nexthop.h.

void NextHop::PostAdd ( )
virtual

Reimplemented from AgentDBEntry.

Definition at line 123 of file nexthop.cc.

void NextHop::ResetMplsRef ( )
inline

Definition at line 399 of file nexthop.h.

void NextHop::SendObjectLog ( const NextHopTable table,
AgentLogEvent::type  event 
) const
virtual

Reimplemented in CompositeNH, VlanNH, VrfNH, InterfaceNH, PBBNH, NdpNH, ArpNH, ReceiveNH, MirrorNH, LabelledTunnelNH, and TunnelNH.

Definition at line 84 of file nexthop.cc.

void NextHop::set_etree_leaf ( bool  val)
inline

Definition at line 411 of file nexthop.h.

void NextHop::set_id ( uint32_t  index)
inline

Definition at line 409 of file nexthop.h.

void NextHop::set_learning_flag ( bool  val)
inline

Definition at line 419 of file nexthop.h.

void NextHop::SetKey ( const DBRequestKey key)
virtual

Implements DBEntry.

Reimplemented in CompositeNH, VlanNH, VrfNH, InterfaceNH, PBBNH, NdpNH, ArpNH, ResolveNH, ReceiveNH, L2ReceiveNH, DiscardNH, MirrorNH, and TunnelNH.

Definition at line 98 of file nexthop.cc.

void NextHop::SetNHSandeshData ( NhSandeshData &  data) const

Definition at line 3172 of file nexthop.cc.

virtual std::string NextHop::ToString ( ) const
inlinevirtual

Implements DBEntryBase.

Reimplemented in CompositeNH, VrfNH, InterfaceNH, PBBNH, ResolveNH, ReceiveNH, L2ReceiveNH, DiscardNH, MirrorNH, LabelledTunnelNH, and TunnelNH.

Definition at line 368 of file nexthop.h.

Member Data Documentation

bool NextHop::etree_leaf_
protected

Definition at line 452 of file nexthop.h.

uint32_t NextHop::id_
protected

Definition at line 449 of file nexthop.h.

const uint32_t NextHop::kInvalidIndex = 0xFFFFFFFF
static

Definition at line 342 of file nexthop.h.

bool NextHop::learning_enabled_
protected

Definition at line 451 of file nexthop.h.

MplsLabelRef NextHop::mpls_label_
protected

Definition at line 450 of file nexthop.h.

bool NextHop::policy_
protected

Definition at line 448 of file nexthop.h.

Type NextHop::type_
protected

Definition at line 446 of file nexthop.h.

bool NextHop::valid_
protected

Definition at line 447 of file nexthop.h.


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