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

#include <flow_entry.h>

Collaboration diagram for PortTable:

Public Types

typedef boost::shared_ptr< PortPortPtr
 
typedef IndexVector< PortPtrPortList
 
typedef std::map< uint16_t,
uint16_t > 
PortToBitIndexMap
 
typedef std::pair< uint16_t,
uint16_t > 
PortToBitIndexPair
 
typedef IndexVector< FlowKeyPortBitMap
 
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)
 
Agentagent ()
 
uint16_t port_count () const
 
void set_timeout (uint64_t timeout)
 
tbb::recursive_mutex & mutex ()
 
void UpdatePortConfig (const PortConfig *port_config)
 
uint16_t GetPortIndex (uint16_t port) const
 
const PortConfigport_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

Agentagent_
 
uint8_t protocol_
 
PortCacheTable cache_
 
uint16_t hash_table_size_
 
PortHashTable hash_table_
 
PortList port_list_
 
PortToBitIndexMap port_to_bit_index_
 
PortConfig port_config_
 
tbb::recursive_mutex mutex_
 
std::unique_ptr< TaskTriggertask_trigger_
 

Detailed Description

Definition at line 1010 of file flow_entry.h.

Member Typedef Documentation

Definition at line 1020 of file flow_entry.h.

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

Definition at line 1021 of file flow_entry.h.

Definition at line 1022 of file flow_entry.h.

Definition at line 1015 of file flow_entry.h.

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

Definition at line 1014 of file flow_entry.h.

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

Definition at line 1017 of file flow_entry.h.

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

Definition at line 1018 of file flow_entry.h.

Constructor & Destructor Documentation

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

Definition at line 3887 of file flow_entry.cc.

PortTable::~PortTable ( )

Definition at line 3895 of file flow_entry.cc.

Member Function Documentation

void PortTable::AddPort ( uint16_t  port_no)
private

Definition at line 3986 of file flow_entry.cc.

Here is the call graph for this function:

Agent* PortTable::agent ( )
inline

Definition at line 1031 of file flow_entry.h.

uint16_t PortTable::Allocate ( const FlowKey key)

Definition at line 3901 of file flow_entry.cc.

Here is the call graph for this function:

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

Definition at line 3935 of file flow_entry.cc.

Here is the call graph for this function:

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

Definition at line 4004 of file flow_entry.cc.

Here is the call graph for this function:

void PortTable::DeletePort ( uint16_t  port_no)
private

Definition at line 4017 of file flow_entry.cc.

Here is the call graph for this function:

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

Definition at line 3949 of file flow_entry.cc.

Here is the call graph for this function:

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

Definition at line 4109 of file flow_entry.cc.

Here is the call graph for this function:

uint16_t PortTable::GetPortIndex ( uint16_t  port) const

Definition at line 4103 of file flow_entry.cc.

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

Definition at line 1054 of file flow_entry.h.

bool PortTable::HandlePortConfig ( const PortConfig pc)
private

Definition at line 4062 of file flow_entry.cc.

Here is the call graph for this function:

uint16_t PortTable::HashFlowKey ( const FlowKey key)

Definition at line 3879 of file flow_entry.cc.

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

Definition at line 4031 of file flow_entry.cc.

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

Definition at line 1043 of file flow_entry.h.

const PortConfig* PortTable::port_config ( ) const
inline

Definition at line 1050 of file flow_entry.h.

uint16_t PortTable::port_count ( ) const
inline

Definition at line 1035 of file flow_entry.h.

void PortTable::Relocate ( uint16_t  port_no)
private

Definition at line 3976 of file flow_entry.cc.

Here is the call graph for this function:

void PortTable::set_timeout ( uint64_t  timeout)
inline

Definition at line 1039 of file flow_entry.h.

Here is the call graph for this function:

void PortTable::UpdatePortConfig ( const PortConfig port_config)

Definition at line 4048 of file flow_entry.cc.

Here is the call graph for this function:

Member Data Documentation

Agent* PortTable::agent_
private

Definition at line 1066 of file flow_entry.h.

PortCacheTable PortTable::cache_
private

Definition at line 1079 of file flow_entry.h.

PortHashTable PortTable::hash_table_
private

Definition at line 1088 of file flow_entry.h.

uint16_t PortTable::hash_table_size_
private

Definition at line 1084 of file flow_entry.h.

const uint8_t PortTable::kInvalidPort = 0
static

Definition at line 1012 of file flow_entry.h.

tbb::recursive_mutex PortTable::mutex_
mutableprivate

Definition at line 1099 of file flow_entry.h.

PortConfig PortTable::port_config_
private

Definition at line 1098 of file flow_entry.h.

PortList PortTable::port_list_
private

Definition at line 1091 of file flow_entry.h.

PortToBitIndexMap PortTable::port_to_bit_index_
private

Definition at line 1095 of file flow_entry.h.

uint8_t PortTable::protocol_
private

Definition at line 1076 of file flow_entry.h.

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

Definition at line 1100 of file flow_entry.h.


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