1
.\" Copyright (C) The libssh2 project and its contributors.
2
.\" SPDX-License-Identifier: BSD-3-Clause
3
.TH libssh2_channel_open_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
5
libssh2_channel_open_ex - establish a generic session channel
11
libssh2_channel_open_ex(LIBSSH2_SESSION *session, const char *channel_type,
12
unsigned int channel_type_len,
13
unsigned int window_size,
14
unsigned int packet_size,
15
const char *message, unsigned int message_len);
18
libssh2_channel_open_session(session);
21
\fIsession\fP - Session instance as returned by
22
.BR libssh2_session_init_ex(3)
24
\fIchannel_type\fP - Channel type to open. Typically one of session,
25
direct-tcpip, or tcpip-forward. The SSH2 protocol allowed for additional
26
types including local, custom channel types.
28
\fIchannel_type_len\fP - Length of channel_type
30
\fIwindow_size\fP - Maximum amount of unacknowledged data remote host is
31
allowed to send before receiving an SSH_MSG_CHANNEL_WINDOW_ADJUST packet.
33
\fIpacket_size\fP - Maximum number of bytes remote host is allowed to send
34
in a single SSH_MSG_CHANNEL_DATA or SSG_MSG_CHANNEL_EXTENDED_DATA packet.
36
\fImessage\fP - Additional data as required by the selected channel_type.
38
\fImessage_len\fP - Length of message parameter.
40
Allocate a new channel for exchanging data with the server. This method is
41
typically called through its macroized form:
42
.BR libssh2_channel_open_session(3)
44
.BR libssh2_channel_direct_tcpip(3)
46
.BR libssh2_channel_forward_listen(3)
48
Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
50
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
52
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
54
\fILIBSSH2_ERROR_CHANNEL_FAILURE\fP -
56
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block.