TCP Session Management
I need to know how the Linux implementation of TCP performs it's session management.
I would like to see some documentation, or perhaps the source code for scenarios like this:
An application Listens on: Local IP = A, Local Port = P, Remote IP = *, Remote Port = *. Effectively the local server scenario where you know nothing about whom will attempt to connect.
What would happen if another application (or the same one with more information about its peers) Listens on: Local IP = A, Local Port = P, Remote IP = B, Remote Port = *. Basically, expecting a connection from B, but do not know the remote ephemeral port.
I can imagine a scenario where it would be desirable to have multiple listens like this, but I don't know how Linux would behave in this scenario.
It would be very easy to actual code up an example of this particular scenario to validate behavior, but I'm really interested in how tcp session management in general works under Linux, the above is just an example.
Thanks in advance!