Implement LibSsl2, Net_1_Http2 and NetGetMemoryPoolStats #2028

Closed
github-bot wants to merge 2 commits from gh-pr/2028/head into gh-pr/2028/base
Owner

@⁠Ekt0re on GitHub · 2026-10-31 19:11 UTC · original
Ekt0re:Implement-LibSsl2,-Net_1_Http2-and-NetGetMemoryPoolStats → main · +258 −77 · 3 files · 2 commits · closed without merging

Implement missing Http2, Ssl and Net imports (sceHttp2AbortRequest, sceHttp2SetResolveRetry, sceHttp2GetMemoryPoolStats, sceSslGetMemoryPoolStats, sceNetGetMemoryPoolStats)

Summary

This PR adds five missing libSceNet-family exports and registers the Ssl library under the Ssl_v2.1 version, which the game imports.

NID Library Symbol Implementation
IZ-qjhRqvjk Http2 v1.1 sceHttp2AbortRequest LibHttp2::Http2AbortRequest
otUQuZa-mv0 Http2 v1.1 sceHttp2GetMemoryPoolStats LibHttp2::Http2GetMemoryPoolStats
Gcjh+CisAZM Http2 v1.1 sceHttp2SetResolveRetry LibHttp2::Http2SetResolveRetry
-PoIzr3PEk0 Ssl v2.1 sceSslGetMemoryPoolStats LibSsl::SslGetMemoryPoolStats
rMyh97BU5pY Net v1.1 sceNetGetMemoryPoolStats LibNet::NetGetMemoryPoolStats

Issues:

Background

HOT WHEELS™ Infinite Rush (PPSA22408) stops at the logo screen because of these unresolved imports (build KytyPS5-2026-10-31-0261891):

Unresolved import stub called: otUQuZa-mv0[Http2_v1][Http2_v1.1][Func]
Unresolved import stub called: -PoIzr3PEk0[Ssl_v1][Ssl_v2.1][Func]
Unresolved import stub called: rMyh97BU5pY[Net_v1][Net_v1.1][Func]
Unresolved import stub called: Gcjh+CisAZM[Http2_v1][Http2_v1.1][Func]
Unresolved import stub called: IZ-qjhRqvjk[Http2_v1][Http2_v1.1][Func]

All five functions also exist in shadPS4 (http.cpp, http2.cpp, ssl.cpp, net.cpp). The behavior was taken from there and adapted to KytyPS5's existing code. Where shadPS4 only has a stub, this PR does a little more where the existing state allows it.

Changes

Net (src/libs/libNet.cpp, src/libs/network.cpp)

  • Added Network::PoolGetSize(int memid, int* size), which looks up a pool under the network mutex.
  • Added Net::NetGetMemoryPoolStats(int memid, NetMemoryPoolStats* stats):
    • stats == nullptr → NET_ERROR_EINVAL
    • unknown pool → NET_ERROR_EBADF
    • otherwise fills pool_size with the pool size and sets max_inuse_size, current_inuse_size and reserved to 0.
  • Added the LibNet::NetGetMemoryPoolStats wrapper (FinishNetCall) and registered NID rMyh97BU5pY.

Ssl (src/libs/libNet.cpp)

  • Added SslGetMemoryPoolStats(int ssl_ctx_id, void* stats). The pool is not tracked, so it zeroes the output structure (if provided) and returns OK.
  • Registered NID -PoIzr3PEk0 in the existing Ssl v1 module.
  • Added a new LibSsl2 module (LIB_VERSION("Ssl", 1, "Ssl", 2, 1)), with InitNet_2_Ssl called from InitNet_1. It registers the same four existing Ssl functions (SslInit, SslTerm, SslGetCaCerts, SslFreeCaCerts) plus SslGetMemoryPoolStats, so the game's Ssl_v2.1 imports resolve.

