1libssh2_channel_forward_listen_ex(3)libssh2libssh2_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 *
12       libssh2_channel_forward_listen_ex(LIBSSH2_SESSION *session,
13                                         char *host, int port,
14                                         int *bound_port, int queue_maxsize);
15
16       LIBSSH2_LISTENER *
17       libssh2_channel_forward_listen(LIBSSH2_SESSION *session, int port);
18

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

SEE ALSO

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