It would be nice to replace this with some embedded dns library. In a perfect world the operating system takes care of this...