Commit Graph
213 Commits
Author SHA1 Message Date
Yunus Shaikh be3f208b02 fix(libSceNet): answer sceNetInitParam and a null sceNetConfigGetIfFlags as measured
BunnyFl measured both calls in firmware 13.42 libSceNet.sprx, run in an
emulator on the module itself. sceNetInitParam returns 0x80410116 for a
null parameter. The first non-null call copies the first 32 bytes of the
parameter and returns 0, and every later call returns 0x80410110, with a
null parameter and after sceNetTerm too, because the flag is never
cleared. sceNetConfigGetIfFlags returns 0x8041130E for a null flags
pointer before anything else. Both replace throws that stood in for the
unknown answers.

The first successful sceNetInitParam still marks the library initialized,
as sceNetInit does here, because the other calls check it. The module
reads only bit 0 of the stored copy's first word, to raise the pool limit
of sceNetPoolCreate from 32 to 128; that limit is recorded as not
modelled, as sceNetPoolCreate here has none.
2026-10-25 05:11:17 -07:00
Adrià a2f634b2c0 Merge pull request #9357 from thuanquang/docs/debt-sweep-net-accept
docs(libSceNet): correct when sceNetAccept reads the inherited nonblocking mode
2026-10-25 11:41:36 +01:00
Queuze 58e7bf57fb chore: sync PR 9931 with current main 2026-10-25 07:28:28 -03:00
Queuze 449a6580dd chore: sync PR 9542 with current main 2026-10-25 07:27:26 -03:00
Queuze 843725faac chore: sync PR 9525 with current main 2026-10-25 07:27:01 -03:00
Queuze d73fc31f7b chore: sync PR 9523 with current main 2026-10-25 07:26:18 -03:00
Queuze e0bc1f73d3 chore: sync PR 9930 with current main 2026-10-25 07:23:56 -03:00
3d20b5e4c2 fix(libSceNet): count only datagram bytes in sceNetIoctl FIONREAD on macOS
On macOS, FIONREAD on a datagram socket counts more than the queued
payload, so after one 5-byte datagram sceNetIoctl reported 37.
libkernel's sockets already ask a macOS datagram socket for SO_NREAD,
the size of the next datagram, instead; do the same for sceNetSocket
sockets that are not streams.

