libsshpp v0.1.7
Modern C++17 wrapper for libssh
Loading...
Searching...
No Matches
sshpp::detail Namespace Reference

Classes

class  HandlerBridge
 
class  SessionCore
 
class  UniqueHandle
 Zero-overhead move-only owner for a libssh C handle. See docs/design/02 ยง2.2. More...
 

Typedefs

using SessionCorePtr = std::shared_ptr< SessionCore >
 

Functions

ErrorInfo make_error_info (native_session session, const char *operation, SourceLocation where, errc fallback=errc::unknown)
 
errc errc_from_auth_result (int auth_result) noexcept
 Maps a raw SSH_AUTH_* result to sshpp::errc for error paths (success/partial are not errors).
 
ErrorInfo make_sftp_error_info (native_sftp sftp, native_session session, const char *operation, SourceLocation where)
 Snapshots sftp_get_error()/ssh_get_error() for an SFTP failure into an ErrorInfo.
 

Variables

std::mutex g_library_mutex
 
int g_library_refcount = 0
 
LogLevel g_library_log_level = LogLevel::none
 
LogCallback g_library_log_callback
 
Library::DestructorErrorHandler g_library_destructor_handler
 

Typedef Documentation

◆ SessionCorePtr

using sshpp::detail::SessionCorePtr = typedef std::shared_ptr<SessionCore>

Function Documentation

◆ make_error_info()

SSHPP_INLINE ErrorInfo sshpp::detail::make_error_info ( native_session  session,
const char *  operation,
SourceLocation  where,
errc  fallback = errc::unknown 
)

Snapshots ssh_get_error()/ssh_get_error_code() for session into an ErrorInfo, mapping the libssh error code to the closest sshpp::errc.

◆ errc_from_auth_result()

SSHPP_INLINE errc sshpp::detail::errc_from_auth_result ( int  auth_result)
noexcept

Maps a raw SSH_AUTH_* result to sshpp::errc for error paths (success/partial are not errors).

◆ make_sftp_error_info()

SSHPP_INLINE ErrorInfo sshpp::detail::make_sftp_error_info ( native_sftp  sftp,
native_session  session,
const char *  operation,
SourceLocation  where 
)

Snapshots sftp_get_error()/ssh_get_error() for an SFTP failure into an ErrorInfo.

Variable Documentation

◆ g_library_mutex

std::mutex sshpp::detail::g_library_mutex
inline

◆ g_library_refcount

int sshpp::detail::g_library_refcount = 0
inline

◆ g_library_log_level

LogLevel sshpp::detail::g_library_log_level = LogLevel::none
inline

◆ g_library_log_callback

LogCallback sshpp::detail::g_library_log_callback
inline

◆ g_library_destructor_handler

Library::DestructorErrorHandler sshpp::detail::g_library_destructor_handler
inline