assh/assh.h header reference
Description [link]
This header contains declarations of types used across the library as well as error related enums and macros.
Members [link]
Types [link]
- typedef assh_status_t (assh_allocator_t)(void *alloc_pv, void **ptr, size_t size, enum assh_alloc_type_e type)
- typedef [...] assh_bool_t
- enum assh_severity_e
- enum assh_status_e
- typedef [...] assh_status_t
Function [link]
- const char * assh_error_str(assh_status_t err)
Macros [link]
Members detail [link]
#define ASSH_SEVERITY(code) [link]
This macro is declared in assh/assh.h source file, line 253.
This macro extracts the enum assh_severity_e part of an status code returned by a function.
See also assh_status_t, enum assh_severity_e and Error handling.
#define ASSH_STATUS(code) [link]
This macro is declared in assh/assh.h source file, line 244.
This macro extracts the enum assh_status_e part of an status code returned by a function.
See also assh_status_t, enum assh_status_e, ASSH_SUCCESS and Error handling.
#define ASSH_SUCCESS(code) [link]
This macro is declared in assh/assh.h source file, line 248.
This macro evaluate to true when the status code is not an error.
See also ASSH_STATUS and Error handling.
typedef assh_status_t (assh_allocator_t)(void *alloc_pv, void **ptr, size_t size, enum assh_alloc_type_e type) [link]
This typedef is declared in assh/assh.h source file, line 506.
This is the memory allocator function type. A pointer to function of this type may be passed to the assh_context_create function. The same behavior as the standard realloc function is expected.
See also Core and modules.
typedef uint8_t assh_bool_t [link]
This typedef is declared in assh/assh.h source file, line 138.
A simple boolean type used in libassh.
const char * assh_error_str(assh_status_t err) [link]
This function is declared in assh/assh.h source file, line 239.
This function returns an error string description of the passed error code.
enum assh_severity_e [link]
This enum is declared in assh/assh.h source file, line 162.
This enum specifies the error severity and must be ored with an enum assh_status_e value.
These values indicate how the state of the session is impacted by the associated error.
Multiple error severity bits may be ored together; in this case the highest bit set prevails. This allows increasing the error severity returned by a callee from the caller function.
See also Error handling.
Identifier | Description |
---|---|
ASSH_ERRSV_CONTINUE | The error is not critical and the connection may continue. This is the default when no severity is specified. |
ASSH_ERRSV_DISCONNECT | The error prevent further communication with the remote host but a disconnect packet may still be send before closing the connection. |
enum assh_status_e [link]
This enum is declared in assh/assh.h source file, line 176.
This enum specifies the possible errors returned by the libassh functions and passed to the assh_event_done function.
See also Error handling.
Identifier | Description |
---|---|
ASSH_OK | Success. |
ASSH_NO_DATA | No data were available, This is not an error. |
ASSH_NOT_FOUND | The requested entry was not found, This is not an error. |
ASSH_ERR_IO | IO error. |
ASSH_ERR_MEM | Memory allocation error. |
ASSH_ERR_INPUT_OVERFLOW | Buffer overflow in input data. Input data contains bad or corrupt data which would result in memory access outside allowed bounds. |
ASSH_ERR_OUTPUT_OVERFLOW | Output buffer is not large enough to write expected data. |
ASSH_ERR_NUM_OVERFLOW | Arithmetic overflow on big number. |
ASSH_ERR_NUM_COMPARE_FAILED | Compare failed on big number. |
ASSH_ERR_BAD_VERSION | Bad version of the ssh protocol. |
ASSH_ERR_BAD_DATA | Packet or buffer contains unexpected or corrupt data. |
ASSH_ERR_BAD_ARG | Invalid function arguments |
ASSH_ERR_MAC | Message authentication code error. |
ASSH_ERR_PROTOCOL | Packet content doesn't match current state of the protocol. |
ASSH_ERR_BUSY | Requested operation can not be performed at this time. |
ASSH_ERR_CRYPTO | Crypto initialization or processing error. |
ASSH_ERR_NOTSUP | Unsupported parameter value. |
ASSH_ERR_KEX_FAILED | The key exchange has failed |
ASSH_ERR_MISSING_KEY | The required key is not available. |
ASSH_ERR_MISSING_ALGO | The required algorithm is not available. |
ASSH_ERR_WRONG_KEY | The key failed to decipher |
ASSH_ERR_HOSTKEY_SIGNATURE | The host key verification has failed |
ASSH_ERR_SERVICE_NA | The requested service is not available |
ASSH_ERR_NO_AUTH | No more authentication method available. |
ASSH_ERR_NO_MORE_SERVICE | The client has reached the end of list of services to request. |
ASSH_ERR_WEAK_ALGORITHM | Algorithm or key security level is below defined threshold. |
ASSH_ERR_TIMEOUT | Protocol timeout. |
typedef int_fast16_t assh_status_t [link]
This typedef is declared in assh/assh.h source file, line 147.
The error code integer type returned by assh functions. It is composed of two parts specified by the enum assh_status_e and enum assh_severity_e enums.
See also ASSH_STATUS, ASSH_SEVERITY and Error handling.