Http2 (src/libs/libNet.cpp)

  • Http2SetResolveRetry(int id, int32_t retry): added a resolve_retry field to Http2Options and stores the value. Returns HTTP2_ERROR_INVALID_ID for an unknown id. The value is stored but not yet used by the resolver.
  • Http2AbortRequest(int req_id):
    • for an HTTP/2 request, sets send_result and async_result to HTTP2_ERROR_TIMEOUT and returns 0;
    • otherwise delegates to Network::Http::HttpAbortRequest, the same fallback as shadPS4.
  • Http2GetMemoryPoolStats(int ctx_id, void* stats): fills pool_size from the matching HTTP/2 context (or 0 if the context is unknown), zeroes the other fields and returns 0.
  • Registered NIDs IZ-qjhRqvjk, otUQuZa-mv0 and Gcjh+CisAZM in InitNet_1_Http2.

Differences from shadPS4

  • sceNetGetMemoryPoolStats checks stats == nullptr before the pool lookup, so a null pointer with an invalid pool returns EINVAL, while shadPS4 returns EBADF.
  • sceHttp2SetResolveRetry and sceHttp2GetMemoryPoolStats keep some state here; shadPS4 implements both as plain stubs.
  • sceHttp2GetMemoryPoolStats returns 0 even when the context id is unknown.
  • sceSslGetMemoryPoolStats is a stub that only zeroes the output, like shadPS4's stub.

Known limitations

  • Pool statistics report only the configured pool size. max_inuse_size and current_inuse_size are always 0.
  • Http2AbortRequest only updates the stored results of an HTTP/2 request. It does not cancel an in-flight transfer.
  • resolve_retry is stored but not applied.

Formatting

The diff also contains whitespace-only changes in libNet.cpp and network.cpp (alignment and line wrapping from the formatter). They do not change behavior.

Testing

  • HOT WHEELS™ Infinite Rush (PPSA22408) no longer reports the five unresolved imports above.
  • Carmen Sandiego (PPSA25256) no longer reports the unresolved import.
