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

Function StrToAddrAndPortRange

tools/ipfw/nat.c:284–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284static int
285StrToAddrAndPortRange (const char* str, struct in_addr* addr, char* proto,
286 port_range *portRange)
287{
288 char* ptr;
289
290 ptr = strchr (str, ':');
291 if (!ptr)
292 errx (EX_DATAERR, "%s is missing port number", str);
293
294 *ptr = '\0';
295 ++ptr;
296
297 StrToAddr (str, addr);
298 return StrToPortRange (ptr, proto, portRange);
299}
300
301/* End of stuff taken from natd.c. */
302

Callers 1

setup_redir_portFunction · 0.85

Calls 3

strchrFunction · 0.85
StrToAddrFunction · 0.85
StrToPortRangeFunction · 0.85

Tested by

no test coverage detected