aboutsummaryrefslogtreecommitdiff
path: root/src/channels.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2014-01-16 09:06:56 +0100
committerAndreas Schneider <asn@cryptomilk.org>2014-01-16 09:13:06 +0100
commit5229253f8684026b01db4cc6cdf3c149a6358984 (patch)
tree221ba7585ac8e2999520b7bbd74325cbc156ee1d /src/channels.c
parenta1c4fc07d43fb7a7e1e91bfdadbd3dc62b8ce462 (diff)
downloadlibssh-5229253f8684026b01db4cc6cdf3c149a6358984.tar.gz
libssh-5229253f8684026b01db4cc6cdf3c149a6358984.tar.xz
libssh-5229253f8684026b01db4cc6cdf3c149a6358984.zip
channel: Fix the name scheme of the forward functions.
Diffstat (limited to 'src/channels.c')
-rw-r--r--src/channels.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/channels.c b/src/channels.c
index dc51d959..116ada6d 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -2251,7 +2251,11 @@ error:
* SSH_AGAIN if in nonblocking mode and call has
* to be done again.
**/
-int ssh_forward_listen(ssh_session session, const char *address, int port, int *bound_port) {
+int ssh_channel_listen_forward(ssh_session session,
+ const char *address,
+ int port,
+ int *bound_port)
+{
ssh_buffer buffer = NULL;
ssh_string addr = NULL;
int rc = SSH_ERROR;
@@ -2293,16 +2297,7 @@ error:
return rc;
}
-/**
- * @brief Accept an incoming TCP/IP forwarding channel.
- *
- * @param[in] session The ssh session to use.
- *
- * @param[in] timeout_ms A timeout in milliseconds.
- *
- * @return Newly created channel, or NULL if no incoming channel request from
- * the server
- */
+/* DEPRECATED */
ssh_channel ssh_forward_accept(ssh_session session, int timeout_ms) {
return ssh_channel_accept(session, SSH_CHANNEL_FORWARDED_TCPIP, timeout_ms, NULL);
}
@@ -2338,7 +2333,10 @@ ssh_channel ssh_channel_accept_forward(ssh_session session, int timeout_ms, int*
* SSH_AGAIN if in nonblocking mode and call has
* to be done again.
*/
-int ssh_forward_cancel(ssh_session session, const char *address, int port) {
+int ssh_channel_cancel_forward(ssh_session session,
+ const char *address,
+ int port)
+{
ssh_buffer buffer = NULL;
ssh_string addr = NULL;
int rc = SSH_ERROR;
@@ -2372,6 +2370,10 @@ error:
return rc;
}
+int ssh_forward_cancel(ssh_session session, const char *address, int port) {
+ return ssh_channel_cancel_forward(session, address, port);
+}
+
/**
* @brief Set environment variables.
*