Repository navigation
feat(libSceNet): implement Show*WithMemory diagnostics and sceNetGetStatisticsInfo - #12288
Conversation
Progress report (750cf6c → c1e321f)📈 System libraries: 46.68% (+0.03%, +4 implemented functions) ✅ 4 implemented
Changed libraries (implemented exports)
|
|
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.
|
|
Windows result for head Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, The tree also carried the open PRs #12290, #12285, #12269, #12265, #12232, #12206, #12201, #12199, #12197, #12165, #12146, all merged cleanly, so the run is a joint one; the tests of this PR are AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
|
Windows and Linux results with controls (the description names no platform). Head Windows: Windows 11 Pro 26300, AMD Ryzen 7 7800X3D, WinLibs GCC 15.2.0 r7, Ninja Release,
Linux: Ubuntu 22.04 under WSL2, GCC 11.4.0, Ninja Release.
Not tested: the diagnostics' printed output against a console, macOS, any title. AI-assisted (Claude Code). |
sceNetShowIfconfigWithMemory, sceNetShowPolicyWithMemory and sceNetShowRoute6WithMemory threw NotImplemented_nid_no_patch. They now behave like the existing sceNetShowRouteWithMemory: an unknown memory pool id fails with NET_EBADF (errno set), a live pool returns success without printing. The behaviour follows shadPS4's net.cpp, which does the same for these three. The new silent stubs are listed in the libSceNet technical debt file, and the tests cover the invalid id, live pool and destroyed pool cases.
sceNetGetStatisticsInfo threw NotImplemented_nid_no_patch. It now fills the six 32-bit fields of the statistics block (kernel memory free and minimum free, packet count, QoS packet count, library memory free and minimum free) and fails with NET_EFAULT, setting errno, for a null pointer. The layout and the "plenty free, nothing queued" answer follow shadPS4's net.cpp and net_types.h; the host has no counter for the console's network memory, so the values are not measured. The debt file records this, and the test checks the null pointer, the field invariants and that the flags argument is ignored.
a30f43f to
c1e321f
Compare
What
Implements four libSceNet exports that threw
NotImplemented_nid_no_patch:sceNetShowIfconfigWithMemory,sceNetShowPolicyWithMemory,sceNetShowRoute6WithMemory: validate the memory pool id (NET_EBADFwith errno for an unknown or destroyed pool) and return success without printing, exactly as the existingsceNetShowRouteWithMemorydoes. Reference for the behaviour: shadPS4src/core/libraries/net/net.cpp.sceNetGetStatisticsInfo: the 24-byte statistics block (NetStatisticsInfo, sixint32) is filled with "plenty free, nothing queued"; a null pointer fails withNET_EFAULTand errno. Layout and values follow shadPS4net.cpp/net_types.h; not measured on a console.Everything else in the library that still throws was left untouched on purpose. I could not find a credible public source for its prototype and behaviour (shadPS4 only has
LOG_ERROR(STUBBED)bodies with no signatures for the Sync, Dump, EventCallback, Dhcp, Wlan, route/ARP/interface-table andsceNetCtl*IpcIntgroups), andsceNetGetsockoptEx,sceNetSetsockoptEx,sceNetSocketInternal,sceNetSysctl,sceNetInetNtopWithScopeId,sceNetInetPtonWithScopeIdandsceNetConfigGetDefaultRouteare already implemented by open PR #9578. The new silent stubs are listed indocs/dev/debt/libSceNet.md.Tested
guest_sce_net(ctest) passes with the new cases incore/libs/tests/GuestSceNet.cpp(invalid pool, live pool, destroyed pool for the three diagnostics; null pointer, field invariants and ignored flags for the statistics call).python3 tools/check_conventions.py --base upstream/main,test_public_headers.py --audit-onlyandgit diff --checkpass.Checklist