struct tapi_dns_unbound_cfg_opt

Overview

Unbound DNS server config file options. More…

#include <tapi_dns_unbound.h>

struct tapi_dns_unbound_cfg_opt {
    // fields

    tapi_dns_unbound_verbose verbosity;
    size_t n;
    const char** filename;
    struct tapi_dns_unbound_cfg_opt includes;
    const char* username;
    const char* chroot;
    const char* directory;
    tapi_dns_unbound_cfg_address* addr;
    struct tapi_dns_unbound_cfg_opt interfaces;
    const struct sockaddr** addr;
    struct tapi_dns_unbound_cfg_opt outgoing_interfaces;
    tapi_dns_unbound_cfg_ac* rule;
    struct tapi_dns_unbound_cfg_opt access_controls;
    te_sockaddr_subnet* addr;
    struct tapi_dns_unbound_cfg_opt private_addresses;
    const char* private_domain;
    tapi_job_opt_uint_t port;
    bool so_reuseport;
    tapi_dns_unbound_cfg_auth_zone* zone;
    struct tapi_dns_unbound_cfg_opt auth_zones;
    tapi_job_opt_uint_t num_threads;
    tapi_job_opt_uint_t num_queries_per_thread;
    tapi_job_opt_uint_t jostle_timeout;
    bool minimal_responses;
    bool do_ip4;
    bool do_ip6;
    bool do_udp;
    bool do_tcp;
    tapi_job_opt_uint_t incoming_num_tcp;
    tapi_job_opt_uint_t outgoing_num_tcp;
    tapi_job_opt_uint_t cache_max_ttl;
    tapi_job_opt_uint_t cache_min_ttl;
    tapi_job_opt_uint_t so_rcvbuf;
    tapi_job_opt_uint_t so_sndbuf;
};

Detailed Documentation

Unbound DNS server config file options.

use-syslog option disabled by default.

Fields

tapi_dns_unbound_verbose verbosity

Increase verbosity.

struct tapi_dns_unbound_cfg_opt includes

Array of file names to include.

const char* username

If given, after binding the port the user privileges are dropped. If username is set as an empty string or NULL, then no user change is performed.

const char* chroot

Change root directory to the new one.

const char* directory

Sets the working directory for the program.

struct tapi_dns_unbound_cfg_opt interfaces

Array of interfaces to use to connect to the network. These interfaces are listened to for queries from clients, and answers to clients are given from this.

struct tapi_dns_unbound_cfg_opt outgoing_interfaces

Array of interfaces to use to connect to the network. These interfaces are used to send queries to authoritative servers and receive their replies.

struct tapi_dns_unbound_cfg_opt access_controls

Array of access control rules for given netblocks and actions.

struct tapi_dns_unbound_cfg_opt private_addresses

Array of addresses on private network, and are not allowed to be returned for public internet names.

const char* private_domain

Allow this domain, and all its subdomains to contain private addresses.

tapi_job_opt_uint_t port

The port number on which the server responds to queries.

bool so_reuseport

If true, then open dedicated listening sockets for incoming queries for each thread and try to set the SO_REUSEPORT socket option on each socket.

struct tapi_dns_unbound_cfg_opt auth_zones

Authority zones.

tapi_job_opt_uint_t num_threads

The number of threads to create to serve clients.

tapi_job_opt_uint_t num_queries_per_thread

The number of queries that every thread will service simultaneously.

tapi_job_opt_uint_t jostle_timeout

Timeout used when the server is very busy. Set to a value that usually results in one roundtrip to the authority servers.

bool minimal_responses

If true, Unbound does not insert authority/additional sections into response messages when those sections are not required. This reduces response size significantly, and may avoid TCP fallback for some responses. This may cause a slight speedup.

bool do_ip4

Enable or disable whether IPv4 queries are answered or issued.

bool do_ip6

Enable or disable whether IPv6 queries are answered or issued.

bool do_udp

Enable or disable whether UDP queries are answered or issued.

bool do_tcp

Enable or disable whether TCP queries are answered or issued.

tapi_job_opt_uint_t incoming_num_tcp

Number of incoming TCP buffers to allocate per thread.

tapi_job_opt_uint_t outgoing_num_tcp

Number of outgoing TCP buffers to allocate per thread.

tapi_job_opt_uint_t cache_max_ttl

Time to live maximum for RRsets and messages in the cache.

tapi_job_opt_uint_t cache_min_ttl

Time to live minimum for RRsets and messages in the cache.

tapi_job_opt_uint_t so_rcvbuf

If not 0, then set the SO_RCVBUF socket option to get more buffer space on UDP port 53 incoming queries.

tapi_job_opt_uint_t so_sndbuf

If not 0, then set the SO_SNDBUF socket option to get more buffer space on UDP port 53 outgoing queries.