feat(net): expose stream and datagram protocol #9930

Merged
Queuse merged 7 commits from upstream-pr/9930 into main 2026-10-25 12:35:49 +00:00
Queuse commented 2026-10-22 22:26:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Queuse on 2026-10-22T22:26:48Z.


What

Read SO_PROTOCOL for IPv4/IPv6 stream and datagram sockets, including default protocol selection and accepted-socket inheritance, following FreeBSD 11.4 sogetopt. Raw protocol mapping remains unimplemented and throws; console measurements remain in library debt.

Tested

Windows 11 x86-64, WinLibs MinGW-w64 GCC 15.2.0-r7, Ninja, Release. Head 05eec3e725 includes main 63a863d3b0.

  • Rebuilt affected libraries and focused targets; guest_net_protocol and all 24 net_empty_stream_* scenarios: 25/25 pass, with no skips.
  • Public declaration audit, conventions and whitespace checks pass. The fixture uses canonical public headers.
  • Consulted main 75227c7cdc leaves the focused library/fixture sources and test registrations unchanged after the tested base; the trial merge is clean and retains the intervening debt corrections. Intervening shader changes are outside these focused runtime tests.
  • No fresh Linux/macOS runtime, full hosted product build, title or console run.

Integration order: #9523 → #9542 → #9515 → #9578; #9525 → #9543 → #9930; #9931 follows #9542. #9930/#9931 can land independently after their prerequisites and before #9932/#9948. #8686 and the canonical-header migration #10706 are already in main; retain accepted-socket protocol inheritance, connection state, all option paths, short-buffer rules, tests and debt entries. The #5836 peer/broadcast order proposal remains unconfirmed.

Overlap snapshot 63a863d3b0: confirmed intersections with #9525, #9543. 7 shared-file comparisons are incomplete because those branches conflict with the base: #5836, #7201, #9494, #9727, #9733, #9948, #10502. Manual inspection finds peer/broadcast paths, platform sends, argument validation, IPv6 conversion, socket records and diagnostic display. No duplicate option implementation was found in those shared hunks. Preserve fields, declarations, registrations and debt entries when integrating. These checks do not establish a combined runtime pass with the conflicting branches.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #9543 (merge order; includes #9525)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4974952480 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9930). Originally posted by [Queuse](https://github.com/Queuse) on 2026-10-22T22:26:48Z. --- ### What Read `SO_PROTOCOL` for IPv4/IPv6 stream and datagram sockets, including default protocol selection and accepted-socket inheritance, following FreeBSD 11.4 [sogetopt](https://github.com/freebsd/freebsd-src/blob/releng/11.4/sys/kern/uipc_socket.c#L2695-L2697). Raw protocol mapping remains unimplemented and throws; console measurements remain in library debt. ### Tested Windows 11 x86-64, WinLibs MinGW-w64 GCC 15.2.0-r7, Ninja, Release. Head `05eec3e725` includes main `63a863d3b0`. - Rebuilt affected libraries and focused targets; guest_net_protocol and all 24 net_empty_stream_* scenarios: 25/25 pass, with no skips. - Public declaration audit, conventions and whitespace checks pass. The fixture uses canonical public headers. - Consulted main `75227c7cdc` leaves the focused library/fixture sources and test registrations unchanged after the tested base; the trial merge is clean and retains the intervening debt corrections. Intervening shader changes are outside these focused runtime tests. - No fresh Linux/macOS runtime, full hosted product build, title or console run. Integration order: #9523 → #9542 → #9515 → #9578; #9525 → #9543 → #9930; #9931 follows #9542. #9930/#9931 can land independently after their prerequisites and before #9932/#9948. #8686 and the canonical-header migration #10706 are already in main; retain accepted-socket protocol inheritance, connection state, all option paths, short-buffer rules, tests and debt entries. The #5836 peer/broadcast order proposal remains unconfirmed. Overlap snapshot `63a863d3b0`: confirmed intersections with #9525, #9543. 7 shared-file comparisons are incomplete because those branches conflict with the base: #5836, #7201, #9494, #9727, #9733, #9948, #10502. Manual inspection finds peer/broadcast paths, platform sends, argument validation, IPv6 conversion, socket records and diagnostic display. No duplicate option implementation was found in those shared hunks. Preserve fields, declarations, registrations and debt entries when integrating. These checks do not establish a combined runtime pass with the conflicting branches. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #9543 (merge order; includes #9525) <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
MarcZX10 commented 2026-10-23 05:45:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T05:45:59Z.

Review: APPROVED


Reviewed exact head c079a98a411093257bbd88f3fd8f28a836d438ec. Effective/default protocol selection and accepted-socket inheritance are covered, output-size/error behavior is tested, and unsupported raw sockets remain explicit in debt. Current-main diff-check and conventions pass; the branch merges cleanly and no intervening main commit touched the changed paths. The author’s combined Windows + WSL2 integration run reports all 8 focused network tests passing with #9931/#9932 and related prerequisite changes. I did not rerun the C++ tests locally. The documented merge prerequisite #9543 (including #9525), and #8686’s agreed later order, remain; preserve both this and #9931’s getter/test/debt changes through final rebase.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5624403585 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9930#pullrequestreview-5624403585). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T05:45:59Z. **Review:** APPROVED --- Reviewed exact head `c079a98a411093257bbd88f3fd8f28a836d438ec`. Effective/default protocol selection and accepted-socket inheritance are covered, output-size/error behavior is tested, and unsupported raw sockets remain explicit in debt. Current-main diff-check and conventions pass; the branch merges cleanly and no intervening main commit touched the changed paths. The author’s combined Windows + WSL2 integration run reports all 8 focused network tests passing with #9931/#9932 and related prerequisite changes. I did not rerun the C++ tests locally. The documented merge prerequisite #9543 (including #9525), and #8686’s agreed later order, remain; preserve both this and #9931’s getter/test/debt changes through final rebase.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!9930
No description provided.