OpenSDN source code
PortTable Class Reference

#include <flow_entry.h>

Collaboration diagram for PortTable:

Public Types

typedef boost::shared_ptr< Port > PortPtr
 
typedef IndexVector< PortPtr > PortList
 
typedef std::map< uint16_t, uint16_t > PortToBitIndexMap
 
typedef std::pair< uint16_t, uint16_t > PortToBitIndexPair
 
typedef IndexVector< FlowKey > PortBitMap
 
typedef boost::shared_ptr< PortBitMap > PortBitMapPtr
 
typedef std::vector< PortBitMapPtr > PortHashTable
 

Public Member Functions

 PortTable (Agent *agent, uint32_t bucket_size, uint8_t protocol)
 
 ~PortTable ()
 
uint16_t Allocate (const FlowKey &key)
 
void Free (const FlowKey &key, uint16_t port, bool release)
 
uint16_t HashFlowKey (const FlowKey &key)
 
Agent * agent ()
 
uint16_t port_count () const
 
void set_timeout (uint64_t timeout)
 
std::recursive_mutex & mutex ()
 
void UpdatePortConfig (const PortConfig *port_config)
 
uint16_t GetPortIndex (uint16_t port) const
 
const PortConfig * port_config () const
 
std::vector< uint16_t > GetPortList () const
 
void GetFlowKeyList (uint16_t port, std::vector< FlowKey > &key) const
 

Static Public Attributes

static const uint8_t kInvalidPort = 0
 

Private Member Functions

PortPtr CreatePortEntry (uint16_t port_no)
 
void AddPort (uint16_t port_no)
 
void DeletePort (uint16_t port_no)
 
void Relocate (uint16_t port_no)
 
bool IsValidPort (uint16_t port, uint16_t count)
 
void DeleteAllFlow (uint16_t port, uint16_t index)
 
bool HandlePortConfig (const PortConfig &pc)
 

Private Attributes

Agent * agent_
 
uint8_t protocol_
 
PortCacheTable cache_
 
uint16_t hash_table_size_
 
PortHashTable hash_table_
 
PortList port_list_
 
PortToBitIndexMap port_to_bit_index_
 
PortConfig port_config_
 
std::recursive_mutex mutex_
 
std::unique_ptr< TaskTrigger > task_trigger_
 

Detailed Description

Definition at line 1011 of file flow_entry.h.

Member Typedef Documentation

◆ PortBitMap

Definition at line 1021 of file flow_entry.h.

◆ PortBitMapPtr

typedef boost::shared_ptr<PortBitMap> PortTable::PortBitMapPtr

Definition at line 1022 of file flow_entry.h.

◆ PortHashTable

Definition at line 1023 of file flow_entry.h.

◆ PortList

Definition at line 1016 of file flow_entry.h.

◆ PortPtr

typedef boost::shared_ptr<Port> PortTable::PortPtr

Definition at line 1015 of file flow_entry.h.

◆ PortToBitIndexMap

typedef std::map<uint16_t, uint16_t> PortTable::PortToBitIndexMap

Definition at line 1018 of file flow_entry.h.

◆ PortToBitIndexPair

typedef std::pair<uint16_t, uint16_t> PortTable::PortToBitIndexPair

Definition at line 1019 of file flow_entry.h.

Constructor & Destructor Documentation

◆ PortTable()

PortTable::PortTable ( Agent *  agent,
uint32_t  bucket_size,
uint8_t  protocol 
)

Definition at line 3941 of file flow_entry.cc.

◆ ~PortTable()

PortTable::~PortTable ( )

Definition at line 3949 of file flow_entry.cc.

Member Function Documentation

◆ AddPort()

void PortTable::AddPort ( uint16_t  port_no)
private

Definition at line 4040 of file flow_entry.cc.

Here is the call graph for this function:

◆ agent()

Agent* PortTable::agent ( )
inline

Definition at line 1032 of file flow_entry.h.

◆ Allocate()

uint16_t PortTable::Allocate ( const FlowKey &  key)

Definition at line 3955 of file flow_entry.cc.

Here is the call graph for this function:

◆ CreatePortEntry()

