Repository navigation
feat(libSceNetCtl): answer the IpcInt calls as their public twins, plus NpUtility's bandwidth test and Http's registered ids - #10900
Conversation
… 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.
Progress report (57f506f → 404d381)📈 System libraries: 49.48% (+0.1%, +13 implemented functions) ✅ 13 implemented
⚪ 2 behaviourally empty (constant return or throw)
Changed libraries (implemented exports)
|
|
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
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.
|
@MarcZX10 agreed, thanks. 404d3812c0 puts |
MarcZX10
left a comment
There was a problem hiding this comment.
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.
What
Answers 13 calls that threw, one commit per library:
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.sceNpBandwidthTestInitStartreturns SIGNED_OUT as InitStartDownload/Upload do;sceNpBandwidthTestShutdownWithDetailedInforeturns INVALID_ARGUMENT and writes nothing, as Shutdown does.sceHttpGetRegisteredCtxIdsreports the libnet pool id and SSL context id given tosceHttpInit, 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 callssceNetCtl{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
guest_net_ctl,guest_np_utility_offline,guest_http_optionsandguest_httppass 10 of 10 on Linux and on Windows, 0 skipped.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners. This commit removes the ForLib case, soguest_net_ctlkeeps 2 of the 3 new cases below.guest_net_ctl3 of 3 new cases red on main's code and green;guest_np_utility_offline2 of 2;guest_http_options1 of 1;public_headersand its compile batches included) pass,check_conventionspasses;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)