summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libssh/libssh.h22
-rw-r--r--include/libssh/libsshpp.hpp8
2 files changed, 22 insertions, 8 deletions
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h
index 2b125f23..a34e9ee4 100644
--- a/include/libssh/libssh.h
+++ b/include/libssh/libssh.h
@@ -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);
diff --git a/include/libssh/libsshpp.hpp b/include/libssh/libsshpp.hpp
index 1a5d80a9..71d6ff5e 100644
--- a/include/libssh/libsshpp.hpp
+++ b/include/libssh/libsshpp.hpp
@@ -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;