1REMCTL_COMMAND(3)          remctl Library Reference          REMCTL_COMMAND(3)
2
3
4

NAME

6       remctl_command, remctl_commandv - Send a command to a remctl server
7

SYNOPSIS

9       #include <remctl.h>
10
11       int remctl_command(struct remctl *r, const char **command);
12
13       #include <sys/uio.h>
14
15       int remctl_commandv(struct remctl *r, const struct iovec *iov,
16                           size_t count);
17

DESCRIPTION

19       remctl_command() and remctl_commandv() send a command to a remote rem‐
20       ctl server.  The remctl client object r, created with remctl_new(),
21       should have previously been passed to remctl_open() to open a connec‐
22       tion to the server.
23
24       remctl_command() takes the command as a NULL-terminated array of nul-
25       terminated strings (the same layout as an argv array).  This function
26       is most convenient when passing simple text commands.
27
28       remctl_commandv() takes the command as an array of iovec structs of
29       length count.  This function is most convenient when passing arbitrary
30       data to the command, since the iovec struct takes a pointer and a
31       length for each chunk of data.  See writev(2) for the layout of the
32       iovec struct.
33
34       After calling one of these functions, call remctl_output() to get the
35       results of the command.
36

RETURN VALUE

38       remctl_command() and remctl_commandv() return true on success and false
39       on failure.  On failure, the caller should call remctl_error() to
40       retrieve the error message.
41

SEE ALSO

43       remctl_new(3), remctl_open(3), remctl_output(3), remctl_error(3)
44
45       The current version of the remctl library and complete details of the
46       remctl protocol are available from its web page at
47       <http://www.eyrie.org/~eagle/software/remctl/>.
48

AUTHOR

50       Russ Allbery <rra@stanford.edu>
51
52
53
542.11                              2007-06-29                 REMCTL_COMMAND(3)
Impressum