Crate unbound_sys [] [src]

Structs

ub_result

The validation and resolution results. Allocated by the resolver, and need to be freed by the application with ub_resolve_free().

Enums

ub_ctx

The validation context is created to hold the resolver status, validation keys and a small cache (containing messages, rrsets, roundtrip times, trusted keys, lameness information).

Functions

init

Initialize library.

ub_cancel

Cancel an async query in progress. Its callback will not be called.

ub_ctx_add_ta

Add a trust anchor to the given context. The trust anchor is a string, on one line, that holds a valid DNSKEY or DS RR.

ub_ctx_add_ta_file

Add trust anchors to the given context. Pass name of a file with DS and DNSKEY records (like from dig or drill).

ub_ctx_async

Set a context behaviour for asynchronous action.

ub_ctx_config

setup configuration for the given context.

ub_ctx_create

Create a resolving and validation context. The information from /etc/resolv.conf and /etc/hosts is not utilised by default. Use ub_ctx_resolvconf and ub_ctx_hosts to read them.

ub_ctx_data_add

Add localdata to the library local authority info. Similar to local-data config statement.

ub_ctx_data_remove

Remove localdata from the library local authority info.

ub_ctx_debuglevel

Set debug verbosity for the context Output is directed to stderr.

ub_ctx_debugout

Set debug output (and error output) to the specified stream. Pass NULL to disable. Default is stderr.

ub_ctx_delete

Destroy a validation context and free all its resources. Outstanding async queries are killed and callbacks are not called for them.

ub_ctx_get_option

Get an option from the context.

ub_ctx_hosts

Read list of hosts from the filename given. Usually "/etc/hosts". These addresses are not flagged as DNSSEC secure when queried for.

ub_ctx_print_local_zones

Debug routine. Print the local zone information to debug output.

ub_ctx_resolvconf

Read list of nameservers to use from the filename given. Usually "/etc/resolv.conf". Uses those nameservers as caching proxies. If they do not support DNSSEC, validation may fail.

ub_ctx_set_fwd

Set machine to forward DNS queries to, the caching resolver to use. IP4 or IP6 address. Forwards all DNS requests to that machine, which is expected to run a recursive resolver. If the proxy is not DNSSEC-capable, validation may fail. Can be called several times, in that case the addresses are used as backup servers.

ub_ctx_set_option

Set an option for the context.

ub_ctx_trustedkeys

Add trust anchors to the given context. Pass the name of a bind-style config file with trusted-keys{}.

ub_ctx_zone_add

Add a new zone with the zonetype to the local authority info of the library.

ub_ctx_zone_remove

Remove zone from local authority info of the library.

ub_fd

Get file descriptor. Wait for it to become readable, at this point answers are returned from the asynchronous validating resolver. Then call the ub_process to continue processing. This routine works immediately after context creation, the fd does not change.

ub_poll

Poll a context to see if it has any new results Do not poll in a loop, instead extract the fd below to poll for readiness, and then check, or wait using the wait routine.

ub_process

Call this routine to continue processing results from the validating resolver (when the fd becomes readable). Will perform necessary callbacks.

ub_resolve

Perform resolution and validation of the target name.

ub_resolve_async

Perform resolution and validation of the target name. Asynchronous, after a while, the callback will be called with your data and the result.

ub_resolve_free

Free storage associated with a result structure.

ub_strerror

Convert error value to a human readable string.

ub_version

Get a version string from the libunbound implementation.

ub_wait

Wait for a context to finish with results. Calls ub_process() after the wait for you. After the wait, there are no more outstanding asynchronous queries.

Type Definitions

ub_callback_t

Callback for results of async queries. The readable function definition looks like: