OpenSDN source code
MacLearningProto Class Reference

#include <mac_learning_proto.h>

Inheritance diagram for MacLearningProto:
Collaboration diagram for MacLearningProto:

Public Types

typedef boost::shared_ptr< MacLearningPartitionMacLearningPartitionPtr
 
typedef boost::shared_ptr< MacIpLearningTableMacIpLearningTablePtr
 
typedef std::vector< MacLearningPartitionPtrMacLearningPartitionList
 
typedef boost::shared_ptr< MacAgingTableMacAgingTablePtr
 
- Public Types inherited from Proto
typedef WorkQueue< boost::shared_ptr< PktInfo > > ProtoWorkQueue
 

Public Member Functions

 MacLearningProto (Agent *agent, boost::asio::io_context &io)
 
virtual ~MacLearningProto ()
 
virtual bool Validate (PktInfo *msg)
 
virtual ProtoHandlerAllocProtoHandler (boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
 
MacLearningPartitionFind (uint32_t index)
 
void Delete (uint32_t index)
 
bool Enqueue (PktInfoPtr msg)
 
void Init ()
 
uint32_t Hash (uint32_t vrf_id, const MacAddress &mac)
 
uint32_t size ()
 
TokenPooladd_tokens ()
 
TokenPoolchange_tokens ()
 
TokenPooldelete_tokens ()
 
TokenPtr GetToken (MacLearningEntryRequest::Event event)
 
virtual void TokenAvailable (TokenPool *pool)
 
MacIpLearningTableGetMacIpLearningTable ()
 
- Public Member Functions inherited from Proto
 Proto (Agent *agent, const char *task_name, PktHandler::PktModuleName mod, boost::asio::io_context &io)
 
virtual ~Proto ()
 
virtual void ProcessStats (PktStatsType::Type type)
 
void FreeBuffer (PktInfo *msg)
 
bool ProcessProto (boost::shared_ptr< PktInfo > msg_info)
 
bool RunProtoHandler (ProtoHandler *handler)
 
void set_trace (bool val)
 
void set_free_buffer (bool val)
 
boost::asio::io_context & get_io_service () const
 
Agentagent () const
 
const ProtoWorkQueuework_queue () const
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (MacLearningProto)
 

Private Attributes

tbb::mutex::scoped_lock mutex_
 
MacLearningPartitionList mac_learning_partition_list_
 
MacIpLearningTablePtr mac_ip_learning_tbl_
 
TokenPool add_tokens_
 
TokenPool change_tokens_
 
TokenPool delete_tokens_
 

Additional Inherited Members

- Protected Attributes inherited from Proto
Agentagent_
 
PktHandler::PktModuleName module_
 
bool trace_
 
bool free_buffer_
 
boost::asio::io_context & io_
 
ProtoWorkQueue work_queue_
 

Detailed Description

Definition at line 20 of file mac_learning_proto.h.

Member Typedef Documentation

◆ MacAgingTablePtr

Definition at line 26 of file mac_learning_proto.h.

◆ MacIpLearningTablePtr

Definition at line 23 of file mac_learning_proto.h.

◆ MacLearningPartitionList

◆ MacLearningPartitionPtr

Definition at line 22 of file mac_learning_proto.h.

Constructor & Destructor Documentation

◆ MacLearningProto()

MacLearningProto::MacLearningProto ( Agent agent,
boost::asio::io_context &  io 
)

Definition at line 13 of file mac_learning_proto.cc.

Here is the call graph for this function:

◆ ~MacLearningProto()

virtual MacLearningProto::~MacLearningProto ( )
inlinevirtual

Definition at line 30 of file mac_learning_proto.h.

Member Function Documentation

◆ add_tokens()

TokenPool* MacLearningProto::add_tokens ( )
inline

Definition at line 48 of file mac_learning_proto.h.

◆ AllocProtoHandler()

ProtoHandler * MacLearningProto::AllocProtoHandler ( boost::shared_ptr< PktInfo info,
boost::asio::io_context &  io 
)
virtual

Implements Proto.

Definition at line 24 of file mac_learning_proto.cc.

Here is the call graph for this function:

◆ change_tokens()

TokenPool* MacLearningProto::change_tokens ( )
inline

Definition at line 52 of file mac_learning_proto.h.

◆ Delete()

void MacLearningProto::Delete ( uint32_t  index)
inline

Definition at line 38 of file mac_learning_proto.h.

◆ delete_tokens()

TokenPool* MacLearningProto::delete_tokens ( )
inline

Definition at line 56 of file mac_learning_proto.h.

◆ DISALLOW_COPY_AND_ASSIGN()

MacLearningProto::DISALLOW_COPY_AND_ASSIGN ( MacLearningProto  )
private

◆ Enqueue()

bool MacLearningProto::Enqueue ( PktInfoPtr  msg)
virtual

Reimplemented from Proto.

Definition at line 48 of file mac_learning_proto.cc.

Here is the call graph for this function:

◆ Find()

MacLearningPartition * MacLearningProto::Find ( uint32_t  index)

Definition at line 81 of file mac_learning_proto.cc.

◆ GetMacIpLearningTable()

MacIpLearningTable * MacLearningProto::GetMacIpLearningTable ( )

Definition at line 107 of file mac_learning_proto.cc.

◆ GetToken()

TokenPtr MacLearningProto::GetToken ( MacLearningEntryRequest::Event  event)

Definition at line 62 of file mac_learning_proto.cc.

Here is the call graph for this function:

◆ Hash()

uint32_t MacLearningProto::Hash ( uint32_t  vrf_id,
const MacAddress mac 
)

Definition at line 33 of file mac_learning_proto.cc.

Here is the call graph for this function:

◆ Init()

void MacLearningProto::Init ( )

Definition at line 99 of file mac_learning_proto.cc.

Here is the call graph for this function:

◆ size()

uint32_t MacLearningProto::size ( )
inline

Definition at line 44 of file mac_learning_proto.h.

◆ TokenAvailable()

void MacLearningProto::TokenAvailable ( TokenPool pool)
virtual

Reimplemented from Proto.

Definition at line 90 of file mac_learning_proto.cc.

Here is the call graph for this function:

◆ Validate()

virtual bool MacLearningProto::Validate ( PktInfo msg)
inlinevirtual

Reimplemented from Proto.

Definition at line 32 of file mac_learning_proto.h.

Member Data Documentation

◆ add_tokens_

TokenPool MacLearningProto::add_tokens_
private

Definition at line 68 of file mac_learning_proto.h.

◆ change_tokens_

TokenPool MacLearningProto::change_tokens_
private

Definition at line 69 of file mac_learning_proto.h.

◆ delete_tokens_

TokenPool MacLearningProto::delete_tokens_
private

Definition at line 70 of file mac_learning_proto.h.

◆ mac_ip_learning_tbl_

MacIpLearningTablePtr MacLearningProto::mac_ip_learning_tbl_
private

Definition at line 67 of file mac_learning_proto.h.

◆ mac_learning_partition_list_

MacLearningPartitionList MacLearningProto::mac_learning_partition_list_
private

Definition at line 66 of file mac_learning_proto.h.

◆ mutex_

tbb::mutex::scoped_lock MacLearningProto::mutex_
private

Definition at line 65 of file mac_learning_proto.h.


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