struct ssh_callbacks_struct

Overview

The structure to replace libssh functions with appropriate callbacks. More…

#include <include/libssh/callbacks.h>

struct ssh_callbacks_struct {
    // fields

    ssh_auth_callback auth_function;
    ssh_channel_open_request_x11_callback channel_open_request_x11_function;
    void(* connect_status_function)(void *userdata, float status);
    ssh_global_request_callback global_request_function;
    ssh_log_callback log_function;
    size_t size;
    void* userdata;
};

Detailed Documentation

The structure to replace libssh functions with appropriate callbacks.

Fields

ssh_auth_callback auth_function

This functions will be called if e.g.

a keyphrase is needed.

ssh_channel_open_request_x11_callback channel_open_request_x11_function

This function will be called when an incoming X11 request is received.

void(* connect_status_function)(void *userdata, float status)

This function gets called during connection time to indicate the percentage of connection steps completed.

ssh_global_request_callback global_request_function

This function will be called each time a global request is received.

ssh_log_callback log_function

This function will be called each time a loggable event happens.

size_t size

DON’T SET THIS use ssh_callbacks_init() instead.

void* userdata

User-provided data.

User is free to set anything he wants here