This software functions as a DNS resolver and is both recursive and reentrant.
DNS.c also provides restartable record iterators with user-specified sorting. Iterating over MX or SRV records in semantic order, for example, by preference and priority is made simple by the DNS_rr_foreach() function. Incorporating a restartable manner functionality provides greater flexibility when processing large sets of records.
The package also supports "smart" queries, which enables queries for NS, MX, and SRV records to attempt to resolve the RDATA canonical hostname into an A record when enabled in the core resolver. Any hosts that are not in-bailiwick or don't provide glue, they are automagically returned in the answer packet . This feature is supported for both stub and recursive resolver instantiations, and it’s also built into the address info (i.e., getaddrinfo()) API.
DNS.c employs randomized source ports and QIDs, making it more challenging to predict DNS responses.
Lastly, DNS.c offers a non-blocking, reentrant, iterator-based getaddrinfo() interface; dns_ai_open(), dns_ai_nextent(), and dns_ai_close(). It's semantically similar to getaddrinfo(), but it also accepts a record type parameter. The ability to iterate over (struct addrinfo) objects, even when querying an MX, NS, and SRV host reduces latency since any necessary recursion can be postponed.
Version 0.6.1: N/A