Repository navigation
feat(libSceNet): list IPv6 sockets in sceNetGetSockInfo6 - #8362
Conversation
|
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.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
@MarrasFederico thanks. The layout and the listing logic match Since your base, record.flags = NET_SOCKINFO_F_SELF | (socket.native->nonblock ? NET_SOCKINFO_F_NONBLOCK : 0);(Checked with GCC 13 |
|
Windows build of a6a3831 merged onto current
With this one line changed on the merge, - 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. |
|
@oneandonlydean thanks, fixed in c4a2fbf after merging current @ycbuzi that was the same line your Windows build stopped on. |
|
Windows run of the fix (
Not covered: the full build, and any title run. |
|
I am reviewing #9506, which adds |
…nfo6 # Conflicts: # core/libs/prx/libSceNet/Export.cpp # docs/dev/debt/libSceNet.md
|
@MarcZX10 no overlap with #9506. I checked the exact exports, the CMake/test registration and the debt section:
I updated this branch to Merged together onto that |
|
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 |
…'s insertion point
…NetInetPton entry
|
@MarcZX10 thanks. I moved the With the current head:
No |
|
@ntamas94 I compared the current diffs of #9948 and this PR. The exports are distinct, but #9948 changes |
harisibrar1
left a comment
There was a problem hiding this comment.
Checked against main 522e32e and SharpProspero Socket.cs (5dfdb4b):
- It still merges cleanly with current main (3-way
merge-tree, no conflicts), and main still throws insceNetGetSockInfo6, so this isn't duplicated. fill_sock_info6matches main'sfill_sock_info(thenative->nonblockread, the WinsockWSAEINVALhandling for an unbound socket,ENOTCONNfromgetpeername). BecauseIPV6_V6ONLYis set at socket creation, no v4-mapped addresses reach the IPv6 branch.- The
NetSockInfo6definition completes main's global-scope forward declaration, and thestatic_asserts pin 0x6C/0x7C and the fields shared withNetSockInfo. - 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.
|
Merged onto current |
What
sceNetGetSockInfo6threwnot implemented, and its debt entry listed the signature as unknown. SharpProsperoSocket.csdocumentsSceNetSockInfo6: the 0xA0-byteSceNetSockInfowith 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 theIPV6status flag (0x400000) and the 0x1000 flag that reports both families.The call is the IPv6 counterpart of
sceNetGetSockInfoand follows it for everything else:flagsother than 0x40 (TIME_WAIT) and 0x1000 fail withEINVAL, as do a nullinfowiths >= 0andn < 1; a bad descriptor fails withEBADF.s < 0, a nullinforeturns the count, and otherwise up tonrecords are written in descriptor order.swithout 0x1000 fails withEAFNOSUPPORT, assceNetGetSockInfodoes for an IPv6 socket.SELF,NONBLOCKandIPV6flags. An IPv4 socket is reported with its IPv4 addresses, zero IPv6 addresses and noIPV6flag. The other fields are 0, as insceNetGetSockInfo.The debt entry records that nothing is measured on a console; shadPS4 only stubs the call.
Current overlap follow-up: #9948 changes
sock_buffer_sizefromSocktoSockInfoSource; this PR'sfill_sock_info6still 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 onlo(unshare -rn), because IPv6 is disabled onloon this host and the test skips its IPv6 cases there (test(libSceNet): accept every unusable IPv6 loopback error in guest_sce_net #7987). In the namespace the whole test passes:n < 1, a nullinfowiths >= 0, and a closed descriptor andINT32_MAXgivingEBADF.EAFNOSUPPORTwithout 0x1000 and a full record with it.::1.nof 1, 2, count + 1 andINT32_MAX, flags 0x40, 0x1000 and 0x1040, and no writes on errors.main, where the call throws. Dropping theIPV6flag, swapping the local and remote addresses, listing IPv4 sockets without 0x1000, or accepting another flag makes it fail.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pyfinds no conflicting lines. It could not compare fix(libSceNet): stop Sackboy loading retries on peer sockets #5836, test: organize library tests and label CTest suites #6044, Macos port #7201, feat: macOS on Apple Silicon host support (Rosetta 2 and MoltenVK) #7332, feat(net): parse Ethernet address strings #8204 and feat(libSceNet): implement the net thread calls and refuse network emulation #8254, which conflict withmain; none of them touches the socket info calls.main524398151f.mainnow declaressceNetGetSockInfo6(std::int32_t, NetSockInfo6*, std::uint32_t capacity, std::uint32_t flags), and the implementation takes that signature. A capacity read as a negativeint32_t(for example -1) still returnsEINVAL. Allguest_sce_netchecks pass again, in a network namespace with IPv6 on loopback.docs/dev/debt/libSceNet.md: thesceNetGetSockInfo6entry now sits after thesceNetSendmsg and sceNetRecvmsgentry, a line no open PR changes. It was right aftersceNetGetSockInfo, where fix(libSceNet): reject nonpositive socket buffers #9544 inserts too.tools/pr_overlap.pynow reports no conflicting lines. Pairwise three-way merges with fix(libSceNet): reject nonpositive socket buffers #9544, fix(libSceNet): keep MSG_DONTWAIT and aborted stream sends short on macOS hosts #9733, fix(libSceNet): reject the flags and names the module rejects #9727, fix(libSceNet): follow FreeBSD inet text rules for IPv6 #9494, feat(libSceNet): implement the Ex and Internal socket forms, sceNetSysctl, scope-ID text and the default route #9578, feat(libSceNet): expose socket type and listen state #9525 and feat(libSceNet): read reuse and broadcast flags #9542 are clean, so no merge order is needed.sceNetSetDnsInfo/sceNetSetDns6Info): no overlap. Merged together ontomain, the two merge cleanly, andguest_sce_netand feat(net): store DNS servers set through sceNetSetDnsInfo and sceNetSetDns6Info #9506'sguest_net_dns_infoboth pass. feat(net): store DNS servers set through sceNetSetDnsInfo and sceNetSetDns6Info #9506 can land before or after this PR.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)