Skip to content

feat(libSceNet): implement sceNetResolverStartNtoa6 - #5411

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
ps54all:feat/libscenet-resolver-ntoa6
Oct 13, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
ps54all:feat/libscenet-resolver-ntoa6

Conversation

@ps54all

@ps54all ps54all commented Oct 13, 2026

Copy link
Copy Markdown

What

sceNetResolverStartNtoa6 resolves a host name to its first IPv6 address and writes the 16-byte address. It was not exported, so a title that imports it fails to load (unresolved ELF import zl35YNs9jnI from libSceNet.prx).

  • The IPv4 lookup is generalized over the address family (lookup_host); sceNetResolverStartNtoa and the multiple-record variants keep their behaviour and go through it with AF_INET.
  • The IPv6 call uses the same resolver bookkeeping as the IPv4 one: abort preservation (EINTR), sceNetResolverGetError, and the RESOLVER_ENODNS error for a failed lookup. A name without an IPv6 address fails the same way.
  • Timeout and retry are ignored as in sceNetResolverStartNtoa. Nonzero flags throw, since their meaning for this call is not known.
  • The debt entry in docs/dev/debt/libSceNet.md records the assumptions: signature taken from sceNetResolverStartNtoa, no IPv4-mapped fallback, unverified on hardware.

Tested

Windows 11, RTX 3080, WinLibs GCC 15.2.0 r7, Release.

  • guest_sce_net gains checks: ::1 resolves to ::1, a null name returns EINVAL (0x80410116), and an IPv4 literal (no IPv6 address) returns and records RESOLVER_ENODNS (0x804101E1). Without the implementation the test does not link (undefined reference to sceNetResolverStartNtoa6). With it the test passes (exit 0). On this machine the whole test takes about 34 s, because the existing .invalid lookups wait on the local DNS, so it hits its 20 s ctest timeout here both with and without this change.
  • python tools/check_conventions.py --base origin/main and tools/check_test_registration.py pass.
  • Metal Gear Solid 4: Guns of the Patriots, Master Collection Version (PPSA18194, Unity): on main it fails to load on this import. With this change it reaches its title screen ("Press any button", Ver. 1.4.1) and runs at 60 fps for the 240 s run. Starting a game hands off to the second executable (--executable mgs4/mgs4.elf), which then stops on missing libSceCesCs EUC-JP conversions (sceCesUtf8StrToMbcsStr and its family). That is a separate follow-up.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: PPSA18194 (no Game bring-up discussion yet)
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code); the runs are on my machine.

🤖 Generated with Claude Code

Resolve a host name to its first IPv6 address through the host resolver
(getaddrinfo with AF_INET6) and write the 16-byte address. The lookup
shares the IPv4 path's resolver bookkeeping (abort preservation, error
state); a name without an IPv6 address fails with RESOLVER_ENODNS like a
failed lookup. Nonzero flags throw.

Metal Gear Solid 4 Master Collection (PPSA18194) imports it and failed to
load without it (unresolved zl35YNs9jnI from libSceNet.prx).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Progress report (dacd785 → df32a44)

➖ System libraries: 88.15% (+0.0%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceNet sceNetResolverStartNtoa6

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#5004 docs/dev/debt/libSceNet.md L13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants