The s6dns library interface

General information

libs6dns is a DNS client library, designed for clarity and simplicity - which translates into smallness of the code.

A major focus of libs6dns is to avoid unnecessary use of heap memory. Memory is only allocated in the heap to store queries and response packets during a DNS resolution process, and to store the final answers into a user-provided stralloc; all the other operations use stack memory, and perform as few copies as possible.




The s6-dns/s6dns.h header is actually a concatenation of other headers: the libs6dns is separated into several modules, each of them with its own header.

(User-level asynchronous resolution functions are provided in the skadns library.)

Two functional macros are actually directly declared in the s6dns.h header: