39 Commits
Author SHA1 Message Date
hugodearaujo 25b7991c6a fix(netctl): start the library initialized, as titles find it
Titles register and check NetCtl callbacks without importing
sceNetCtlInit: libSceNetCtl is an internal sysmodule the system has
started before the title runs. 007 First Light traps at start-up when
sceNetCtlRegisterCallback answers NOT_INITIALIZED.
2026-10-21 18:56:52 -03:00
boykopovar 5888cf3cb2 fix(net): align merged ipv6 and rudp argument types 2026-10-21 21:56:07 +03:00
boykopovar ea086b2374 fix(netctl): restore initialization and callback validation 2026-10-21 21:51:41 +03:00
boykopovar ce8ee3f598 fix(netctl): restore scan and network query signatures 2026-10-21 21:50:44 +03:00
boykopovar 4cb4905c29 fix(netctl): recover connection test result signature 2026-10-21 21:47:53 +03:00
boykopovar 7525726c14 fix(netctl): recover access point retry signatures 2026-10-21 21:47:40 +03:00
boykopovar e5a43c86bc fix(netctl): recover state and result query signatures 2026-10-21 21:45:06 +03:00
boykopovar 419a34cadb fix(netctl): recover callback and event stub signatures 2026-10-21 21:45:05 +03:00
Dean 1bcaa14234 Merge pull request #8307 from hypermoist/fix/libs-console-results-part2
fix(libs): return what the firmware returns from 31 more calls it does not implement
2026-10-21 20:57:00 +13:00
Dean 16c7e76761 Merge pull request #8321 from MarrasFederico/feat/netctl-get-result-v6
feat(libSceNetCtl): report no error for IPv6 events in sceNetCtlGetResultV6
2026-10-21 17:54:21 +13:00
Dean 7e6830ec55 Merge pull request #8268 from Athen2045/feat/net-dns-info
feat(libSceNet): implement sceNetGetDnsInfo
2026-10-21 11:50:31 +13:00
Dean 407d0d8df3 Merge pull request #8100 from LuisAguilarDev/feat/netctl-get-info-v6
feat(netctl): add sceNetCtlGetInfoV6 argument and connection checks
2026-10-21 06:18:12 +13:00
Federico Marras 8a7d16b001 feat(libSceNetCtl): report no error for IPv6 events in sceNetCtlGetResultV6 2026-10-20 12:03:19 +02:00
hypermistandClaude Opus 5.5 db25758397 fix(libs): return what the firmware returns from 29 more calls it does not implement
The NetCtl ApRp calls, the SaveData debug calls, HttpDbgEnableProfile,
HttpDbgSetPrintf, PadEnableExtensionPort and VideoRecording Init, Term
and SendCommand return 0; ImeForTestFunction returns 0x80BC00FF; the Hmd
distortion work memory align and size are 0x400 and 0x20000 and
DistortionGetCompoundEyeCorrectionCommand returns 0x81110009;
AjmInstanceCodecType returns the instance id shifted right by 14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-20 22:38:57 +13:00
Allan JohnandClaude Opus 5.5 8ab6ecb17a feat(libSceNet): implement sceNetGetDnsInfo
Report the host IPv4 DNS servers of the interface sceNetCtlGetInfo
uses, through a helper libSceNetCtl exports, and return their count.
The signature and layout follow the OpenOrbis musl resolver and Net.h.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 13:19:12 +05:30
Dean 19cefe1287 Merge pull request #8018 from ymatrix1/feat/netctl-missing-exports
feat(libSceNetCtl): export missing firmware network control interfaces
2026-10-20 17:50:07 +13:00
Luis Gerardo Aguilar 1b33f14c8c feat(netctl): add sceNetCtlGetInfoV6 argument and connection checks
Titles import sceNetCtlGetInfoV6, and a missing import stops them at
load. The checks that need no answer layout are implemented; every code
throws when the host has IPv6, since the layout of the answer is not
verified.
2026-10-19 20:17:26 -05:00
Yuri Olive 196e2e2ada feat(libSceNetCtl): export missing firmware interfaces 2026-10-19 14:55:22 -03:00
Lindamea1andClaude Opus 5.5 d8baccc195 feat(libSceNetCtl): declare sceNetCtlGetInfoV6
libSceNetCtl exports sceNetCtlGetStateV6, sceNetCtlRegisterCallbackV6
and sceNetCtlUnregisterCallbackV6 but not sceNetCtlGetInfoV6 (NID
Jy1EO5GdlcM). Dragon Ball Xenoverse 2 (PPSA08587) imports it, and an
import that no system library exports stops a title before its entry
point: on Linux ld.so refuses the relinked executable with "undefined
symbol: Jy1EO5GdlcM", and on Windows the entry stub prints "FAIL:
unresolved ELF import Jy1EO5GdlcM from libSceNetCtl.prx" and raises
0xC0000139. The title's tester reports that it does not call the
function before its loading screen.

