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:
committed by
Aris Adamantiadis
parent
4305da29a1
commit
2ffbdb0492
@@ -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_session(ssh_event event, ssh_session session);
|
||||
LIBSSH_API void ssh_event_free(ssh_event event);
|
||||
LIBSSH_API const char* ssh_get_serverbanner(ssh_session session);
|
||||
|
||||
#ifndef LIBSSH_LEGACY_0_4
|
||||
#include "libssh/legacy.h"
|
||||
|
||||
@@ -245,6 +245,17 @@ void ssh_free(ssh_session 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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user