| 330 | */ |
| 331 | |
| 332 | static int |
| 333 | estimate_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 | |
| 353 | static int |
| 354 | setup_redir_addr(char *buf, int *ac, char ***av) |
no test coverage detected