1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-26 01:03:15 +03:00
Files
libssh/src/libssh.map
Eshan Kelkar c1606da450 Introduce sftp async i/o (aio) api
The existing sftp async read api has two problems :

1. sftp_async_read() assumes that the value of the third
parameter count is same as the number of bytes requested
to read in the corresponding call to sftp_async_read_begin().

But the documentation of sftp_async_read() allows the value of
count parameter to be more than that requested length. If value
of count parameter is more than that requested length then
sftp_async_read() updates the file->offset incorrectly which
leads to further read/writes occuring from incorrect offsets.

The problem here is that sftp_async_read() doesn't know about
the number of bytes requested to read specified in the call to
sftp_async_read_begin(), and it wrongly assumes the value
of its count parameter (which is actually the size of the buffer
to store the read data) to be the same as the number of bytes
requested to read.

2. sftp_async_read_begin() returns an uint32_t type value type
casted to int as a request identifier, whereas sftp_async_read()
expects an uint32_t type value as a request identifier. Due to this
the user has to typecast the identifier returned by sftp_async_read_begin()
from int to uint32_t and then pass it to sftp_async_read(). This
type casting is cumbersome for the user and hence the approach is
not user-friendly.

This commit solves the above two problems by introducing a new
sftp aio api.

The sftp_aio_begin_*() functions in the api send an i/o request to
the sftp server and provide the caller a dynamically allocated
structure storing information about the sent request. Information
like number of bytes requested for i/o, id of sent request etc is
stored in the structure.

That structure should be provided to the sftp_aio_wait_*() functions
in the api which wait for the response corresponding to the request whose
info is stored in the provided structure.

The libssh user is supposed to handle that structure through an
opaque type sftp_aio.

Since the structure stores the number of bytes requested for i/o,
sftp_aio_wait_*() knows about the number of bytes requested for i/o
(specified in the call to sftp_aio_begin_*()) and hence updates the
file->offset correctly solving problem #1 present in the existing
async api.

Since the structure provided by sftp_aio_begin_*() (containing the
request id) is supplied to sftp_aio_wait_*(), no casting of id's
needs to be done by the user solving problem #2 of the existing
async api.

Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com>
Reviewed-by: Sahana Prasad <sahana@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2023-12-04 18:34:59 +01:00

474 lines
13 KiB
Plaintext

