From d89e102b236ba49e25a4ec13a1ba33b45502155c Mon Sep 17 00:00:00 2001
From: James Housley <jim@thehousleys.net>
Date: Wed, 13 Jun 2007 17:22:15 +0000
Subject: [PATCH] Add libssh2_channel_direct_tcpip_ex.3 and
 libssh2_channel_eof.3

---
 docs/Makefile.am                       |  4 ++-
 docs/libssh2_channel_direct_tcpip_ex.3 | 39 ++++++++++++++++++++++++++
 docs/libssh2_channel_eof.3             | 18 ++++++++++++
 3 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 docs/libssh2_channel_direct_tcpip_ex.3
 create mode 100644 docs/libssh2_channel_eof.3

diff --git a/docs/Makefile.am b/docs/Makefile.am
index 9df3731..abcc9da 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,10 +1,12 @@
-# $Id: Makefile.am,v 1.9 2007/06/13 17:03:38 jehousley Exp $
+# $Id: Makefile.am,v 1.10 2007/06/13 17:22:15 jehousley Exp $
 
 EXTRA_DIST = template.3
 
 dist_man_MANS =
 	libssh2_banner_set.3 \
 	libssh2_channel_close.3 \
+	libssh2_channel_direct_tcpip_ex.3 \
+	libssh2_channel_eof.3 \
 	libssh2_channel_forward_accept.3 \
 	libssh2_channel_forward_listen_ex.3 \
 	libssh2_channel_read_ex.3 \
diff --git a/docs/libssh2_channel_direct_tcpip_ex.3 b/docs/libssh2_channel_direct_tcpip_ex.3
new file mode 100644
index 0000000..09e6077
--- /dev/null
+++ b/docs/libssh2_channel_direct_tcpip_ex.3
@@ -0,0 +1,39 @@
+.\" $Id: libssh2_channel_direct_tcpip_ex.3,v 1.1 2007/06/13 17:22:15 jehousley Exp $
+.\"
+.TH libssh2_channel_direct_tcpip_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
+.SH NAME
+libssh2_channel_direct_tcpip_ex - Tunnel a TCP connection through an SSH session
+.SH SYNOPSIS
+#include <libssh2.h>
+
+LIBSSH2_CHANNEL * 
+libssh2_channel_direct_tcpip_ex(LIBSSH2_SESSION *session, const char *host, int port, const char *shost, int sport);
+
+LIBSSH2_CHANNEL * 
+libssh2_channel_direct_tcpip(LIBSSH2_SESSION *session, const char *host, int port);
+
+.SH DESCRIPTION
+/fIsession/fP - Session instance as returned by 
+.BR libssh2_session_init(3)
+
+/fIhost/fP - Third party host to connect to using the SSH host as a proxy.
+
+/fIport/fP - Port on third party host to connect to.
+
+/fIshost/fP - Host to tell the SSH server the connection originated on.
+
+/fIsport/fP - Port to tell the SSH server the connection originated from.
+
+Tunnel a TCP/IP connection through the SSH transport via the remote host to 
+a third party. Communication from the client to the SSH server remains 
+encrypted, communication from the server to the 3rd party host travels 
+in cleartext.
+
+.SH RETURN VALUE
+Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
+
+.SH ERRORS
+\fILIBSSH2_ERROR_ALLOC\fP -  An internal memory allocation call failed.
+
+.SH SEE ALSO
+.BR libssh2_session_init(3)
diff --git a/docs/libssh2_channel_eof.3 b/docs/libssh2_channel_eof.3
new file mode 100644
index 0000000..5066731
--- /dev/null
+++ b/docs/libssh2_channel_eof.3
@@ -0,0 +1,18 @@
+.\" $Id: libssh2_channel_eof.3,v 1.1 2007/06/13 17:22:15 jehousley Exp $
+.\"
+.TH libssh2_channel_eof 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
+.SH NAME
+libssh2_channel_eof - check a channel's EOF status
+.SH SYNOPSIS
+#include <libssh2.h>
+
+int 
+libssh2_channel_eof(LIBSSH2_CHANNEL *channel);
+
+.SH DESCRIPTION
+\fIchannel\fP - active channel stream to set closed status on.
+
+Check if the remote host has sent an EOF status for the selected stream.
+
+.SH RETURN VALUE
+Returns 1 if the remote host has sent EOF, otherwise 0.