MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lookup_host

Function lookup_host

tools/ipfw/ipfw2.c:2962–2977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2960}
2961
2962static int
2963lookup_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
2979struct tidx {
2980 ipfw_obj_ntlv *idx;

Callers 1

fill_ipFunction · 0.70

Calls 1

inet_atonFunction · 0.85

Tested by

no test coverage detected