AnyPS5/docs/dev
screamm 15bbc19501 feat(libScePosixForWebKit): implement getservbyname
Implement getservbyname (H1bArJPagV0) in libScePosixForWebKit. Cloud
Play (PPSA99600) imports it from this library only (registry index 408,
call site 0x1042124); once fnmatch (#3545) is in, its predicted load
stop is:

    FAIL: unresolved ELF import H1bArJPagV0 from libScePosixForWebKit.prx

The ps5-payload-dev SDK stubs (f5d40f02, sce_stubs/) declare
getservbyname in libScePosixForWebKit.c and not in libkernel.c or
libSceLibcInternal.c. The call site is the service-name branch of a
getaddrinfo inside the title: a non-numeric service is looked up with
protocol "tcp", "udp" or "sctp" and the port is read big-endian at
offset 16 of the result, which fixes the servent layout used here
(name, aliases, 32-bit port, protocol at 0, 8, 16, 24).

The guest has no /etc/services and the console's file is unknown, so the
function searches 37 lines of FreeBSD 11.4 etc/services (8c639945):
ftp-data, ftp, ssh, telnet, smtp, domain, tftp, http, pop3, ntp, imap,
https, rtsp, submission, imaps and pop3s with their aliases and
protocols, in file order. None of their names or aliases appears on an
earlier line of the full file, so these lookups answer as the full file
would. The search follows files_servent in lib/libc/net/getservent.c
(8c639945): exact, case-sensitive match on the name or an alias, a null
protocol takes the first match, the port in network byte order, the
result in per-thread storage like getserv's NSS TLS state. Any other
name returns null without touching errno, as for a name the file lacks.
The repository's getaddrinfo still resolves service names through the
host, so there was no table to share; this is recorded in
TechnicalDebt.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13 15:43:05 +03:00
..
debt feat(libScePosixForWebKit): implement getservbyname 2026-10-13 15:43:05 +03:00
ARCHITECTURE.md feat(agc): depth planes sampled as 2D arrays, cubes and integer views 2026-10-13 12:11:02 +13:00
BUILD.md Merge pull request #4607 from yunusshaikh7/feat/tracy-profiler 2026-10-12 23:09:21 +02:00
CONVENTIONS.md refactor(docs): separated user and dev in docs + compatibility file 2026-09-28 22:58:17 +03:00
HW_ORACLE.md feat(shader): follow FP16_OVFL in every f16 result 2026-10-10 04:32:38 -03:00
PROGRESS.md feat(progress): publish a progress history chart 2026-10-12 21:31:09 +02:00
TechnicalDebt.md Merge pull request #4682 from bubblegg/feat/netctl-get-if-stat 2026-10-13 09:26:47 +02:00