Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-10-2013, 07:48 AM
|
#1
|
LQ Newbie
Registered: Apr 2013
Posts: 2
Rep: 
|
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!
Jason
|
|
|
04-13-2013, 01:26 PM
|
#2
|
Member
Registered: Dec 2012
Location: inside the matrix
Distribution: Debian, Xubuntu, Gentoo, Antergos
Posts: 90
Rep:
|
|
|
|
04-22-2013, 01:32 PM
|
#3
|
LQ Newbie
Registered: Apr 2013
Posts: 2
Original Poster
Rep: 
|
Not quite what I'm looking for, but thanks for trying.
Thanks for the response, but that's not quite what I'm looking for I'm afraid.
I found the man page for Listen, which implies that TCP will only be able to listen on a single port a single time. I'm not convinced that is a necessary restriction, since a system can have many local addresses - but I think it answers my question.
In my case, I am using an implementation of TCP that is still a work in progress (not the Linux TCP service), and cannot use linux services to hack my way around this.
I'm considering implementing an alternative session manager that sits between TCP and the application that will allow it to manage multiple listens on the same port using different mixtures of local and remote addresses. It might be overkill, but provides an interesting abstraction that I can exploit in my application.
Thanks for the views and the response.
|
|
|
All times are GMT -5. The time now is 06:05 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|