|
OpenSDN source code
|
#include <sandesh_client.h>


Public Member Functions | |
| SandeshClient (EventManager *evm, const std::vector< Endpoint > &collectors, const SandeshConfig &config, bool periodicuve=false) | |
| virtual | ~SandeshClient () |
| void | Initiate () |
| void | Shutdown () |
| virtual SandeshSession * | CreateSMSession (SslSession::EventObserver eocb, SandeshReceiveMsgCb rmcb, TcpServer::Endpoint ep) |
| void | InitializeSMSession (int connects) |
| void | DeleteSMSession (SandeshSession *session) |
| bool | CloseSMSession () |
| bool | ReceiveMsg (const std::string &msg, const SandeshHeader &header, const std::string &sandesh_name, const uint32_t header_offset) |
| void | SendUVE (int count, const std::string &stateName, const std::string &server, const Endpoint &server_ip, const std::vector< Endpoint > &collector_eps) |
| bool | SendSandesh (Sandesh *snh) |
| bool | SendSandeshUVE (Sandesh *snh_uve) |
| SandeshClientSM::State | state () |
| bool | IsSession () |
| SandeshSession * | session () const |
| SandeshClientSM * | state_machine () const |
| StatsClient * | stats_client () const |
| void | SetDscpValue (uint8_t value) |
| uint8_t | dscp_value () const |
| void | SetSessionWaterMarkInfo (Sandesh::QueueWaterMarkInfo &scwm) |
| void | ResetSessionWaterMarkInfo () |
| void | GetSessionWaterMarkInfo (std::vector< Sandesh::QueueWaterMarkInfo > &scwm_info) const |
| void | ReConfigCollectors (const std::vector< std::string > &) |
| int | session_close_interval_msec () const |
| uint64_t | session_close_time_usec () const |
Public Member Functions inherited from SslServer | |
| SslServer (EventManager *evm, boost::asio::ssl::context::method m, bool ssl_enabled=true, bool ssl_handshake_delayed=false) | |
| virtual | ~SslServer () |
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 TcpSession * | CreateSession () |
| virtual void | DeleteSession (TcpSession *session) |
| virtual void | Connect (TcpSession *session, Endpoint remote) |
| virtual bool | DisableSandeshLogMessages () const |
| int | GetPort () const |
| const io::SocketStats & | GetSocketStats () const |
| size_t | GetSessionCount () const |
| EventManager * | event_manager () |
| bool | HasSessionReadAvailable () const |
| bool | HasSessions () const |
| TcpSession * | GetSession (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 SandeshClientSM::Mgr | |
| virtual void | SendUVE (int count, const std::string &stateName, const std::string &server, const TcpServer::Endpoint &server_ip, const std::vector< TcpServer::Endpoint > &collectors)=0 |
Static Public Attributes | |
| static const int | kInitialSMSessionCloseIntervalMSec = 10 * 1000 |
| static const int | kMaxSMSessionCloseIntervalMSec = 60 * 1000 |
Protected Member Functions | |
| virtual SslSession * | AllocSession (SslSocket *socket) |
| bool | CloseSMSessionInternal () |
Protected Member Functions inherited from SslServer | |
| boost::asio::ssl::context * | context () |
Protected Member Functions inherited from TcpServer | |
| virtual bool | AcceptSession (TcpSession *session) |
| void | set_socket_open_failure (bool flag) |
| bool | socket_open_failure () const |
| Endpoint | LocalEndpoint () const |
Protected Member Functions inherited from SandeshClientSM::Mgr | |
| Mgr () | |
| virtual | ~Mgr () |
Private Member Functions | |
| bool | ReceiveCtrlMsg (const std::string &msg, const SandeshHeader &header, const std::string &sandesh_name, const uint32_t header_offset) |
| DISALLOW_COPY_AND_ASSIGN (SandeshClient) | |
Private Attributes | |
| int | sm_task_instance_ |
| int | sm_task_id_ |
| int | session_task_instance_ |
| int | session_writer_task_id_ |
| int | session_reader_task_id_ |
| uint8_t | dscp_value_ |
| std::vector< Endpoint > | collectors_ |
| std::string | stats_collector_ |
| boost::scoped_ptr< SandeshClientSM > | sm_ |
| boost::scoped_ptr< StatsClient > | stats_client_ |
| std::vector< Sandesh::QueueWaterMarkInfo > | session_wm_info_ |
| int | session_close_interval_msec_ |
| uint64_t | session_close_time_usec_ |
Static Private Attributes | |
| static const int | kSMTaskInstance = 0 |
| static const std::string | kSMTask = "sandesh::SandeshClientSM" |
| static const int | kSessionTaskInstance = Task::kTaskInstanceAny |
| static const std::string | kSessionWriterTask = "sandesh::SandeshClientSession" |
| static const std::string | kSessionReaderTask = "sandesh::SandeshClientReader" |
| static const std::vector< Sandesh::QueueWaterMarkInfo > | kSessionWaterMarkInfo |
| static bool | task_policy_set_ = false |
Friends | |
| class | CollectorInfoRequest |
Additional Inherited Members | |
Public Types inherited from SslServer | |
| typedef boost::asio::ssl::stream< boost::asio::ip::tcp::socket > | SslSocket |
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 |
Protected Types inherited from TcpServer | |
| typedef boost::intrusive_ptr< TcpServer > | TcpServerPtr |
| typedef boost::intrusive_ptr< TcpSession > | TcpSessionPtr |
Definition at line 42 of file sandesh_client.h.
| SandeshClient::SandeshClient | ( | EventManager * | evm, |
| const std::vector< Endpoint > & | collectors, | ||
| const SandeshConfig & | config, | ||
| bool | periodicuve = false |
||
| ) |
|
virtual |
Definition at line 151 of file sandesh_client.cc.
|
protectedvirtual |
Implements SslServer.
Definition at line 530 of file sandesh_client.cc.
| bool SandeshClient::CloseSMSession | ( | ) |
|
protected |
|
virtual |
Implements SandeshClientSM::Mgr.
Definition at line 275 of file sandesh_client.cc.

|
inlinevirtual |
Implements SandeshClientSM::Mgr.
Definition at line 62 of file sandesh_client.h.

|
private |
|
inline |
Definition at line 99 of file sandesh_client.h.
| void SandeshClient::GetSessionWaterMarkInfo | ( | std::vector< Sandesh::QueueWaterMarkInfo > & | scwm_info | ) | const |
Definition at line 525 of file sandesh_client.cc.
|
virtual |
Implements SandeshClientSM::Mgr.
Definition at line 312 of file sandesh_client.cc.

| void SandeshClient::Initiate | ( | ) |
Definition at line 169 of file sandesh_client.cc.
|
inline |
Definition at line 81 of file sandesh_client.h.
|
private |
|
virtual |
Implements SandeshClientSM::Mgr.
Definition at line 221 of file sandesh_client.cc.

| void SandeshClient::ReConfigCollectors | ( | const std::vector< std::string > & | collector_list | ) |
| void SandeshClient::ResetSessionWaterMarkInfo | ( | ) |
| bool SandeshClient::SendSandesh | ( | Sandesh * | snh | ) |
Definition at line 182 of file sandesh_client.cc.
| bool SandeshClient::SendSandeshUVE | ( | Sandesh * | snh_uve | ) |
Definition at line 186 of file sandesh_client.cc.
|
inline |
Definition at line 86 of file sandesh_client.h.
|
inline |
Definition at line 107 of file sandesh_client.h.
|
inline |
Definition at line 110 of file sandesh_client.h.
| void SandeshClient::SetDscpValue | ( | uint8_t | value | ) |
| void SandeshClient::SetSessionWaterMarkInfo | ( | Sandesh::QueueWaterMarkInfo & | scwm | ) |
| void SandeshClient::Shutdown | ( | void | ) |
Definition at line 178 of file sandesh_client.cc.
|
inline |
Definition at line 77 of file sandesh_client.h.
|
inline |
Definition at line 90 of file sandesh_client.h.
|
inlinevirtual |
Implements SandeshClientSM::Mgr.
Definition at line 94 of file sandesh_client.h.
|
friend |
Definition at line 114 of file sandesh_client.h.
|
private |
Definition at line 133 of file sandesh_client.h.
|
private |
Definition at line 132 of file sandesh_client.h.
|
static |
Definition at line 44 of file sandesh_client.h.
|
static |
Definition at line 45 of file sandesh_client.h.
|
staticprivate |
Definition at line 124 of file sandesh_client.h.
|
staticprivate |
Definition at line 122 of file sandesh_client.h.
|
staticprivate |
Definition at line 125 of file sandesh_client.h.
|
staticprivate |
Definition at line 123 of file sandesh_client.h.
|
staticprivate |
Definition at line 121 of file sandesh_client.h.
|
staticprivate |
Definition at line 120 of file sandesh_client.h.
|
private |
Definition at line 139 of file sandesh_client.h.
|
private |
Definition at line 140 of file sandesh_client.h.
|
private |
Definition at line 131 of file sandesh_client.h.
|
private |
Definition at line 129 of file sandesh_client.h.
|
private |
Definition at line 137 of file sandesh_client.h.
|
private |
Definition at line 130 of file sandesh_client.h.
|
private |
Definition at line 135 of file sandesh_client.h.
|
private |
Definition at line 128 of file sandesh_client.h.
|
private |
Definition at line 127 of file sandesh_client.h.
|
private |
Definition at line 136 of file sandesh_client.h.
|
private |
Definition at line 134 of file sandesh_client.h.
|
staticprivate |
Definition at line 138 of file sandesh_client.h.