| 123 | }; |
| 124 | |
| 125 | static int |
| 126 | lookup_host (char *host, struct in_addr *ipaddr) |
| 127 | { |
| 128 | struct hostent *he; |
| 129 | |
| 130 | if (!inet_aton(host, ipaddr)) { |
| 131 | #ifndef FSTACK |
| 132 | if ((he = gethostbyname(host)) == NULL) |
| 133 | return(-1); |
| 134 | *ipaddr = *(struct in_addr *)he->h_addr_list[0]; |
| 135 | #else |
| 136 | return (-1); |
| 137 | #endif |
| 138 | } |
| 139 | return(0); |
| 140 | } |
| 141 | |
| 142 | /* |
| 143 | * This one handles all table-related commands |
no test coverage detected