PortTable::PortPtr PortTable::CreatePortEntry ( uint16_t  port_no)
private

Definition at line 3989 of file flow_entry.cc.

Here is the call graph for this function:

◆ DeleteAllFlow()

void PortTable::DeleteAllFlow ( uint16_t  port,
uint16_t  index 
)
private

Definition at line 4058 of file flow_entry.cc.

Here is the call graph for this function:

◆ DeletePort()

void PortTable::DeletePort ( uint16_t  port_no)
private

Definition at line 4071 of file flow_entry.cc.

Here is the call graph for this function:

◆ Free()

void PortTable::Free ( const FlowKey &  key,
uint16_t  port,
bool  release 
)

Definition at line 4003 of file flow_entry.cc.

Here is the call graph for this function:

◆ GetFlowKeyList()

void PortTable::GetFlowKeyList ( uint16_t  port,
std::vector< FlowKey > &  key 
) const

Definition at line 4163 of file flow_entry.cc.

Here is the call graph for this function:

◆ GetPortIndex()

uint16_t PortTable::GetPortIndex ( uint16_t  port) const

Definition at line 4157 of file flow_entry.cc.

◆ GetPortList()

std::vector<uint16_t> PortTable::GetPortList ( ) const
inline

Definition at line 1055 of file flow_entry.h.

◆ HandlePortConfig()

bool PortTable::HandlePortConfig ( const PortConfig &  pc)
private

Definition at line 4116 of file flow_entry.cc.

Here is the call graph for this function:

◆ HashFlowKey()

uint16_t PortTable::HashFlowKey ( const FlowKey &  key)

Definition at line 3933 of file flow_entry.cc.

◆ IsValidPort()

bool PortTable::IsValidPort ( uint16_t  port,
uint16_t  count 
)
private

Definition at line 4085 of file flow_entry.cc.

◆ mutex()

std::recursive_mutex& PortTable::mutex ( )
inline

Definition at line 1044 of file flow_entry.h.

◆ port_config()

const PortConfig* PortTable::port_config ( ) const
inline

Definition at line 1051 of file flow_entry.h.

◆ port_count()

uint16_t PortTable::port_count ( ) const
inline

Definition at line 1036 of file flow_entry.h.

◆ Relocate()

void PortTable::Relocate ( uint16_t  port_no)
private

Definition at line 4030 of file flow_entry.cc.

Here is the call graph for this function:

◆ set_timeout()

void PortTable::set_timeout ( uint64_t  timeout)
inline

Definition at line 1040 of file flow_entry.h.

Here is the call graph for this function:

◆ UpdatePortConfig()

void PortTable::UpdatePortConfig ( const PortConfig *  port_config)

Definition at line 4102 of file flow_entry.cc.

Here is the call graph for this function:

Member Data Documentation

◆ agent_

Agent* PortTable::agent_
private

Definition at line 1067 of file flow_entry.h.

◆ cache_

PortCacheTable PortTable::cache_
private

Definition at line 1080 of file flow_entry.h.

◆ hash_table_

PortHashTable PortTable::hash_table_
private

Definition at line 1089 of file flow_entry.h.

◆ hash_table_size_

uint16_t PortTable::hash_table_size_
private

Definition at line 1085 of file flow_entry.h.

◆ kInvalidPort

const uint8_t PortTable::kInvalidPort = 0
static

Definition at line 1013 of file flow_entry.h.

◆ mutex_

std::recursive_mutex PortTable::mutex_
mutableprivate

Definition at line 1100 of file flow_entry.h.

◆ port_config_

PortConfig PortTable::port_config_
private

Definition at line 1099 of file flow_entry.h.

◆ port_list_

PortList PortTable::port_list_
private

Definition at line 1092 of file flow_entry.h.

◆ port_to_bit_index_

PortToBitIndexMap PortTable::port_to_bit_index_
private

Definition at line 1096 of file flow_entry.h.

◆ protocol_

uint8_t PortTable::protocol_
private

Definition at line 1077 of file flow_entry.h.

◆ task_trigger_

std::unique_ptr<TaskTrigger> PortTable::task_trigger_
private

Definition at line 1101 of file flow_entry.h.


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