aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-09-16 09:11:03 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-09-16 10:38:14 +0200
commit8823dee51a95ca9d46d005f4f0a4b2c3f827a78b (patch)
tree4e60baf71995fe2110e21ab2be7b12b12cd2f302 /src
parent3e07359a35aa3ae719dfd697211e9d1130dc94d2 (diff)
downloadlibssh-8823dee51a95ca9d46d005f4f0a4b2c3f827a78b.tar.gz
libssh-8823dee51a95ca9d46d005f4f0a4b2c3f827a78b.tar.xz
libssh-8823dee51a95ca9d46d005f4f0a4b2c3f827a78b.zip
client: Add example code for ssh_get_openssh_version().
BUG: https://red.libssh.org/issues/120
Diffstat (limited to 'src')
-rw-r--r--src/client.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client.c b/src/client.c
index 99a300b1..6bab5f8b 100644
--- a/src/client.c
+++ b/src/client.c
@@ -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) {