It is a Sony network-control call with no FreeBSD counterpart, and
neither its parameters nor the IPv6 info layout are known, so it is
declared without parameters and throws through
NotImplemented_nid_no_patch, as CONTRIBUTING.md asks of exports that
cannot be implemented. The gap is recorded in
docs/dev/debt/libSceNetCtl.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:07:45 +01:00
Adrià b7a75819f3 Merge pull request #6720 from AdvaitPalve11/feat-netctl-info-codes
feat(netctl): implement remaining info codes in sceNetCtlGetInfo
2026-10-19 12:10:02 +02:00
Advait Palve d4fdc030e1 feat(netctl): implement Wi-Fi info codes in sceNetCtlGetInfo 2026-10-19 10:02:07 +02:00
David 306229d940 Merge remote-tracking branch 'origin/main' into fix/netctl-default-route-macos
# Conflicts:
#	core/libs/tests/GuestNetCtl.cpp
#	docs/dev/debt/libSceNetCtl.md
2026-10-19 00:18:16 +04:00
fdfawef324andClaude Opus 5.5 2ae7896b6d fix(libSceNetCtl): keep the callback argument and deliver the state from sceNetCtlCheckCallback
sceNetCtlRegisterCallback and sceNetCtlRegisterCallbackV6 stored only
the function and dropped its argument, and sceNetCtlCheckCallback
returned 0 without calling anything, so a title that polls
sceNetCtlCheckCallback until its callback reports IPOBTAINED never
got the event.

Each callback slot now keeps the function, its argument and the last
event it received; unregistration clears the slot. With no IPv4
callback registered, sceNetCtlCheckCallback returns 0 without querying
the host. Otherwise it takes the state from the same host-interface
predicate as sceNetCtlGetState, IPOBTAINED (3) or DISCONNECTED (1)
(shadPS4 src/core/libraries/network/net_ctl_codes.h L27-29
@15abf68c9b52), marks the IPv4 slots whose last event differs and
calls them on the calling thread with their argument after the lock is
released, so a callback can unregister itself. Delivery once per state
change and slot follows KytyPS5 src/libs/network.cpp @9e41d8320a27
(NetCtlCallbackSlot L3447-3451, NetCtlCheckCallback L3648-3661,
NetCtlRegisterCallback L3687-3707); shadPS4 net_ctl_obj.cpp L47-57
delivers on every check instead, and the debt entry records the
difference and that KytyPS5 calls the callbacks under its lock.
sceNetCtlTerm clears both tables, as KytyPS5 NetCtlTerm (L3625-3633)
does. V6 slots keep their argument but get no event, since no source
says which call delivers them.

NetCtlCallback is now an APS5_VABI pointer, so the Windows build calls
the guest function with the System V ABI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 18:31:00 +02:00
David f3bf216868 Merge remote-tracking branch 'origin/main' into fix/netctl-default-route-macos
# Conflicts:
#	docs/dev/debt/libSceNetCtl.md
2026-10-18 09:37:31 +04:00
Nithishvelan M aaba312e6d feat(libSceNetCtl): support NET_CTL_INFO_HTTP_PROXY_PORT and validate null in sceNetCtlGetNatInfo 2026-10-18 00:06:43 +05:30
David 26bc5ce87c Merge remote-tracking branch 'origin/main' into fix/netctl-default-route-macos
# Conflicts:
#	docs/dev/debt/libSceNetCtl.md
2026-10-17 19:31:46 +04:00
David 8af08029b8 fix(libSceNetCtl): read the default route from the routing table on macOS
sceNetCtlGetInfo found the host's default route in /proc/net/route, which
macOS does not have, so every IPv4 query threw "the host routing table is
unavailable" there. On macOS it now reads the IPv4 routes that have a
gateway with sysctl(NET_RT_FLAGS, RTF_GATEWAY) and keeps those to
0.0.0.0 that are up, neither rejecting nor host routes, on an interface
that still exists. An interface-scoped default route ranks after the
unscoped one, the route macOS sends traffic by. The parsing is exported
as NetCtlDefaultRoutes_nid_no_patch so it can be tested on a routing
table built by hand.
2026-10-16 08:42:35 +04:00
Celegans12 625525de79 fix(libSceNetCtl): answer the DHCP host name, PPPoE name and proxy server as empty strings
Since #5056, sceNetCtlGetInfo throws for every info code it does not
model. Ghost of Yotei (PPSA26344) asks for code 12, the DHCP host name,
during boot and now aborts one second in.

