=========================================================================*\ * Global Lua functions \*=========================================================================*/ -------------------------------------------------------------------------*\ * Returns all information provided by the resolver given a host name * or ip address \*------------------------------------------------------------
| 53 | * or ip address |
| 54 | \*-------------------------------------------------------------------------*/ |
| 55 | static int inet_gethost(const char *address, struct hostent **hp) { |
| 56 | struct in_addr addr; |
| 57 | if (inet_aton(address, &addr)) |
| 58 | return socket_gethostbyaddr((char *) &addr, sizeof(addr), hp); |
| 59 | else |
| 60 | return socket_gethostbyname(address, hp); |
| 61 | } |
| 62 | |
| 63 | /*-------------------------------------------------------------------------*\ |
| 64 | * Returns all information provided by the resolver given a host name |
no test coverage detected