replace '*' -> '-' as address to listen to and document it

This commit is contained in:
Alexandre Ratchov 2011-05-03 21:36:52 +02:00
parent e76f856e7a
commit 1cda5b83e3
3 changed files with 11 additions and 1 deletions

View File

@ -152,6 +152,11 @@ Without this option,
listens on the
.Ux Ns -domain
socket only, and is not reachable from any network.
If the option argument is
.Sq -
then
.Nm
will accept connections from any address.
.It Fl l
Detach and become a daemon.
.It Fl m Ar mode

View File

@ -110,7 +110,7 @@ listen_new_tcp(char *addr, unsigned port)
*/
memset(&aihints, 0, sizeof(struct addrinfo));
snprintf(serv, sizeof(serv), "%u", port);
host = strcmp(addr, "*") == 0 ? NULL : addr;
host = strcmp(addr, "-") == 0 ? NULL : addr;
aihints.ai_flags |= AI_PASSIVE;
aihints.ai_socktype = SOCK_STREAM;
aihints.ai_protocol = IPPROTO_TCP;

View File

@ -69,6 +69,11 @@ Without this option,
listens on the
.Ux Ns -domain
socket only, and is not reachable from any network.
If the option argument is
.Sq -
then
.Nm
will accept connections from any address.
.It Fl l
Detach and become a daemon.
.It Fl o Ar file