1libssh2_channel_setenv_ex(3) libssh2 manual libssh2_channel_setenv_ex(3)
2
3
4
6 libssh2_channel_setenv_ex - set an environment variable on the channel
7
9 #include <libssh2.h>
10
11 int libssh2_channel_setenv_ex(LIBSSH2_CHANNEL *channel, char *varname,
12 unsigned int varname_len, const char *value, unsigned int value_len);
13
14 int libssh2_channel_setenv(LIBSSH2_CHANNEL *channel, char *varname,
15 const char *value);
16
17
19 channel - Previously opened channel instance such as returned by lib‐
20 ssh2_channel_open_ex(3)
21
22 varname - Name of environment variable to set on the remote channel
23 instance.
24
25 varname_len - Length of passed varname parameter.
26
27 value - Value to set varname to.
28
29 value_len - Length of value parameter.
30
31 Set an environment variable in the remote channel's process space. Note
32 that this does not make sense for all channel types and may be ignored
33 by the server despite returning success.
34
36 Return 0 on success or negative on failure. It returns LIB‐
37 SSH2_ERROR_EAGAIN when it would otherwise block. While LIB‐
38 SSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per
39 se.
40
41
43 LIBSSH2_ERROR_ALLOC - An internal memory allocation call failed.
44
45 LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
46
47 LIBSSH2_ERROR_CHANNEL_REQUEST_DENIED -
48
50 libssh2_channel_open_ex(3)
51
52
53
54libssh2 0.15 1 Jun 2007 libssh2_channel_setenv_ex(3)