Building the libssh2 and including a script to build it as UB
[printdrop.git] / libssh2 / share / man / man3 / libssh2_channel_forward_listen_ex.3
1 .\" $Id: libssh2_channel_forward_listen_ex.3,v 1.7 2007/06/13 16:41:33 jehousley Exp $
2 .\"
3 .TH libssh2_channel_forward_listen_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
4 .SH NAME
5 libssh2_channel_forward_listen_ex - listen to inbound connections
6 .SH SYNOPSIS
7 #include <libssh2.h>
8
9 LIBSSH2_LISTENER *
10 libssh2_channel_forward_listen_ex(LIBSSH2_SESSION *session, char *host, int port, int *bound_port, int queue_maxsize);
11
12 LIBSSH2_LISTENER *
13 libssh2_channel_forward_listen(LIBSSH2_SESSION *session, int port);
14
15 .SH DESCRIPTION
16 Instruct the remote SSH server to begin listening for inbound TCP/IP
17 connections. New connections will be queued by the library until accepted by
18 \fIlibssh2_channel_forward_accept(3)\fP.
19
20 \fIsession\fP - instance as returned by libssh2_session_init().
21
22 \fIhost\fP - specific address to bind to on the remote host. Binding to
23 0.0.0.0 (default when NULL is passed) will bind to all available addresses.
24
25 \fIport\fP - port to bind to on the remote host. When 0 is passed, the remote
26 host will select the first available dynamic port.
27
28 \fIbound_port\fP - Populated with the actual port bound on the remote
29 host. Useful when requesting dynamic port numbers.
30
31 \fIqueue_maxsize\fP - Maximum number of pending connections to queue before
32 rejecting further attempts.
33
34 \fIlibssh2_channel_forward_listen(3)\fP is a macro.
35 .SH RETURN VALUE
36 A newly allocated LIBSSH2_LISTENER instance or NULL on failure.
37 .SH ERRORS
38 \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
39
40 \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
41
42 \fILIBSSH2_ERROR_PROTO\fP - An invalid SSH protocol response was received on the socket.
43
44 \fILIBSSH2_ERROR_REQUEST_DENIED\fP - The remote server refused the request.
45
46 \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block.
47 .SH SEE ALSO
48 .BR libssh2_channel_forward_accept(3)