**@⁠Ekt0re** on GitHub · 2026-10-31 19:11 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2028) `Ekt0re:Implement-LibSsl2,-Net_1_Http2-and-NetGetMemoryPoolStats` → `main` · +258 −77 · 3 files · 2 commits · closed without merging # Implement missing `Http2`, `Ssl` and `Net` imports (`sceHttp2AbortRequest`, `sceHttp2SetResolveRetry`, `sceHttp2GetMemoryPoolStats`, `sceSslGetMemoryPoolStats`, `sceNetGetMemoryPoolStats`) ## Summary This PR adds five missing `libSceNet`-family exports and registers the `Ssl` library under the `Ssl_v2.1` version, which the game imports. | NID | Library | Symbol | Implementation | |-----|---------|--------|----------------| | `IZ-qjhRqvjk` | Http2 v1.1 | `sceHttp2AbortRequest` | `LibHttp2::Http2AbortRequest` | | `otUQuZa-mv0` | Http2 v1.1 | `sceHttp2GetMemoryPoolStats` | `LibHttp2::Http2GetMemoryPoolStats` | | `Gcjh+CisAZM` | Http2 v1.1 | `sceHttp2SetResolveRetry` | `LibHttp2::Http2SetResolveRetry` | | `-PoIzr3PEk0` | Ssl v2.1 | `sceSslGetMemoryPoolStats` | `LibSsl::SslGetMemoryPoolStats` | | `rMyh97BU5pY` | Net v1.1 | `sceNetGetMemoryPoolStats` | `LibNet::NetGetMemoryPoolStats` | Issues: - [https://git.gtahub.st/github/KytyPS5--KytyPS5/issues/1960](https://git.gtahub.st/github/KytyPS5--KytyPS5/issues/1960) - [https://git.gtahub.st/github/KytyPS5--KytyPS5/issues/1960](https://git.gtahub.st/github/KytyPS5--KytyPS5/issues/1960) ## Background **HOT WHEELS™ Infinite Rush** (PPSA22408) stops at the logo screen because of these unresolved imports (build KytyPS5-2026-10-31-0261891): ``` Unresolved import stub called: otUQuZa-mv0[Http2_v1][Http2_v1.1][Func] Unresolved import stub called: -PoIzr3PEk0[Ssl_v1][Ssl_v2.1][Func] Unresolved import stub called: rMyh97BU5pY[Net_v1][Net_v1.1][Func] Unresolved import stub called: Gcjh+CisAZM[Http2_v1][Http2_v1.1][Func] Unresolved import stub called: IZ-qjhRqvjk[Http2_v1][Http2_v1.1][Func] ``` All five functions also exist in shadPS4 (`http.cpp`, `http2.cpp`, `ssl.cpp`, `net.cpp`). The behavior was taken from there and adapted to KytyPS5's existing code. Where shadPS4 only has a stub, this PR does a little more where the existing state allows it. ## Changes ### Net (`src/libs/libNet.cpp`, `src/libs/network.cpp`) - Added `Network::PoolGetSize(int memid, int* size)`, which looks up a pool under the network mutex. - Added `Net::NetGetMemoryPoolStats(int memid, NetMemoryPoolStats* stats)`: - `stats == nullptr` → `NET_ERROR_EINVAL` - unknown pool → `NET_ERROR_EBADF` - otherwise fills `pool_size` with the pool size and sets `max_inuse_size`, `current_inuse_size` and `reserved` to `0`. - Added the `LibNet::NetGetMemoryPoolStats` wrapper (`FinishNetCall`) and registered NID `rMyh97BU5pY`. ### Ssl (`src/libs/libNet.cpp`) - Added `SslGetMemoryPoolStats(int ssl_ctx_id, void* stats)`. The pool is not tracked, so it zeroes the output structure (if provided) and returns `OK`. - Registered NID `-PoIzr3PEk0` in the existing `Ssl` v1 module. - Added a new `LibSsl2` module (`LIB_VERSION("Ssl", 1, "Ssl", 2, 1)`), with `InitNet_2_Ssl` called from `InitNet_1`. It registers the same four existing Ssl functions (`SslInit`, `SslTerm`, `SslGetCaCerts`, `SslFreeCaCerts`) plus `SslGetMemoryPoolStats`, so the game's `Ssl_v2.1` imports resolve. ### Http2 (`src/libs/libNet.cpp`) - `Http2SetResolveRetry(int id, int32_t retry)`: added a `resolve_retry` field to `Http2Options` and stores the value. Returns `HTTP2_ERROR_INVALID_ID` for an unknown id. The value is stored but not yet used by the resolver. - `Http2AbortRequest(int req_id)`: - for an HTTP/2 request, sets `send_result` and `async_result` to `HTTP2_ERROR_TIMEOUT` and returns `0`; - otherwise delegates to `Network::Http::HttpAbortRequest`, the same fallback as shadPS4. - `Http2GetMemoryPoolStats(int ctx_id, void* stats)`: fills `pool_size` from the matching HTTP/2 context (or `0` if the context is unknown), zeroes the other fields and returns `0`. - Registered NIDs `IZ-qjhRqvjk`, `otUQuZa-mv0` and `Gcjh+CisAZM` in `InitNet_1_Http2`. ## Differences from shadPS4 - `sceNetGetMemoryPoolStats` checks `stats == nullptr` **before** the pool lookup, so a null pointer with an invalid pool returns `EINVAL`, while shadPS4 returns `EBADF`. - `sceHttp2SetResolveRetry` and `sceHttp2GetMemoryPoolStats` keep some state here; shadPS4 implements both as plain stubs. - `sceHttp2GetMemoryPoolStats` returns `0` even when the context id is unknown. - `sceSslGetMemoryPoolStats` is a stub that only zeroes the output, like shadPS4's stub. ## Known limitations - Pool statistics report only the configured pool size. `max_inuse_size` and `current_inuse_size` are always `0`. - `Http2AbortRequest` only updates the stored results of an HTTP/2 request. It does not cancel an in-flight transfer. - `resolve_retry` is stored but not applied. ## Formatting The diff also contains whitespace-only changes in `libNet.cpp` and `network.cpp` (alignment and line wrapping from the formatter). They do not change behavior. ## Testing - HOT WHEELS™ Infinite Rush (PPSA22408) no longer reports the five unresolved imports above. - Carmen Sandiego (PPSA25256) no longer reports the unresolved import.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:12:12 +00:00
github-bot closed this pull request 2026-11-26 10:12:12 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-31 19:15 UTC · original · edited 2026-10-31 21:39 UTC

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 1d56d0303a and e9fed6bbd2.

