OpenSDN source code
MacAgingTable Class Reference

#include <mac_aging.h>

Collaboration diagram for MacAgingTable:

Public Types

typedef std::pair< MacLearningEntry *, MacAgingEntryPtrMacAgingPair
 
typedef std::map< MacLearningEntry *, MacAgingEntryPtrMacAgingEntryTable
 

Public Member Functions

 MacAgingTable (Agent *agent, const VrfEntry *)
 
virtual ~MacAgingTable ()
 
uint32_t CalculateEntriesPerIteration (uint32_t table_size)
 
uint64_t timeout_in_usecs () const
 
void set_timeout (uint32_t msec)
 
bool Run ()
 
void Add (MacLearningEntryPtr ptr)
 
void Delete (MacLearningEntryPtr ptr)
 
const MacAgingEntryFind (MacLearningEntry *me) const
 

Static Public Attributes

static const uint32_t kDefaultAgingTimeout = 30 * 1000
 
static const uint32_t kMinEntriesPerScan = 100
 

Private Member Functions

bool ShouldBeAged (MacAgingEntry *ptr, uint64_t curr_time)
 
void SendDeleteMsg (MacAgingEntry *ptr)
 
void ReadStats (MacAgingEntry *ptr)
 
void Trace (const std::string &str, MacAgingEntry *ptr)
 
 DISALLOW_COPY_AND_ASSIGN (MacAgingTable)
 

Private Attributes

Agentagent_
 
MacAgingEntryTable aging_table_
 
MacLearningEntrylast_key_
 
uint32_t timeout_msec_
 
VrfEntryConstRef vrf_
 

Friends

class MacAgingSandeshResp
 

Detailed Description

Definition at line 60 of file mac_aging.h.

Member Typedef Documentation

◆ MacAgingEntryTable

Definition at line 65 of file mac_aging.h.

◆ MacAgingPair

Definition at line 64 of file mac_aging.h.

Constructor & Destructor Documentation

◆ MacAgingTable()

MacAgingTable::MacAgingTable ( Agent agent,
const VrfEntry vrf 
)

Definition at line 42 of file mac_aging.cc.

◆ ~MacAgingTable()

MacAgingTable::~MacAgingTable ( )
virtual

Definition at line 46 of file mac_aging.cc.

Member Function Documentation

◆ Add()

void MacAgingTable::Add ( MacLearningEntryPtr  ptr)

Definition at line 49 of file mac_aging.cc.

Here is the call graph for this function:

◆ CalculateEntriesPerIteration()

uint32_t MacAgingTable::CalculateEntriesPerIteration ( uint32_t  table_size)

Definition at line 122 of file mac_aging.cc.

◆ Delete()

void MacAgingTable::Delete ( MacLearningEntryPtr  ptr)

Definition at line 61 of file mac_aging.cc.

Here is the call graph for this function:

◆ DISALLOW_COPY_AND_ASSIGN()

MacAgingTable::DISALLOW_COPY_AND_ASSIGN ( MacAgingTable  )
private

◆ Find()

const MacAgingEntry* MacAgingTable::Find ( MacLearningEntry me) const
inline

Definition at line 81 of file mac_aging.h.

◆ ReadStats()

void MacAgingTable::ReadStats ( MacAgingEntry ptr)
private

Definition at line 69 of file mac_aging.cc.

Here is the call graph for this function:

◆ Run()

bool MacAgingTable::Run ( void  )

Definition at line 151 of file mac_aging.cc.

Here is the call graph for this function:

◆ SendDeleteMsg()

void MacAgingTable::SendDeleteMsg ( MacAgingEntry ptr)
private

Definition at line 113 of file mac_aging.cc.

Here is the call graph for this function:

◆ set_timeout()

void MacAgingTable::set_timeout ( uint32_t  msec)
inline

Definition at line 74 of file mac_aging.h.

◆ ShouldBeAged()

bool MacAgingTable::ShouldBeAged ( MacAgingEntry ptr,
uint64_t  curr_time 
)
private

Definition at line 83 of file mac_aging.cc.

Here is the call graph for this function:

◆ timeout_in_usecs()

uint64_t MacAgingTable::timeout_in_usecs ( ) const
inline

Definition at line 70 of file mac_aging.h.

◆ Trace()

void MacAgingTable::Trace ( const std::string &  str,
MacAgingEntry ptr 
)
private

Definition at line 100 of file mac_aging.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ MacAgingSandeshResp

friend class MacAgingSandeshResp
friend

Definition at line 95 of file mac_aging.h.

Member Data Documentation

◆ agent_

Agent* MacAgingTable::agent_
private

Definition at line 96 of file mac_aging.h.

◆ aging_table_

MacAgingEntryTable MacAgingTable::aging_table_
private

Definition at line 97 of file mac_aging.h.

◆ kDefaultAgingTimeout

const uint32_t MacAgingTable::kDefaultAgingTimeout = 30 * 1000
static

Definition at line 62 of file mac_aging.h.

◆ kMinEntriesPerScan

const uint32_t MacAgingTable::kMinEntriesPerScan = 100
static

Definition at line 63 of file mac_aging.h.

◆ last_key_

MacLearningEntry* MacAgingTable::last_key_
private

Definition at line 98 of file mac_aging.h.

◆ timeout_msec_

uint32_t MacAgingTable::timeout_msec_
private

Definition at line 99 of file mac_aging.h.

◆ vrf_

VrfEntryConstRef MacAgingTable::vrf_
private

Definition at line 100 of file mac_aging.h.


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