assh/assh_event.h header reference

Description [link] 

The API of the library is event based, as explained in the evts section.

This header contains declaration of the struct assh_event_s structure as well as event management functions.

Header inclusion [link] 

Members [link] 

Types [link] 

Functions [link] 

  • void assh_event_done(struct assh_session_s *s, struct assh_event_s *e, enum assh_status_e err)
  • assh_bool_t assh_event_get(struct assh_session_s *s, struct assh_event_s *e, assh_time_t time)

Macro [link] 

Members detail [link] 

void assh_event_done(struct assh_session_s *s, struct assh_event_s *e, enum assh_status_e err) [link] 

This function is declared in assh/assh_event.h source file, line 248.

This function acknowledges the last event returned by the assh_event_get function.

If an error occurred during event processing by the caller, it should be reported to this function, especially if the error must terminate the session.

When an error is reported, the content of the event object is considered undefined by the library. The error will later be reported by an ASSH_EVENT_SESSION_ERROR event unless shadowed by an other error of higher severity.

See also fsms and evts.

assh_bool_t assh_event_get(struct assh_session_s *s, struct assh_event_s *e, assh_time_t time) [link] 

This function is declared in assh/assh_event.h source file, line 229.

This function runs the various state machines which implement the ssh2 protocol, including the currently running service and key-exchange. It then reports the next available event to the caller.

The assh_event_done function must be called after each successful call to this function, before requesting the next event.

This function can be called again unless 0 is returned eventually. This occurs when the session terminates.

When the function returns 1, the passed object event is initialized and can be examined by the application.

In order for the library to handle protocol timeouts properly, the current time in seconds has to be passed to this function. When this is the case, the assh_session_deadline function can be used to get the next ssh2 protocol deadline.

See also fsms, evts and assh_session_closed.

enum assh_event_id_e [link] 

This enum is declared in assh/assh_event.h source file, line 42.

This enum specifies event types.

IdentifierValueDescription
ASSH_EVENT_INVALID0 This event id is not valid and can be used to mark non-initialized event objects.
ASSH_EVENT_READ1See struct assh_event_transport_read_s.
ASSH_EVENT_WRITE2See struct assh_event_transport_write_s.
ASSH_EVENT_DISCONNECT3See struct assh_event_transport_disconnect_s.
ASSH_EVENT_DEBUG4See struct assh_event_transport_debug_s.
ASSH_EVENT_SESSION_ERROR5See struct assh_event_session_error_s.
ASSH_EVENT_KEX_HOSTKEY_LOOKUP6See struct assh_event_kex_hostkey_lookup_s.
ASSH_EVENT_KEX_DONE7See struct assh_event_kex_done_s.
ASSH_EVENT_SERVICE_START9See struct assh_event_service_start_s.
ASSH_EVENT_USERAUTH_CLIENT_USER10See struct assh_event_userauth_client_user_s.
ASSH_EVENT_USERAUTH_CLIENT_METHODS11See struct assh_event_userauth_client_methods_s.
ASSH_EVENT_USERAUTH_CLIENT_BANNER12See struct assh_event_userauth_client_banner_s.
ASSH_EVENT_USERAUTH_CLIENT_PWCHANGE13See struct assh_event_userauth_client_pwchange_s.
ASSH_EVENT_USERAUTH_CLIENT_KEYBOARD14See struct assh_event_userauth_client_keyboard_s.
ASSH_EVENT_USERAUTH_CLIENT_SUCCESS15
ASSH_EVENT_USERAUTH_CLIENT_SIGN16See struct assh_event_userauth_client_sign_s.
ASSH_EVENT_USERAUTH_SERVER_METHODS20See struct assh_event_userauth_server_methods_s.
ASSH_EVENT_USERAUTH_SERVER_NONE21See struct assh_event_userauth_server_none_s.
ASSH_EVENT_USERAUTH_SERVER_USERKEY22See struct assh_event_userauth_server_userkey_s.
ASSH_EVENT_USERAUTH_SERVER_PASSWORD23See struct assh_event_userauth_server_password_s.
ASSH_EVENT_USERAUTH_SERVER_KBINFO24See struct assh_event_userauth_server_kbinfo_s.
ASSH_EVENT_USERAUTH_SERVER_KBRESPONSE25See struct assh_event_userauth_server_kbresponse_s.
ASSH_EVENT_USERAUTH_SERVER_HOSTBASED26See struct assh_event_userauth_server_hostbased_s.
ASSH_EVENT_USERAUTH_SERVER_SUCCESS27See struct assh_event_userauth_server_success_s.
ASSH_EVENT_REQUEST30See struct assh_event_request_s.
ASSH_EVENT_REQUEST_ABORT31See struct assh_event_request_abort_s.
ASSH_EVENT_REQUEST_SUCCESS32See struct assh_event_request_success_s.
ASSH_EVENT_REQUEST_FAILURE33See struct assh_event_request_failure_s.
ASSH_EVENT_CHANNEL_OPEN34See struct assh_event_channel_open_s.
ASSH_EVENT_CHANNEL_CONFIRMATION35See struct assh_event_channel_confirmation_s.
ASSH_EVENT_CHANNEL_FAILURE36See struct assh_event_channel_failure_s.
ASSH_EVENT_CHANNEL_DATA37See struct assh_event_channel_data_s.
ASSH_EVENT_CHANNEL_WINDOW38See struct assh_event_channel_window_s.
ASSH_EVENT_CHANNEL_EOF39See struct assh_event_channel_eof_s.
ASSH_EVENT_CHANNEL_CLOSE40See struct assh_event_channel_close_s.
ASSH_EVENT_CHANNEL_ABORT41See struct assh_event_channel_abort_s.
ASSH_EVENT_COUNT42

struct assh_event_s [link] 

This struct is declared in assh/assh_event.h source file, line 145.

This struct holds an event reported by the assh_event_get function.

FieldDescription
enum assh_event_id_e id;Id of the event.
assh_event_done_t * f_done; Pointer to the event acknowledge function, if any.
void * done_pv; Private data for the event acknowledge function.
union <anonymous> {
union <anonymous>::assh_event_session_u session;
union assh_event_transport_u transport;
union assh_event_kex_u kex;
union <anonymous>::assh_event_service_u service;
union assh_event_userauth_client_u userauth_client;
union assh_event_userauth_server_u userauth_server;
union assh_event_connection_u connection;
uintptr_t params[16]; Padding
};

#define ASSH_EVENT_DONE_FCN(n) [link] 

This macro is for internal use only.

This macro is declared in assh/assh_event.h source file, line 127.

This macro expands to:

ASSH_WARN_UNUSED_RESULT assh_status_t (n)(struct assh_session_s *s,
const struct assh_event_s *e,
enum assh_status_e inerr)

See also assh_event_done_t.

typedef assh_status_t (assh_event_done_t)(struct assh_session_s *s, const struct assh_event_s *e, enum assh_status_e inerr) [link] 

This typedef is for internal use only.

This typedef is declared in assh/assh_event.h source file, line 135.

This declaration involves expansion of the ASSH_EVENT_DONE_FCN macro.

This typedef is called when the event has been processed.

See also assh_event_done.

Valid XHTML 1.0 StrictGenerated by diaxen on Sun Oct 25 23:31:03 2020 using MkDoc