Function gethostbyname is actually function used for finding the domain name that
's real name of the name we set and IP. Domain name such, by when the variables to values will
? Variable types hostent back, which hostent agent type structure is a
.- char * h_name is the name of host. Actually, we need to find a
- char * * h_aliases is array other names all of the host closes array. With the NULL Pointer
- int h_addrtype is a type of address as AF_INET (IPv4) or AF_INET6 (IPv6)
- int h_length is a length of Address unit has a byte
.- char * * h_addr_list is array pointer of network address of machine. Array
with NULL Pointer
- h_addr is IP Address. The first one in h_addr_list
we can write examples of applications gethostbyname code (code samples from
http: / / www.beej.us / guide / bgnet / output / HTML / multipage / gethostbynameman.html)
be.