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

Function estimate_redir_addr

tools/ipfw/nat.c:332–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330 */
331
332static int
333estimate_redir_addr(int *ac, char ***av)
334{
335 size_t space = sizeof(struct nat44_cfg_redir);
336 char *sep = **av;
337 u_int c = 0;
338
339 (void)ac; /* UNUSED */
340 while ((sep = strchr(sep, ',')) != NULL) {
341 c++;
342 sep++;
343 }
344
345 if (c > 0)
346 c++;
347
348 space += c * sizeof(struct nat44_cfg_spool);
349
350 return (space);
351}
352
353static int
354setup_redir_addr(char *buf, int *ac, char ***av)

Callers 1

ipfw_config_natFunction · 0.85

Calls 1

strchrFunction · 0.85

Tested by

no test coverage detected