I want to send a dns request through gethostbyname() and want to store resolved IP and TTL value in dns response through c or c++ code.
Can someone please suggest me any code . I am getting resolved IP throught gethostbyname() system calls. But don't know, how to get correspondig TTL value also.