| 392 | } |
| 393 | |
| 394 | static int |
| 395 | estimate_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 | |
| 415 | static int |
| 416 | setup_redir_port(char *buf, int *ac, char ***av) |
no test coverage detected