I can't see any reference to gethostbyname in Session. In Query, on the other hand...
It's quite possible that Session *should* contain the DNS lookup sequence, so it can be easily hooked into, though. It already contains a hostname lookup cache, but rather roughly used by the Query objects...