unbound DNS server tool TAPI (tapi_dns_unbound)

Overview

TAPI to handle unbound DNS server tool. More…

// typedefs

typedef enum tapi_dns_unbound_verbose tapi_dns_unbound_verbose;
typedef struct tapi_dns_unbound_cfg_address tapi_dns_unbound_cfg_address;
typedef enum tapi_dns_unbound_cfg_ac_action tapi_dns_unbound_cfg_ac_action;
typedef struct tapi_dns_unbound_cfg_ac tapi_dns_unbound_cfg_ac;
typedef struct tapi_dns_unbound_cfg_auth_zone tapi_dns_unbound_cfg_auth_zone;
typedef struct tapi_dns_unbound_cfg_opt tapi_dns_unbound_cfg_opt;
typedef struct tapi_dns_unbound_opt tapi_dns_unbound_opt;
typedef struct tapi_dns_unbound_app tapi_dns_unbound_app;

// enums

enum tapi_dns_unbound_cfg_ac_action;
enum tapi_dns_unbound_verbose;

// structs

struct tapi_dns_unbound_app;
struct tapi_dns_unbound_cfg_ac;
struct tapi_dns_unbound_cfg_address;
struct tapi_dns_unbound_cfg_auth_zone;
struct tapi_dns_unbound_cfg_opt;
struct tapi_dns_unbound_opt;

// global variables

const tapi_dns_unbound_cfg_opt tapi_dns_unbound_cfg_default_opt;
const tapi_dns_unbound_opt tapi_dns_unbound_default_opt;

// global functions

te_errno tapi_dns_unbound_create(tapi_job_factory_t* factory, const tapi_dns_unbound_opt* opt, tapi_dns_unbound_app** app);
te_errno tapi_dns_unbound_start(tapi_dns_unbound_app* app);
te_errno tapi_dns_unbound_wait(tapi_dns_unbound_app* app, int timeout_ms);
te_errno tapi_dns_unbound_kill(tapi_dns_unbound_app* app, int signum);
te_errno tapi_dns_unbound_stop(tapi_dns_unbound_app* app);
te_errno tapi_dns_unbound_destroy(tapi_dns_unbound_app* app);

Detailed Documentation

TAPI to handle unbound DNS server tool.

Typedefs

typedef enum tapi_dns_unbound_verbose tapi_dns_unbound_verbose

Representation of possible values for unbound::verbose option.

typedef struct tapi_dns_unbound_cfg_address tapi_dns_unbound_cfg_address

Representation of pair of address and port.

typedef enum tapi_dns_unbound_cfg_ac_action tapi_dns_unbound_cfg_ac_action

Representation of possible values of action for access_control option.

typedef struct tapi_dns_unbound_cfg_ac tapi_dns_unbound_cfg_ac

Representation of unbound::access-control option.

typedef struct tapi_dns_unbound_cfg_auth_zone tapi_dns_unbound_cfg_auth_zone

Representation of unbound::auth-zone option element.

typedef struct tapi_dns_unbound_cfg_opt tapi_dns_unbound_cfg_opt

Unbound DNS server config file options.

use-syslog option disabled by default.

typedef struct tapi_dns_unbound_opt tapi_dns_unbound_opt

Unbound DNS server specific command line options.

typedef struct tapi_dns_unbound_app tapi_dns_unbound_app

Information of a unbound DNS server tool.

Global Variables

const tapi_dns_unbound_cfg_opt tapi_dns_unbound_cfg_default_opt

Default options initializer.

const tapi_dns_unbound_opt tapi_dns_unbound_default_opt

Default options initializer.

Global Functions

te_errno tapi_dns_unbound_create(tapi_job_factory_t* factory, const tapi_dns_unbound_opt* opt, tapi_dns_unbound_app** app)

Create unbound DNS server app.

Parameters:

factory

Job factory.

opt

Unbound server tool options.

app

Unbound server app handle.

Returns:

Status code.

te_errno tapi_dns_unbound_start(tapi_dns_unbound_app* app)

Start unbound DNS server tool.

Parameters:

app

Unbound DNS server app handle.

Returns:

Status code.

te_errno tapi_dns_unbound_wait(tapi_dns_unbound_app* app, int timeout_ms)

Wait for unbound DNS server tool completion.

Parameters:

app

Unbound DNS server app handle.

timeout_ms

Wait timeout in milliseconds.

TE_EINPROGRESS

unbound DNS server is still running.

Returns:

Status code.

te_errno tapi_dns_unbound_kill(tapi_dns_unbound_app* app, int signum)

Send a signal to unbound DNS server tool.

Parameters:

app

Unbound DNS server app handle.

signum

Signal to send.

Returns:

Status code.

te_errno tapi_dns_unbound_stop(tapi_dns_unbound_app* app)

Stop unbound DNS server tool. It can be started over with tapi_dns_unbound_start().

Parameters:

app

Unbound DNS server app handle.

TE_EPROTO

unbound DNS server tool is stopped, but report is unavailable.

Returns:

Status code.

te_errno tapi_dns_unbound_destroy(tapi_dns_unbound_app* app)

Destroy unbound DNS server app. The app cannot be used after calling this function.

Parameters:

app

Unbound DNS server app handle.

Returns:

Status code.