libs6dns
s6-dns
Software
skarnet.org

The s6dns_ip46 library interface

The following functions are declared in the s6-dns/s6dns-ip46.h header, and implemented as macros.

General information

s6dns_ip46 is the transport abstraction layer. It allows the functions declared in s6-dns/s6dns-engine.h and s6-dns/s6dns-rci.h to be transport-agnostic, i.e. to be able to work with both IPv4 and IPv6.

If the underlying skalibs has been compiled with flag-noipv6, or if it has detected at build time that the target host does not support IPv6, then the s6dns-ip46 abstraction will be totally transparent and use no resources at all.

Data structures

A s6dns_ip46list_t structure holds a list of S6DNS_MAX_SERVERS (16) IPv4 or IPv6 addresses. Such a mixed list can be constructed, for instance, if the /etc/resolv.conf file contains both v4 and v6 nameserver lines.

Functions

If list is a s6dns_ip46list_t and i an integer between 0 and DNS_MAX_SERVERS-1, then