feat(libSceNet): list IPv6 sockets in sceNetGetSockInfo6 #8362

Merged
MarrasFederico merged 9 commits from upstream-pr/8362 into main 2026-10-24 16:41:46 +00:00
MarrasFederico commented 2026-10-20 11:03:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-10-20T11:03:12Z.


What

sceNetGetSockInfo6 threw not implemented, and its debt entry listed the signature as unknown. SharpProspero Socket.cs documents SceNetSockInfo6: the 0xA0-byte SceNetSockInfo with its two reserved blocks at 0x6C and 0x7C used for the local and remote IPv6 addresses, and the IPv4 address fields kept for IPv4-only sockets. It also documents the IPV6 status flag (0x400000) and the 0x1000 flag that reports both families.

The call is the IPv6 counterpart of sceNetGetSockInfo and follows it for everything else:

  • Validation: flags other than 0x40 (TIME_WAIT) and 0x1000 fail with EINVAL, as do a null info with s >= 0 and n < 1; a bad descriptor fails with EBADF.
  • Counting and listing: with s < 0, a null info returns the count, and otherwise up to n records are written in descriptor order.
  • Which sockets: IPv6 sockets only; with 0x1000 IPv4 sockets too. An IPv4 socket asked for by s without 0x1000 fails with EAFNOSUPPORT, as sceNetGetSockInfo does for an IPv6 socket.
  • Fields: the IPv6 local and remote addresses and ports, buffer sizes and the SELF, NONBLOCK and IPV6 flags. An IPv4 socket is reported with its IPv4 addresses, zero IPv6 addresses and no IPV6 flag. The other fields are 0, as in sceNetGetSockInfo.

The debt entry records that nothing is measured on a console; shadPS4 only stubs the call.

Current overlap follow-up: #9948 changes sock_buffer_size from Sock to SockInfoSource; this PR's fill_sock_info6 still uses the former. I proposed #8362 first, then #9948 with that caller adapted on rebase. This is a proposed order, not a completed combined validation.

Tested

