| 282 | } |
| 283 | |
| 284 | static int |
| 285 | StrToAddrAndPortRange (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 |
no test coverage detected