aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-03-09 19:39:34 +0100
committerAndreas Schneider <asn@cryptomilk.org>2011-03-09 19:39:34 +0100
commit7420b0fb833bfe5c9e7199a2e028721dd128d281 (patch)
treecf4d86249e5b8eb64189d552325131ef7ad950d6 /include
parent52e223dfdd560152d7030d39f3e1a0a51041c349 (diff)
downloadlibssh-7420b0fb833bfe5c9e7199a2e028721dd128d281.tar.gz
libssh-7420b0fb833bfe5c9e7199a2e028721dd128d281.tar.xz
libssh-7420b0fb833bfe5c9e7199a2e028721dd128d281.zip
doc: More doc for messaging functions.
Diffstat (limited to 'include')
-rw-r--r--include/libssh/server.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/include/libssh/server.h b/include/libssh/server.h
index d0cdd2db..cca21fd2 100644
--- a/include/libssh/server.h
+++ b/include/libssh/server.h
@@ -240,10 +240,46 @@ LIBSSH_API int ssh_handle_key_exchange(ssh_session session);
*/
LIBSSH_API void ssh_bind_free(ssh_bind ssh_bind_o);
-/* messages.c */
+/**********************************************************
+ * SERVER MESSAGING
+ **********************************************************/
+
+/**
+ * @brief Reply with a standard reject message.
+ *
+ * Use this function if you don't know what to respond or if you want to reject
+ * a request.
+ *
+ * @param[in] msg The message to use for the reply.
+ *
+ * @return 0 on success, -1 on error.
+ *
+ * @see ssh_message_get()
+ */
LIBSSH_API int ssh_message_reply_default(ssh_message msg);
+/**
+ * @brief Get the name of the authenticated user.
+ *
+ * @param[in] msg The message to get the username from.
+ *
+ * @return The username or NULL if an error occured.
+ *
+ * @see ssh_message_get()
+ * @see ssh_message_type()
+ */
LIBSSH_API char *ssh_message_auth_user(ssh_message msg);
+
+/**
+ * @brief Get the password of the authenticated user.
+ *
+ * @param[in] msg The message to get the password from.
+ *
+ * @return The username or NULL if an error occured.
+ *
+ * @see ssh_message_get()
+ * @see ssh_message_type()
+ */
LIBSSH_API char *ssh_message_auth_password(ssh_message msg);
LIBSSH_API ssh_public_key ssh_message_auth_publickey(ssh_message msg);
LIBSSH_API int ssh_message_auth_kbdint_is_response(ssh_message msg);