summaryrefslogtreecommitdiffstats
path: root/src/client.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-09-16 09:11:03 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-10-01 14:47:57 +0200
commit5b7a696cf23bd3bf4743fff240f9729383c7df1d (patch)
tree06e1fe9ce4f558fa6af8c73d8b6a3f9e1cec4c29 /src/client.c
parentc59568c3c1c80e3bb7e9844c16c6c3edfc2b2dba (diff)
client: Add example code for ssh_get_openssh_version().
BUG: https://red.libssh.org/issues/120
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client.c b/src/client.c
index e3c8fa4a..dad988ed 100644
--- a/src/client.c
+++ b/src/client.c
@@ -584,6 +584,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) {