mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 02:39:48 +09:00
channel: Fix the name scheme of the forward functions.
This commit is contained in:
@@ -405,10 +405,19 @@ LIBSSH_API const char *ssh_copyright(void);
|
||||
LIBSSH_API void ssh_disconnect(ssh_session session);
|
||||
LIBSSH_API char *ssh_dirname (const char *path);
|
||||
LIBSSH_API int ssh_finalize(void);
|
||||
LIBSSH_API ssh_channel ssh_forward_accept(ssh_session session, int timeout_ms);
|
||||
LIBSSH_API ssh_channel ssh_channel_accept_forward(ssh_session session, int timeout_ms, int *destination_port);
|
||||
LIBSSH_API int ssh_forward_cancel(ssh_session session, const char *address, int port);
|
||||
LIBSSH_API int ssh_forward_listen(ssh_session session, const char *address, int port, int *bound_port);
|
||||
|
||||
/* REVERSE PORT FORWARDING */
|
||||
LIBSSH_API ssh_channel ssh_channel_accept_forward(ssh_session session,
|
||||
int timeout_ms,
|
||||
int *destination_port);
|
||||
LIBSSH_API int ssh_channel_cancel_forward(ssh_session session,
|
||||
const char *address,
|
||||
int port);
|
||||
LIBSSH_API int ssh_channel_listen_forward(ssh_session session,
|
||||
const char *address,
|
||||
int port,
|
||||
int *bound_port);
|
||||
|
||||
LIBSSH_API void ssh_free(ssh_session session);
|
||||
LIBSSH_API const char *ssh_get_disconnect_message(ssh_session session);
|
||||
LIBSSH_API const char *ssh_get_error(void *error);
|
||||
@@ -429,7 +438,12 @@ LIBSSH_API int ssh_get_publickey_hash(const ssh_key key,
|
||||
unsigned char **hash,
|
||||
size_t *hlen);
|
||||
|
||||
/* DEPRECATED FUNCTIONS */
|
||||
SSH_DEPRECATED LIBSSH_API int ssh_get_pubkey_hash(ssh_session session, unsigned char **hash);
|
||||
SSH_DEPRECATED LIBSSH_API ssh_channel ssh_forward_accept(ssh_session session, int timeout_ms);
|
||||
SSH_DEPRECATED LIBSSH_API int ssh_forward_cancel(ssh_session session, const char *address, int port);
|
||||
SSH_DEPRECATED LIBSSH_API int ssh_forward_listen(ssh_session session, const char *address, int port, int *bound_port);
|
||||
|
||||
|
||||
LIBSSH_API int ssh_get_random(void *where,int len,int strong);
|
||||
LIBSSH_API int ssh_get_version(ssh_session session);
|
||||
|
||||
@@ -365,14 +365,14 @@ public:
|
||||
/* acceptForward is implemented later in this file */
|
||||
|
||||
void_throwable cancelForward(const char *address, int port){
|
||||
int err=ssh_forward_cancel(c_session, address, port);
|
||||
int err=ssh_channel_cancel_forward(c_session, address, port);
|
||||
ssh_throw(err);
|
||||
return_throwable;
|
||||
}
|
||||
|
||||
void_throwable listenForward(const char *address, int port,
|
||||
int &boundport){
|
||||
int err=ssh_forward_listen(c_session, address, port, &boundport);
|
||||
int err=ssh_channel_listen_forward(c_session, address, port, &boundport);
|
||||
ssh_throw(err);
|
||||
return_throwable;
|
||||
}
|
||||
@@ -583,8 +583,8 @@ private:
|
||||
|
||||
/* This code cannot be put inline due to references to Channel */
|
||||
Channel *Session::acceptForward(int timeout_ms){
|
||||
ssh_channel forward = ssh_forward_accept(c_session,
|
||||
timeout_ms);
|
||||
ssh_channel forward =
|
||||
ssh_channel_accept_forward(c_session, timeout_ms, NULL);
|
||||
ssh_throw_null(c_session,forward);
|
||||
Channel *newchan = new Channel(*this,forward);
|
||||
return newchan;
|
||||
|
||||
Reference in New Issue
Block a user