mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
client: Add example code for ssh_get_openssh_version().
BUG: https://red.libssh.org/issues/120
This commit is contained in:
@@ -579,6 +579,14 @@ char *ssh_get_issue_banner(ssh_session session) {
|
|||||||
* @param[in] session The SSH session to use.
|
* @param[in] session The SSH session to use.
|
||||||
*
|
*
|
||||||
* @return The version number if available, 0 otherwise.
|
* @return The version number if available, 0 otherwise.
|
||||||
|
*
|
||||||
|
* @code
|
||||||
|
* int openssh = ssh_get_openssh_version();
|
||||||
|
*
|
||||||
|
* if (openssh == SSH_INT_VERSION(6, 1, 0)) {
|
||||||
|
* printf("Version match!\m");
|
||||||
|
* }
|
||||||
|
* @endcode
|
||||||
*/
|
*/
|
||||||
int ssh_get_openssh_version(ssh_session session) {
|
int ssh_get_openssh_version(ssh_session session) {
|
||||||
if (session == NULL) {
|
if (session == NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user