function NoProxyPattern::ipMapTo6
Maps an IPv4 address to IPv6
Parameters
string $binary in_addr:
int $size Byte size of in_addr:
Return value
string Mapped or existing in_addr
2 calls to NoProxyPattern::ipMapTo6()
- NoProxyPattern::ipGetAddr in vendor/
composer/ composer/ src/ Composer/ Util/ NoProxyPattern.php - Returns an array of the IP in_addr and its byte size
- NoProxyPattern::ipGetMask in vendor/
composer/ composer/ src/ Composer/ Util/ NoProxyPattern.php - Returns the binary network mask mapped to IPv6
File
-
vendor/
composer/ composer/ src/ Composer/ Util/ NoProxyPattern.php, line 313
Class
- NoProxyPattern
- Tests URLs against NO_PROXY patterns
Namespace
Composer\UtilCode
private function ipMapTo6(string $binary, int $size) : string {
if ($size === 4) {
$prefix = str_repeat(chr(0), 10) . str_repeat(chr(255), 2);
$binary = $prefix . $binary;
}
return $binary;
}