Repository navigation
feat(libSceNet): declare 21 exports with known signatures - #2266
brycebrower2008 wants to merge 1 commit into
Conversation
The PS5 libSceNet exports these functions, but no library defined them. They are added as throwing stubs: DNS info, interface names, random and system time, statistics, ioctl, memory allocation, the Show*WithMemory diagnostics, thread helpers, sceNetUsleep, sceNetInetPtonEx and sceNetEtherStrton. Signatures follow shadPS4's reverse-engineered PS4 libSceNet; the PS5 export list is the one in ps5-payload-dev/sdk sce_stubs/libSceNet.c. TechnicalDebt records that the signatures are not confirmed for the PS5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DpG7ipD1K8Dzbwq8U9jyvX
Dextroid17
left a comment
There was a problem hiding this comment.
Verified on Linux.
-
base
d70b8998(upstream/main) + headc94515c1. -
Artifact control on the built module:
unpatched/libSceNet.prxcarries 19 of the 19 declared functions with this PR, and 0 of them without it (main's module). Pre-existing neighbours (sceNetInit_nid_postfix,sceNetBind_nid_postfix) are present in both arms, so nothing was displaced. -
Citations checked against the source, not taken on trust. Four spot-checked against
shadPS4/src/core/libraries/net/net.h(fetched, 12,697 bytes):shadPS4 this PR sceNetEtherStrtonconst char* str, OrbisNetEtherAddr* nconst char* str, NetEtherAddr* nsceNetGetRandomu32* outuint32_t* outsceNetIoctlOrbisNetId s, u64 cmd, void* dataint s, uint64_t cmd, void* datasceNetUsleeps32 microsecondsint microsecondsAll four agree; the differences are typedef spelling (
u32/u64/s32-> the fixed-width names,OrbisNetId->int), which is the right way to port them. -
No duplicates: none of the 19 names exists in the module on
main. -
The
TechnicalDebt.mdbullet listing the declarations is present, which is what makes throwing stubs acceptable here rather than silent ones.
The bar, and what I can and cannot supply for it. A declaration batch lands when it names the title that imports those functions. I can check one title against a full import registry — PPSA26344 (Ghost of Yotei) — and it imports none of these (0 of the 683 imports I can resolve; 19 of its 702 stayed unresolved, so I am not claiming "none" absolutely). That is a negative, not a substitute for your positive: naming the title that needs these is the part that decides whether this merges.
What I could not verify: that a title calls any of them (an import is not a call), and no runtime beyond the module build.
Written with AI assistance.
|
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
No title was run. 🤖 Addressed by Claude Code |
|
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.
|
|
Same as #2265. |
What
Declares 21 libSceNet exports that the PS5 module has and no library defined, as throwing stubs:
sceNetEtherStrton,sceNetGet/SetDnsInfo,sceNetGet/SetDns6Info,sceNetGetIfName,sceNetGetRandom,sceNetGetStatisticsInfo,sceNetGetSystemTime,sceNetInetPtonEx,sceNetIoctl,sceNetMemoryAllocate/Free, the fivesceNetShow*WithMemorycalls,sceNetThreadCreate/JoinandsceNetUsleep.Signatures follow shadPS4's net.h (PS4); TechnicalDebt records that they are not confirmed for the PS5.
sceNetGetIfListis also exported but has no agreed signature (shadPS4 declares none, OpenOrbis a guessed one), so it is left out.How the functions were chosen: each one is in the PS5 module's export list in ps5-payload-dev/sdk
sce_stubs(generated from firmware.sprxexports), its name hashes to the NID shadPS4 registers, no library inmaindefines that NID, and none of the open pull requests adds it (checked against theAPS5_VABIdefinitions in the head of every open PR). Only functions with a published signature are included; exports whose signature nobody has published are left out rather than declared without parameters.Tested
Linux (Ubuntu 24.04, GCC 13.3), full build with
BUILD_TESTING=ON, with this branch merged together with the other three declaration PRs.ninja libsbuilds and NID-patches every library;patched_libraries,guest_http,guest_http_response_header,guest_http2,progress_report,nid_patcher_dynamic_strings,nid_patcher_symbol_versionsandstrict_nid_filterpass.readelf --dyn-symson the patched.prxfiles shows each new function exported under its NID.guest_sce_netaborts in the test container on unmodifiedmaintoo, because the container has no IPv6 (socket(AF_INET6)fails withEAFNOSUPPORT).tools/check_conventions.py --base origin/mainpasses. No title or homebrew run: these are throwing stubs, so they only change which imports bind at startup.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)