1 .\" $Id: libssh2_channel_open_ex.3,v 1.1 2007/06/13 20:54:25 jehousley Exp $
3 .TH libssh2_channel_open_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
5 libssh2_channel_open_ex - establish a generic session 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);
13 libssh2_channel_open_session(session);
16 \fIsession\fP - Session instance as returned by
17 .BR libssh2_session_init(3)
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.
23 \fIchannel_type_len\fP - Length of channel_type
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.
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.
31 \fImessage\fP - Additional data as required by the selected channel_type.
33 \fImessage_len\fP - Length of message parameter.
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)
39 .BR libssh2_channel_direct_tcpip(3)
41 .BR libssh2_channel_forward_listen(3)
44 Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
47 \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
49 \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
51 \fILIBSSH2_ERROR_CHANNEL_FAILURE\fP -
53 \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block.