Building the libssh2 and including a script to build it as UB
[printdrop.git] / libssh2 / share / man / man3 / libssh2_channel_open_ex.3
1 .\" $Id: libssh2_channel_open_ex.3,v 1.1 2007/06/13 20:54:25 jehousley Exp $
2 .\"
3 .TH libssh2_channel_open_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
4 .SH NAME
5 libssh2_channel_open_ex - establish a generic session channel
6 .SH SYNOPSIS
7 #include <libssh2.h>
8
9 LIBSSH2_CHANNEL *
10 libssh2_channel_open_ex(LIBSSH2_SESSION *session, const char *channel_type, unsigned int channel_type_len, unsigned int window_size, unsigned int packet_size, const char *message, unsigned int message_len);
11
12 LIBSSH2_CHANNEL *
13 libssh2_channel_open_session(session);
14
15 .SH DESCRIPTION
16 \fIsession\fP - Session instance as returned by
17 .BR libssh2_session_init(3)
18
19 \fIchannel_type\fP - Channel type to open. Typically one of session,
20 direct-tcpip, or tcpip-forward. The SSH2 protocol allowed for additional
21 types including local, custom channel types.
22
23 \fIchannel_type_len\fP - Length of channel_type
24
25 \fIwindow_size\fP - Maximum amount of unacknowledged data remote host is
26 allowed to send before receiving an SSH_MSG_CHANNEL_WINDOW_ADJUST packet.
27
28 \fIpacket_size\fP - Maximum number of bytes remote host is allowed to send
29 in a single SSH_MSG_CHANNEL_DATA or SSG_MSG_CHANNEL_EXTENDED_DATA packet.
30
31 \fImessage\fP - Additional data as required by the selected channel_type.
32
33 \fImessage_len\fP - Length of message parameter.
34
35 Allocate a new channel for exchanging data with the server. This method is
36 typically called through its macroized form:
37 .BR libssh2_channel_open_session(3)
38 or via
39 .BR libssh2_channel_direct_tcpip(3)
40 or
41 .BR libssh2_channel_forward_listen(3)
42
43 .SH RETURN VALUE
44 Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
45
46 .SH ERRORS
47 \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
48
49 \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
50
51 \fILIBSSH2_ERROR_CHANNEL_FAILURE\fP -
52
53 \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block.
54
55 .SH SEE ALSO
56 Add related functions