source: web/old/remctl-2.14/docs/api/remctl_command.pod @ f6f3e91

web
Last change on this file since f6f3e91 was f6f3e91, checked in by Jessica B. Hamrick <jhamrick@…>, 15 years ago

Preserve directory hierarchy (not sure what happened to it)

  • Property mode set to 100644
File size: 1.7 KB
Line 
1=for stopwords
2remctl const iovec NUL-terminated argv Allbery
3
4=head1 NAME
5
6remctl_command, remctl_commandv - Send a command to a remctl server
7
8=head1 SYNOPSIS
9
10#include <remctl.h>
11
12int B<remctl_command>(struct remctl *I<r>, const char **I<command>);
13
14#include <sys/uio.h>
15
16int B<remctl_commandv>(struct remctl *I<r>, const struct iovec *I<iov>,
17                    size_t I<count>);
18
19=head1 DESCRIPTION
20
21remctl_command() and remctl_commandv() send a command to a remote remctl
22server.  The remctl client object I<r>, created with remctl_new(), should
23have previously been passed to remctl_open() to open a connection to the
24server.
25
26remctl_command() takes the command as a NULL-terminated array of
27NUL-terminated strings (the same layout as an argv array).  This function
28is most convenient when passing simple text commands.
29
30remctl_commandv() takes the command as an array of iovec structs of length
31I<count>.  This function is most convenient when passing arbitrary data to
32the command, since the iovec struct takes a pointer and a length for each
33chunk of data.  See writev(2) for the layout of the iovec struct.
34
35After calling one of these functions, call remctl_output() to get the
36results of the command.
37
38=head1 RETURN VALUE
39
40remctl_command() and remctl_commandv() return true on success and false on
41failure.  On failure, the caller should call remctl_error() to retrieve
42the error message.
43
44=head1 SEE ALSO
45
46remctl_new(3), remctl_open(3), remctl_output(3), remctl_error(3)
47
48The current version of the remctl library and complete details of the
49remctl protocol are available from its web page at
50L<http://www.eyrie.org/~eagle/software/remctl/>.
51
52=head1 AUTHOR
53
54Russ Allbery <rra@stanford.edu>
55
56=cut
Note: See TracBrowser for help on using the repository browser.