Skip to content

feat(libSceNetCtl): answer the IpcInt calls as their public twins, plus NpUtility's bandwidth test and Http's registered ids - #10900

Merged
oneandonlydean merged 4 commits into
boykopovar:mainfrom
EagleBearerYS:feat/netctl-ipcint-twins-v2
Oct 26, 2026
Merged

oneandonlydean merged 4 commits into
boykopovar:mainfrom
EagleBearerYS:feat/netctl-ipcint-twins-v2

Conversation

@EagleBearerYS

@EagleBearerYS EagleBearerYS commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What

Answers 13 calls that threw, one commit per library:

  • libSceNetCtl (10): the IpcInt getters and callback forms (sceNetCtl{GetState,GetStateV6,GetResult,GetResultV6,GetInfo,GetInfoV6}IpcInt, sceNetCtl{Register,Unregister}Callback{,V6}IpcInt) forward to their public twins, whose recovered argument registers they share. This is recorded as unmeasured in the debt file.
  • libSceNpUtility (2): sceNpBandwidthTestInitStart returns SIGNED_OUT as InitStartDownload/Upload do; sceNpBandwidthTestShutdownWithDetailedInfo returns INVALID_ARGUMENT and writes nothing, as Shutdown does.
  • libSceHttp (1): sceHttpGetRegisteredCtxIds reports the libnet pool id and SSL context id given to sceHttpInit, in the order of the recovered prototype, with GetMemoryPoolStats' BEFORE_INIT/INVALID_ID checks; a null output throws.

