mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 00:22:57 -05:00
13 KiB
13 KiB
libSceNetCtl technical debt
Silent stubs
- sceNetCtlGetNatInfo (libSceNetCtl) -
sceNetCtlGetNatInfovalidates null pointers and returnsSCE_NET_CTL_ERROR_NOT_CONNECTED(0x80412108) without performing NAT discovery.
Unknown function info
- sceNetCtlGetInfoV6 (libSceNetCtl, NID
Jy1EO5GdlcM) - imported by PPSA08587.(int code, SceNetCtlInfoV6* info)with codes 1-5 (IP address, link-local address, default route, primary and secondary DNS) comes only from SharpProspero, whose source is unknown; shadPS4 and fpPS4 only stub it. A nullinfoanswersINVALID_ADDR, a code outside 1-5INVALID_CODE, and a host without an IPv6 addressNOT_CONNECTED, assceNetCtlGetStateV6reports it. The layout of each answer is unverified, so every code throws on a host with an IPv6 address - sceNetCtlGetInfo (libSceNetCtl) - answers from the host interface that holds an IPv4 address, preferring the one that carries the default route: its address, netmask, gateway, MTU and first two IPv4 DNS servers. The device is reported as wired, the link as connected, the IP configuration as DHCP and the HTTP proxy as off, whatever the host uses, and the Ethernet address is the one
sceNetGetMacAddressreports. A gateway or DNS server the interface does not have is reported as0.0.0.0; what a console reports then is unknown. The DHCP host name (12), the PPPoE user name (13), the HTTP proxy server (20) and the Wi-Fi BSSID and SSID (5, 6) are empty strings, as that configuration sets none of them; the remaining Wi-Fi codes (7-10) and the HTTP proxy port (21) report 0; this follows KytyPS5 and is not measured on hardware - sceNetCtlRegisterCallbackForNpToolkit (libSceNetCtl) - unknown signature
- sceNetCtlRegisterCallbackIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlRegisterCallbackForLibIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlUnregisterCallbackForNpToolkit (libSceNetCtl) - unknown signature
- sceNetCtlUnregisterCallbackIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlUnregisterCallbackForLibIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlCheckCallbackForNpToolkit (libSceNetCtl) - unknown signature
- sceNetCtlCheckCallbackForLibIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlClearEventIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlClearEventForNpToolkit (libSceNetCtl) - unknown signature
- sceNetCtlClearEventForLibIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetResultIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetStateIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetState2IpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetInfoIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetEtherLinkMode (libSceNetCtl) - unknown signature
- sceNetCtlGetWifiType (libSceNetCtl) - unknown signature
- sceNetCtlConnectIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlConnectWithRetryIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlConnectConfIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlDisconnectIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlScanIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetScanInfoBssidIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetScanInfoByBssidIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetScanInfoForSsidScanIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetScanInfoBssidForSsidListScanIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetScanInfoForSsidListScanIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlSetErrorNotificationEnabledIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlRegisterCallbackV6IpcInt (libSceNetCtl) - unknown signature
- sceNetCtlUnregisterCallbackV6IpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetResultV6 (libSceNetCtl, NID
H5yARg37U5g) -(int eventType, int* errorCode)comes only from SharpProspero, whose source is unknown; shadPS4 only stubs it. Callbacks registered withsceNetCtlRegisterCallbackV6receive no event, so event types 1-3 write 0 toerrorCode; what a console writes before the first event is unmeasured. A nullerrorCodeanswersINVALID_ADDR, assceNetCtlGetResultdoes, and other event types throw, as their error code on a console is unknown - sceNetCtlGetResultV6IpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetStateV6IpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetInfoV6IpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetNatInfoIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlSetStunWithPaddingFlagIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlUnsetStunWithPaddingFlagIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlIsBandwidthManagementEnabledIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlDisableBandwidthManagementIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlEnableBandwidthManagementIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetBandwidthInfoIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetNetEvConfigInfoIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetConnectionElapsedTimeIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlApRpCheckCallback (libSceNetCtl) - unknown signature
- sceNetCtlApRpClearEvent (libSceNetCtl) - unknown signature
- sceNetCtlApRpRegisterCallback (libSceNetCtl) - unknown signature
- sceNetCtlApRpUnregisterCallback (libSceNetCtl) - unknown signature
- sceNetCtlApRpGetResult (libSceNetCtl) - unknown signature
- sceNetCtlApRpGetState (libSceNetCtl) - unknown signature
- sceNetCtlApRpGetInfo (libSceNetCtl) - unknown signature
- sceNetCtlApRpStart (libSceNetCtl) - unknown signature
- sceNetCtlApCpStart (libSceNetCtl) - unknown signature
- sceNetCtlApAppStartWithRetryPid (libSceNetCtl) - unknown signature
- sceNetCtlApAppStartWithRetry (libSceNetCtl) - unknown signature
- sceNetCtlApRpStartWithRetry (libSceNetCtl) - unknown signature
- sceNetCtlApRpStartConf (libSceNetCtl) - unknown signature
- sceNetCtlApRpStop (libSceNetCtl) - unknown signature
- sceNetCtlApCpStop (libSceNetCtl) - unknown signature
- sceNetCtlApAppInitWpaKey (libSceNetCtl) - unknown signature
- sceNetCtlApAppInitWpaKeyForQa (libSceNetCtl) - unknown signature
- sceNetCtlApRestart (libSceNetCtl) - unknown signature
- sceNetBweCheckCallbackIpcInt (libSceNetCtl) - unknown signature
- sceNetBweClearEventIpcInt (libSceNetCtl) - unknown signature
- sceNetBweRegisterCallbackIpcInt (libSceNetCtl) - unknown signature
- sceNetBweUnregisterCallbackIpcInt (libSceNetCtl) - unknown signature
- sceNetBweGetInfoIpcInt (libSceNetCtl) - unknown signature
- sceNetBweStartInternetConnectionTestIpcInt (libSceNetCtl) - unknown signature
- sceNetBweFinishInternetConnectionTestIpcInt (libSceNetCtl) - unknown signature
- sceNetBweStartInternetConnectionTestBandwidthTestIpcInt (libSceNetCtl) - unknown signature
- sceNetBweSetInternetConnectionTestResultIpcInt (libSceNetCtl) - unknown signature
- sceNetCtlGetWifiInfoIpcInt (libSceNetCtl) - unknown signature
Functional
- sceNetCtlCheckCallback (libSceNetCtl) - the state comes from the host interfaces, as in
sceNetCtlGetState:IPOBTAINED(3) while the host has a non-loopback IPv4 or IPv6 address,DISCONNECTED(1) otherwise; the event values follow shadPS4, and no other event is delivered. Each callback registered withsceNetCtlRegisterCallbackis called on the checking thread with its registration argument when the state differs from the last one it received, so a new registration receives the current state at the next check. This edge-triggered model follows KytyPS5; shadPS4 delivers the state on every check instead, and neither is measured on hardware. KytyPS5 calls the callbacks under its lock; here they are called after the lock is released, from a copy of their slots, so asceNetCtlUnregisterCallbackorsceNetCtlTermon another thread that returns while a check is in flight does not stop that check from calling the callback once more with its old argument. Callbacks registered withsceNetCtlRegisterCallbackV6keep their argument but receive no event, because no source says which call delivers them - sceNetCtlGetInfo (libSceNetCtl) finds the host's default route in
/proc/net/routeon Linux and, on macOS, in the routing table read withsysctl(NET_RT_FLAGS, RTF_GATEWAY), where an interface-scoped default route ranks after the unscoped one - sceNetCtlGetIfStat (libSceNetCtl) throws on macOS: an unprivileged process reads the interface byte counters (
getifaddrsandsysctl(NET_RT_IFLIST2)alike) reduced to their low 32 bits, so a total would wrap every 4 GiB