Files selected for processing: 3
  • src/libs/libNet.cpp
  • src/libs/network.cpp
  • src/libs/network.h

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

The change adds network memory-pool statistics and exposes them through the Net library. It adds SSL memory-pool statistics for SSL versions 1 and 2, and registers SSL version 2 initialization. It also adds HTTP/2 resolve-retry configuration, abort handling, and memory-pool statistics. The remaining code changes reformat existing declarations and expressions or add byte-order marks.

Suggested reviewers: nmzik

Change: Feature

Merge Risk: Minimal · up to e9fed

This change adds missing network, SSL and HTTP/2 statistics, retry and abort exports, and the SSL v2 module registration. No concrete merge-blocking risk remains in the supplied context. The size of the Net statistics structure in the guest ABI has not been confirmed.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 3.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main changes: adding LibSsl2, Net_1_Http2, and NetGetMemoryPoolStats.
Description check Passed The description directly explains the five added exports, registration changes, behavior, limitations, and affected games.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 3.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 30 functions across 3 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
**@⁠coderabbitai[bot]** on GitHub · 2026-10-31 19:15 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2028#issuecomment-6547964297) · edited 2026-10-31 21:39 UTC <!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/2028?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=3"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3" alt="Review in Change Stack →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- recent_review_start --> No actionable comments were generated in the recent review. <details> <summary><strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="16" height="16" align="absmiddle" alt=""></picture> Recent review info</strong></summary> <dl> <dd> <!-- review_info_content --> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary> <dl> <dd> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/026189166f71cc1995f5851dee1ddad7d5826e99/.coderabbit.yaml>) - **Commit**: [0261891](<https://github.com/KytyPS5/KytyPS5/commit/026189166f71cc1995f5851dee1ddad7d5826e99>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `fd20de67-e273-49e9-81c1-72464e80e32e` </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</strong></summary> <dl> <dd> Reviewing files that changed from the base of the PR and between 1d56d0303a051b1e407528e2c1853f3ab7e3d888 and e9fed6bbd22d4bd42c9545cb9efa8d370f4eb01f. </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 3</strong></summary> <dl> <dd> * `src/libs/libNet.cpp` * `src/libs/network.cpp` * `src/libs/network.h` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. </dd> </dl> </details> <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary><strong>Walkthrough</strong></summary> <dl> <dd> The change adds network memory-pool statistics and exposes them through the Net library. It adds SSL memory-pool statistics for SSL versions 1 and 2, and registers SSL version 2 initialization. It also adds HTTP/2 resolve-retry configuration, abort handling, and memory-pool statistics. The remaining code changes reformat existing declarations and expressions or add byte-order marks. **Suggested reviewers:** `nmzik` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <!-- change_assessment_commit:"e9fed6bbd22d4bd42c9545cb9efa8d370f4eb01f" --> <!-- change_assessment_priority:{"version":1,"urgency":"p2","manual":false} --> **Change:** Feature <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-unassessed-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minimal</strong> · up to <code>e9fed</code></summary> <dl> <dd> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **⚪ Minimal** · up to `e9fed` --> <!-- final_review_risk_coverage:{"sourceCommitId":"e9fed6bbd22d4bd42c9545cb9efa8d370f4eb01f","coveredCommitId":"e9fed6bbd22d4bd42c9545cb9efa8d370f4eb01f","kind":"reviewed"} --> This change adds missing network, SSL and HTTP/2 statistics, retry and abort exports, and the SSL v2 module registration. No concrete merge-blocking risk remains in the supplied context. The size of the Net statistics structure in the guest ABI has not been confirmed. <!-- final_review_risk_end --> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 4 · <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> 1</strong></summary> <dl> <dd> <strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> Failed checks: 1 warning</strong> | Check name | Status | Explanation | Resolution | | :---------------- | :----------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ![Warning](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-warning.svg) | Docstring coverage is 3.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary><strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> Passed checks: 4 passed</strong></summary> <dl> <dd> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title clearly identifies the main changes: adding LibSsl2, Net_1_Http2, and NetGetMemoryPoolStats. | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description directly explains the five added exports, registration changes, behavior, limitations, and affected games. | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | </dd> </dl> </details> <details> <summary><strong>Full details: Docstring Coverage</strong></summary> <dl> <dd> **Explanation** Docstring coverage is 3.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 30 functions across 3 files. **Resolution** Write docstrings for the functions missing them to satisfy the coverage threshold. </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=2028)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>Share</strong></summary> <dl> <dd> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </dd> </dl> </details> <!-- tips_end -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-31 19:15 UTC · original · edited 2026-10-31 21:34 UTC
On src/libs/libNet.cpp line 298 (outdated):

