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

Function lookup_host

tools/ipfw/tables.c:125–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123};
124
125static int
126lookup_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

Callers 3

tentry_fill_key_typeFunction · 0.70
guess_key_typeFunction · 0.70
tentry_fill_valueFunction · 0.70

Calls 1

inet_atonFunction · 0.85

Tested by

no test coverage detected