1libssh2_channel_open_ex(3)          libssh2         libssh2_channel_open_ex(3)
2
3
4

NAME

6       libssh2_channel_open_ex - establish a generic session channel
7

SYNOPSIS

9       #include <libssh2.h>
10
11       LIBSSH2_CHANNEL *
12       libssh2_channel_open_ex(LIBSSH2_SESSION *session, const char *channel_type,
13                               unsigned int channel_type_len,
14                               unsigned int window_size,
15                               unsigned int packet_size,
16                               const char *message, unsigned int message_len);
17
18       LIBSSH2_CHANNEL *
19       libssh2_channel_open_session(session);
20

DESCRIPTION

22       session - Session instance as returned by libssh2_session_init_ex(3)
23
24       channel_type  - Channel type to open. Typically one of session, direct-
25       tcpip, or tcpip-forward. The SSH2 protocol allowed for additional types
26       including local, custom channel types.
27
28       channel_type_len - Length of channel_type
29
30       window_size  - Maximum amount of unacknowledged data remote host is al‐
31       lowed to send before receiving an SSH_MSG_CHANNEL_WINDOW_ADJUST packet.
32
33       packet_size - Maximum number of bytes remote host is allowed to send in
34       a single SSH_MSG_CHANNEL_DATA or SSG_MSG_CHANNEL_EXTENDED_DATA packet.
35
36       message - Additional data as required by the selected channel_type.
37
38       message_len - Length of message parameter.
39
40       Allocate a new channel for exchanging data with the server. This method
41       is  typically  called  through  its   macroized   form:   libssh2_chan‐
42       nel_open_session(3)  or  via  libssh2_channel_direct_tcpip(3)  or  lib‐
43       ssh2_channel_forward_listen(3)
44

RETURN VALUE

46       Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL  on  er‐
47       rors.
48

ERRORS

50       LIBSSH2_ERROR_ALLOC -  An internal memory allocation call failed.
51
52       LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
53
54       LIBSSH2_ERROR_CHANNEL_FAILURE -
55
56       LIBSSH2_ERROR_EAGAIN  -  Marked for non-blocking I/O but the call would
57       block.
58

SEE ALSO

60       Add related functions
61
62
63
64libssh2 0.15                      1 Jun 2007        libssh2_channel_open_ex(3)
Impressum