Commit Graph

46 Commits

Author SHA1 Message Date
Adrià 0cff844842
Merge pull request #3707 from overlordxrz-source/feat/net-in6addr-linklocal-allnodes
feat(libSceNet): export sce_net_in6addr_linklocal_allnodes
2026-10-11 23:53:51 +02:00
overlordxrz-source 4891d625af feat(libSceNet): export sce_net_in6addr_linklocal_allnodes
Co-authored-by: eliasbruno124-dev <230422461+eliasbruno124-dev@users.noreply.github.com>
2026-10-11 11:41:05 -04:00
ArjenS-LA 859736aa0e fix(net): preserve truncated UDP receives on Windows 2026-10-11 09:48:50 -03:00
xXPBSXx c4d29f6a99 fix(exports): export the calls PPSA01530, PPSA23827 and PPSA13356 import
Forwards _sceUltWaitingQueueResourcePoolCreate and _sceUltSemaphoreCreate to the existing calls, like the other underscore Ult exports. Declares sceNetShowIfconfig, sceNpWebApi2GetMemoryPoolStats, Json::Value::setNullAccessCallBack, kqueue, kevent and one pad call of unknown name without an implementation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 11:07:03 +02:00
hugodearaujo 7e5a34c58c fix(net): return the console's errors from the memory pool stats calls
Measured on a PS5 (firmware 13.60):
- sceSslGetMemoryPoolStats returns 0x8095F007 for a null output, before
  the id check, and 0x8095F006 for an unknown or terminated context,
  zeroing the 32-byte output.
- sceHttp2GetMemoryPoolStats returns 0x817B1225 for a null output,
  before the id check, and 0x817B1100 for an unknown or terminated
  context, zeroing the 32-byte output.
- sceNetGetMemoryPoolStats checks the pool before the output, so an
  unknown pool with a null output returns EBADF.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:49:13 +02:00
