Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

remctl_command(3) [debian man page]

REMCTL_COMMAND(3)					     remctl Library Reference						 REMCTL_COMMAND(3)

NAME
remctl_command, remctl_commandv - Send a command to a remctl server SYNOPSIS
#include <remctl.h> int remctl_command(struct remctl *r, const char **command); #include <sys/uio.h> int remctl_commandv(struct remctl *r, const struct iovec *iov, size_t count); DESCRIPTION
remctl_command() and remctl_commandv() send a command to a remote remctl server. The remctl client object r, created with remctl_new(), should have previously been passed to remctl_open() to open a connection to the server. remctl_command() takes the command as a NULL-terminated array of NUL-terminated strings (the same layout as an argv array). This function is most convenient when passing simple text commands. remctl_commandv() takes the command as an array of iovec structs of length count. This function is most convenient when passing arbitrary data to the command, since the iovec struct takes a pointer and a length for each chunk of data. See writev(2) for the layout of the iovec struct. After calling one of these functions, call remctl_output() to get the results of the command. RETURN VALUE
remctl_command() and remctl_commandv() return true on success and false on failure. On failure, the caller should call remctl_error() to retrieve the error message. SEE ALSO
remctl_new(3), remctl_open(3), remctl_output(3), remctl_error(3) The current version of the remctl library and complete details of the remctl protocol are available from its web page at <http://www.eyrie.org/~eagle/software/remctl/>. AUTHOR
Russ Allbery <rra@stanford.edu> COPYRIGHT AND LICENSE
Copyright 2007, 2009 The Board of Trustees of the Leland Stanford Junior University Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. 3.2 2012-06-19 REMCTL_COMMAND(3)

Check Out this Related Man Page

REMCTL_OPEN(3)						     remctl Library Reference						    REMCTL_OPEN(3)

NAME
remctl_open - Connect to a remote remctl server SYNOPSIS
#include <remctl.h> int remctl_open(struct remctl *r, const char *host, unsigned short port, const char *principal); DESCRIPTION
remctl_open() opens a TCP connection to the given host on the given port and then authenticates using the remctl protocol and the service principal principal. r is a remctl struct created via remctl_new(). host must not be NULL. If port is 0, the library first attempts to connect to the registered port of 4373 and then tries the legacy port of 4444 if that fails. Future versions of the library will drop this fallback to 4444. If principal is NULL, a service principal of "host/host" is used, with the realm determined by domain-realm mapping. If no principal is specified and the default is used, the underlying GSS-API library may canonicalize host via DNS before determining the service principal, depending on your library configuration. Specifying a principal disables this behavior. The remctl protocol uses Kerberos v5 via GSS-API for authentication. The underlying GSS-API library will use the default ticket cache for authentication, so to successfully use remctl_open(), the caller should already have Kerberos tickets for an appropriate realm stored in its default ticket cache. The environment variable KRB5CCNAME can be used to control which ticket cache is used. RETURN VALUE
remctl_open() returns true on success and false on failure. On failure, the caller should call remctl_error() to retrieve the error message. CAVEATS
If the principal argument to remctl_open() is NULL, most GSS-API libraries will canonicalize the host using DNS before deriving the principal name from it. This means that when connecting to a remctl server via a CNAME, remctl_open() will normally authenticate using a principal based on the canonical name of the host instead of the specified host parameter. This behavior may cause problems if two consecutive DNS lookups of host may return two different results, such as with some DNS-based load-balancing systems. The canonicalization behavior is controlled by the GSS-API library; with the MIT Kerberos GSS-API library, canonicalization can be disabled by setting "rdns" to false in the [libdefaults] section of krb5.conf. It can also be disabled by passing an explicit Kerberos principal name via the principal argument, which will then be used without changes. If canonicalization is desired, the caller may wish to canonicalize host before calling remctl_open() to avoid problems with multiple DNS calls returning different results. The default behavior, when a port of 0 is given, of trying 4373 and falling back to 4444 will be removed in a future version of this library in favor of using the "remctl" service in /etc/services if set and then falling back on only 4373. 4444 was the poorly-chosen original remctl port and should be phased out. NOTES
The remctl port number, 4373, was derived by tracing the diagonals of a QWERTY keyboard up from the letters "remc" to the number row. SEE ALSO
remctl_new(3), remctl_error(3) The current version of the remctl library and complete details of the remctl protocol are available from its web page at <http://www.eyrie.org/~eagle/software/remctl/>. AUTHOR
Russ Allbery <rra@stanford.edu> COPYRIGHT AND LICENSE
Copyright 2007, 2008, 2009 The Board of Trustees of the Leland Stanford Junior University Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. 3.2 2012-06-19 REMCTL_OPEN(3)
Man Page