# This map file was updated with abimap-0.3.2
LIBSSH_4_5_0 # Released
{
global:
_ssh_log;
buffer_free;
buffer_get;
buffer_get_len;
buffer_new;
channel_accept_x11;
channel_change_pty_size;
channel_close;
channel_forward_accept;
channel_forward_cancel;
channel_forward_listen;
channel_free;
channel_get_exit_status;
channel_get_session;
channel_is_closed;
channel_is_eof;
channel_is_open;
channel_new;
channel_open_forward;
channel_open_session;
channel_poll;
channel_read;
channel_read_buffer;
channel_read_nonblocking;
channel_request_env;
channel_request_exec;
channel_request_pty;
channel_request_pty_size;
channel_request_send_signal;
channel_request_sftp;
channel_request_shell;
channel_request_subsystem;
channel_request_x11;
channel_select;
channel_send_eof;
channel_set_blocking;
channel_write;
channel_write_stderr;
privatekey_free;
privatekey_from_file;
publickey_free;
publickey_from_file;
publickey_from_privatekey;
publickey_to_string;
sftp_async_read;
sftp_async_read_begin;
sftp_attributes_free;
sftp_canonicalize_path;
sftp_chmod;
sftp_chown;
sftp_client_message_free;
sftp_client_message_get_data;
sftp_client_message_get_filename;
sftp_client_message_get_flags;
sftp_client_message_get_type;
sftp_client_message_set_filename;
sftp_close;
sftp_closedir;
sftp_dir_eof;
sftp_extension_supported;
sftp_extensions_get_count;
sftp_extensions_get_data;
sftp_extensions_get_name;
sftp_file_set_blocking;
sftp_file_set_nonblocking;
sftp_free;
sftp_fstat;
sftp_fstatvfs;
sftp_fsync;
sftp_get_client_message;
sftp_get_error;
sftp_handle;
sftp_handle_alloc;
sftp_handle_remove;
sftp_init;
sftp_lstat;
sftp_mkdir;
sftp_new;
sftp_new_channel;
sftp_open;
sftp_opendir;
sftp_read;
sftp_readdir;
sftp_readlink;
sftp_rename;
sftp_reply_attr;
sftp_reply_data;
sftp_reply_handle;
sftp_reply_name;
sftp_reply_names;
sftp_reply_names_add;
sftp_reply_status;
sftp_rewind;
sftp_rmdir;
sftp_seek;
sftp_seek64;
sftp_send_client_message;
sftp_server_init;
sftp_server_new;
sftp_server_version;
sftp_setstat;
sftp_stat;
sftp_statvfs;
sftp_statvfs_free;
sftp_symlink;
sftp_tell;
sftp_tell64;
sftp_unlink;
sftp_utimes;
sftp_write;
ssh_accept;
ssh_add_channel_callbacks;
ssh_auth_list;
ssh_basename;
ssh_bind_accept;
ssh_bind_accept_fd;
ssh_bind_fd_toaccept;
ssh_bind_free;
ssh_bind_get_fd;
ssh_bind_listen;
ssh_bind_new;
ssh_bind_options_set;
ssh_bind_set_blocking;
ssh_bind_set_callbacks;
ssh_bind_set_fd;
ssh_blocking_flush;
ssh_buffer_add_data;
ssh_buffer_free;
ssh_buffer_get;
ssh_buffer_get_data;
ssh_buffer_get_len;
ssh_buffer_new;
ssh_buffer_reinit;
ssh_channel_accept_forward;
ssh_channel_accept_x11;
ssh_channel_cancel_forward;
ssh_channel_change_pty_size;
ssh_channel_close;
ssh_channel_free;
ssh_channel_get_exit_status;
ssh_channel_get_session;
ssh_channel_is_closed;
ssh_channel_is_eof;
ssh_channel_is_open;
ssh_channel_listen_forward;
ssh_channel_new;
ssh_channel_open_auth_agent;
ssh_channel_open_forward;
ssh_channel_open_reverse_forward;
ssh_channel_open_session;
ssh_channel_open_x11;
ssh_channel_poll;
ssh_channel_poll_timeout;
ssh_channel_read;
ssh_channel_read_nonblocking;
ssh_channel_read_timeout;
ssh_channel_request_auth_agent;
ssh_channel_request_env;
ssh_channel_request_exec;
ssh_channel_request_pty;
ssh_channel_request_pty_size;
ssh_channel_request_send_break;
ssh_channel_request_send_exit_signal;
ssh_channel_request_send_exit_status;
ssh_channel_request_send_signal;
ssh_channel_request_sftp;
ssh_channel_request_shell;
ssh_channel_request_subsystem;
ssh_channel_request_x11;
ssh_channel_select;
ssh_channel_send_eof;
ssh_channel_set_blocking;
ssh_channel_set_counter;
ssh_channel_window_size;
ssh_channel_write;
ssh_channel_write_stderr;
ssh_clean_pubkey_hash;
ssh_connect;
ssh_connector_free;
ssh_connector_new;
ssh_connector_set_in_channel;
ssh_connector_set_in_fd;
ssh_connector_set_out_channel;
ssh_connector_set_out_fd;
ssh_copyright;
ssh_dirname;
ssh_disconnect;
ssh_dump_knownhost;
ssh_event_add_connector;
ssh_event_add_fd;
ssh_event_add_session;
ssh_event_dopoll;
ssh_event_free;
ssh_event_new;
ssh_event_remove_connector;
ssh_event_remove_fd;
ssh_event_remove_session;
ssh_execute_message_callbacks;
ssh_finalize;
ssh_forward_accept;
ssh_forward_cancel;
ssh_forward_listen;
ssh_free;
ssh_get_cipher_in;
ssh_get_cipher_out;
ssh_get_clientbanner;
ssh_get_disconnect_message;
ssh_get_error;
ssh_get_error_code;
ssh_get_fd;
ssh_get_hexa;
ssh_get_hmac_in;
ssh_get_hmac_out;
ssh_get_issue_banner;
ssh_get_kex_algo;
ssh_get_log_callback;
ssh_get_log_level;
ssh_get_log_userdata;
ssh_get_openssh_version;
ssh_get_poll_flags;
ssh_get_pubkey;
ssh_get_pubkey_hash;
ssh_get_publickey;
ssh_get_publickey_hash;
ssh_get_random;
ssh_get_server_publickey;
ssh_get_serverbanner;
ssh_get_status;
ssh_get_version;
ssh_getpass;
ssh_gssapi_get_creds;
ssh_gssapi_set_creds;
ssh_handle_key_exchange;
ssh_init;
ssh_is_blocking;
ssh_is_connected;
ssh_is_server_known;
ssh_key_cmp;
ssh_key_free;
ssh_key_is_private;
ssh_key_is_public;
ssh_key_new;
ssh_key_type;
ssh_key_type_from_name;
ssh_key_type_to_char;
ssh_known_hosts_parse_line;
ssh_knownhosts_entry_free;
ssh_log;
ssh_message_auth_interactive_request;
ssh_message_auth_kbdint_is_response;
ssh_message_auth_password;
ssh_message_auth_pubkey;
ssh_message_auth_publickey;
ssh_message_auth_publickey_state;
ssh_message_auth_reply_pk_ok;
ssh_message_auth_reply_pk_ok_simple;
ssh_message_auth_reply_success;
ssh_message_auth_set_methods;
ssh_message_auth_user;
ssh_message_channel_request_channel;
ssh_message_channel_request_command;
ssh_message_channel_request_env_name;
ssh_message_channel_request_env_value;
ssh_message_channel_request_open_destination;
ssh_message_channel_request_open_destination_port;
ssh_message_channel_request_open_originator;
ssh_message_channel_request_open_originator_port;
ssh_message_channel_request_open_reply_accept;
ssh_message_channel_request_pty_height;
ssh_message_channel_request_pty_pxheight;
ssh_message_channel_request_pty_pxwidth;
ssh_message_channel_request_pty_term;
ssh_message_channel_request_pty_width;
ssh_message_channel_request_reply_success;
ssh_message_channel_request_subsystem;
ssh_message_channel_request_x11_auth_cookie;
ssh_message_channel_request_x11_auth_protocol;
ssh_message_channel_request_x11_screen_number;
ssh_message_channel_request_x11_single_connection;
ssh_message_free;
ssh_message_get;
ssh_message_global_request_address;
ssh_message_global_request_port;
ssh_message_global_request_reply_success;
ssh_message_reply_default;
ssh_message_retrieve;
ssh_message_service_reply_success;
ssh_message_service_service;
ssh_message_subtype;
ssh_message_type;
ssh_mkdir;
ssh_new;
ssh_options_copy;
ssh_options_get;
ssh_options_get_port;
ssh_options_getopt;
ssh_options_parse_config;
ssh_options_set;
ssh_pcap_file_close;
ssh_pcap_file_free;
ssh_pcap_file_new;
ssh_pcap_file_open;
ssh_pki_copy_cert_to_privkey;
ssh_pki_export_privkey_file;
ssh_pki_export_privkey_to_pubkey;
ssh_pki_export_pubkey_base64;
ssh_pki_export_pubkey_file;
ssh_pki_generate;
ssh_pki_import_cert_base64;
ssh_pki_import_cert_file;
ssh_pki_import_privkey_base64;
ssh_pki_import_privkey_file;
ssh_pki_import_pubkey_base64;
ssh_pki_import_pubkey_file;
ssh_pki_key_ecdsa_name;
ssh_print_hexa;
ssh_privatekey_type;
ssh_publickey_to_file;
ssh_remove_channel_callbacks;
ssh_scp_accept_request;
ssh_scp_close;
ssh_scp_deny_request;
ssh_scp_free;
ssh_scp_init;
ssh_scp_leave_directory;
ssh_scp_new;
ssh_scp_pull_request;
ssh_scp_push_directory;
ssh_scp_push_file;
ssh_scp_push_file64;
ssh_scp_read;
ssh_scp_request_get_filename;
ssh_scp_request_get_permissions;
ssh_scp_request_get_size;
ssh_scp_request_get_size64;
ssh_scp_request_get_warning;
ssh_scp_write;
ssh_select;
ssh_send_debug;
ssh_send_ignore;
ssh_send_keepalive;
ssh_server_init_kex;
ssh_service_request;
ssh_session_export_known_hosts_entry;
ssh_session_has_known_hosts_entry;
ssh_session_is_known_server;
ssh_session_update_known_hosts;
ssh_set_agent_channel;
ssh_set_agent_socket;
ssh_set_auth_methods;
ssh_set_blocking;
ssh_set_callbacks;
ssh_set_channel_callbacks;
ssh_set_counters;
ssh_set_fd_except;
ssh_set_fd_toread;
ssh_set_fd_towrite;
ssh_set_log_callback;
ssh_set_log_level;
ssh_set_log_userdata;
ssh_set_message_callback;
ssh_set_pcap_file;
ssh_set_server_callbacks;
ssh_silent_disconnect;
ssh_string_burn;
ssh_string_copy;
ssh_string_data;
ssh_string_fill;
ssh_string_free;
ssh_string_free_char;
ssh_string_from_char;
ssh_string_get_char;
ssh_string_len;
ssh_string_new;
ssh_string_to_char;
ssh_threads_get_noop;
ssh_threads_get_pthread;
ssh_threads_set_callbacks;
ssh_try_publickey_from_file;
ssh_userauth_agent;
ssh_userauth_agent_pubkey;
ssh_userauth_autopubkey;
ssh_userauth_gssapi;
ssh_userauth_kbdint;
ssh_userauth_kbdint_getanswer;
ssh_userauth_kbdint_getinstruction;
ssh_userauth_kbdint_getname;
ssh_userauth_kbdint_getnanswers;
ssh_userauth_kbdint_getnprompts;
ssh_userauth_kbdint_getprompt;
ssh_userauth_kbdint_setanswer;
ssh_userauth_list;
ssh_userauth_none;
ssh_userauth_offer_pubkey;
ssh_userauth_password;
ssh_userauth_privatekey_file;
ssh_userauth_pubkey;
ssh_userauth_publickey;
ssh_userauth_publickey_auto;
ssh_userauth_try_publickey;
ssh_version;
ssh_write_knownhost;
string_burn;
string_copy;
string_data;
string_fill;
string_free;
string_from_char;
string_len;
string_new;
string_to_char;
local:
*;
} ;
LIBSSH_4_6_0 # Released
{
global:
ssh_print_hash;
} LIBSSH_4_5_0;
LIBSSH_4_7_0 # Released
{
global:
sftp_client_message_get_submessage;
ssh_get_fingerprint_hash;
ssh_pki_export_privkey_base64;
} LIBSSH_4_6_0;
LIBSSH_4_8_0 # Released
{
global:
sftp_server_free;
ssh_bind_options_parse_config;
ssh_channel_open_forward_unix;
ssh_message_channel_request_open_reply_accept_channel;
} LIBSSH_4_7_0;
LIBSSH_4_8_1 # Released
{
global:
ssh_session_get_known_hosts_entry;
ssh_threads_get_default;
} LIBSSH_4_8_0;
LIBSSH_4_9_0 # Released
{
global:
ssh_channel_open_forward_port;
ssh_key_dup;
ssh_send_issue_banner;
ssh_session_set_disconnect_message;
ssh_userauth_publickey_auto_get_current_identity;
ssh_vlog;
} LIBSSH_4_8_1;
LIBSSH_AFTER_4_9_0
{
global:
sftp_channel_default_data_callback;
sftp_channel_default_subsystem_request;
sftp_aio_begin_read;
sftp_aio_begin_write;
sftp_aio_free;
sftp_aio_wait_read;
sftp_aio_wait_write;
} LIBSSH_4_9_0;