We'll probably need to intercept the more traditional gethostbyname() API and friends at some point too.
This is distinct from capnhook's hooklib, although the intent is the same. Hopefully these two libraries sharing a name won't get too confusing...