Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting something akin to the accept() syscall in POSIX in smoltcp? #1007

Open
thegameison opened this issue Oct 28, 2024 · 0 comments
Open

Comments

@thegameison
Copy link

We are creating an OS in Rust, and so far smoltcp seems like a promising interface for part of our networking stack. However, I was curious if it is possible to create a version of the accept syscall with the current smoltcp interface.

The accept syscall takes in a listening fd corresponding to a streaming socket (like a TCP socket). When this socket receives a connection request from a client, it will delegate this connection to a new socket (presumably with the same IP address and port). However, this new socket likely starts in the SynReceived state rather than the Listen or Closed state, and will have its remote endpoint configured when created.

From what I can see, there is no way to manually start the TCP Socket state in SynReceived in smoltcp. Is there another recommended way of implementing something akin to accept with the current interface?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant