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

#include <ovsdb_client_tcp.h>

Inheritance diagram for OVSDB::OvsdbClientTcp:
Collaboration diagram for OVSDB::OvsdbClientTcp:

Public Member Functions

 OvsdbClientTcp (Agent *agent, IpAddress tor_ip, int tor_port, IpAddress tsn_ip, int keepalive_interval, int ha_stale_route_interval, OvsPeerManager *manager)
 
virtual ~OvsdbClientTcp ()
 
virtual TcpSessionAllocSession (Socket *socket)
 
void RegisterClients ()
 
void OnSessionEvent (TcpSession *session, TcpSession::Event event)
 
const std::string protocol ()
 
const std::string server ()
 
uint16_t port ()
 
Ip4Address tsn_ip ()
 
const
boost::asio::ip::tcp::endpoint & 
server_ep () const
 
void shutdown ()
 
OvsdbClientSessionFindSession (Ip4Address ip, uint16_t port)
 
OvsdbClientSessionNextSession (OvsdbClientSession *session)
 
void AddSessionInfo (SandeshOvsdbClient &client)
 
- Public Member Functions inherited from TcpServer
 TcpServer (EventManager *evm)
 
virtual ~TcpServer ()
 
virtual bool Initialize (unsigned short port)
 
virtual bool Initialize (unsigned short port, const IpAddress &host_ip, int intf_id=-1)
 
bool InitializeInternal (boost::asio::ip::tcp::endpoint localaddr)
 
const std::string ToString () const
 
void SetAcceptor ()
 
void ResetAcceptor ()
 
void Shutdown ()
 
void ClearSessions ()
 
void UpdateSessionsDscp (uint8_t dscp)
 
virtual TcpSessionCreateSession ()
 
virtual void DeleteSession (TcpSession *session)
 
virtual void Connect (TcpSession *session, Endpoint remote)
 
virtual bool DisableSandeshLogMessages () const
 
int GetPort () const
 
const io::SocketStatsGetSocketStats () const
 
size_t GetSessionCount () const
 
EventManagerevent_manager ()
 
bool HasSessionReadAvailable () const
 
bool HasSessions () const
 
TcpSessionGetSession (Endpoint remote)
 
void WaitForEmpty ()
 
void GetRxSocketStats (SocketIOStats *socket_stats) const
 
void GetTxSocketStats (SocketIOStats *socket_stats) const
 
void GetRxSocketStats (SocketIOStats &socket_stats) const
 
void GetTxSocketStats (SocketIOStats &socket_stats) const
 
int SetMd5SocketOption (NativeSocketType fd, uint32_t peer_ip, const std::string &md5_password)
 
int SetListenSocketMd5Option (uint32_t peer_ip, const std::string &md5_password)
 
int SetDscpSocketOption (NativeSocketType fd, uint8_t value)
 
uint8_t GetDscpValue (NativeSocketType fd) const
 
int SetListenSocketDscp (uint8_t value)
 
int SetSocketOptions (const SandeshConfig &sandesh_config)
 
int SetKeepAliveSocketOption (int fd, const SandeshConfig &sandesh_config)
 
- Public Member Functions inherited from OVSDB::OvsdbClient
 OvsdbClient (OvsPeerManager *manager, int keepalive_interval, int ha_stale_route_interval)
 
virtual ~OvsdbClient ()
 
void set_connect_complete_cb (SessionEventCb cb)
 
void set_pre_connect_complete_cb (SessionEventCb cb)
 
void RegisterConnectionTable (Agent *agent)
 
ConnectionStateTableconnection_table ()
 
KSyncObjectManagerksync_obj_manager ()
 
int keepalive_interval () const
 
int ha_stale_route_interval () const
 
void Init ()
 

Protected Attributes

Agentagent_
 
TcpSessionsession_
 
boost::asio::ip::tcp::endpoint server_ep_
 
- Protected Attributes inherited from OVSDB::OvsdbClient
OvsPeerManagerpeer_manager_
 
SessionEventCb connect_complete_cb_
 
SessionEventCb pre_connect_complete_cb_
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (OvsdbClientTcp)
 

Private Attributes

Ip4Address tsn_ip_
 
bool shutdown_
 

Friends

class OvsdbClientTcpSession
 

Additional Inherited Members

- Public Types inherited from TcpServer
typedef
boost::asio::ip::tcp::endpoint 
Endpoint
 
typedef
boost::asio::ip::tcp::socket 
Socket
 
typedef
boost::asio::ip::tcp::socket::native_handle_type 
NativeSocketType
 
- Public Types inherited from OVSDB::OvsdbClient
typedef boost::function< void(OvsdbClientSession *)> SessionEventCb
 
- Static Public Member Functions inherited from OVSDB::OvsdbClient
static OvsdbClientAllocate (Agent *agent, TorAgentParam *params, OvsPeerManager *manager)
 
- Static Public Attributes inherited from OVSDB::OvsdbClient
static const uint32_t OVSDBKeepAliveTimer = 10000
 
