The containing class is available as OS\sockaddr_in6 in the www repository.
OS\sockaddr_in6
Get the scope ID
final public function getScopeID(): int;
See man ip6 for details.
man ip6
int