fix(libs): TLOU runtime funcs for Net (getpeername, htonll/ntohll) #302

Merged
Pouare514 merged 1 commit from upstream-pr/302 into main 2026-10-04 21:11:21 +00:00
Pouare514 commented 2026-10-01 23:38:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Pouare514 on 2026-10-01T23:38:35Z.


What

TLOU Part I needs sceNetGetpeername plus 64-bit byte-order helpers. Implements sceNetGetpeername (mirrors sceNetGetsockname, guest address translation included), sceNetHtonll and sceNetNtohll. This also resolves the former sceNetUnknown00 (TCkRD0DWNLg computes to sceNetGetpeername), so that stub is removed. Split out of the former combined TLOU runtime PR.

Tested

  • Windows Release Ninja: libs target builds clean (was failing on duplicate patched export before removing the resolved Unknown00).
  • No behaviour change for other titles (additive exports plus one stub removal).

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 in TechnicalDebt
  • 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
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4710890314 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/302). Originally posted by [Pouare514](https://github.com/Pouare514) on 2026-10-01T23:38:35Z. --- ### What TLOU Part I needs `sceNetGetpeername` plus 64-bit byte-order helpers. Implements `sceNetGetpeername` (mirrors `sceNetGetsockname`, guest address translation included), `sceNetHtonll` and `sceNetNtohll`. This also resolves the former `sceNetUnknown00` (`TCkRD0DWNLg` computes to `sceNetGetpeername`), so that stub is removed. Split out of the former combined TLOU runtime PR. ### Tested - Windows Release Ninja: `libs` target builds clean (was failing on duplicate patched export before removing the resolved Unknown00). - No behaviour change for other titles (additive exports plus one stub removal). ### Checklist - [x] Based on current main; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt - [x] No notes, investigation .md files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [ ] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-01 23:39:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-01T23:39:01Z.


Progress report (2cf901b → fb9e0ff)

📈 System libraries: 77.39% (+0.04%, +3 implemented, -1 removed functions)

✅ 3 implemented
Library Name
libSceNet sceNetGetpeername
libSceNet sceNetHtonll
libSceNet sceNetNtohll
🗑️ 1 removed
Library Name
libSceNet sceNetUnknown00
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5942776611 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/302#issuecomment-5942776611). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-01T23:39:01Z. --- <!-- progress-report --> ### Progress report (2cf901b → fb9e0ff) 📈 **System libraries**: 77.39% (+0.04%, +3 implemented, -1 removed functions) <details> <summary>✅ 3 implemented</summary> | Library | Name | | - | - | | libSceNet | `sceNetGetpeername` | | libSceNet | `sceNetHtonll` | | libSceNet | `sceNetNtohll` | </details> <details> <summary>🗑️ 1 removed</summary> | Library | Name | | - | - | | libSceNet | `sceNetUnknown00` | </details>
oneandonlydean commented 2026-10-04 05:40:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T05:40:34Z.


Thanks for pushing TLOU along. This needs splitting and a few changes: one topic per PR (Net, Rtc, SessionSignaling, VideoOut and Ssl are separate), and the functions that return 0 without doing anything (sceSslLoadCert, sceSslGetMemoryPoolStats, sceVideoOutVrrPeg and sceVideoOutVrrStatusUnknown00) either need a real implementation or must throw with NotImplemented_nid_no_patch, since they are not UI silent stubs. Main already has sceNpSessionSignalingGetConnectionStatus with its real signature, so the (void) one here has to go (merged as is, the file would define it twice), and the TechnicalDebt hunk repeats #301's lines. For sceRtcParseDateTime, could you say where the accepted format comes from?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5977007093 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/302#issuecomment-5977007093). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-04T05:40:34Z. --- Thanks for pushing TLOU along. This needs splitting and a few changes: one topic per PR (Net, Rtc, SessionSignaling, VideoOut and Ssl are separate), and the functions that return 0 without doing anything (`sceSslLoadCert`, `sceSslGetMemoryPoolStats`, `sceVideoOutVrrPeg` and `sceVideoOutVrrStatusUnknown00`) either need a real implementation or must throw with `NotImplemented_nid_no_patch`, since they are not UI silent stubs. Main already has `sceNpSessionSignalingGetConnectionStatus` with its real signature, so the `(void)` one here has to go (merged as is, the file would define it twice), and the TechnicalDebt hunk repeats #301's lines. For `sceRtcParseDateTime`, could you say where the accepted format comes from?
Pouare514 commented 2026-10-04 14:35:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Pouare514 on 2026-10-04T14:35:19Z.


Split done as requested: this PR is now Net only (getpeername, htonll/ntohll, plus removing the resolved sceNetUnknown00). The other topics are #516 (Rtc), #517 (SessionSignaling), #518 (VideoOut), #519 (Ssl). Changes in this round: VrrPeg/VrrStatusUnknown00/LoadCert/GetMemoryPoolStats now throw instead of returning 0, the duplicate (void) GetConnectionStatus is dropped, the TechnicalDebt duplicates shared with #301 are dropped here, and the ParseDateTime format source (assumed ISO 8601 subset, unverified) is recorded in TechnicalDebt. Bonus find: sceNetGetpeername computes to TCkRD0DWNLg, so the old sceNetUnknown00 stub is removed. Each branch builds clean (libs target).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5981116793 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/302#issuecomment-5981116793). Originally posted by [Pouare514](https://github.com/Pouare514) on 2026-10-04T14:35:19Z. --- Split done as requested: this PR is now Net only (getpeername, htonll/ntohll, plus removing the resolved sceNetUnknown00). The other topics are #516 (Rtc), #517 (SessionSignaling), #518 (VideoOut), #519 (Ssl). Changes in this round: VrrPeg/VrrStatusUnknown00/LoadCert/GetMemoryPoolStats now throw instead of returning 0, the duplicate (void) GetConnectionStatus is dropped, the TechnicalDebt duplicates shared with #301 are dropped here, and the ParseDateTime format source (assumed ISO 8601 subset, unverified) is recorded in TechnicalDebt. Bonus find: sceNetGetpeername computes to TCkRD0DWNLg, so the old sceNetUnknown00 stub is removed. Each branch builds clean (libs target).
oneandonlydean commented 2026-10-04 21:07:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T21:07:45Z.


Thanks for the split. This one is ready to merge from my side: sceNetGetpeername follows sceNetGetsockname, TCkRD0DWNLg is its NID, and swap64 swaps all eight bytes correctly.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5984394063 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/302#issuecomment-5984394063). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-04T21:07:45Z. --- Thanks for the split. This one is ready to merge from my side: `sceNetGetpeername` follows `sceNetGetsockname`, TCkRD0DWNLg is its NID, and `swap64` swaps all eight bytes correctly.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!302
No description provided.