D. J. Bernstein
Internet publication
DNScache

The pickdns-data program

pickdns-data reads local IP addresses from a file named data in the current directory. It creates data.cdb in a binary format designed for fast access by pickdns. It may also create some other files with names beginning with data.

pickdns-data updates data.cdb atomically, so you can use it safely while pickdns is running. If anything goes wrong with the creation of data.cdb, pickdns-data stops and leaves the old data.cdb in place.

Data format

     +fqdn:ip
The domain name fqdn has IP address ip. You can list as many as 128 IP addresses for the same name.

     -fqdn:ip
This type of line is used by programs that automatically edit data to temporarily exclude addresses of overloaded or dead machines. The line is ignored.

     #comment
Comment line. The line is ignored.

Client differentiation

pickdns can return results that depend on the location of the client. pickdns-data supports the following data lines:
     %lo:ipprefix
IP addresses starting with ipprefix are in location lo. lo must be at most two bytes long: e.g., uk.

     +fqdn:ip:lo
The domain name fqdn has IP address ip for clients in location lo. You can list as many as 128 IP addresses for the same name and location. This eliminates all non-location +fqdn:ip lines from the point of view of those clients.
     -fqdn:ip:lo
Ignored.