REMCTL_COMMAND(3)
π REMCTL_COMMAND β sending commands to your remctl server like the icon you are π
okay bestie, so this is the remctl library reference page for remctl_command and remctl_commandv, fr fr. two lil functions, one big job: yeeting a command at a remctl server. let's get into it π«Ά
β¨ 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 πΈ
so remctl_command() and remctl_commandv() send a command to a remote remctl server. iconic behaviour honestly.
your remctl client object r β the one you made with remctl_new() β should have already been handed over to remctl_open() first, so you've got an actual open connection to the server. no connection, no vibes, no command. that's the rule π
remctl_command() takes the command as a NULL-terminated array of NUL-terminated strings β literally the same layout as an argv array. this one is your bestie when you're passing simple text commands, super convenient, no notes β¨
remctl_commandv() takes the command as an array of iovec structs of length count. this one is the moment when you're passing arbitrary data to the command, because the iovec struct holds a pointer and a length for each chunk of data. for the exact layout of the iovec struct, go peek at writev(2). slay π¦
wanna control the network timeout for sending the command? that's a whole separate thing, go look at remctl_set_timeout(3). π
and after you call one of these functions? you call remctl_output() to get the results of the command. do not skip this step, that's where the actual tea is β
β 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. yes, actually call it β it's right there, it's telling you what went wrong, let it speak π£οΈ
π COMPATIBILITY π
these interfaces have been provided by the remctl client library since its initial release in version 2.0. day one. original main character energy. periodt π
π AUTHOR π
Russ Allbery <eagle@eyrie.org>
π COPYRIGHT AND LICENSE π
Copyright 2007, 2009, 2014 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.
SPDX-License-Identifier: FSFAP
no cap, "without any warranty" means exactly what it says β as-is, bestie, no promises π
π§ SEE ALSO π§
The current version of the remctl library and complete details of the remctl protocol are available from its web page at <https://www.eyrie.org/~eagle/software/remctl/>. go read it, iykyk π
and that's the whole page!! this was remctl Library Reference, version 3.18, dated 2022-05-09 β tysm for reading, go send some commands, you're doing amazing sweetie πβ¨π
π¦ where this page comes from
- debian bookworm: libremctl-dev 3.18-1+b7 Β· MIT
- debian trixie: libremctl-dev 3.18-3 Β· MIT
- epel 9: remctl-devel 3.18-1.el9 Β· MIT
- ubuntu noble: libremctl-dev 3.18-1.1build2 Β· MIT
- ubuntu questing: libremctl-dev 3.18-3
- ubuntu resolute: libremctl-dev 3.18-5build2 Β· MIT
- ubuntu stonking: libremctl-dev 3.18-5build3 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms