man/3/ip (ip): Discuss local IP addresses for "announce" and "bind".

This commit is contained in:
Benjamin Riefenstahl 2022-06-11 13:00:05 +00:00 committed by Ori Bernstein
parent e402fd8340
commit b3dc2af6d6

View file

@ -682,33 +682,43 @@ Otherwise a free port number starting at 5000 is chosen.
The connect fails if the combination of local and remote address/port pairs The connect fails if the combination of local and remote address/port pairs
are already assigned to another port. are already assigned to another port.
.TP .TP
.BI announce\ X .BI announce\ [ip-address ! ]port
.I X Set the local IP address and port number and accept calls there. If
is a decimal port number or ip-address is left out, accept calls on any address. If port is 0, a
.LR * . port is automatically choosen that is not yet announced.
Set the local port If the address is
number to
.I X
and accept calls to
.IR X .
If
.I X
is
.LR * , .LR * ,
accept accept calls on any address.
calls for any port that no process has explicitly announced. If port is
The local IP address cannot be set. .LR * ,
accept calls on any port.
If port is
.LR * ,
and the address is left out, accept calls on any address and port.
.B Announce .B Announce
fails if the connection is already announced or connected. fails if the connection is already announced.
.TP .TP
.BI bind\ X .BI bind\ [ip-address ! ]port
.I X Set the local IP address and port number like for a server connection
is a decimal port number or similar to the
.LR * . .B announce
Set the local port number to command.
.IR X . If ip-address is left out, an address is automatically selected. If
This exists to support emulation port is 0, a port is automatically choosen that is not yet announced.
of BSD sockets by the APE libraries (see This command has no actual effect, beyond remembering the parameters
and possibly selecting an unused port.
The commands
.B announce
and
.B connect
reset both the local address and the port according to their own
parameters.
This command also does
.B not
reserve the IP address and port, another connection can use them, even
while they are registered in a connection by this command.
This exists to support emulation of BSD sockets by the APE libraries
(see
.IR pcc (1)) .IR pcc (1))
and is not otherwise used. and is not otherwise used.
.\" this is gone .\" this is gone