libssh2_channel_direct_tcpip_ex.3 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. .TH libssh2_channel_direct_tcpip_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
  2. .SH NAME
  3. libssh2_channel_direct_tcpip_ex - Tunnel a TCP connection through an SSH session
  4. .SH SYNOPSIS
  5. #include <libssh2.h>
  6. LIBSSH2_CHANNEL *
  7. libssh2_channel_direct_tcpip_ex(LIBSSH2_SESSION *session, const char *host, int port, const char *shost, int sport);
  8. LIBSSH2_CHANNEL *
  9. libssh2_channel_direct_tcpip(LIBSSH2_SESSION *session, const char *host, int port);
  10. .SH DESCRIPTION
  11. \fIsession\fP - Session instance as returned by
  12. .BR libssh2_session_init_ex(3)
  13. \fIhost\fP - Third party host to connect to using the SSH host as a proxy.
  14. \fIport\fP - Port on third party host to connect to.
  15. \fIshost\fP - Host to tell the SSH server the connection originated on.
  16. \fIsport\fP - Port to tell the SSH server the connection originated from.
  17. Tunnel a TCP/IP connection through the SSH transport via the remote host to
  18. a third party. Communication from the client to the SSH server remains
  19. encrypted, communication from the server to the 3rd party host travels
  20. in cleartext.
  21. .SH RETURN VALUE
  22. Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
  23. .SH ERRORS
  24. \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
  25. .SH SEE ALSO
  26. .BR libssh2_session_init_ex(3)