Repository navigation
feat(libkernel): implement socketpair - #1728
Closed
HyperDarkmoon wants to merge 1 commit into
Closed
HyperDarkmoon wants to merge 1 commit into
HyperDarkmoon wants to merge 1 commit into
Conversation
Nineteen titles in the boykopovar#1578 audit import socketpair from libkernel and no built module exports it, so the loader stops at start-up. The pair is two guest sockets of family 1, AF_UNIX as FreeBSD numbers it: a host socketpair(AF_UNIX, ...) on Linux, and on Windows, where Winsock has none, both ends of one loopback TCP connection for a stream pair and two loopback UDP sockets connected to each other for a datagram pair. Both ends are registered under one lock and both descriptors are written together, so a failure leaves them at -1. An unnamed socketpair end carries no name, so getsockname, getpeername and recvfrom report the two-byte address an unnamed end has rather than the loopback names the Windows pair would otherwise hand out, and connect on an end returns EISCONN. Those choices, and the Windows pair itself, are recorded in TechnicalDebt. guest_socketpair covers both types in both directions, the unnamed addresses, EISCONN, and the argument errors.
9 tasks done
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
Author
|
Closing in favor of #1711 which has a more complete socketpair implementation with Windows pair details and broader semantics; this branch is redundant. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(libkernel): implement socketpair
Nineteen titles in the #1578 audit import socketpair from libkernel and
no built module exports it, so the loader stops at start-up.
The pair is two guest sockets of family 1, AF_UNIX as FreeBSD numbers
it: a host socketpair(AF_UNIX, ...) on Linux, and on Windows, where
Winsock has none, both ends of one loopback TCP connection for a stream
pair and two loopback UDP sockets connected to each other for a datagram
pair. Both ends are registered under one lock and both descriptors are
written together, so a failure leaves them at -1.
An unnamed socketpair end carries no name, so getsockname, getpeername
and recvfrom report the two-byte address an unnamed end has rather than
the loopback names the Windows pair would otherwise hand out, and
connect on an end returns EISCONN. Those choices, and the Windows pair
itself, are recorded in TechnicalDebt.
guest_socketpair covers both types in both directions, the unnamed
addresses, EISCONN, and the argument errors.