Files
AnyPS5/docs/dev/debt/libSceNpSessionSignaling.md
T

24 lines
6.1 KiB
Markdown

# libSceNpSessionSignaling technical debt
### Unknown function info
- [sceNpSessionSignalingInitialize, sceNpSessionSignalingCreateContext and sceNpSessionSignalingCreateContext2](../../../core/libs/prx/libSceNpSessionSignaling/Export.cpp) - the initialization layout is 40 bytes; both context layouts are 56 bytes with callback and user-data pairs. The second context variant adds a group identifier to its connection callback. Pool allocation, callback delivery and underlying NP account validation are not implemented; priority and affinity settings do not affect host scheduling.
- [sceNpSessionSignalingGetConnectionStatus, sceNpSessionSignalingActivateSession and sceNpSessionSignalingActivateUser](../../../core/libs/prx/libSceNpSessionSignaling/Export.cpp) - initialization, context lookup and output validation follow the system library. Connections never activate in the offline runtime; activation returns unavailable and a connection query on a valid context returns connection-not-found without writing outputs. SDK-dependent peer-address validation and local-network discovery remain incomplete.
- [sceNpSessionSignalingCreateJoinActivate, sceNpSessionSignalingJoinActivate, sceNpSessionSignalingManualUdpAbortConnection, sceNpSessionSignalingManualUdpCreateJoin, sceNpSessionSignalingManualUdpEstablishConnection and sceNpSessionSignalingManualUdpJoin](../../../core/libs/prx/libSceNpSessionSignaling/Export.cpp) (libSceNpSessionSignaling) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpSessionSignaling.c) and the [13.60 inventory](https://github.com/xdCloudy/PS5-13.60-Function-Stub-Library/blob/bfec40deb4c47a17d7603ee2bc79aa6862c0c56b/data/firmware-13.60/libscenpsessionsignaling-58c8806476.jsonl), but no credible prototypes were found. The parameterless declarations are import-resolution placeholders, not an ABI claim, and they still throw through `NotImplemented_nid_no_patch`.
- [sceNpSessionSignalingInitializeWithPort, sceNpSessionSignalingSetCustomProperty and sceNpSessionSignalingRegisterInternalCallback](../../../core/libs/prx/libSceNpSessionSignaling/Export.cpp) - Initialize (`0xab80`) and InitializeWithPort (`0xab40`) reach manager vtable slot 0x10 (`0x1c7c0`): it rejects a null parameter, a second initialization and a failed pool, uses the low 16 bits of the port and accepts any reserved value; the host opens no socket and ignores both. SetCustomProperty (`0xb3c0`) checks init, null property and context, then calls slot 0x78 (`0x114c0` -> `0x14420`), which applies `strnlen` to the property pointer and exchanges a dword; the four-byte load/store is unverified, so the host refuses a valid request with `NotImplemented_nid_no_patch`. GetCustomProperty (`0xb470`) calls slot 0x80 (`0x11500` -> `0x14630`) and returns the fresh-context zero. RegisterInternalCallback stores both pointers without invoking them; the callback signature is unknown.
### Functional
- [sceNpSessionSignalingGetGroupInfo, sceNpSessionSignalingGetGroupFromSessionId, sceNpSessionSignalingGetGroupFromPeerAddress, sceNpSessionSignalingGetConnectionFromNetAddress, sceNpSessionSignalingGetConnectionFromNetAddress2, sceNpSessionSignalingGetConnectionFromPeerAddress, sceNpSessionSignalingGetConnectionFromPeerAddress2](../../../core/libs/prx/libSceNpSessionSignaling/Export.cpp) (libSceNpSessionSignaling) - no session ever activates here, so every lookup on a valid context ends at not-found (group 0x8055330A, connection 0x8055330C). The signatures and the checks before it are the PS5 13.60 module's, read from disassembly: 0x80553301 before initialization, 0x80553303 for a null pointer, then 0x80553308 for an unknown context
- [sceNpSessionSignalingGetGroupFromSessionId, sceNpSessionSignalingGetConnectionFromPeerAddress, sceNpSessionSignalingGetConnectionFromPeerAddress2](../../../core/libs/prx/libSceNpSessionSignaling/Export.cpp) (libSceNpSessionSignaling) - three titles disassembled for this entry import them, five call sites in all: PPSA02530 (GroupFromSessionId 0x87c9118, PeerAddress2 0x87c912f), PPSA02225 (PeerAddress2 0x9e5595 and 0x9e5787) and PPSA01285 (PeerAddress 0xeecf55). PPSA02530 and PPSA01285 test the result only for negative, PPSA02225 at 0x9e5787 only for nonzero, and none of these sites compares it with a specific code; on a negative result PPSA02530 jumps to 0x87c914d, and on a nonzero result PPSA02225 jumps to 0x9e53d0 at 0x9e5787. What PPSA01285 does after a negative result (a wait path from 0xeecf9b) was not read.
- [sceNpSessionSignalingGetMemoryInfo and sceNpSessionSignalingGetConnectionStatistics](../../../core/libs/prx/libSceNpSessionSignaling/Export.cpp) (libSceNpSessionSignaling) - the wrapper checks initialization (0x80553301) and a null output (0x80553303) before delegating. The host stores the pool size from initialization and reports zero used and peak sizes because it allocates no signaling pool, and reports all connection statistics as zero because no connection ever activates. The console's actual usage and statistics values were not measured.
- [sceNpSessionSignalingGetCustomProperty and sceNpSessionSignalingSetCustomProperty](../../../core/libs/prx/libSceNpSessionSignaling/Export.cpp) (libSceNpSessionSignaling) - Get allows a null output and returns the zero of a fresh context. Set rejects a null property pointer and an unknown context through the wrapper's errors, then refuses a valid request through `NotImplemented_nid_no_patch`: the internal slot 0x78 path applies `strnlen` to the property pointer and exchanges a dword, so the four-byte load, storage and replacement are not established. Reusing a destroyed context slot keeps the property and both callback pointers clear, so a new context starts from the same state as a fresh slot.
- [sceNpSessionSignalingRegisterInternalCallback](../../../core/libs/prx/libSceNpSessionSignaling/Export.cpp) (libSceNpSessionSignaling) - stores the callback and user-data pointers in the context and never invokes them. Null pointers are accepted, as the wrapper does not check them, and the call returns 0 after forwarding to the internal object regardless of its result. The callback signature is unknown.