I’ve just had to struggle with the hex ip addresses which dnscache logs, after a bit of searching I found some nice notes about the log format here thanks to Rob Mayoff.

Finally I found this (Broken link http://www.artfiles.org/qmail.org/dnscache-log.pl) handy perl script.