1libssh2_channel_forward_listen_exl(i3b)ssh2 manluiablssh2_channel_forward_listen_ex(3)
2
3
4

NAME

6       libssh2_channel_forward_listen_ex - listen to inbound connections
7

SYNOPSIS

9       #include <libssh2.h>
10
11       LIBSSH2_LISTENER   *  libssh2_channel_forward_listen_ex(LIBSSH2_SESSION
12       *session, char *host, int port, int *bound_port, int queue_maxsize);
13
14       LIBSSH2_LISTENER * libssh2_channel_forward_listen(LIBSSH2_SESSION *ses‐
15       sion, int port);
16
17

DESCRIPTION

19       Instruct  the  remote  SSH server to begin listening for inbound TCP/IP
20       connections. New connections  will  be  queued  by  the  library  until
21       accepted by libssh2_channel_forward_accept(3).
22
23       session - instance as returned by libssh2_session_init().
24
25       host  -  specific  address  to  bind  to on the remote host. Binding to
26       0.0.0.0 (default when NULL  is  passed)  will  bind  to  all  available
27       addresses.
28
29       port - port to bind to on the remote host. When 0 is passed, the remote
30       host will select the first available dynamic port.
31
32       bound_port - Populated with the actual port bound on the  remote  host.
33       Useful when requesting dynamic port numbers.
34
35       queue_maxsize  -  Maximum number of pending connections to queue before
36       rejecting further attempts.
37
38       libssh2_channel_forward_listen(3) is a macro.
39

RETURN VALUE

41       A newly allocated LIBSSH2_LISTENER instance or NULL on failure.
42

ERRORS

44       LIBSSH2_ERROR_ALLOC - An internal memory allocation call failed.
45
46       LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
47
48       LIBSSH2_ERROR_PROTO - An invalid SSH protocol response was received  on
49       the socket.
50
51       LIBSSH2_ERROR_REQUEST_DENIED - The remote server refused the request.
52
53       LIBSSH2_ERROR_EAGAIN  -  Marked for non-blocking I/O but the call would
54       block.
55

SEE ALSO

57       libssh2_channel_forward_accept(3)
58
59
60
61libssh2 0.15                      1 Jun 200l7ibssh2_channel_forward_listen_ex(3)
Impressum