Originally Posted by dudeman41465
nslookup will give you that information. You could probably add some greps to the end of it to cut out only the information you want.
Thank you for your response.
Yes, nslookup, a shell command, can also do the same job,
but getnameinfo invoked by a c program is a system call.