1libssh2_channel_setenv_ex(3)        libssh2       libssh2_channel_setenv_ex(3)
2
3
4

NAME

6       libssh2_channel_setenv_ex - set an environment variable on the channel
7

SYNOPSIS

9       #include <libssh2.h>
10
11       int
12       libssh2_channel_setenv_ex(LIBSSH2_CHANNEL *channel,
13                                 char *varname, unsigned int varname_len,
14                                 const char *value, unsigned int value_len);
15
16       int
17       libssh2_channel_setenv(LIBSSH2_CHANNEL *channel,
18                              char *varname, const char *value);
19

DESCRIPTION

21       channel  -  Previously opened channel instance such as returned by lib‐
22       ssh2_channel_open_ex(3)
23
24       varname - Name of environment variable to set on the remote channel in‐
25       stance.
26
27       varname_len - Length of passed varname parameter.
28
29       value - Value to set varname to.
30
31       value_len - Length of value parameter.
32
33       Set an environment variable in the remote channel's process space. Note
34       that this does not make sense for all channel types and may be  ignored
35       by the server despite returning success.
36

RETURN VALUE

38       Return  0  on  success  or negative on failure.  It returns LIBSSH2_ER‐
39       ROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is
40       a negative number, it is not really a failure per se.
41
42

ERRORS

44       LIBSSH2_ERROR_ALLOC -  An internal memory allocation call failed.
45
46       LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
47
48       LIBSSH2_ERROR_CHANNEL_REQUEST_DENIED -
49

SEE ALSO

51       libssh2_channel_open_ex(3)
52
53
54
55libssh2 0.15                      1 Jun 2007      libssh2_channel_setenv_ex(3)
Impressum