s6-dns
Software
skarnet.org

The s6-dnsip4-filter program

s6-dnsip4-filter reads domain names on its standard input and prints the corresponding IPv4 addresses on its standard output.

Interface

     s6-dnsip4-filter [ -l maxlines ] [ -c maxconn ] [ -t timeout ] [ -f normalfmt ] [ -e errorfmt ]

Options

Formatting rules

normalfmt and errorfmt are format strings, i.e. they tell the program how a line must be printed. The following sequences are recognized:

Example

     s6-dnsns google.com | s6-dnsip4-filter -f "%d"

prints all the nameserver addresses for the google.com domain. This is useful, for instance, to give the result as an argument to s6-dnsq.

Notes

s6-dnsip4-filter does not perform DNS resolutions itself. Instead, it forks a skadnsd child and sends it queries, getting the results asynchronously. The s6-dns filter programs have actually been written as example uses of the skadns library.