OpenSDN source code
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< AgentDBEntryAgentDBEntyRef
 
- Public Types inherited from DBEntryBase
typedef DBTableBase::ListenerId ListenerId
 
typedef std::unique_ptr< DBRequestKeyKeyPtr
 

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

◆ Type

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() [1/2]

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

Definition at line 360 of file nexthop.h.

◆ NextHop() [2/2]

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

Definition at line 363 of file nexthop.h.

◆ ~NextHop()

NextHop::~NextHop ( )
virtual

Definition at line 92 of file nexthop.cc.

Member Function Documentation

◆ Add()

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

Definition at line 109 of file nexthop.cc.

◆ AllocateLabel()

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

Definition at line 105 of file nexthop.cc.

Here is the call graph for this function:

◆ CanAdd()

virtual bool NextHop::CanAdd ( ) const
pure virtual

◆ Change()

void NextHop::Change ( const DBRequest req)
virtual

Definition at line 113 of file nexthop.cc.

◆ ChangeEntry()

virtual bool NextHop::ChangeEntry ( const DBRequest req)
pure virtual

◆ DBEntrySandesh()

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:

◆ Delete()

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

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

Definition at line 372 of file nexthop.h.

◆ DeleteOnZeroRefCount()

virtual bool NextHop::DeleteOnZeroRefCount ( ) const
inlinevirtual

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

Definition at line 390 of file nexthop.h.

◆ DISALLOW_COPY_AND_ASSIGN()

NextHop::DISALLOW_COPY_AND_ASSIGN ( NextHop  )
private

◆ EnqueueResync()

void NextHop::EnqueueResync ( ) const

Definition at line 135 of file nexthop.cc.

◆ etree_leaf()

bool NextHop::etree_leaf ( ) const
inline

Definition at line 415 of file nexthop.h.

◆ FillObjectLog()

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

Definition at line 142 of file nexthop.cc.

◆ FillObjectLogIntf()

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:

◆ FillObjectLogMac()

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

Definition at line 253 of file nexthop.cc.

◆ GetRefCount()

uint32_t NextHop::GetRefCount ( ) const
inlinevirtual

Implements AgentDBEntry.

Definition at line 395 of file nexthop.h.

Here is the call graph for this function:

◆ GetType()

Type NextHop::GetType ( ) const
inline

Definition at line 405 of file nexthop.h.

◆ id()

uint32_t NextHop::id ( ) const
inline

Definition at line 408 of file nexthop.h.

◆ IsLess()

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:

◆ IsValid()

bool NextHop::IsValid ( ) const
inline

Definition at line 406 of file nexthop.h.

◆ learning_enabled()

bool NextHop::learning_enabled ( ) const
inline

Definition at line 423 of file nexthop.h.

◆ MatchEgressData()

virtual bool NextHop::MatchEgressData ( const NextHop nh) const
pure virtual

◆ mpls_label()

const MplsLabel* NextHop::mpls_label ( ) const
inline

Definition at line 434 of file nexthop.h.

◆ NeedMplsLabel()

virtual bool NextHop::NeedMplsLabel ( )
pure virtual

◆ NextHopIsLess()

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

◆ NexthopToInterfacePolicy()

bool NextHop::NexthopToInterfacePolicy ( ) const

Definition at line 262 of file nexthop.cc.

Here is the call graph for this function:

◆ OnZeroRefCount()

virtual void NextHop::OnZeroRefCount ( )
inlinevirtual

Reimplemented in CompositeNH.

Definition at line 393 of file nexthop.h.

◆ PolicyEnabled()

bool NextHop::PolicyEnabled ( ) const
inline

Definition at line 407 of file nexthop.h.

◆ PostAdd()

void NextHop::PostAdd ( )
virtual

Reimplemented from AgentDBEntry.

Definition at line 123 of file nexthop.cc.

◆ ResetMplsRef()

void NextHop::ResetMplsRef ( )
inline

Definition at line 399 of file nexthop.h.

◆ SendObjectLog()

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

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

Definition at line 84 of file nexthop.cc.

◆ set_etree_leaf()

void NextHop::set_etree_leaf ( bool  val)
inline

Definition at line 411 of file nexthop.h.

◆ set_id()

void NextHop::set_id ( uint32_t  index)
inline

Definition at line 409 of file nexthop.h.

◆ set_learning_flag()

void NextHop::set_learning_flag ( bool  val)
inline

Definition at line 419 of file nexthop.h.

◆ SetKey()

void NextHop::SetKey ( const DBRequestKey key)
virtual

Implements DBEntry.

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

Definition at line 98 of file nexthop.cc.

◆ SetNHSandeshData()

void NextHop::SetNHSandeshData ( NhSandeshData &  data) const

Definition at line 3172 of file nexthop.cc.

◆ ToString()

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

Implements DBEntryBase.

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

Definition at line 368 of file nexthop.h.

Member Data Documentation

◆ etree_leaf_

bool NextHop::etree_leaf_
protected

Definition at line 452 of file nexthop.h.

◆ id_

uint32_t NextHop::id_
protected

Definition at line 449 of file nexthop.h.

◆ kInvalidIndex

const uint32_t NextHop::kInvalidIndex = 0xFFFFFFFF
static

Definition at line 342 of file nexthop.h.

◆ learning_enabled_

bool NextHop::learning_enabled_
protected

Definition at line 451 of file nexthop.h.

◆ mpls_label_

MplsLabelRef NextHop::mpls_label_
protected

Definition at line 450 of file nexthop.h.

◆ policy_

bool NextHop::policy_
protected

Definition at line 448 of file nexthop.h.

◆ type_

Type NextHop::type_
protected

Definition at line 446 of file nexthop.h.

◆ valid_

bool NextHop::valid_
protected

Definition at line 447 of file nexthop.h.


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