Jan Šlégl 875ff3f8d9 feat(libSceNet): declare sceNetShowNetstat
PPSA11386 imports it; on main it is one of the title's three missing
imports, with sceSslGetCaList and sceSslFreeCaList, and the title does not
call it during its start-up. The signature is unknown, so it is declared
without parameters and throws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 18:01:23 +02:00
Dean 9c724baad3
Merge pull request #1786 from Zurisen/fix/windows-socket-shutdown-epipe
fix(net): report EPIPE for a send after shutdown on Windows
2026-10-10 17:41:18 +13:00
Adrià Franch bb54bffeaa fix(net): lock the memory pool stats with the host mutex type 2026-10-10 02:06:08 +02:00
Roojool a0f42946e5 fix(net): use native Windows condition waits for empty epoll 2026-10-10 02:05:23 +02:00
Zurisen 2356aba27b fix(net): report EPIPE for a send after shutdown on Windows
Winsock fails send, sendto and sendmsg on a socket shut down for writing
with WSAESHUTDOWN, which neither Windows error map handled, so libkernel
and libSceNet reported EIO. FreeBSD reports EPIPE there, and the Linux
maps already translate the host's EPIPE to 32. Map WSAESHUTDOWN to 32
in both.
2026-10-10 02:02:29 +02:00
Obi Newman 881fb01069
feat(libs): report Http2, Ssl and Net memory pool statistics (#1119)
sceHttp2GetMemoryPoolStats, sceSslGetMemoryPoolStats and
sceNetGetMemoryPoolStats threw. PPSA16064 (Minecraft Dungeons II,
Unreal Engine) queries all three while its HTTP module starts, and
aborted there.

Each library now records the pool size given at sceHttp2Init,
sceSslInit or sceNetPoolCreate and reports it with a peak and current
use of 0: the offline Http2 and Ssl models and the host-socket Net
library allocate nothing from these pools. The layouts follow the PS4
SDK's *MemoryPoolStats structures. Net returns EBADF for an unknown
pool and EINVAL for a null output, like its other pool calls; Http2 and
Ssl throw for both, as their error codes are unknown. Terminating a
context or destroying a pool forgets its size.

sceHttp2SetResolveRetry, which the title calls next, accepts and
ignores its value like the other Http2 settings. The four Http2
WebSocket exports the title imports are added as unimplemented.

guest_http2, guest_ssl and guest_sce_net check the reported sizes;
guest_sce_net also checks the null-output and unknown-pool errors.
2026-10-09 21:03:06 +13:00
LeandroLP23 f054374661 test(libSceNet): pin the resolver info layout and check the buffer on errors
The layout offsets the titles read are static_asserts, and guest_sce_net now
checks a canary past byte 384, distinct records, and an untouched buffer on the
EINVAL, RESOLVER_ENODNS and EBADF paths, as #1845's test did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:58:18 +02:00
LeandroLP23 427fd92591 feat(libSceNet): implement sceNetResolverStartNtoaMultipleRecordsEx
PS5VR (PPSA99177) stops at start-up on the unresolved import sT4nBQKUPqM;
Jelly5, Emby5 and Nuvio import it too. The call fills the 384-byte resolver
info with up to ten IPv4 records (32 bytes each, family at +16) and the record
counts at +320 and +324, from the same host lookup sceNetResolverStartNtoa
uses, now shared. Only flags 0 is implemented; other flags throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:52:02 +02:00
Adrià f2f7abab71
Merge pull request #1448 from ewraj/fix/net-connect-einprogress
fix(libSceNet): report EINPROGRESS for a non-blocking connect and translate the missing socket errors
2026-10-08 16:02:31 +02:00
Dean f100d1d67a
Merge pull request #1373 from gjonn/feat/kernel-select-net-sockets
feat(libkernel): implement select over libSceNet sockets
2026-10-08 22:36:09 +13:00
Raj d3900b240f fix(libSceNet): translate EHOSTUNREACH and the socket errors libkernel translates
The host's EHOSTUNREACH was reported as ENETUNREACH (51); FreeBSD's
EHOSTUNREACH is 65, which libkernel's sockets already report. EADDRNOTAVAIL,
ENOBUFS, EISCONN, ENOTCONN and EACCES had no translation and became EIO;
they now map to 49, 55, 56, 57 and 13, as in libkernel/Socket/src/Udp.cpp.

guest_sce_net connects the connected client again and expects EISCONN
(0x80410138); before this change it received EIO.
2026-10-08 12:23:36 +05:30
Raj 513479380c fix(libSceNet): report EINPROGRESS for a non-blocking connect
A non-blocking sceNetConnect that cannot complete at once must fail with
EINPROGRESS (36, 0x80410124), as FreeBSD's connect does, and a repeated call
while it is pending with EALREADY (37). On Windows, Winsock reports the
first case as WSAEWOULDBLOCK, which was translated to EAGAIN (0x80410123); on
Linux, EINPROGRESS and EALREADY had no translation and became EIO
(0x80410105). Code that waits for the connection only when connect reports
EINPROGRESS treated both as a failed connection.

guest_sce_net connects a non-blocking socket to the loopback listener and
accepts 0 or EINPROGRESS; before this change it received EAGAIN on Windows.
2026-10-08 12:22:49 +05:30
Dean c8a2f06325
Merge pull request #1248 from eliasbruno124-dev/fix/net-ipv6-any-current
fix(net): provide IPv6 unspecified address object
2026-10-08 18:29:31 +13:00
Gjon Gojcevic a47fe27d28 feat(libkernel): implement select over libSceNet sockets
libSceNet registers a socket poller with libkernel; select polls the requested descriptors through it until the timeout and rewrites the descriptor sets.
2026-10-07 20:47:03 -04:00
eliasbruno124-dev 971099aa15 fix(net): provide IPv6 unspecified address object 2026-10-07 22:11:33 +02:00
kjhq 63af67138f feat(libSceNet): export in6addr_any and in6addr_loopback
libSceNet exports the IPv6 wildcard and loopback addresses as data.
2026-10-07 10:43:24 +00:00
alfalfa-star e91fe0f063 feat(libs): declare the exports PPSA14632 imports that no library provides
LEGO Horizon Adventures imports 19 functions that no library exports
and no open pull request adds, so it fails eager binding. They are
declared as throwing stubs. The two libSceAjmWVorbis imports have no
known name and are exported by NID from libSceAjm.native.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 07:10:13 +02:00
Chad df98b8899e feat(libs): name the PPSA23566 stubs from the shadPS4 NID list and implement sleep
20 of the 31 NIDs have names in shadPS4's aerolib list. They are declared
under those names; POSIX sleep is implemented. The NpPartner001 and Psml
MFSR2 exports stay unnamed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 17:28:39 -05:00
Chad 7cbf45b660 feat(libs): declare the exports PPSA23566 imports that no library provides
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 17:04:05 -05:00
Adrià Franch 92d79996c7 libSceNet: implement sceNetSendmsg and sceNetRecvmsg
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 11:51:42 +02:00
Dean 901ddfd1f8
Merge pull request #783 from adriadam10/feat/net-resolver-get-error
feat(libSceNet): implement sceNetResolverGetError
2026-10-06 14:14:10 +13:00
Dean 9cafa33f94
Merge pull request #658 from NumberGuan/codex/fix-net-inet-ntop-errors
fix(net): report address text buffer errors to the guest
2026-10-06 13:29:03 +13:00
Adrià Franch 9fb83a2435 feat(libSceNet): implement sceNetResolverGetError
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 01:40:36 +02:00
Dean 6eebd23a62
Merge pull request #745 from Blizzeq/fix/net-error-codes
fix(net): return SCE_NET_ERROR codes from failing sceNet calls
2026-10-06 12:24:24 +13:00
Dean e51edb4dc2
Merge pull request #744 from Blizzeq/fix/net-send-sigpipe
fix(net): keep SIGPIPE from killing the process on Linux sends
2026-10-06 12:23:42 +13:00
Jakub Krasuski f91e13447d fix(net): return SCE_NET_ERROR codes from failing sceNet calls
Every failing sceNet function returned -1 and left the code only in
sceNetErrnoLoc. The functions return the errno combined with
0x80410100 (SCE_NET_ERROR_*), as the resolver paths of this file
already do with RESOLVER_ENODNS and as shadPS4 and fpPS4 do for the
whole library. A title that compares the result with
SCE_NET_ERROR_EWOULDBLOCK saw a non-blocking receive without data as
an unknown failure.

Assisted-by: Claude Opus 5.5
2026-10-05 21:58:21 +02:00
Jakub Krasuski 01220faa1a fix(net): keep SIGPIPE from killing the process on Linux sends
sceNetSend and sceNetSendto called send and sendto without
MSG_NOSIGNAL, so a send on a connection the peer had closed raised
SIGPIPE and terminated the process. shadPS4 has sceNetSend pass
0x20000, FreeBSD's MSG_NOSIGNAL, down to sendto, so a title gets the
error back instead of a signal.

Pass MSG_NOSIGNAL on Linux and translate EPIPE, which fell through to
EIO.

Assisted-by: Claude Opus 5.5
2026-10-05 21:57:20 +02:00
Merijn 8f6328242d feat(libs): add exports imported by PPSA12544
Implement scePthreadGetschedparam and scePthreadSetschedparam on top of
the thread priority, POSIX utimes and fsync on top of sceKernelUtimes
and sceKernelFsync, and sceUserServiceGetAccessibilityZoomFollowFocus
like the other accessibility queries. Add the remaining imports of
PPSA12544 as unimplemented exports and record unknown NIDs and
signatures in the technical debt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:25:52 +02:00
Tomás Ortellado 77dc9e77e1 fix(net): report address text buffer errors to the guest 2026-10-05 09:01:14 -03:00
Pouare514 ac7bc704c3 fix(prx): export tripwire NIDs under recomputed real names, restore main's hunks 2026-10-05 02:13:22 +02:00
Pouare514 66a95ada20 feat(prx): unknown loader tripwires for TLOU 2026-10-05 02:12:32 +02:00
Pouare514 fb9e0fff5b fix(libs): TLOU runtime funcs for Net (getpeername, htonll/ntohll) 2026-10-04 16:33:18 +02:00
Pouare514 1c724c0228 feat(libs): Cyberpunk 2077 loading support (REDGalaxy + stubs)
# Conflicts:
#	core/libs/prx/libSceContentExport/Export.cpp
#	core/libs/prx/libScePlayGoDialog/Export.cpp
2026-10-02 23:14:04 +03: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
Michon 2b5f2d32d3 feat: export the AMPR command buffer waits and writes, sceAgcFuseShaderHalves, sceAgcSetSubmitMode, sceNpSessionSignalingCreateContext and sceNetEpollAbort
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-30 18:19:55 +02:00
OverkillLabs 3230352202 feat(net): offline socket/epoll/resolver stack with FreeBSD errno mapping
libSceNet: replace the always-fail stubs with a real offline network
stack. Sockets, epoll instances, memory pools and resolvers are tracked
in proper registries with create/destroy lifecycles; bind/listen/accept/
connect/send/recv/getsockopt/setsockopt/getsockname behave the way they
would on a console with no link up (bind and listen succeed locally,
connect/send fail with the errno a routeless host would give, blocking
calls such as accept/recv/epoll_wait return on close, abort or their
timeout). Infinite ("wait forever") timeouts are serviced in bounded
slices so a caller can never deadlock the process. Errno values match
the FreeBSD numbering the guest expects through sceNetErrnoLoc. Restored
sceNetGetsockopt and sceNetResolverStartAton (present upstream) using
the same registry-backed conventions as the rest of the rewrite.

libSceRudp: companion change giving the reliable-UDP library a genuine
context registry (init/create/bind/set-option/get-status) with
consistent error codes; connection attempts consistently fail since no
peer can ever be reached offline.
2026-09-28 12:45:34 +03:00
devilismyfriend 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 55a120e318 fix(nid): detect linker suffix-merged symbol names postfixes 2026-08-21 14:45:07 +03:00
boykopovar 59bee8d187 feat(libs): add libs function signatures 2026-08-20 23:18:16 +03:00