@@ -276,15 +281,54 @@ LIB_VERSION("Ssl", 1, "Ssl", 1, 1);
 
 namespace Ssl = Network::Ssl;
 
+static int KYTY_SYSV_ABI SslGetMemoryPoolStats(int ssl_ctx_id, void* stats) {
+	PRINT_NAME();
+
+	LOGF("\t ssl_ctx_id = %d\n", ssl_ctx_id);
+
+	if (stats != nullptr) {
+		struct SslMemoryPoolStats {
+			uint64_t pool_size;
+			uint64_t max_inuse_size;
+			uint64_t current_inuse_size;
+			uint32_t reserved;
+		};
+		auto* s               = static_cast<SslMemoryPoolStats*>(stats);
+		s->pool_size          = 0;
+		s->max_inuse_size     = 0;

Minor · Functional Correctness · Quick win

Report the configured SSL pool size.

Network::SslInit stores a nonzero pool size, but this function reports zero for every SSL context. It also returns OK for a terminated or unknown context. Look up ssl_ctx_id, return SSL_ERROR_INVALID_ID when it is invalid, and report its stored size when it is valid. (raw.githubusercontent.com)

✅ Addressed in commit e9fed6b

**@⁠coderabbitai[bot]** on GitHub · 2026-10-31 19:15 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2028#discussion_r4432981008) · edited 2026-10-31 21:34 UTC On `src/libs/libNet.cpp` line 298 (outdated): ```diff @@ -276,15 +281,54 @@ LIB_VERSION("Ssl", 1, "Ssl", 1, 1); namespace Ssl = Network::Ssl; +static int KYTY_SYSV_ABI SslGetMemoryPoolStats(int ssl_ctx_id, void* stats) { + PRINT_NAME(); + + LOGF("\t ssl_ctx_id = %d\n", ssl_ctx_id); + + if (stats != nullptr) { + struct SslMemoryPoolStats { + uint64_t pool_size; + uint64_t max_inuse_size; + uint64_t current_inuse_size; + uint32_t reserved; + }; + auto* s = static_cast<SslMemoryPoolStats*>(stats); + s->pool_size = 0; + s->max_inuse_size = 0; ``` <!-- coderabbit-ai-generated:v1 --> **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/amber-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minor** · **Functional Correctness** · **Quick win** **Report the configured SSL pool size.** `Network::SslInit` stores a nonzero pool size, but this function reports zero for every SSL context. It also returns `OK` for a terminated or unknown context. Look up `ssl_ctx_id`, return `SSL_ERROR_INVALID_ID` when it is invalid, and report its stored size when it is valid. ([raw.githubusercontent.com](https://raw.githubusercontent.com/KytyPS5/KytyPS5/1d56d0303a051b1e407528e2c1853f3ab7e3d888/src/libs/network.cpp)) <!-- fingerprinting:phantom:poseidon:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:d281fc306b2e3ebad8db3e99 --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commit e9fed6b
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-31 19:15 UTC · original · edited 2026-10-31 21:34 UTC
On src/libs/libNet.cpp line 1532 (outdated):

@@ -1453,6 +1500,61 @@ static int KYTY_SYSV_ABI Http2DeleteRequest(int req_id) {
 	return 0;
 }
 
+static int KYTY_SYSV_ABI Http2SetResolveRetry(int id, int32_t retry) {
+	PRINT_NAME();
+
+	LOGF("\t id    = %d\n"
+	     "\t retry = %d\n",
+	     id, retry);
+
+	auto* options = GetHttp2Options(id);
+	if (options == nullptr) {
+		return HTTP2_ERROR_INVALID_ID;
+	}
+
+	options->resolve_retry = retry;
+
+	return 0;
+}
+
+static int KYTY_SYSV_ABI Http2AbortRequest(int req_id) {
+	PRINT_NAME();
+
+	LOGF("\t req_id = %d\n", req_id);
+
+	auto request = g_http2_requests.find(req_id);
+	if (request != g_http2_requests.end()) {
+		request->second.send_result  = HTTP2_ERROR_TIMEOUT;
+		request->second.async_result = HTTP2_ERROR_TIMEOUT;
+		return 0;
+	}
+
+	return Network::Http::HttpAbortRequest(req_id);

Minor · Functional Correctness · Quick win

Keep HTTP/2 abort errors in the HTTP/2 error domain.

If req_id is not a tracked HTTP/2 request, this call returns an HTTP error for an unknown ID. It can also return success for an unrelated, valid HTTP request ID without changing the HTTP/2 request state. Return HTTP2_ERROR_INVALID_ID for an untracked HTTP/2 ID, or translate the delegated result if cross-library IDs are intentional. (raw.githubusercontent.com)

✅ Addressed in commit e9fed6b

**@⁠coderabbitai[bot]** on GitHub · 2026-10-31 19:15 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2028#discussion_r4432981012) · edited 2026-10-31 21:34 UTC On `src/libs/libNet.cpp` line 1532 (outdated): ```diff @@ -1453,6 +1500,61 @@ static int KYTY_SYSV_ABI Http2DeleteRequest(int req_id) { return 0; } +static int KYTY_SYSV_ABI Http2SetResolveRetry(int id, int32_t retry) { + PRINT_NAME(); + + LOGF("\t id = %d\n" + "\t retry = %d\n", + id, retry); + + auto* options = GetHttp2Options(id); + if (options == nullptr) { + return HTTP2_ERROR_INVALID_ID; + } + + options->resolve_retry = retry; + + return 0; +} + +static int KYTY_SYSV_ABI Http2AbortRequest(int req_id) { + PRINT_NAME(); + + LOGF("\t req_id = %d\n", req_id); + + auto request = g_http2_requests.find(req_id); + if (request != g_http2_requests.end()) { + request->second.send_result = HTTP2_ERROR_TIMEOUT; + request->second.async_result = HTTP2_ERROR_TIMEOUT; + return 0; + } + + return Network::Http::HttpAbortRequest(req_id); ``` <!-- coderabbit-ai-generated:v1 --> **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/amber-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minor** · **Functional Correctness** · **Quick win** **Keep HTTP/2 abort errors in the HTTP/2 error domain.** If `req_id` is not a tracked HTTP/2 request, this call returns an HTTP error for an unknown ID. It can also return success for an unrelated, valid HTTP request ID without changing the HTTP/2 request state. Return `HTTP2_ERROR_INVALID_ID` for an untracked HTTP/2 ID, or translate the delegated result if cross-library IDs are intentional. ([raw.githubusercontent.com](https://raw.githubusercontent.com/KytyPS5/KytyPS5/1d56d0303a051b1e407528e2c1853f3ab7e3d888/src/libs/network.cpp)) <!-- fingerprinting:phantom:poseidon:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:dbe380afcb4d70b98a67e664 --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commit e9fed6b
@ -1420,6 +1450,29 @@ int KYTY_SYSV_ABI NetPoolDestroy(int memid) {
return OK;
}
int KYTY_SYSV_ABI NetGetMemoryPoolStats(int memid, Net::NetMemoryPoolStats* stats) {
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-31 19:15 UTC · original · edited 2026-10-31 21:35 UTC

Critical · Functional Correctness · Quick win

Declare the Net statistics type and function before using them.

At the reviewed revision, src/libs/network.h contains neither Net::NetMemoryPoolStats nor a declaration of Net::NetGetMemoryPoolStats. This definition cannot compile because the parameter type is unknown. The new wrapper in src/libs/libNet.cpp also needs both declarations. Add the shared struct and function declaration to src/libs/network.h. (raw.githubusercontent.com)

✅ Addressed in commit e9fed6b

**@⁠coderabbitai[bot]** on GitHub · 2026-10-31 19:15 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2028#discussion_r4432981014) · edited 2026-10-31 21:35 UTC <!-- coderabbit-ai-generated:v1 --> **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/critical-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Critical** · **Functional Correctness** · **Quick win** **Declare the Net statistics type and function before using them.** At the reviewed revision, `src/libs/network.h` contains neither `Net::NetMemoryPoolStats` nor a declaration of `Net::NetGetMemoryPoolStats`. This definition cannot compile because the parameter type is unknown. The new wrapper in `src/libs/libNet.cpp` also needs both declarations. Add the shared struct and function declaration to `src/libs/network.h`. ([raw.githubusercontent.com](https://raw.githubusercontent.com/KytyPS5/KytyPS5/1d56d0303a051b1e407528e2c1853f3ab7e3d888/src/libs/network.h)) <!-- fingerprinting:phantom:poseidon:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:22493ecd68334817c6c01140 --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commit e9fed6b
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-31 19:16 UTC · original · reviewed

Actionable comments posted: 3


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 026189166f and 1d56d0303a.

Files selected for processing: 3
  • src/libs/libNet.cpp
  • src/libs/network.cpp
  • src/libs/network.h

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-31 19:16 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2028#pullrequestreview-5724481244) · **reviewed** <!-- coderabbit-ai-generated:v1 --> **Actionable comments posted: 3** --- <details> <summary><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="16" height="16" align="absmiddle" alt=""></picture> Review info</summary> <dl> <dd> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</summary> <dl> <dd> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/026189166f71cc1995f5851dee1ddad7d5826e99/.coderabbit.yaml>) - **Commit**: [0261891](<https://github.com/KytyPS5/KytyPS5/commit/026189166f71cc1995f5851dee1ddad7d5826e99>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `39ea61fa-14b8-48ef-b830-b759bc6ec82e` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</summary> <dl> <dd> Reviewing files that changed from the base of the PR and between 026189166f71cc1995f5851dee1ddad7d5826e99 and 1d56d0303a051b1e407528e2c1853f3ab7e3d888. </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 3</summary> <dl> <dd> * `src/libs/libNet.cpp` * `src/libs/network.cpp` * `src/libs/network.h` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. </dd> </dl> </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=adab0aa9-789b-4a2e-b154-6f269e42b99c attempt=51a1842d-673b-4098-917c-bcc3923425f5 batch=1/1 -->
Author
Owner

@⁠Nmzik on GitHub · 2026-11-04 01:22 UTC · original

Merged only Http2GetMemoryPoolStats

**@⁠Nmzik** on GitHub · 2026-11-04 01:22 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2028#issuecomment-6619944577) Merged only Http2GetMemoryPoolStats

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.