mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-07 13:39:55 +00:00
sceNetInetNtopWithScopeId and sceNetInetPtonWithScopeId threw. They now handle AF_INET6 text with an RFC 4007 numeric zone (fe80::1%2): the address part goes through sceNetInetNtop and sceNetInetPton, so it follows the FreeBSD inet text rules, and the zone is printed and parsed as FreeBSD 11.4's getnameinfo (NI_NUMERICSCOPE) and getaddrinfo do. A zero scope ID prints the address alone and text without a zone parses to scope ID 0. An empty zone, one above 2^32 - 1, or an invalid address part returns 0 and leaves both outputs untouched; a buffer too small for the scoped text gives ENOSPC. A zone given as an interface name, and AF_INET, still throw: the tree has no mapping from interface names to the console's interface indexes and no answer for an IPv4 zone. The debt file says so. Tested: guest_sce_net_tests round-trips fe80::1%2 (same address bytes as fe80::1, scope ID 2) and ff02::1%4294967295, checks the exact buffer size and ENOSPC one byte short, the unscoped forms, four rejected texts with untouched outputs, EINVAL for null pointers, and that an interface-name zone and AF_INET throw.