9.3.2 behavior - explain please
Everton da Silva Marques
emarques at diveo.net.br
Fri Aug 3 11:15:47 UTC 2007
Chris Buxton wrote:
>
> Had to be. There's no way two processes can
> actually bind to the same port. (Right?)
I don't think this is true for multicast sockets:
If more than one application binds to the same
port number on a system, each application must
set the SO_REUSEPORT socket option before binding
to the port. In that case, every application will
receive all multicast datagrams sent to the port
number.
Source:
http://docs.hp.com/en/B2355-90136/ch05s05.html
Barry Margolin wrote:
>
> So is lsof lying? It says UDP for both of them below.
I don't think it's downright lying:
labrat at netflow:~$ nc -u -l -p 2000 &
[1] 3678
labrat at netflow:~$ nc -u -l -p 2000 &
[2] 3732
labrat at netflow:~$ jobs
[1]- Running nc -u -l -p 2000 &
[2]+ Running nc -u -l -p 2000 &
labrat at netflow:~$ lsof -i UDP:2000
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
nc 3678 labrat 3u IPv4 65120320 UDP *:2000
nc 3732 labrat 3u IPv4 65120373 UDP *:2000
labrat at netflow:~$
However, I checked that UDP segments are actually
delivered to only one of the processes.
Everton
More information about the bind-users
mailing list