| 2960 | } |
| 2961 | |
| 2962 | static int |
| 2963 | lookup_host (char *host, struct in_addr *ipaddr) |
| 2964 | { |
| 2965 | struct hostent *he; |
| 2966 | |
| 2967 | if (!inet_aton(host, ipaddr)) { |
| 2968 | #ifndef FSTACK |
| 2969 | if ((he = gethostbyname(host)) == NULL) |
| 2970 | return(-1); |
| 2971 | *ipaddr = *(struct in_addr *)he->h_addr_list[0]; |
| 2972 | #else |
| 2973 | return (-1); |
| 2974 | #endif |
| 2975 | } |
| 2976 | return(0); |
| 2977 | } |
| 2978 | |
| 2979 | struct tidx { |
| 2980 | ipfw_obj_ntlv *idx; |