Kept as throws: sceAppInstUtilAppIsInInstalling (disputed prototype, as #8346 found), sceAppInstUtilAppIsInUpdating (no patch model; libSceGameUpdate declines a fabricated no-update result) and the ForLib callback calls sceNetCtl{Register,Unregister,Check}CallbackForLibIpcInt. No source establishes whether the console keeps their table apart from the NpToolkit one or shares it, so 404d3812c0 puts them back to throwing after review.

Related: #9834 rewrites the same lines of sceHttpInit and sceHttpTerm (its transport context also keeps memid and ssl_ctx_id). Merge order: this PR before #9834, which is a much larger draft (merge order only; asked on #10901); #8346 takes AppInstUtil's other rows; #10640 and #10699 edit NpUtility's Export.cpp; #9578, #10790, #10502, #9728 and #7201 edit NetCtl's.

Tested

  • GitHub's runners, 748f2b3: run 40175524077: guest_net_ctl, guest_np_utility_offline, guest_http_options and guest_http pass 10 of 10 on Linux and on Windows, 0 skipped.
  • GitHub's runners, 404d381 (run): the same four tests pass 10 of 10. Linux: 4 run, 4 pass, 0 skip, 0 fail. Windows: 4 run, 4 pass, 0 skip, 0 fail. Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners. This commit removes the ForLib case, so guest_net_ctl keeps 2 of the 3 new cases below.
  • Linux (Ubuntu 24.04, gcc 13.3), CI configure flags, as an unprivileged user:
    • red/green per commit: guest_net_ctl 3 of 3 new cases red on main's code and green; guest_np_utility_offline 2 of 2; guest_http_options 1 of 1;
    • every commit: build, the related tests (public_headers and its compile batches included) pass, check_conventions passes;
    • full ctest: 2,214 tests, 2,119 pass, 90 skipped (GPU and display tests without a device there), 5 fail: the IPv6 socket tests on a host booted with ipv6.disable=1, which fail the same way on main.

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

… add the ForLib callback table

The ten IpcInt getters and callback forms forward to sceNetCtlGetState,
GetStateV6, GetResult, GetResultV6, GetInfo, GetInfoV6 and the IPv4 and
IPv6 callback registration, whose recovered argument registers they
share. The three ForLib calls keep a fourth table of eight callbacks with
the register, unregister and dispatch the NpToolkit forms use. Both are
recorded as unmeasured in the debt file.
…nWithDetailedInfo offline

InitStart returns SIGNED_OUT, as sceNpBandwidthTestInitStartDownload and
InitStartUpload do, so no test is ever started, and
ShutdownWithDetailedInfo returns INVALID_ARGUMENT and writes nothing, as
sceNpBandwidthTestShutdown does. Neither reads an argument.
sceHttpGetRegisteredCtxIds writes the libnet memory pool id and the SSL
context id the context was created with, in the order of its recovered
prototype. With no live context it returns BEFORE_INIT and for an
unknown or terminated id INVALID_ID, as sceHttpGetMemoryPoolStats does;
a null output throws.
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Progress report (57f506f → 404d381)

📈 System libraries: 49.48% (+0.1%, +13 implemented functions)

✅ 13 implemented
Library Name
libSceHttp sceHttpGetRegisteredCtxIds
libSceNetCtl sceNetCtlGetInfoIpcInt
libSceNetCtl sceNetCtlGetInfoV6IpcInt
libSceNetCtl sceNetCtlGetResultIpcInt
libSceNetCtl sceNetCtlGetResultV6IpcInt
libSceNetCtl sceNetCtlGetStateIpcInt
libSceNetCtl sceNetCtlGetStateV6IpcInt
libSceNetCtl sceNetCtlRegisterCallbackIpcInt
libSceNetCtl sceNetCtlRegisterCallbackV6IpcInt
libSceNetCtl sceNetCtlUnregisterCallbackIpcInt
libSceNetCtl sceNetCtlUnregisterCallbackV6IpcInt
libSceNpUtility sceNpBandwidthTestInitStart
libSceNpUtility sceNpBandwidthTestShutdownWithDetailedInfo
⚪ 2 behaviourally empty (constant return or throw)
Library Name
libSceNpUtility sceNpBandwidthTestInitStart
libSceNpUtility sceNpBandwidthTestShutdownWithDetailedInfo

Changed libraries (implemented exports)

Library Before After Change
libSceHttp 85/115 (73.91%) 86/115 (74.78%) +0.87 pp
libSceNetCtl 29/85 (34.12%) 39/85 (45.88%) +11.76 pp
libSceNpUtility 19/96 (19.79%) 21/96 (21.88%) +2.08 pp

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 9834 core/libs/prx/libSceHttp/Export.cpp L283-285, L406
PR 11134 core/libs/prx/libSceHttp/Export.cpp L283-285, L406

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.

Pull request Shared files not compared
PR 6039 docs/dev/debt/libSceNetCtl.md
PR 7201 core/libs/prx/libSceNetCtl/Export.cpp
PR 10699 core/libs/prx/libSceNpUtility/Export.cpp
docs/dev/debt/libSceNpUtility.md

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the 16 implementations and their tests. One behavior remains explicitly unsupported by evidence: sceNetCtlRegisterCallbackForLibIpcInt, sceNetCtlUnregisterCallbackForLibIpcInt, and sceNetCtlCheckCallbackForLibIpcInt are implemented as a new independent eight-slot callback table, while the PR debt entry says no source establishes whether this table exists separately or shares the NpToolkit table. The tests only confirm the new model chosen by this patch. AGENTS.md requires unknown behavior to remain throwing and be recorded as debt. Please keep these three exports unimplemented until a console observation or source establishes the table semantics; the other changes can then be reviewed independently.

No source establishes whether the console keeps the callback table of
sceNetCtlRegisterCallbackForLibIpcInt, UnregisterCallbackForLibIpcInt and
CheckCallbackForLibIpcInt apart from the NpToolkit one or shares it. The
three throw again, as on main, and their table, test and debt entry go.
@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@MarcZX10 agreed, thanks. 404d3812c0 puts sceNetCtlRegisterCallbackForLibIpcInt, sceNetCtlUnregisterCallbackForLibIpcInt and sceNetCtlCheckCallbackForLibIpcInt back to throwing, as on main, and removes their table, test and debt entry. The other 13 calls are unchanged. guest_net_ctl, guest_np_utility_offline, guest_http_options and guest_http pass 10 of 10 on Linux and Windows, 0 skipped (run). Could you take another look when you have a moment?

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed updated head 404d381. The three ForLib callback exports, their independent table, tests, and debt entry have been removed, so the unsupported callback-table behavior from my earlier review is no longer present. I inspected the remaining forwarding wrappers, the NpUtility signed-out/error answers, and the HTTP registered-context tracking and lifecycle tests. The contributor fork verification run 40178721657 completed successfully on Linux and Windows: guest_net_ctl, guest_np_utility_offline, guest_http_options, and guest_http passed with zero skips on both platforms. Locally, git diff --check and tools/check_conventions.py pass. I did not run a local C++ build. The checklist records the #9834 merge order for the overlapping HTTP init/term hunks; the remaining overlap notices are adjacent or in separate functions. AI-assisted: yes.

@oneandonlydean oneandonlydean self-assigned this Oct 26, 2026
@oneandonlydean
oneandonlydean merged commit ae5c514 into boykopovar:main Oct 26, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants