1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-02 01:17:52 +03:00

commit a7e14524c4f7903f607cdcd02b83782e89f0a82c

This commit is contained in:
rofl0r
2012-01-02 16:31:37 +01:00
committed by Aris Adamantiadis
parent 4305da29a1
commit 2ffbdb0492
2 changed files with 12 additions and 0 deletions

View File

@@ -580,6 +580,7 @@ LIBSSH_API int ssh_event_dopoll(ssh_event event, int timeout);
LIBSSH_API int ssh_event_remove_fd(ssh_event event, socket_t fd); LIBSSH_API int ssh_event_remove_fd(ssh_event event, socket_t fd);
LIBSSH_API int ssh_event_remove_session(ssh_event event, ssh_session session); LIBSSH_API int ssh_event_remove_session(ssh_event event, ssh_session session);
LIBSSH_API void ssh_event_free(ssh_event event); LIBSSH_API void ssh_event_free(ssh_event event);
LIBSSH_API const char* ssh_get_serverbanner(ssh_session session);
#ifndef LIBSSH_LEGACY_0_4 #ifndef LIBSSH_LEGACY_0_4
#include "libssh/legacy.h" #include "libssh/legacy.h"

View File

@@ -245,6 +245,17 @@ void ssh_free(ssh_session session) {
SAFE_FREE(session); SAFE_FREE(session);
} }
/**
* @brief get the server banner
* @param[in] session The SSH session
*/
const char* ssh_get_serverbanner(ssh_session session) {
if(!session) {
return NULL;
}
return session->serverbanner;
}
/** /**
* @brief Disconnect impolitely from a remote host by closing the socket. * @brief Disconnect impolitely from a remote host by closing the socket.
* *