Co-authored-by: Himansh Raj <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 03:15:43 -03:00
Dean e599efd64d Merge pull request #10572 from ZSWolt/fix/libscenet-usleep-negative-log
fix(libSceNet): print the console's line for a negative sceNetUsleep
2026-10-25 19:06:10 +13:00
Yunus Shaikh e9db171018 feat(libSceNet): report the loopback interface's flags
sceNetConfigGetIfFlags answers interface 0, lo0 in the sceNetGetIfName
numbering, with IFF_UP | IFF_LOOPBACK | IFF_RUNNING | IFF_MULTICAST, the
flags FreeBSD 11 gives a configured loopback. Other interfaces and a null
flags pointer throw: the library models no other interface.
2026-10-25 03:00:00 +00:00
Yunus Shaikh 64f42541ae feat(libSceNet): initialize the library through sceNetInitParam
sceNetInitParam initializes the library as sceNetInit does and returns
its result. NetInitializeParameter's layout is unknown, so its fields are
not read; a null parameter throws because its console result is unknown.
2026-10-25 03:00:00 +00:00
Queuze 7bed4c2cc5 chore(net): sync protocol with current main 2026-10-24 18:59:51 -03:00
Adrià 637220db11 Merge pull request #8686 from Ondra97/codex/fix-net-empty-stream-receive
fix(net): complete zero-length TCP receives without waiting on Windows
2026-10-24 22:07:49 +02:00
Queuze eebd13e224 chore: refresh socket option contribution #9523 2026-10-24 15:52:53 -03:00
Queuze 4537b815e5 chore: refresh socket option contribution #9525 2026-10-24 15:52:52 -03:00
Queuze 28371daefd chore: refresh socket option contribution #9542 2026-10-24 15:52:51 -03:00
Queuze 942934a863 chore: refresh socket option contribution #9931 2026-10-24 15:52:49 -03:00
Queuze 2103fdf846 chore: refresh socket option contribution #9930 2026-10-24 15:52:49 -03:00
Adrià d4b85d2b29 Merge pull request #8362 from MarrasFederico/feat/net-get-sock-info6
feat(libSceNet): list IPv6 sockets in sceNetGetSockInfo6
2026-10-24 18:41:46 +02:00
Adrià feb5059ac4 Merge pull request #8254 from YossiYad/feat/net-threads
feat(libSceNet): implement the net thread calls and refuse network emulation
2026-10-24 18:35:46 +02:00
Adrià 3102f39af0 Merge pull request #8235 from jagrat04/feat/libSceNet-show-route-with-memory
feat(libSceNet): implement sceNetShowRouteWithMemory
2026-10-24 17:17:45 +02:00
Ondra97 3d0c155288 fix(net): guard empty stream polling on Windows 2026-10-24 15:45:58 +02:00
ZSWoltandClaude Opus 5.5 412c3cd91f fix(libSceNet): print the console's line for a negative sceNetUsleep
After sceNetInit, the console's sceNetUsleep prints
"[LIBNET] usleep <count>" to standard output for a negative count
before failing with EINVAL, as a payload measured on firmware 13.60
(#9076). AnyPS5 failed without printing it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 13:30:52 +03:00
jagrat Singh 32455327e4 feat(libSceNet): implement sceNetShowNetstatEx 2026-10-24 12:20:53 +02:00
Adrià 2dc8e456b5 Merge pull request #8225 from jagrat04/feat/libSceNet-show-policy
feat(libSceNet): implement sceNetShowPolicy
2026-10-24 12:18:48 +02:00
Dean efe844c653 Merge pull request #10308 from orezraey/fix/libkernel-socket-receive-measured-ps5
fix(libkernel): answer zero-length datagram receives and recvmsg flags as measured on a PS5
2026-10-24 20:46:44 +13:00
orezraeyandClaude Opus 5.5 366c18439e docs(libSceNet): move the sceNetRecv truncation note to the libSceNet debt file
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:43:13 -03:00
Yunus Shaikh fca8266468 Merge main into fix/libscenet-inet-text-rules 2026-10-23 19:15:30 -07:00
Queuze 4f6358a918 chore: sync contribution #9523 with main 2026-10-23 20:02:18 -03:00
Queuze a2cd79cd2b chore: sync contribution #9525 with main 2026-10-23 20:02:17 -03:00
Queuze b2aafa368e chore: sync contribution #9542 with main 2026-10-23 20:02:17 -03:00
Queuze 2a7c73eb2f chore: sync contribution #9930 with main 2026-10-23 20:02:16 -03:00
Queuze 323d269fa1 chore: sync contribution #9931 with main 2026-10-23 20:02:15 -03:00
orezraeyandClaude Opus 5.5 b2dc84b68d fix(libSceNet): read sceNetInetPton text and null outputs as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 13:17:24 -03:00
orezraeyandClaude Opus 5.5 d4321c6569 docs(libSceNet): separate the PS4 and PS5 measurements of sceNetInetPtonEx
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 13:10:40 -03:00
orezraeyandClaude Opus 5.5 dd9716e1c3 fix(libSceNet): convert sceNetInetPtonEx without an output as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 13:10:40 -03:00
Dean 0825fee797 Merge pull request #10052 from maximilianfv/fix/libscenet-macos-udp-shutdown
fix(libSceNet): wake a receive on an unbound datagram socket at shutdown on macOS
2026-10-24 01:45:04 +13:00
Yossi Yadgar 42961e1b45 docs(debt): note where the net thread and emulation behaviour comes from 2026-10-23 11:12:45 +03:00
78983daa1c fix(libSceNet): wake a receive on an unbound datagram socket at shutdown on macOS
On macOS, shutdown(SHUT_RD) on a UDP socket that was never bound does not
wake a thread blocked in recv on it, so sceNetShutdown left the receiver
hanging. Use the receive wait that Windows already has: block on the
socket table until the socket gets a local port or is shut, then poll.
On macOS an unbound socket reports port 0 from getsockname, so the check
looks at the port instead of the Winsock error.

Ported from #8658.

Co-authored-by: Himansh Raj <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 03:39:27 -03:00
Arnab Ghosh 5dfa258d9f feat(libSceNet): implement sceNetIoctl 2026-10-23 10:07:18 +06:00
xXPBSXxandClaude Sonnet 5.5 b2a6d79a89 docs(debt): record what a Windows datagram socket keeps after sceNetConnect to AF_UNSPEC
sceNetConnect dissolves a datagram association with the same host call sequence as connect (disconnect_datagram in Export.cpp). The sceNetConnect-to-AF_UNSPEC debt entry only described Linux. On Windows a socket bound to an explicit address keeps it in the same way, and a sendto on the host socket to a non-loopback address fails with Winsock error 10051, where FreeBSD's udp_disconnect() resets the local address.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 03:03:13 +02:00
Queuze fea0994737 chore: sync socket option contribution with main 2026-10-22 19:10:47 -03:00
Queuze c079a98a41 chore: sync socket option contribution with main 2026-10-22 19:10:46 -03:00
Queuze 435a41bb82 chore: sync contribution with main 2026-10-22 19:09:12 -03:00
Queuze ff4412c7e6 chore: sync contribution with main 2026-10-22 19:07:22 -03:00
Queuze a559f1e0be chore: sync contribution with main 2026-10-22 19:02:56 -03:00
Dean 1fd6f9bb58 Merge pull request #9544 from Queuse/codex/net-buffer-validation
fix(libSceNet): reject nonpositive socket buffers
2026-10-23 10:54:58 +13:00
Dean 1da03c6f34 Merge pull request #9076 from orezraey/fix/net-utilities-measured-ps5
fix(libSceNet): accept every sceNetMemoryAllocate flag as measured on a PS5
2026-10-23 09:22:21 +13:00
Dean 5d40eb3fdc Merge pull request #9106 from Retr0G28/fix/scenet-stream-recv-timeout-eagain
fix(libSceNet): report EAGAIN when a stream receive times out on Windows
2026-10-23 09:22:12 +13:00
Queuse f696ec8809 docs(net): keep independent option entries apart 2026-10-22 12:55:52 -03:00