From 4a36e52bc4e74946fcf2054389bf70ce1eefdcdf Mon Sep 17 00:00:00 2001 From: Norbert Pocs Date: Thu, 29 Sep 2022 11:15:35 +0200 Subject: [PATCH] server.c: Add missing function documentation Signed-off-by: Norbert Pocs Reviewed-by: Jakub Jelen (cherry picked from commit 407078402923bbe1525a5dd47414d58779e1ddb1) --- src/server.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/server.c b/src/server.c index 04949a94..7e2fbfc1 100644 --- a/src/server.c +++ b/src/server.c @@ -695,6 +695,13 @@ static int ssh_message_service_request_reply_default(ssh_message msg) { return ssh_message_service_reply_success(msg); } +/** + * @brief Sends SERVICE_ACCEPT to the client + * + * @param msg The message to reply to + * + * @returns SSH_OK when success otherwise SSH_ERROR + */ int ssh_message_service_reply_success(ssh_message msg) { ssh_session session; int rc; @@ -797,6 +804,13 @@ int ssh_message_reply_default(ssh_message msg) { return -1; } +/** + * @brief Gets the service name from the service request message + * + * @param msg The service request message + * + * @returns the service name from the message + */ const char *ssh_message_service_service(ssh_message msg){ if (msg == NULL) { return NULL; @@ -837,6 +851,13 @@ ssh_public_key ssh_message_auth_publickey(ssh_message msg){ return ssh_pki_convert_key_to_publickey(msg->auth_request.pubkey); } +/** + * @brief Get the state of the public key authentication process + * + * @param msg The message + * + * @returns state of the authentication + */ enum ssh_publickey_state_e ssh_message_auth_publickey_state(ssh_message msg){ if (msg == NULL) { return -1; @@ -1193,6 +1214,13 @@ int ssh_execute_message_callbacks(ssh_session session){ return SSH_OK; } +/** + * @brief Sends a keepalive message to the session + * + * @param The session to send the message to + * + * @returns SSH_OK + */ int ssh_send_keepalive(ssh_session session) { /* Client denies the request, so the error code is not meaningful */