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

Function estimate_redir_port

tools/ipfw/nat.c:394–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392}
393
394static int
395estimate_redir_port(int *ac, char ***av)
396{
397 size_t space = sizeof(struct nat44_cfg_redir);
398 char *sep = **av;
399 u_int c = 0;
400
401 (void)ac; /* UNUSED */
402 while ((sep = strchr(sep, ',')) != NULL) {
403 c++;
404 sep++;
405 }
406
407 if (c > 0)
408 c++;
409
410 space += c * sizeof(struct nat44_cfg_spool);
411
412 return (space);
413}
414
415static int
416setup_redir_port(char *buf, int *ac, char ***av)

Callers 1

ipfw_config_natFunction · 0.85

Calls 1

strchrFunction · 0.85

Tested by

no test coverage detected