Maintained by: NLnet Labs
Functions | Variables
unbound-control.c File Reference

The remote control utility contacts the unbound server over ssl and sends the command, receives the answer, and displays the result from the commandline. More...

#include "config.h"
#include "util/log.h"
#include "util/config_file.h"
#include "util/locks.h"
#include "util/net_help.h"

Functions

static void usage ()
 Give unbound-control usage, and exit (1). More...
 
static void ssl_err (const char *s)
 exit with ssl error
 
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 void send_file (SSL *ssl, FILE *in, char *buf, size_t sz)
 send stdin to server
 
static int go_cmd (SSL *ssl, 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.
 

Variables

int optind
 getopt global, in case header files fail to declare it. More...
 
char * optarg
 getopt global, in case header files fail to declare it. More...
 

Detailed Description

The remote control utility contacts the unbound server over ssl and sends the command, receives the answer, and displays the result from the commandline.

Function Documentation

static void usage ( void  )
static

Give unbound-control usage, and exit (1).

Referenced by main().

Variable Documentation

int optind

getopt global, in case header files fail to declare it.

char* optarg

getopt global, in case header files fail to declare it.