The nslookup is used for network administration command-line tool which is available for many computers operating systems to query the Domain Name System and obtain domain name or an IP address mapping or to find any other specific DNS record.
The nslookup returns an endpoint(s) of this URL. But if I need to get some intermediate URL/IP, how can I do it?
For eg. If www.example.com is hosted on two instances on the AWS behind an ELB(Elastic load balancer), then
nslookup www.example.com
will return an IP of the 2 instances. Is there any method to get the DNS/IP of a load balancer?
I used the following function in C to resolve a URL to endpoints.
int getaddrinfo(const char *node, const char *service,
const struct addrinfo *hints,
struct addrinfo **res);
Is there any way to get my load balancer URL/IP in C?