Skip to content

feat(libSceNet): implement sceNetShowIfconfigWithMemory - #8234

Merged
adriadam10 merged 3 commits into
boykopovar:mainfrom
jagrat04:feat/libSceNet-show-ifconfig-with-memory
Oct 24, 2026
Merged

adriadam10 merged 3 commits into
boykopovar:mainfrom
jagrat04:feat/libSceNet-show-ifconfig-with-memory

Conversation

@jagrat04

@jagrat04 jagrat04 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What

Implement sceNetShowIfconfigWithMemory in core/libs/prx/libSceNet/Export.cpp:

  • Validates the provided memory pool ID against active pools (g_pools) under g_mutex, returning NET_EBADF if invalid.
  • Throws std::runtime_error(__func__) for a valid pool once the net library is initialized, aligning with sibling diagnostics (sceNetShowIfconfig and sceNetShowNetstat) per 04f2d9a60f.
  • Adds guest unit tests in core/libs/tests/GuestSceNet.cpp verifying invalid pool failure, destroyed pool failure, and throwing on valid active pool.
  • Documents the function in docs/dev/debt/libSceNet.md folded into sceNetShowIfconfig, sceNetShowNetstat.

Tested

  • Linux (Ubuntu 24.04 via WSL2, GCC 15): ninja -C build-linux libSceNet guest_sce_net_tests built cleanly; ctest --test-dir build-linux -V -R guest_sce_net passed (1/1 tests passed 100%).
  • python tools/check_conventions.py --base origin/main: passed with 0 violations.

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 (NotImplemented_nid_no_patch); 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 (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Progress report (b607bfd → ac2591a)

📈 System libraries: 48.47% (+0.01%, +2 implemented functions)

✅ 2 implemented
Library Name
libkernel setpgid_nid_postfix
libkernel setpgrp_nid_postfix

Changed libraries (implemented exports)

Library Before After Change
libkernel 664/704 (94.32%) 666/706 (94.33%) +0.02 pp

@github-actions

github-actions Bot commented Oct 20, 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
PR 8742 setpgid
setpgrp
PR 9378 core/libs/prx/libkernel/System/src/Process.cpp L346
core/libs/tests/GuestParentProcess.cpp L11, L23
docs/dev/debt/libkernel.md L241
PR 9499 docs/dev/debt/libkernel.md L241-242

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 4630 docs/dev/debt/libkernel.md
PR 5021 core/libs/prx/libkernel/System/src/Process.cpp
docs/dev/debt/libkernel.md
PR 6149 docs/dev/debt/libkernel.md
PR 6830 docs/dev/debt/libkernel.md
PR 6936 docs/dev/debt/libkernel.md
PR 7088 docs/dev/debt/libkernel.md
PR 7105 docs/dev/debt/libkernel.md
PR 7121 docs/dev/debt/libkernel.md
PR 7149 docs/dev/debt/libkernel.md
PR 7192 docs/dev/debt/libkernel.md
PR 7201 core/libs/prx/libkernel/System/src/Process.cpp
PR 7509 docs/dev/debt/libkernel.md
PR 7511 docs/dev/debt/libkernel.md
PR 8010 docs/dev/debt/libkernel.md
PR 8605 docs/dev/debt/libkernel.md
PR 9133 core/libs/prx/libkernel/System/src/Process.cpp
docs/dev/debt/libkernel.md
PR 9160 docs/dev/debt/libkernel.md
PR 9199 docs/dev/debt/libkernel.md
PR 9284 docs/dev/debt/libkernel.md
PR 9293 docs/dev/debt/libkernel.md
PR 9297 docs/dev/debt/libkernel.md
PR 9302 docs/dev/debt/libkernel.md
PR 9509 docs/dev/debt/libkernel.md
PR 9557 docs/dev/debt/libkernel.md
PR 9561 docs/dev/debt/libkernel.md
PR 9566 docs/dev/debt/libkernel.md
PR 9575 docs/dev/debt/libkernel.md
PR 9669 core/libs/prx/libkernel/System/src/Process.cpp
docs/dev/debt/libkernel.md
PR 9693 docs/dev/debt/libkernel.md
PR 9929 core/libs/prx/libkernel/System/src/Process.cpp
PR 9947 docs/dev/debt/libkernel.md
PR 10061 docs/dev/debt/libkernel.md

@github-actions github-actions Bot added docs prx needs rebase Conflicts with main, rebase needed labels Oct 20, 2026
@adriadam10 adriadam10 self-assigned this Oct 21, 2026
@adriadam10
adriadam10 force-pushed the feat/libSceNet-show-ifconfig-with-memory branch from 112fbe7 to f8d51b3 Compare October 21, 2026 11:05
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 21, 2026
@jagrat04
jagrat04 force-pushed the feat/libSceNet-show-ifconfig-with-memory branch from f8d51b3 to 7f7dfdb Compare October 21, 2026 15:35
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 21, 2026
@MarcZX10

Copy link
Copy Markdown
Contributor

I am reviewing #9506, which adds sceNetSetDnsInfo, sceNetSetDns6Info and sceNetGetDns6Info plus a new registered test and debt entry. The overlap bot could not compare some of these branches because of base conflicts, and this PR author has not yet recorded an agreed merge order. Please confirm whether your current changes overlap these exact exports, CMake/test insertion, or debt section, and whether #9506 can land before your PR or should depend on yours. The #9506 author is being asked to record the agreed order in Depends on and the overlap note.

@jagrat04
jagrat04 force-pushed the feat/libSceNet-show-ifconfig-with-memory branch from 7f7dfdb to f086ee6 Compare October 22, 2026 04:39
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 22, 2026
@jagrat04

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Thanks for checking! There is no overlap with #9506:

  • Exports: This PR implements sceNetShowIfconfigWithMemory only. It does not touch sceNetSetDnsInfo, sceNetSetDns6Info, or sceNetGetDns6Info.
  • Tests & CMake: Tests are in GuestSceNet.cpp and do not touch CMakeLists.txt or GuestNetDnsInfo.cpp.
  • Debt documentation: Touches Silent stubs in docs/dev/debt/libSceNet.md without affecting the DNS entries in Unknown function info.
  • Merge Order: Either PR can land first without issues (Depends on: none). This branch has also been cleanly rebased onto latest main.

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this was opened, main changed the sibling diagnostics (04f2d9a, "reject unsupported diagnostic output after initialization"): sceNetShowIfconfig and sceNetShowNetstat now throw once the net library is initialized, because the native output is not implemented, and GuestSceNet.cpp pins that (Failed(sceNetShowIfconfig(), 200)). Returning 0 from sceNetShowIfconfigWithMemory for a valid pool is the plausible-success-where-main-threw case we reject.

  • core/libs/prx/libSceNet/Export.cpp:2289: keep the pool check (NET_EBADF for an unknown pool), but for a valid pool throw like sceNetShowIfconfig (throw std::runtime_error(__func__)) instead of return 0.
  • core/libs/tests/GuestSceNet.cpp:280: drop sceNetShowIfconfigWithMemory(pool) == 0; the invalid-pool rows (-1, destroyed pool) stay and still fail without the change. Pin the valid-pool case as a throw if the harness has a way to (see how line 1690 handles sceNetShowIfconfig).
  • docs/dev/debt/libSceNet.md:5: this is no longer a silent stub. Fold it into the existing sceNetShowIfconfig, sceNetShowNetstat line (initialized calls throw).

Rebase onto current main when you push.

@jagrat04
jagrat04 force-pushed the feat/libSceNet-show-ifconfig-with-memory branch from f086ee6 to 7799927 Compare October 24, 2026 09:03
@jagrat04

Copy link
Copy Markdown
Contributor Author

@adriadam10 Thanks for the review and clear guidance!

Updated as requested:

  • Export.cpp: Retained the memory pool validation (NET_EBADF for unknown/invalid pool IDs), and for a valid pool now throw std::runtime_error(__func__) matching sibling diagnostic behavior after initialization.
  • GuestSceNet.cpp: Dropped the success return assertion; kept invalid-pool checks (-1 and destroyed pool ID returning NET_EBADF / error 9) and pinned the valid-pool case to assert throwing std::runtime_error.
  • libSceNet.md: Removed from silent stubs and folded into the sceNetShowIfconfig, sceNetShowIfconfigWithMemory, sceNetShowNetstat entry stating initialized calls throw.
  • Rebased cleanly onto current main (aeeaefad98), verified conventions pass with 0 violations, and confirmed guest_sce_net tests pass 100%.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
@adriadam10
adriadam10 force-pushed the feat/libSceNet-show-ifconfig-with-memory branch from 7799927 to a7efa2e Compare October 24, 2026 11:35
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 24, 2026
@adriadam10
adriadam10 force-pushed the feat/libSceNet-show-ifconfig-with-memory branch from a7efa2e to 9ebe598 Compare October 24, 2026 15:22
@adriadam10
adriadam10 force-pushed the feat/libSceNet-show-ifconfig-with-memory branch from 9ebe598 to ac2591a Compare October 24, 2026 15:26
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
@adriadam10
adriadam10 merged commit 440cbdd into boykopovar:main Oct 24, 2026
10 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Re-checked on current main: the pool check (NET_EBADF for an unknown or destroyed pool) and the throw for a valid pool match sceNetShowIfconfig/sceNetShowNetstat, and the new test lines fail without the change. Rebased onto main (adjacent conflicts with sceNetShowRouteWithMemory in the test and the Silent stubs debt line, merged by hand keeping both); merged.

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.

4 participants