On Thursday 03 February 2005 02:38, Verdi March wrote:
The responds (particularly Jerry and Davi) describes that case where given a server with two open sessions (from two different clients), the dst_ip and dst_port (belong to the server) are the same.
Now, if we 'reverse' the case (which was what I'm interested initially, so my original question fails to put across this intention), the case become: a client have 2 TCP sessions to two different servers. In both sessions, src_port (at client) are obtained/assigned through "connect" and both are assigned the same src_port. The respond to this, so far, is that it is possible but probably not using the BSD socket API. The only port that is not unique is the dst_port. The src_port is an ephemeral port assigned by the kernel. So, from the client side, there are 2 servers: 142.98.64.43.23 (where 23 is the server port on server 1) 198.98.58.29.23 (where 23 is the server port on server 2) The connect is sending there. So, in the case of a server sending to multiple hosts on the same port, the IP address is unique per host (dst_ip and dst_port). The src_ip is the client's IP address, and as mentioned, the src_prt is assigned by the kernel and is unique.
So, in both cases, you have a unique connection, even if the client for the
2 connections is the same physical process.
In the case of multi-cast, the client is sending to a single multi-cast IP
address. This works fine for UDP but not for TCP.
--
Jerry Feldman