static const int OVSDBMinKeepAliveTimer = 2000
 
static const uint32_t OVSDBHaStaleRouteTimer = 300000
 
static const int OVSDBMinHaStaleRouteTimer = 60000
 
- Protected Types inherited from TcpServer
typedef boost::intrusive_ptr
< TcpServer
TcpServerPtr
 
typedef boost::intrusive_ptr
< TcpSession
TcpSessionPtr
 
- Protected Member Functions inherited from TcpServer
virtual TcpSessionAllocSession (bool server_session)
 
virtual Socketaccept_socket () const
 
virtual void set_accept_socket ()
 
virtual bool AcceptSession (TcpSession *session)
 
void set_socket_open_failure (bool flag)
 
bool socket_open_failure () const
 
Endpoint LocalEndpoint () const
 
virtual void AcceptHandlerComplete (TcpSessionPtr session)
 
virtual void ConnectHandlerComplete (TcpSessionPtr session)
 

Detailed Description

Definition at line 103 of file ovsdb_client_tcp.h.

Constructor & Destructor Documentation

OvsdbClientTcp::OvsdbClientTcp ( Agent agent,
IpAddress  tor_ip,
int  tor_port,
IpAddress  tsn_ip,
int  keepalive_interval,
int  ha_stale_route_interval,
OvsPeerManager manager 
)

Definition at line 18 of file ovsdb_client_tcp.cc.

OvsdbClientTcp::~OvsdbClientTcp ( )
virtual

Definition at line 26 of file ovsdb_client_tcp.cc.

Member Function Documentation

void OvsdbClientTcp::AddSessionInfo ( SandeshOvsdbClient &  client)
virtual

Implements OVSDB::OvsdbClient.

Definition at line 97 of file ovsdb_client_tcp.cc.

Here is the call graph for this function:

TcpSession * OvsdbClientTcp::AllocSession ( Socket socket)
virtual

Implements TcpServer.

Definition at line 35 of file ovsdb_client_tcp.cc.

Here is the call graph for this function:

OVSDB::OvsdbClientTcp::DISALLOW_COPY_AND_ASSIGN ( OvsdbClientTcp  )
private
OvsdbClientSession * OvsdbClientTcp::FindSession ( Ip4Address  ip,
uint16_t  port 
)
virtual

Implements OVSDB::OvsdbClient.

Definition at line 78 of file ovsdb_client_tcp.cc.

Here is the call graph for this function:

OvsdbClientSession * OvsdbClientTcp::NextSession ( OvsdbClientSession session)
virtual

Implements OVSDB::OvsdbClient.

Definition at line 89 of file ovsdb_client_tcp.cc.

void OvsdbClientTcp::OnSessionEvent ( TcpSession session,
TcpSession::Event  event 
)

Definition at line 43 of file ovsdb_client_tcp.cc.

Here is the call graph for this function:

uint16_t OvsdbClientTcp::port ( )
virtual

Implements OVSDB::OvsdbClient.

Definition at line 57 of file ovsdb_client_tcp.cc.

const std::string OvsdbClientTcp::protocol ( )
virtual

Implements OVSDB::OvsdbClient.

Definition at line 49 of file ovsdb_client_tcp.cc.

void OvsdbClientTcp::RegisterClients ( )
virtual

Implements OVSDB::OvsdbClient.

Definition at line 29 of file ovsdb_client_tcp.cc.

Here is the call graph for this function:

const std::string OvsdbClientTcp::server ( )
virtual

Implements OVSDB::OvsdbClient.

Definition at line 53 of file ovsdb_client_tcp.cc.

const boost::asio::ip::tcp::endpoint & OvsdbClientTcp::server_ep ( ) const

Definition at line 74 of file ovsdb_client_tcp.cc.

void OvsdbClientTcp::shutdown ( )
virtual

Implements OVSDB::OvsdbClient.

Definition at line 65 of file ovsdb_client_tcp.cc.

Here is the call graph for this function:

Ip4Address OvsdbClientTcp::tsn_ip ( )
virtual

Implements OVSDB::OvsdbClient.

Definition at line 61 of file ovsdb_client_tcp.cc.

Friends And Related Function Documentation

friend class OvsdbClientTcpSession
friend

Definition at line 132 of file ovsdb_client_tcp.h.

Member Data Documentation

Agent* OVSDB::OvsdbClientTcp::agent_
protected

Definition at line 127 of file ovsdb_client_tcp.h.

boost::asio::ip::tcp::endpoint OVSDB::OvsdbClientTcp::server_ep_
protected

Definition at line 129 of file ovsdb_client_tcp.h.

TcpSession* OVSDB::OvsdbClientTcp::session_
protected

Definition at line 128 of file ovsdb_client_tcp.h.

bool OVSDB::OvsdbClientTcp::shutdown_
private

Definition at line 134 of file ovsdb_client_tcp.h.

Ip4Address OVSDB::OvsdbClientTcp::tsn_ip_
private

Definition at line 133 of file ovsdb_client_tcp.h.


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