OpenSDN source code
|
#include <ovsdb_client_ssl.h>
Public Types | |
typedef std::pair< Ip4Address, uint16_t > | SessionKey |
typedef std::map< SessionKey, OvsdbClientSslSession * > | SessionMap |
![]() | |
typedef boost::asio::ssl::stream < boost::asio::ip::tcp::socket > | SslSocket |
![]() | |
typedef boost::asio::ip::tcp::endpoint | Endpoint |
typedef boost::asio::ip::tcp::socket | Socket |
typedef boost::asio::ip::tcp::socket::native_handle_type | NativeSocketType |
![]() | |
typedef boost::function< void(OvsdbClientSession *)> | SessionEventCb |
Public Member Functions | |
OvsdbClientSsl (Agent *agent, IpAddress tor_ip, int tor_port, IpAddress tsn_ip, int keepalive_interval, int ha_stale_route_interval, const std::string &ssl_cert, const std::string &ssl_privkey, const std::string &ssl_cacert, OvsPeerManager *manager) | |
virtual | ~OvsdbClientSsl () |
virtual SslSession * | AllocSession (SslSocket *socket) |
void | RegisterClients () |
void | OnSessionEvent (TcpSession *session, TcpSession::Event event) |
const std::string | protocol () |
const std::string | server () |
uint16_t | port () |
Ip4Address | tsn_ip () |
void | shutdown () |
OvsdbClientSession * | FindSession (Ip4Address ip, uint16_t port) |
OvsdbClientSession * | NextSession (OvsdbClientSession *session) |
void | AddSessionInfo (SandeshOvsdbClient &client) |
![]() | |
SslServer (EventManager *evm, boost::asio::ssl::context::method m, bool ssl_enabled=true, bool ssl_handshake_delayed=false) | |
virtual | ~SslServer () |
![]() | |
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) |
![]() | |
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) |
ConnectionStateTable * | connection_table () |
KSyncObjectManager * | ksync_obj_manager () |
int | keepalive_interval () const |
int | ha_stale_route_interval () const |
void | Init () |
Private Member Functions | |
bool | AcceptSession (TcpSession *session) |
DISALLOW_COPY_AND_ASSIGN (OvsdbClientSsl) | |
Private Attributes | |
Agent * | agent_ |
uint32_t | ssl_server_port_ |
Ip4Address | tsn_ip_ |
bool | shutdown_ |
SessionMap | session_map_ |
Friends | |
class | OvsdbClientSslSession |
Additional Inherited Members | |
![]() | |
static OvsdbClient * | Allocate (Agent *agent, TorAgentParam *params, OvsPeerManager *manager) |
![]() | |
static const uint32_t | OVSDBKeepAliveTimer = 10000 |
static const int | OVSDBMinKeepAliveTimer = 2000 |
static const uint32_t | OVSDBHaStaleRouteTimer = 300000 |
static const int | OVSDBMinHaStaleRouteTimer = 60000 |
![]() | |
typedef boost::intrusive_ptr < TcpServer > | TcpServerPtr |
typedef boost::intrusive_ptr < TcpSession > | TcpSessionPtr |
![]() | |
boost::asio::ssl::context * | context () |
![]() | |
void | set_socket_open_failure (bool flag) |
bool | socket_open_failure () const |
Endpoint | LocalEndpoint () const |
![]() | |
OvsPeerManager * | peer_manager_ |
SessionEventCb | connect_complete_cb_ |
SessionEventCb | pre_connect_complete_cb_ |
Definition at line 86 of file ovsdb_client_ssl.h.
typedef std::pair<Ip4Address, uint16_t> OVSDB::OvsdbClientSsl::SessionKey |
Definition at line 88 of file ovsdb_client_ssl.h.
typedef std::map<SessionKey, OvsdbClientSslSession *> OVSDB::OvsdbClientSsl::SessionMap |
Definition at line 89 of file ovsdb_client_ssl.h.
OvsdbClientSsl::OvsdbClientSsl | ( | Agent * | agent, |
IpAddress | tor_ip, | ||
int | tor_port, | ||
IpAddress | tsn_ip, | ||
int | keepalive_interval, | ||
int | ha_stale_route_interval, | ||
const std::string & | ssl_cert, | ||
const std::string & | ssl_privkey, | ||
const std::string & | ssl_cacert, | ||
OvsPeerManager * | manager | ||
) |
|
virtual |
Definition at line 63 of file ovsdb_client_ssl.cc.
|
privatevirtual |
Reimplemented from TcpServer.
Definition at line 159 of file ovsdb_client_ssl.cc.
|
virtual |
Implements OVSDB::OvsdbClient.
Definition at line 146 of file ovsdb_client_ssl.cc.
|
virtual |
Implements SslServer.
Definition at line 71 of file ovsdb_client_ssl.cc.
|
private |
|
virtual |
Implements OVSDB::OvsdbClient.
Definition at line 115 of file ovsdb_client_ssl.cc.
|
virtual |
Implements OVSDB::OvsdbClient.
Definition at line 129 of file ovsdb_client_ssl.cc.
void OvsdbClientSsl::OnSessionEvent | ( | TcpSession * | session, |
TcpSession::Event | event | ||
) |
|
virtual |
Implements OVSDB::OvsdbClient.
Definition at line 93 of file ovsdb_client_ssl.cc.
|
virtual |
Implements OVSDB::OvsdbClient.
Definition at line 85 of file ovsdb_client_ssl.cc.
|
virtual |
Implements OVSDB::OvsdbClient.
Definition at line 66 of file ovsdb_client_ssl.cc.
|
virtual |
Implements OVSDB::OvsdbClient.
Definition at line 89 of file ovsdb_client_ssl.cc.
|
virtual |
Implements OVSDB::OvsdbClient.
Definition at line 101 of file ovsdb_client_ssl.cc.
|
virtual |
Implements OVSDB::OvsdbClient.
Definition at line 97 of file ovsdb_client_ssl.cc.
|
friend |
Definition at line 114 of file ovsdb_client_ssl.h.
|
private |
Definition at line 119 of file ovsdb_client_ssl.h.
|
private |
Definition at line 123 of file ovsdb_client_ssl.h.
|
private |
Definition at line 122 of file ovsdb_client_ssl.h.
|
private |
Definition at line 120 of file ovsdb_client_ssl.h.
|
private |
Definition at line 121 of file ovsdb_client_ssl.h.