|
|
static void | usage (void) |
| | Give unbound-control usage, and exit (1).
|
| |
|
static void | print_stats_shm (const char *cfgfile) |
| | print statistics from shm memory segment
|
| |
|
static void | ssl_err (const char *s) |
| | exit with ssl error
|
| |
|
static void | ssl_path_err (const char *s, const char *path) |
| | exit with ssl error related to a file path
|
| |
|
static SSL_CTX * | setup_ctx (struct config_file *cfg) |
| | setup SSL context
|
| |
|
static int | contact_server (const char *svr, struct config_file *cfg, int statuscmd) |
| | contact the server with TCP connect
|
| |
|
static SSL * | setup_ssl (SSL_CTX *ctx, int fd) |
| | setup SSL on the connection
|
| |
|
static int | remote_read (SSL *ssl, int fd, char *buf, size_t len) |
| | read from ssl or fd, fatalexit on error, 0 EOF, 1 success
|
| |
|
static void | remote_write (SSL *ssl, int fd, const char *buf, size_t len) |
| | write to ssl or fd, fatalexit on error
|
| |
| static void | check_args_for_listcmd (int argc, char *argv[]) |
| | check args, to see if too many args. More...
|
| |
|
static void | send_file (SSL *ssl, int fd, FILE *in, char *buf, size_t sz) |
| | send stdin to server
|
| |
|
static void | send_eof (SSL *ssl, int fd) |
| | send end-of-file marker to server
|
| |
|
static int | go_cmd (SSL *ssl, int fd, int quiet, int argc, char *argv[]) |
| | send command and display result
|
| |
|
static int | go (const char *cfgfile, char *svr, int quiet, int argc, char *argv[]) |
| | go ahead and read config, contact server and perform command and display
|
| |
|
int | main (int argc, char *argv[]) |
| | Main routine for unbound-control.
|
| |
The remote control utility contacts the unbound server over ssl and sends the command, receives the answer, and displays the result from the commandline.