#include #include #include #include extern int h_errno; int main(int argc, char **argv) { struct in_addr addr; unsigned char a[] = { 255, 0, 0, 0 }; struct hostent *hep; int errn; memcpy(&addr, a, 4); hep = gethostbyaddr((void *) &addr, sizeof addr, AF_INET); printf("hep=%p h_errno=%d\n", hep, h_errno); }