I have this code:
struct hostent *host;
struct hostent *serverHost;
if ((host = gethostbyname(param.ipadress)) == NULL)
{
return -1;
}
if ((serverHost = gethostbyname(param.dnsserver)) == NULL)
{
return -1;
}
and now when I tried host->h_addr
it contains address from param.dnsserver
. What is wrong? What I am doing wrong?