clj-libssh2.libssh2.session

Create and manipulate libssh2 sessions.

abstract

(abstract session)
void **libssh2_session_abstract(LIBSSH2_SESSION *session);

banner-get

(banner-get session)
const char *libssh2_session_banner_get(LIBSSH2_SESSION *session);

banner-set

(banner-set session banner)
int libssh2_session_banner_set(LIBSSH2_SESSION *session, const char *banner);

block-directions

(block-directions session)
int libssh2_session_block_directions(LIBSSH2_SESSION *session);

callback-set

(callback-set session cbtype callback)
void *libssh2_session_callback_set(LIBSSH2_SESSION *session,
                                   int cbtype,
                                   void *callback);

disconnect

(disconnect session description)
int libssh2_session_disconnect(LIBSSH2_SESSION *session,
                               const char *description);

disconnect-ex

(disconnect-ex session reason description lang)
int libssh2_session_disconnect_ex(LIBSSH2_SESSION *session,
                                  int reason,
                                  const char *description,
                                  const char *lang);

flag

(flag session flag value)
int libssh2_session_flag(LIBSSH2_SESSION *session, int flag, int value);

free

(free session)
int libssh2_session_free(LIBSSH2_SESSION *session);

get-blocking

(get-blocking session)
int libssh2_session_get_blocking(LIBSSH2_SESSION* session);

get-timeout

(get-timeout session)
long libssh2_session_get_timeout(LIBSSH2_SESSION* session);

handshake

(handshake session sock)
int libssh2_session_handshake(LIBSSH2_SESSION *session,
                              libssh2_socket_t sock);

hostkey

(hostkey session len type)
const char *libssh2_session_hostkey(LIBSSH2_SESSION *session,
                                    size_t *len,
                                    int *type);

init

(init)
LIBSSH2_SESSION * libssh2_session_init();

init-ex

(init-ex my-alloc my-free my-realloc abstract)
LIBSSH2_SESSION * libssh2_session_init_ex(LIBSSH2_ALLOC_FUNC((*my_alloc)),
                                          LIBSSH2_FREE_FUNC((*my_free)),
                                          LIBSSH2_REALLOC_FUNC((*my_realloc)),
                                          void *abstract);

last-errno

(last-errno session)
int libssh2_session_last_errno(LIBSSH2_SESSION *session);

last-error

(last-error session err-msg err-msg-len want-buf)
int libssh2_session_last_error(LIBSSH2_SESSION *session,
                               char **errmsg,
                               int *errmsg_len,
                               int want_buf);

method-pref

(method-pref session method-type prefs)
int libssh2_session_method_pref(LIBSSH2_SESSION *session,
                               int method_type,
                               const char *prefs);

methods

(methods session method-type)
const char *libssh2_session_methods(LIBSSH2_SESSION *session,
                                    int method_type);

set-blocking

(set-blocking session blocking)
void libssh2_session_set_blocking(LIBSSH2_SESSION* session, int blocking);

set-timeout

(set-timeout session timeout)
void libssh2_session_set_timeout(LIBSSH2_SESSION* session, long timeout);

startup

deprecated in libssh2

(startup session sock)
int libssh2_session_startup(LIBSSH2_SESSION *session, int sock);

supported-algs

(supported-algs session method-type algs)
int libssh2_session_supported_algs(LIBSSH2_SESSION* session,
                                   int method_type,
                                   const char*** algs);