The configuration #5056 reports (wired, DHCP, HTTP proxy off) sets no
DHCP host name, no PPPoE user name and no proxy server, so codes 12, 13
and 20 now return 0 with an empty string. The Wi-Fi codes (5-10) and
the proxy port (21) still throw. GuestNetCtl checks the three empty
answers and keeps the throw check for the rest; the libSceNetCtl debt
line says the same.
2026-10-15 06:00:49 +02:00
Adrià 9f373a46a9 Merge pull request #5056 from 0xRickx/fix/libscenetctl-get-info
fix(libSceNetCtl): answer sceNetCtlGetInfo from the host IPv4 interface
2026-10-14 20:32:46 +02:00
mrfelek 742b7baba3 feat(libSceNetCtl): implement sceNetCtlRegisterCallbackV6 and sceNetCtlUnregisterCallbackV6 2026-10-13 21:27:00 +02:00
RickandClaude Opus 5.5 3065b892f2 fix(libSceNetCtl): answer sceNetCtlGetInfo from the host IPv4 interface
sceNetCtlGetState reports IPOBTAINED from the host's addresses, but
sceNetCtlGetInfo returned NOT_CONNECTED for every code. It now answers
from the host interface that holds an IPv4 address, preferring the one
with the default route: its address, netmask, gateway, MTU and DNS
servers. The link is presented as wired, connected, configured by DHCP
and without a proxy, with the Ethernet address sceNetGetMacAddress
reports. A null info returns INVALID_ADDR and a code outside 1..21
INVALID_CODE; the Wi-Fi, DHCP host name, PPPoE and proxy server codes
throw.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 16:44:06 +02:00
bubbleggandClaude Opus 5.5 a2e97d25a6 fix(libSceNetCtl): read 64-bit interface byte counters on Linux
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:13:54 +02:00
bubbleggandClaude Opus 5.5 ec07f5a5ec fix(libSceNetCtl): keep the Linux interface counters to Linux
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:13:54 +02:00
bubbleggandClaude Opus 5.5 46338a981c feat(libSceNetCtl): add sceNetCtlGetIfStat
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:13:54 +02:00
Praetorian0420 e3eeac4a81 Implement network control and socket functionality improvements
- Enhanced the network control library to check for host addresses and update connection states accordingly.
- Added support for socket operations including connect, listen, accept, send, and recv in the UDP and TCP socket implementations.
- Introduced error handling for various socket operations, ensuring proper feedback for unsupported actions.
- Created comprehensive tests for both TCP and UDP socket functionalities, validating the expected behavior of the network stack.
- Refactored existing code to improve clarity and maintainability, including the removal of unused functions and the addition of necessary error checks.
2026-09-30 23:29:01 -05:00
devilismyfriendandClaude Fable 5.1 9c2a75601d feat(libs): agc packet builders, savedata memory, offline service stubs
- libSceAgc: SetIndexCount, SetBaseIndirectArgs, DispatchIndirect, wait
  and write-data patch functions, relaxed checks for what titles send,
  NOP fillers for LOD stats and wait-until-safe, NotImplemented stubs.
- libSceSaveData.native: short mount points, backup events, save-data
  memory slots.
- user/system service, store dialog, video-out flip modes and queue-full
  error, pad read, fibers, offline behaviour for network/NP modules, and
  new export-only modules Ampr, JpegEnc, Json2, MsgDialog.native,
  NpCppWebApi, NpUtility.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177gthrWEBBfBu5xJDXgBfo
2026-09-25 16:27:49 -07:00
boykopovar abc72da741 feat(libs): define vabi macros + add to declarations 2026-09-10 08:07:03 +03:00
boykopovar 6123893998 feat(libs): throw not impl ex in every stub 2026-09-06 15:05:04 +03:00
boykopovar 59bee8d187 feat(libs): add libs function signatures 2026-08-20 23:18:16 +03:00