Ubuntu 26.04.1, kernel 7.0.0-38, GCC 15.2.0, Release, full build with BUILD_TESTING=ON. Windows was not compiled. No title was run.

  • guest_sce_net, run in a network namespace with IPv6 on lo (unshare -rn), because IPv6 is disabled on lo on this host and the test skips its IPv6 cases there (#7987). In the namespace the whole test passes:
    • Errors: invalid flags on the single, count and list forms, n < 1, a null info with s >= 0, and a closed descriptor and INT32_MAX giving EBADF.
    • IPv4 sockets: EAFNOSUPPORT without 0x1000 and a full record with it.
    • IPv6 records: every byte of the records of unbound and bound UDP sockets, a TCP listener, client and accepted socket, and a connected UDP pair on ::1.
    • Counts and lists: n of 1, 2, count + 1 and INT32_MAX, flags 0x40, 0x1000 and 0x1040, and no writes on errors.
  • The test fails on main, where the call throws. Dropping the IPV6 flag, swapping the local and remote addresses, listing IPv4 sockets without 0x1000, or accepting another flag makes it fail.
  • tools/check_conventions.py --base origin/main passes. tools/pr_overlap.py finds no conflicting lines. It could not compare #5836, #6044, #7201, #7332, #8204 and #8254, which conflict with main; none of them touches the socket info calls.
  • Updated to main 524398151f. main now declares sceNetGetSockInfo6(std::int32_t, NetSockInfo6*, std::uint32_t capacity, std::uint32_t flags), and the implementation takes that signature. A capacity read as a negative int32_t (for example -1) still returns EINVAL. All guest_sce_net checks pass again, in a network namespace with IPv6 on loopback.
  • #9544 and the other open PRs that edit docs/dev/debt/libSceNet.md: the sceNetGetSockInfo6 entry now sits after the sceNetSendmsg and sceNetRecvmsg entry, a line no open PR changes. It was right after sceNetGetSockInfo, where #9544 inserts too. tools/pr_overlap.py now reports no conflicting lines. Pairwise three-way merges with #9544, #9733, #9727, #9494, #9578, #9525 and #9542 are clean, so no merge order is needed.
  • #9506 (sceNetSetDnsInfo/sceNetSetDns6Info): no overlap. Merged together onto main, the two merge cleanly, and guest_sce_net and #9506's guest_net_dns_info both pass. #9506 can land before or after this PR.

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: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4934789828 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8362). Originally posted by [MarrasFederico](https://github.com/MarrasFederico) on 2026-10-20T11:03:12Z. --- ### What `sceNetGetSockInfo6` threw `not implemented`, and its debt entry listed the signature as unknown. [SharpProspero `Socket.cs`](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/Net/Socket.cs#L251-L343) documents `SceNetSockInfo6`: the 0xA0-byte `SceNetSockInfo` with its two reserved blocks at 0x6C and 0x7C used for the local and remote IPv6 addresses, and the IPv4 address fields kept for IPv4-only sockets. It also documents the `IPV6` status flag (0x400000) and the 0x1000 flag that reports both families. The call is the IPv6 counterpart of `sceNetGetSockInfo` and follows it for everything else: - **Validation:** `flags` other than 0x40 (TIME_WAIT) and 0x1000 fail with `EINVAL`, as do a null `info` with `s >= 0` and `n < 1`; a bad descriptor fails with `EBADF`. - **Counting and listing:** with `s < 0`, a null `info` returns the count, and otherwise up to `n` records are written in descriptor order. - **Which sockets:** IPv6 sockets only; with 0x1000 IPv4 sockets too. An IPv4 socket asked for by `s` without 0x1000 fails with `EAFNOSUPPORT`, as `sceNetGetSockInfo` does for an IPv6 socket. - **Fields:** the IPv6 local and remote addresses and ports, buffer sizes and the `SELF`, `NONBLOCK` and `IPV6` flags. An IPv4 socket is reported with its IPv4 addresses, zero IPv6 addresses and no `IPV6` flag. The other fields are 0, as in `sceNetGetSockInfo`. The debt entry records that nothing is measured on a console; shadPS4 only stubs the call. Current overlap follow-up: #9948 changes `sock_buffer_size` from `Sock` to `SockInfoSource`; this PR's `fill_sock_info6` still uses the former. I proposed #8362 first, then #9948 with that caller adapted on rebase. This is a proposed order, not a completed combined validation. ### Tested <!-- 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. --> Ubuntu 26.04.1, kernel 7.0.0-38, GCC 15.2.0, Release, full build with `BUILD_TESTING=ON`. Windows was not compiled. No title was run. - `guest_sce_net`, run in a network namespace with IPv6 on `lo` (`unshare -rn`), because IPv6 is disabled on `lo` on this host and the test skips its IPv6 cases there (#7987). In the namespace the whole test passes: - **Errors:** invalid flags on the single, count and list forms, `n < 1`, a null `info` with `s >= 0`, and a closed descriptor and `INT32_MAX` giving `EBADF`. - **IPv4 sockets:** `EAFNOSUPPORT` without 0x1000 and a full record with it. - **IPv6 records:** every byte of the records of unbound and bound UDP sockets, a TCP listener, client and accepted socket, and a connected UDP pair on `::1`. - **Counts and lists:** `n` of 1, 2, count + 1 and `INT32_MAX`, flags 0x40, 0x1000 and 0x1040, and no writes on errors. - The test fails on `main`, where the call throws. Dropping the `IPV6` flag, swapping the local and remote addresses, listing IPv4 sockets without 0x1000, or accepting another flag makes it fail. - `tools/check_conventions.py --base origin/main` passes. `tools/pr_overlap.py` finds no conflicting lines. It could not compare #5836, #6044, #7201, #7332, #8204 and #8254, which conflict with `main`; none of them touches the socket info calls. - **Updated to `main` `524398151f`.** `main` now declares `sceNetGetSockInfo6(std::int32_t, NetSockInfo6*, std::uint32_t capacity, std::uint32_t flags)`, and the implementation takes that signature. A capacity read as a negative `int32_t` (for example -1) still returns `EINVAL`. All `guest_sce_net` checks pass again, in a network namespace with IPv6 on loopback. - **#9544 and the other open PRs that edit `docs/dev/debt/libSceNet.md`:** the `sceNetGetSockInfo6` entry now sits after the `sceNetSendmsg and sceNetRecvmsg` entry, a line no open PR changes. It was right after `sceNetGetSockInfo`, where #9544 inserts too. `tools/pr_overlap.py` now reports no conflicting lines. Pairwise three-way merges with #9544, #9733, #9727, #9494, #9578, #9525 and #9542 are clean, so no merge order is needed. - **#9506** (`sceNetSetDnsInfo`/`sceNetSetDns6Info`): no overlap. Merged together onto `main`, the two merge cleanly, and `guest_sce_net` and #9506's `guest_net_dns_info` both pass. #9506 can land before or after this PR. ### 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: none <!-- #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 -->
github-actions[bot] commented 2026-10-20 11:03:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T11:03:50Z.


Progress report (8b3e398 → d5d453c)

📈 System libraries: 43.24% (+0.01%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceNet sceNetGetSockInfo6
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6289416883 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8362#issuecomment-6289416883). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T11:03:50Z. --- <!-- progress-report --> ### Progress report (8b3e398 → d5d453c) 📈 **System libraries**: 43.24% (+0.01%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceNet | `sceNetGetSockInfo6` | </details>
oneandonlydean commented 2026-10-21 06:53:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T06:53:45Z.


@MarrasFederico thanks. The layout and the listing logic match sceNetGetSockInfo, but the branch no longer builds once merged with current main:

core/libs/prx/libSceNet/Export.cpp:1639:50: error: 'struct {anonymous}::Sock' has no member named 'nonblock'

Since your base, main moved the non-blocking flag from Sock into the native handle (std::shared_ptr<NativeSocketHandle> native), and sceNetGetSockInfo's fill_sock_info now reads socket.native->nonblock. Please rebase onto main and make the same change in fill_sock_info6:

record.flags = NET_SOCKINFO_F_SELF | (socket.native->nonblock ? NET_SOCKINFO_F_NONBLOCK : 0);

(Checked with GCC 13 -fsyntax-only on the merge of a6a3831b7f into main 7ce3b1df3e: main alone compiles, the merge fails only at that line, and GuestSceNet.cpp compiles.)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309989402 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8362#issuecomment-6309989402). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T06:53:45Z. --- @MarrasFederico thanks. The layout and the listing logic match `sceNetGetSockInfo`, but the branch no longer builds once merged with current `main`: ``` core/libs/prx/libSceNet/Export.cpp:1639:50: error: 'struct {anonymous}::Sock' has no member named 'nonblock' ``` Since your base, `main` moved the non-blocking flag from `Sock` into the native handle (`std::shared_ptr<NativeSocketHandle> native`), and `sceNetGetSockInfo`'s `fill_sock_info` now reads `socket.native->nonblock`. Please rebase onto `main` and make the same change in `fill_sock_info6`: ```cpp record.flags = NET_SOCKINFO_F_SELF | (socket.native->nonblock ? NET_SOCKINFO_F_NONBLOCK : 0); ``` (Checked with GCC 13 `-fsyntax-only` on the merge of `a6a3831b7f` into `main` `7ce3b1df3e`: `main` alone compiles, the merge fails only at that line, and `GuestSceNet.cpp` compiles.)
ycbuzi commented 2026-10-21 07:35:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ycbuzi on 2026-10-21T07:35:13Z.


Windows build of a6a3831b7f merged onto current main b77bd58806 (clean merge, 3a504b44fe) fails, the build the description lists as not done. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release, BUILD_TESTING=ON.

core/libs/prx/libSceNet/Export.cpp: In function 'int fill_sock_info6(int, NetSockInfo6&, bool)':
core/libs/prx/libSceNet/Export.cpp:1639:50: error: 'struct {anonymous}::Sock' has no member named 'nonblock'
 1639 |     record.flags = NET_SOCKINFO_F_SELF | (socket.nonblock ? NET_SOCKINFO_F_NONBLOCK : 0);

fill_sock_info6 copies sceNetGetSockInfo's record code as it was at this PR's base 777bd0f4b2. #8653 (merged 01:19 UTC today) has since removed bool nonblock from Sock and moved the flag to std::atomic<bool> nonblock in NativeSocketHandle; its edit to the IPv4 copy merges without a conflict, so after the merge sceNetGetSockInfo reads socket.native->nonblock (line 1576) while the IPv6 copy still reads socket.nonblock. The line is not under _WIN32 and Sock has no nonblock on any host now, so I expect the same error on Linux after a rebase; I only built Windows. This PR's last checks ran before #8653 landed, with the build jobs skipped.

With this one line changed on the merge, libSceNet and guest_sce_net_tests build with no warnings, and ctest --repeat until-fail:2 on guest_sce_net passes on both repeats. Its new nonblocking datagram case expects the 0x200000 flag, so it exercises this read.

-    record.flags = NET_SOCKINFO_F_SELF | (socket.nonblock ? NET_SOCKINFO_F_NONBLOCK : 0);
+    record.flags = NET_SOCKINFO_F_SELF | (socket.native->nonblock ? NET_SOCKINFO_F_NONBLOCK : 0);

Not run: Linux, a title.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6310651789 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8362#issuecomment-6310651789). Originally posted by [ycbuzi](https://github.com/ycbuzi) on 2026-10-21T07:35:13Z. --- Windows build of a6a3831b7f merged onto current `main` b77bd58806 (clean merge, 3a504b44fe) fails, the build the description lists as not done. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release, `BUILD_TESTING=ON`. ``` core/libs/prx/libSceNet/Export.cpp: In function 'int fill_sock_info6(int, NetSockInfo6&, bool)': core/libs/prx/libSceNet/Export.cpp:1639:50: error: 'struct {anonymous}::Sock' has no member named 'nonblock' 1639 | record.flags = NET_SOCKINFO_F_SELF | (socket.nonblock ? NET_SOCKINFO_F_NONBLOCK : 0); ``` `fill_sock_info6` copies `sceNetGetSockInfo`'s record code as it was at this PR's base 777bd0f4b2. #8653 (merged 01:19 UTC today) has since removed `bool nonblock` from `Sock` and moved the flag to `std::atomic<bool> nonblock` in `NativeSocketHandle`; its edit to the IPv4 copy merges without a conflict, so after the merge `sceNetGetSockInfo` reads `socket.native->nonblock` (line 1576) while the IPv6 copy still reads `socket.nonblock`. The line is not under `_WIN32` and `Sock` has no `nonblock` on any host now, so I expect the same error on Linux after a rebase; I only built Windows. This PR's last checks ran before #8653 landed, with the build jobs skipped. With this one line changed on the merge, `libSceNet` and `guest_sce_net_tests` build with no warnings, and `ctest --repeat until-fail:2` on `guest_sce_net` passes on both repeats. Its new nonblocking datagram case expects the `0x200000` flag, so it exercises this read. ```diff - record.flags = NET_SOCKINFO_F_SELF | (socket.nonblock ? NET_SOCKINFO_F_NONBLOCK : 0); + record.flags = NET_SOCKINFO_F_SELF | (socket.native->nonblock ? NET_SOCKINFO_F_NONBLOCK : 0); ``` Not run: Linux, a title.
MarrasFederico commented 2026-10-21 12:33:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-10-21T12:33:20Z.


@oneandonlydean thanks, fixed in c4a2fbf79 after merging current main: fill_sock_info6 now reads socket.native->nonblock, as fill_sock_info does. It builds, and guest_sce_net passes, including the IPv6 cases in a network namespace with IPv6 on lo.

@ycbuzi that was the same line your Windows build stopped on.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6315993608 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8362#issuecomment-6315993608). Originally posted by [MarrasFederico](https://github.com/MarrasFederico) on 2026-10-21T12:33:20Z. --- @oneandonlydean thanks, fixed in c4a2fbf79 after merging current `main`: `fill_sock_info6` now reads `socket.native->nonblock`, as `fill_sock_info` does. It builds, and `guest_sce_net` passes, including the IPv6 cases in a network namespace with IPv6 on `lo`. @ycbuzi that was the same line your Windows build stopped on.
harmsluis commented 2026-10-21 16:45:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by harmsluis on 2026-10-21T16:45:21Z.


Windows run of the fix (c4a2fbf79) merged onto main cecb540a6 without conflicts. Windows 11 build 26300, non-elevated, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON.

  • guest_sce_net builds with no new warnings and passes 5/5 (ctest --repeat until-fail:3 and two more runs). CheckSockInfo6 is called from the test, so sceNetGetSockInfo6 ran.
  • Control, only that one line put back to socket.nonblock: the build stops at Export.cpp:1639 with 'struct {anonymous}::Sock' has no member named 'nonblock', the same error as the earlier Windows build of a6a3831b7.

Not covered: the full build, and any title run.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6321397536 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8362#issuecomment-6321397536). Originally posted by [harmsluis](https://github.com/harmsluis) on 2026-10-21T16:45:21Z. --- Windows run of the fix (`c4a2fbf79`) merged onto `main` `cecb540a6` without conflicts. Windows 11 build 26300, non-elevated, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, `BUILD_TESTING=ON`. - `guest_sce_net` builds with no new warnings and passes 5/5 (`ctest --repeat until-fail:3` and two more runs). `CheckSockInfo6` is called from the test, so `sceNetGetSockInfo6` ran. - Control, only that one line put back to `socket.nonblock`: the build stops at `Export.cpp:1639` with `'struct {anonymous}::Sock' has no member named 'nonblock'`, the same error as the earlier Windows build of `a6a3831b7`. Not covered: the full build, and any title run.
MarcZX10 commented 2026-10-22 02:07:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T02:07:09Z.


I am reviewing #9506, which adds sceNetSetDnsInfo, sceNetSetDns6Info and sceNetGetDns6Info plus a new registered test and debt entry. The overlap bot could not compare some of these branches because of base conflicts, and this PR author has not yet recorded an agreed merge order. Please confirm whether your current changes overlap these exact exports, CMake/test insertion, or debt section, and whether #9506 can land before your PR or should depend on yours. The #9506 author is being asked to record the agreed order in Depends on and the overlap note.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6330953642 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8362#issuecomment-6330953642). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T02:07:09Z. --- I am reviewing #9506, which adds `sceNetSetDnsInfo`, `sceNetSetDns6Info` and `sceNetGetDns6Info` plus a new registered test and debt entry. The overlap bot could not compare some of these branches because of base conflicts, and this PR author has not yet recorded an agreed merge order. Please confirm whether your current changes overlap these exact exports, CMake/test insertion, or debt section, and whether #9506 can land before your PR or should depend on yours. The #9506 author is being asked to record the agreed order in `Depends on` and the overlap note.
MarrasFederico commented 2026-10-22 04:59:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-10-22T04:59:31Z.


@MarcZX10 no overlap with #9506. I checked the exact exports, the CMake/test registration and the debt section:

  • Exports: this PR only implements sceNetGetSockInfo6 and its fill_sock_info6 helper. #9506 touches sceNetSetDnsInfo, sceNetSetDns6Info and sceNetGetDns6Info.
  • Tests: this PR adds checks to the existing guest_sce_net, while #9506 registers a new guest_net_dns_info.
  • Debt: the two edit different lines of libSceNet.md.

I updated this branch to main 524398151f, where sceNetGetSockInfo6 now has a declared signature, and the implementation takes it.

Merged together onto that main, the two branches merge cleanly. guest_sce_net and guest_net_dns_info both pass, in a network namespace with IPv6 on loopback. #9506 can land before or after this PR; neither needs to depend on the other. I added this to the description.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6333107732 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8362#issuecomment-6333107732). Originally posted by [MarrasFederico](https://github.com/MarrasFederico) on 2026-10-22T04:59:31Z. --- @MarcZX10 no overlap with #9506. I checked the exact exports, the CMake/test registration and the debt section: - **Exports:** this PR only implements `sceNetGetSockInfo6` and its `fill_sock_info6` helper. #9506 touches `sceNetSetDnsInfo`, `sceNetSetDns6Info` and `sceNetGetDns6Info`. - **Tests:** this PR adds checks to the existing `guest_sce_net`, while #9506 registers a new `guest_net_dns_info`. - **Debt:** the two edit different lines of `libSceNet.md`. I updated this branch to `main` `524398151f`, where `sceNetGetSockInfo6` now has a declared signature, and the implementation takes it. Merged together onto that `main`, the two branches merge cleanly. `guest_sce_net` and `guest_net_dns_info` both pass, in a network namespace with IPv6 on loopback. #9506 can land before or after this PR; neither needs to depend on the other. I added this to the description.
MarcZX10 commented 2026-10-22 11:33:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:33:19Z.


I compared your current branch with open #9544. The implementations/tests are independent, but both branches add a debt entry at the same insertion point in docs/dev/debt/libSceNet.md, and their pairwise three-way merge currently conflicts in that file. Please coordinate the merge order with #9544’s author and update the overlap note / Depends on if one PR must land first. #9544 individually merges cleanly with current main; the conflict is between the two PR branches.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6339717376 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8362#issuecomment-6339717376). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T11:33:19Z. --- I compared your current branch with open #9544. The implementations/tests are independent, but both branches add a debt entry at the same insertion point in `docs/dev/debt/libSceNet.md`, and their pairwise three-way merge currently conflicts in that file. Please coordinate the merge order with #9544’s author and update the overlap note / `Depends on` if one PR must land first. #9544 individually merges cleanly with current `main`; the conflict is between the two PR branches.
MarrasFederico commented 2026-10-22 12:38:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-10-22T12:38:30Z.


@MarcZX10 thanks. I moved the sceNetGetSockInfo6 debt entry instead of ordering the two PRs. It now sits after the sceNetSendmsg and sceNetRecvmsg entry, a line that no open PR edits; before, both this PR and #9544 inserted right after sceNetGetSockInfo.

With the current head:

  • the pairwise three-way merge with #9544 is clean;
  • so are the merges with the other open PRs that insert near there (#9733, #9727, #9494, #9578, #9525, #9542);
  • tools/pr_overlap.py reports no conflicting lines.

No Depends on is needed either way. I updated the overlap note in the description.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6340940648 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8362#issuecomment-6340940648). Originally posted by [MarrasFederico](https://github.com/MarrasFederico) on 2026-10-22T12:38:30Z. --- @MarcZX10 thanks. I moved the `sceNetGetSockInfo6` debt entry instead of ordering the two PRs. It now sits after the `sceNetSendmsg and sceNetRecvmsg` entry, a line that no open PR edits; before, both this PR and #9544 inserted right after `sceNetGetSockInfo`. With the current head: - the pairwise three-way merge with #9544 is clean; - so are the merges with the other open PRs that insert near there (#9733, #9727, #9494, #9578, #9525, #9542); - `tools/pr_overlap.py` reports no conflicting lines. No `Depends on` is needed either way. I updated the overlap note in the description.
harisibrar1 commented 2026-10-24 13:51:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-24T13:51:06Z.

Review: APPROVED


Checked against main 522e32e3b6 and SharpProspero Socket.cs (5dfdb4b):

  • It still merges cleanly with current main (3-way merge-tree, no conflicts), and main still throws in sceNetGetSockInfo6, so this isn't duplicated.
  • fill_sock_info6 matches main's fill_sock_info (the native->nonblock read, the Winsock WSAEINVAL handling for an unbound socket, ENOTCONN from getpeername). Because IPV6_V6ONLY is set at socket creation, no v4-mapped addresses reach the IPv6 branch.
  • The NetSockInfo6 definition completes main's global-scope forward declaration, and the static_asserts pin 0x6C/0x7C and the fields shared with NetSockInfo.
  • The debt entry clearly separates what is inferred (IPv4 sockets left out by default, zero IPv6 addresses for IPv4 sockets, accepting 0x40) from what SharpProspero documents, and those inferred paths fail rather than report success. Nothing to add beyond the #9948 ordering you already noted.

Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5638479968 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8362#pullrequestreview-5638479968). Originally posted by [harisibrar1](https://github.com/harisibrar1) on 2026-10-24T13:51:06Z. **Review:** APPROVED --- Checked against main 522e32e3b6 and SharpProspero `Socket.cs` (5dfdb4b): - It still merges cleanly with current main (3-way `merge-tree`, no conflicts), and main still throws in `sceNetGetSockInfo6`, so this isn't duplicated. - `fill_sock_info6` matches main's `fill_sock_info` (the `native->nonblock` read, the Winsock `WSAEINVAL` handling for an unbound socket, `ENOTCONN` from `getpeername`). Because `IPV6_V6ONLY` is set at socket creation, no v4-mapped addresses reach the IPv6 branch. - The `NetSockInfo6` definition completes main's global-scope forward declaration, and the `static_assert`s pin 0x6C/0x7C and the fields shared with `NetSockInfo`. - The debt entry clearly separates what is inferred (IPv4 sockets left out by default, zero IPv6 addresses for IPv4 sockets, accepting 0x40) from what SharpProspero documents, and those inferred paths fail rather than report success. Nothing to add beyond the #9948 ordering you already noted. Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
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!8362
No description provided.