Files
AnyPS5/docs/dev
Yunus Shaikh a19d110222 feat(libSceNet): report the IPv4 default route in sceNetConfigGetDefaultRoute
sceNetConfigGetDefaultRoute threw. It now writes the IPv4 gateway of the
host interface that libSceNetCtl's sceNetCtlGetInfo already describes as
DEFAULT_ROUTE, in network byte order, the order sceNetInetPton writes an
AF_INET address in, and returns 0. libSceNetCtl exports
NetCtlHostIpv4Gateway_nid_no_patch for it, next to the DNS helper
sceNetGetDnsInfo uses. Without a gateway, or for a null pointer, it
still throws: the console's answer for a missing route is not measured.

Tested: guest_sce_net_tests, after sceNetCtlInit, prints the gateway
with sceNetInetNtop and compares it with sceNetCtlGetInfo's
DEFAULT_ROUTE text (192.0.2.1 on this host); a null pointer throws.
On a host without a default route the case checks that the call
throws and leaves the output untouched.
2026-10-22 01:44:35 +00:00
..