1
0
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:
Andreas Schneider
2013-09-16 09:11:03 +02:00
parent 3e07359a35
commit 8823dee51a

View File

@@ -579,6 +579,14 @@ char *ssh_get_issue_banner(ssh_session session) {
* @param[in] session The SSH session to use.
*
* @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) {
if (session == NULL) {