feat(libSceNet): implement sceNetIoctl #9060
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9060"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by ags-arnab on 2026-10-21T11:11:28Z.
What
sceNetIoctlthrewnot implemented. It now implements the(socketId, command, argument)signature recovered onmainin9ccfc4219.On a socket from
sceNetSocket:FIONBIO(0x8004667e) sets the same state asSO_NBIO, through the existing setter. FreeBSD'ssoo_ioctlsetsSS_NBIOfor it, and the library already mapsfcntl'sO_NONBLOCKtoSO_NBIO.FIONREAD(0x4004667f) reports the bytes the host socket has queued.ENOTTY, as libkernel'sioctldoes on its own sockets, and a null argument toFIONBIOorFIONREADfails withEFAULT.A socket from libkernel's
socketgoes to libkernel'sioctl. Any other descriptor fails withNET_EBADF, as insceNetSetsockopt.Requests on a
sceNetSocketsocket are not forwarded to libkernel'sioctl, because there they do not reach the library: on LinuxFIONBIOswitches the host socket'sO_NONBLOCKwithout the library'sSO_NBIOstate, and on Windows the descriptor is aNULplaceholder, soFIONREADand enablingFIONBIOthrow. That libkernel gap is recorded indocs/dev/debt/libkernel.md, and a newsceNetIoctlentry under "Functional" indocs/dev/debt/libSceNet.mdlists what differs from FreeBSD and from shadPS4.tools/progress.py --compare: +1 implemented function.tools/pr_overlap.py --branchreports two overlaps, both at line 226 ofdocs/dev/debt/libkernel.md: #8700 adds an entry next to the one added here, and #9566 rewords theioctl, _ioctlentry just above it. Whichever merges second keeps both changes. The open pull requests it could not compare because they conflict withmainchange other libSceNet functions; none touchessceNetIoctlor ioctl handling.Tested
main9d6adeb55after #9076. ThesceNetIoctldebt line now sits after #9076'ssceNetUsleepline; nothing else changed. An earlier rebase ontoa6dcea927had adopted the recoveredstd::uint32_t commandsignature. ycbuzi's Windows runs in the comments were on d625840 and 081ed539b.guest_sce_netpasses 3 of 3. The host is Apple silicon and Rosetta has no AVX2, so the test ran underqemu-x86_64 -cpu max(QEMU 10.2.1). Withmain'ssceNetIoctland the new test it aborts withsceNetIoctl not implemented.python3 tools/check_conventions.py --base origin/mainpasses.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)Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-21T11:11:34Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
Imported from boykopovar/AnyPS5. Originally posted by ycbuzi on 2026-10-21T17:51:04Z.
Windows run of d625840abd merged onto
main745b394629(16478633d4, clean), the platform the description lists as not tested. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release,BUILD_TESTING=ON.Built
libSceNetandguest_sce_net_testswith no errors or warnings.ctest --repeat until-fail:2onguest_sce_net: passes on both repeats. Not run: a title.Imported from boykopovar/AnyPS5. Originally posted by ycbuzi on 2026-10-22T08:22:00Z.
Windows run of 081ed539b2, the
uint32_trequest update, merged ontomaind6eafa54d0(7a3853c95a, clean). Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release,BUILD_TESTING=ON.Built
libSceNetandguest_sce_net_testswith no errors or warnings.ctest --repeat until-fail:2onguest_sce_net: passes on both repeats. Not run: a title.