OpenSDN source code
|
#include <xmpp_server.h>
Classes | |
class | DeleteActor |
Public Types | |
typedef boost::asio::ip::tcp::endpoint | Endpoint |
typedef boost::function< void(XmppChannelMux *, xmps::PeerState)> | ConnectionEventCb |
![]() | |
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 |
Public Member Functions | |
XmppServer (EventManager *evm, const std::string &server_addr, const XmppChannelConfig *config) | |
XmppServer (EventManager *evm, const std::string &server_addr) | |
XmppServer (EventManager *evm) | |
virtual | ~XmppServer () |
void | RegisterConnectionEvent (xmps::PeerId, ConnectionEventCb) |
void | UnRegisterConnectionEvent (xmps::PeerId) |
void | NotifyConnectionEvent (XmppChannelMux *, xmps::PeerState) |
size_t | ConnectionEventCount () const |
LifetimeManager * | lifetime_manager () |
virtual LifetimeActor * | deleter () |
virtual LifetimeActor * | deleter () const |
virtual TcpSession * | CreateSession () |
virtual bool | Initialize (short port) |
virtual bool | Initialize (short port, bool logUVE) |
virtual bool | Initialize (short port, bool logUVE, const IpAddress &ip) |
void | SessionShutdown () |
bool | MayDelete () const |
void | Shutdown () |
void | Terminate () |
virtual XmppServerConnection * | CreateConnection (XmppSession *session) |
virtual XmppServerConnection * | FindConnection (Endpoint remote_endpoint) |
virtual XmppServerConnection * | FindConnection (const std::string &address) |
virtual void | InsertConnection (XmppServerConnection *connection) |
virtual void | RemoveConnection (XmppServerConnection *connection) |
void | SwapXmppConnectionMapEntries (XmppConnection *connection1, XmppConnection *connection2) |
virtual void | InsertDeletedConnection (XmppServerConnection *connection) |
virtual void | RemoveDeletedConnection (XmppServerConnection *connection) |
bool | ClearConnection (const std::string &hostname) |
void | ClearAllConnections () |
void | UpdateAllConnections (uint8_t time_out) |
const std::string & | ServerAddr () const |
size_t | ConnectionCount () const |
XmppConnectionEndpoint * | FindConnectionEndpoint (const std::string &endpoint_name) |
XmppConnectionEndpoint * | LocateConnectionEndpoint (XmppServerConnection *connection, bool &created) |
void | ReleaseConnectionEndpoint (XmppServerConnection *connection) |
void | FillShowConnections (std::vector< ShowXmppConnection > *show_connection_list) const |
void | FillShowServer (ShowXmppServerResp *resp) const |
void | CreateConfigUpdater (BgpConfigManager *config_manager) |
virtual bool | IsPeerCloseGraceful () const |
uint16_t | GetGracefulRestartTime () const |
uint32_t | GetLongLivedGracefulRestartTime () const |
uint32_t | GetEndOfRibReceiveTime () const |
uint32_t | GetEndOfRibSendTime () const |
bool | IsGRHelperModeEnabled () const |
bool | gr_helper_disable () const |
void | set_gr_helper_disable (bool gr_helper_disable) |
void | SetDscpValue (uint8_t value) |
uint8_t | dscp_value () const |
const std::string | subcluster_name () const |
void | set_subcluster_name (const std::string &subcluster_name) |
![]() | |
XmppConnectionManager (EventManager *evm, boost::asio::ssl::context::method m, bool ssl_enabled, bool ssl_handshake_delayed) | |
void | Shutdown () |
void | EnqueueSession (XmppSession *session) |
size_t | GetSessionQueueSize () const |
tbb::mutex & | mutex () const |
![]() | |
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 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) |
Protected Types | |
typedef std::map< Endpoint, XmppServerConnection * > | ConnectionMap |
![]() | |
typedef boost::intrusive_ptr < TcpServer > | TcpServerPtr |
typedef boost::intrusive_ptr < TcpSession > | TcpSessionPtr |
Protected Member Functions | |
virtual SslSession * | AllocSession (SslSocket *socket) |
virtual bool | AcceptSession (TcpSession *session) |
![]() | |
boost::asio::ssl::context * | context () |
![]() | |
void | set_socket_open_failure (bool flag) |
bool | socket_open_failure () const |
Endpoint | LocalEndpoint () const |
Protected Attributes | |
tbb::reader_writer_lock | connection_map_mutex_ |
ConnectionMap | connection_map_ |
Private Types | |
typedef std::set < XmppServerConnection * > | ConnectionSet |
typedef std::map< std::string, XmppConnectionEndpoint * > | ConnectionEndpointMap |
typedef std::map< xmps::PeerId, ConnectionEventCb > | ConnectionEventCbMap |
Private Member Functions | |
bool | DequeueConnection (XmppServerConnection *connection) |
size_t | GetConnectionQueueSize () const |
void | SetConnectionQueueDisable (bool disabled) |
void | WorkQueueExitCallback (bool done) |
size_t | ConnectionMapSize () const |
DISALLOW_COPY_AND_ASSIGN (XmppServer) | |
Private Attributes | |
ConnectionSet | deleted_connection_set_ |
size_t | max_connections_ |
tbb::mutex | endpoint_map_mutex_ |
ConnectionEndpointMap | connection_endpoint_map_ |
tbb::mutex | deletion_mutex_ |
boost::scoped_ptr < LifetimeManager > | lifetime_manager_ |
boost::scoped_ptr< DeleteActor > | deleter_ |
ConnectionEventCbMap | connection_event_map_ |
std::string | server_addr_ |
bool | log_uve_ |
bool | auth_enabled_ |
int | tcp_hold_time_ |
bool | gr_helper_disable_ |
boost::scoped_ptr < XmppConfigUpdater > | xmpp_config_updater_ |
uint8_t | dscp_value_ |
std::string | subcluster_name_ |
WorkQueue< XmppServerConnection * > | connection_queue_ |
Friends | |
class | BgpXmppBasicTest |
class | DeleteActor |
class | XmppStateMachineTest |
Definition at line 32 of file xmpp_server.h.
|
private |
Definition at line 123 of file xmpp_server.h.
typedef boost::function<void(XmppChannelMux *, xmps::PeerState)> XmppServer::ConnectionEventCb |
Definition at line 42 of file xmpp_server.h.
|
private |
Definition at line 124 of file xmpp_server.h.
|
protected |
Definition at line 113 of file xmpp_server.h.
|
private |
Definition at line 122 of file xmpp_server.h.
typedef boost::asio::ip::tcp::endpoint XmppServer::Endpoint |
Definition at line 34 of file xmpp_server.h.
XmppServer::XmppServer | ( | EventManager * | evm, |
const std::string & | server_addr, | ||
const XmppChannelConfig * | config | ||
) |
XmppServer::XmppServer | ( | EventManager * | evm, |
const std::string & | server_addr | ||
) |
|
explicit |
Definition at line 219 of file xmpp_server.cc.
|
virtual |
|
protectedvirtual |
Reimplemented from TcpServer.
Definition at line 490 of file xmpp_server.cc.
|
protectedvirtual |
Implements SslServer.
Definition at line 472 of file xmpp_server.cc.
void XmppServer::ClearAllConnections | ( | ) |
Definition at line 445 of file xmpp_server.cc.
bool XmppServer::ClearConnection | ( | const std::string & | hostname | ) |
Definition at line 427 of file xmpp_server.cc.
size_t XmppServer::ConnectionCount | ( | ) | const |
size_t XmppServer::ConnectionEventCount | ( | ) | const |
Definition at line 396 of file xmpp_server.cc.
|
private |
Definition at line 400 of file xmpp_server.cc.
void XmppServer::CreateConfigUpdater | ( | BgpConfigManager * | config_manager | ) |
Definition at line 234 of file xmpp_server.cc.
|
virtual |
|
virtual |
Reimplemented from TcpServer.
Definition at line 364 of file xmpp_server.cc.
|
virtual |
Implements XmppConnectionManager.
Definition at line 352 of file xmpp_server.cc.
|
virtual |
Definition at line 356 of file xmpp_server.cc.
|
private |
|
private |
|
inline |
Definition at line 100 of file xmpp_server.h.
void XmppServer::FillShowConnections | ( | std::vector< ShowXmppConnection > * | show_connection_list | ) | const |
void XmppServer::FillShowServer | ( | ShowXmppServerResp * | resp | ) | const |
|
virtual |
Definition at line 409 of file xmpp_server.cc.
|
virtual |
XmppConnectionEndpoint * XmppServer::FindConnectionEndpoint | ( | const std::string & | endpoint_name | ) |
Definition at line 675 of file xmpp_server.cc.
|
private |
uint32_t XmppServer::GetEndOfRibReceiveTime | ( | ) | const |
Definition at line 252 of file xmpp_server.cc.
uint32_t XmppServer::GetEndOfRibSendTime | ( | ) | const |
Definition at line 258 of file xmpp_server.cc.
uint16_t XmppServer::GetGracefulRestartTime | ( | ) | const |
Definition at line 238 of file xmpp_server.cc.
uint32_t XmppServer::GetLongLivedGracefulRestartTime | ( | ) | const |
Definition at line 245 of file xmpp_server.cc.
|
inline |
Definition at line 95 of file xmpp_server.h.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
bool XmppServer::IsGRHelperModeEnabled | ( | ) | const |
Definition at line 264 of file xmpp_server.cc.
|
virtual |
LifetimeManager * XmppServer::lifetime_manager | ( | ) |
Definition at line 360 of file xmpp_server.cc.
XmppConnectionEndpoint * XmppServer::LocateConnectionEndpoint | ( | XmppServerConnection * | connection, |
bool & | created | ||
) |
bool XmppServer::MayDelete | ( | ) | const |
void XmppServer::NotifyConnectionEvent | ( | XmppChannelMux * | mux, |
xmps::PeerState | state | ||
) |
Definition at line 463 of file xmpp_server.cc.
void XmppServer::RegisterConnectionEvent | ( | xmps::PeerId | id, |
ConnectionEventCb | cb | ||
) |
Definition at line 452 of file xmpp_server.cc.
void XmppServer::ReleaseConnectionEndpoint | ( | XmppServerConnection * | connection | ) |
|
virtual |
|
virtual |
|
inline |
Definition at line 76 of file xmpp_server.h.
void XmppServer::SessionShutdown | ( | ) |
|
inline |
|
inline |
|
private |
void XmppServer::SetDscpValue | ( | uint8_t | value | ) |
void XmppServer::Shutdown | ( | void | ) |
Definition at line 339 of file xmpp_server.cc.
|
inline |
Definition at line 101 of file xmpp_server.h.
void XmppServer::SwapXmppConnectionMapEntries | ( | XmppConnection * | connection1, |
XmppConnection * | connection2 | ||
) |
void XmppServer::Terminate | ( | ) |
void XmppServer::UnRegisterConnectionEvent | ( | xmps::PeerId | id | ) |
Definition at line 457 of file xmpp_server.cc.
void XmppServer::UpdateAllConnections | ( | uint8_t | time_out | ) |
Definition at line 438 of file xmpp_server.cc.
|
private |
|
friend |
Definition at line 117 of file xmpp_server.h.
|
friend |
Definition at line 119 of file xmpp_server.h.
|
friend |
Definition at line 120 of file xmpp_server.h.
|
private |
Definition at line 145 of file xmpp_server.h.
|
private |
Definition at line 136 of file xmpp_server.h.
|
private |
Definition at line 142 of file xmpp_server.h.
|
protected |
Definition at line 114 of file xmpp_server.h.
|
mutableprotected |
Definition at line 112 of file xmpp_server.h.
|
private |
Definition at line 151 of file xmpp_server.h.
|
private |
Definition at line 132 of file xmpp_server.h.
|
private |
Definition at line 140 of file xmpp_server.h.
|
private |
Definition at line 138 of file xmpp_server.h.
|
private |
Definition at line 149 of file xmpp_server.h.
|
private |
Definition at line 135 of file xmpp_server.h.
|
private |
Definition at line 147 of file xmpp_server.h.
|
private |
Definition at line 139 of file xmpp_server.h.
|
private |
Definition at line 144 of file xmpp_server.h.
|
private |
Definition at line 133 of file xmpp_server.h.
|
private |
Definition at line 143 of file xmpp_server.h.
|
private |
Definition at line 150 of file xmpp_server.h.
|
private |
Definition at line 146 of file xmpp_server.h.
|
private |
Definition at line 148 of file xmpp_server.h.