The SSH logging functions.
[The libssh API]

Logging functions for debugging and problem resolving. More...

Enumerations

enum  {
  SSH_LOG_NOLOG = 0, SSH_LOG_WARNING, SSH_LOG_PROTOCOL, SSH_LOG_PACKET,
  SSH_LOG_FUNCTIONS
}

Functions

ssh_logging_callback ssh_get_log_callback (void)
 Get the pointer to the logging callback function.
int ssh_get_log_level (void)
 Get the log level of the library.
void * ssh_get_log_userdata (void)
 Get the userdata of the logging function.
int ssh_set_log_callback (ssh_logging_callback cb)
 Set the logging callback function.
int ssh_set_log_level (int level)
 Set the log level of the library.
int ssh_set_log_userdata (void *data)
 Set the userdata for the logging function.

Detailed Description

Logging functions for debugging and problem resolving.


Enumeration Type Documentation

anonymous enum
Enumerator:
SSH_LOG_NOLOG 

No logging at all.

SSH_LOG_WARNING 

Only warnings.

SSH_LOG_PROTOCOL 

High level protocol information.

SSH_LOG_PACKET 

Lower level protocol infomations, packet level.

SSH_LOG_FUNCTIONS 

Every function path.


Function Documentation

ssh_logging_callback ssh_get_log_callback ( void   ) 

Get the pointer to the logging callback function.

Returns:
The pointer the the callback or NULL if none set.

Referenced by ssh_set_callbacks().

int ssh_get_log_level ( void   ) 

Get the log level of the library.

Returns:
The value of the log level.
void* ssh_get_log_userdata ( void   ) 

Get the userdata of the logging function.

Returns:
The userdata if set or NULL.
int ssh_set_log_callback ( ssh_logging_callback  cb  ) 

Set the logging callback function.

Parameters:
[in] cb The callback to set.
Returns:
0 on success, < 0 on errror.

Referenced by ssh_set_callbacks().

int ssh_set_log_level ( int  level  ) 

Set the log level of the library.

Parameters:
[in] level The level to set.
Returns:
SSH_OK on success, SSH_ERROR on error.

Referenced by ssh_bind_options_set(), ssh_options_getopt(), and ssh_options_set().

int ssh_set_log_userdata ( void *  data  ) 

Set the userdata for the logging function.

Parameters:
[in] data The userdata to set.
Returns:
SSH_OK on success.

Referenced by ssh_set_callbacks().


Generated on 24 Jun 2015 for libssh by  doxygen 1.6.1