Originally posted by kuphryn
Another solution is getnameinfo().
Well...in order to use that you already need to know the IP address since it will be passed to 'getnameinfo()'....and he is basically trying to get the IP address...