#include <source/ariba/utility/transport/tcpip/protlib/connectionmap_uds.h>
Public Types | |
typedef const_ass2data_it_t | const_it_t |
connection map iterator | |
Public Member Functions | |
bool | erase (AssocDataUDS *assoc) |
Erase the AssocDataUDS-element. | |
size_t | get_size () const |
get number of records | |
const_it_t | begin () const |
const_it_t | end () const |
bool | insert (AssocDataUDS *assoc) |
Insert a new AssocDataUDS element into the ConnectionMapUDS. | |
AssocDataUDS * | lookup (socketfd_t socketfd) const |
Search for existing connections to this specific socket. | |
AssocDataUDS * | lookup (associd_t associd) const |
Search for existing connections to this specific assoc id. | |
AssocDataUDS * | lookup (const udsaddress &addr) const |
Search for existing connections to this address. | |
bool | erase (socketfd_t socketfd) |
Erase the AssocDataUDS-element associated with this socket. | |
bool | erase (associd_t associd) |
Erase the AssocDataUDS-element associated with this socket. | |
void | clear () |
clear all | |
Private Types | |
typedef unordered_map < socketfd_t,AssocDataUDS * > | ass2data_t |
typedef ass2data_t::const_iterator | const_ass2data_it_t |
typedef unordered_map < udsaddress, AssocDataUDS * > | addr2data_t |
typedef addr2data_t::const_iterator | const_addr2data_it_t |
Private Attributes | |
ass2data_t | ass2data |
map: socket fd to association data | |
addr2data_t | addr2data |
map: (application) address to association data |
The class ConnectionMapUDS saves all required information about currently existing connections. Its methods allow to check for connections and return, if possible, the data associated with the connection.
Definition at line 45 of file connectionmap_uds.h.
typedef unordered_map<udsaddress,AssocDataUDS*> protlib::ConnectionMapUDS::addr2data_t [private] |
Definition at line 72 of file connectionmap_uds.h.
typedef unordered_map<socketfd_t ,AssocDataUDS*> protlib::ConnectionMapUDS::ass2data_t [private] |
Definition at line 70 of file connectionmap_uds.h.
typedef addr2data_t::const_iterator protlib::ConnectionMapUDS::const_addr2data_it_t [private] |
Definition at line 73 of file connectionmap_uds.h.
typedef ass2data_t::const_iterator protlib::ConnectionMapUDS::const_ass2data_it_t [private] |
Definition at line 71 of file connectionmap_uds.h.
connection map iterator
Definition at line 80 of file connectionmap_uds.h.
ConnectionMapUDS::const_it_t protlib::ConnectionMapUDS::begin | ( | ) | const [inline] |
Definition at line 90 of file connectionmap_uds.h.
References ass2data.
void protlib::ConnectionMapUDS::clear | ( | ) |
ConnectionMapUDS::const_it_t protlib::ConnectionMapUDS::end | ( | ) | const [inline] |
Definition at line 95 of file connectionmap_uds.h.
References ass2data.
bool protlib::ConnectionMapUDS::erase | ( | AssocDataUDS * | assoc | ) | [inline] |
Erase the AssocDataUDS-element.
Definition at line 101 of file connectionmap_uds.h.
References erase(), and protlib::AssocDataUDS::socketfd.
bool protlib::ConnectionMapUDS::erase | ( | associd_t | associd | ) |
Erase the AssocDataUDS-element associated with this socket.
erase an association
associd | - association identifier |
Definition at line 129 of file connectionmap_uds.cpp.
References addr2data, ass2data, protlib::AssocDataUDS::assoc, lookup(), and protlib::AssocDataUDS::peer.
bool protlib::ConnectionMapUDS::erase | ( | socketfd_t | socketfd | ) |
Erase the AssocDataUDS-element associated with this socket.
socketfd | socket file descriptor |
Definition at line 113 of file connectionmap_uds.cpp.
References addr2data, ass2data, lookup(), protlib::AssocDataUDS::peer, and protlib::AssocDataUDS::socketfd.
Referenced by erase().
size_t protlib::ConnectionMapUDS::get_size | ( | ) | const [inline] |
bool protlib::ConnectionMapUDS::insert | ( | AssocDataUDS * | assoc | ) |
Insert a new AssocDataUDS element into the ConnectionMapUDS.
Definition at line 57 of file connectionmap_uds.cpp.
References addr2data, ass2data, protlib::AssocDataUDS::assoc, protlib::log::ERROR_LOG, Log, protlib::log::LOG_NORMAL, lookup(), protlib::AssocDataUDS::peer, and protlib::AssocDataUDS::socketfd.
AssocDataUDS * protlib::ConnectionMapUDS::lookup | ( | const udsaddress & | addr | ) | const |
Search for existing connections to this address.
addr | IP-adress + port |
Definition at line 102 of file connectionmap_uds.cpp.
References addr2data.
AssocDataUDS * protlib::ConnectionMapUDS::lookup | ( | associd_t | associd | ) | const |
Search for existing connections to this specific assoc id.
Definition at line 91 of file connectionmap_uds.cpp.
References ass2data.
AssocDataUDS * protlib::ConnectionMapUDS::lookup | ( | socketfd_t | socketfd | ) | const |
Search for existing connections to this specific socket.
socketfd | socket file descriptor |
Definition at line 84 of file connectionmap_uds.cpp.
References ass2data.
map: socket fd to association data
Definition at line 76 of file connectionmap_uds.h.
Referenced by begin(), clear(), end(), erase(), get_size(), insert(), and lookup().