1libssh2_channel_open_ex(3)      libssh2 manual      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   *  libssh2_channel_open_ex(LIBSSH2_SESSION  *session,
12       const char *channel_type, unsigned int channel_type_len,  unsigned  int
13       window_size,  unsigned  int  packet_size, const char *message, unsigned
14       int message_len);
15
16       LIBSSH2_CHANNEL * libssh2_channel_open_session(session);
17
18

DESCRIPTION

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

RETURN VALUE

46       Pointer to a newly  allocated  LIBSSH2_CHANNEL  instance,  or  NULL  on
47       errors.
48
49

ERRORS

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

SEE ALSO

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