aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2014-01-16 09:14:52 +0100
committerAndreas Schneider <asn@cryptomilk.org>2014-01-16 09:14:52 +0100
commit6223e05b2319e4810a5c375d20aaa28b109a752f (patch)
tree7fb95b906d47e8fb92251e24690aafb706a821c8
parent634671db11a3144f1abd900ee30231d7c9a51064 (diff)
downloadlibssh-6223e05b2319e4810a5c375d20aaa28b109a752f.tar.gz
libssh-6223e05b2319e4810a5c375d20aaa28b109a752f.tar.xz
libssh-6223e05b2319e4810a5c375d20aaa28b109a752f.zip
doc: Use ssh_channel_accept_forward() in documentation.
-rw-r--r--doc/forwarding.dox5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/forwarding.dox b/doc/forwarding.dox
index 9dc0df36..2dcf3b28 100644
--- a/doc/forwarding.dox
+++ b/doc/forwarding.dox
@@ -145,7 +145,7 @@ or whatever use you have for it.
@subsection libssh_reverse Doing reverse port forwarding with libssh
To do reverse port forwarding, call ssh_forward_listen(),
-then ssh_forward_accept().
+then ssh_channel_accept_forward().
When you call ssh_forward_listen(), you can let the remote server
chose the non-priviledged port it should listen to. Otherwise, you can chose
@@ -164,6 +164,7 @@ int web_server(ssh_session session)
ssh_channel channel;
char buffer[256];
int nbytes, nwritten;
+ int port;
char *helloworld = ""
"HTTP/1.1 200 OK\n"
"Content-Type: text/html\n"
@@ -186,7 +187,7 @@ int web_server(ssh_session session)
return rc;
}
- channel = ssh_forward_accept(session, 60000);
+ channel = ssh_channel_accept_forward(session, 60000, &port);
if (channel == NULL)
{
fprintf(stderr, "Error waiting for incoming connection: %s\n",