...
bzero(&addr, sizeof(struct sockaddr_in));
if( inet_aton("192.168.4.1", &addr.sin_addr) != 0 ){
host = gethostbyaddr((char *)&addr.sin_addr, 4, AF_INET);
}
if( host == NULL){
fprintf(stderr, "Gethostbyaddr error: %s\n", hstrerror(
h_errno ) );
}
...
====================================================
It can be cpmpiled successfully, but it always get the incorrect
information: "Unknown host" after running.
who can help me?