checkIPv6 [line 864]
Boolean checkIPv6(
String
$ip)
|
|
Checks an IPv6 adress
Checks if the given IP is IPv6-compatible
Parameters:
compress [line 675]
tring compress(
String
$ip, [boolean
$force = false])
|
|
Compresses an IPv6 adress
RFC 2373 allows you to compress zeros in an adress to '::'. This function expects an valid IPv6 adress and compresses successive zeros to '::'
Example: FF01:0:0:0:0:0:0:101 -> FF01::101 0:0:0:0:0:0:0:1 -> ::1
Whe $ip is an already compressed adress the methode returns the value as is, also if the adress can be compressed further.
Example: FF01::0:1 -> FF01::0:1
To enforce maximum compression, you can set the second argument $force to true.
Example: FF01::0:1 -> FF01::1
Parameters:
getAddressType [line 428]
int getAddressType(
String
$ip)
|
|
Returns the type of an IPv6 address.
RFC 2373, Section 2.3 describes several types of addresses in the IPv6 addresse space. Several addresse types are markers for reserved spaces and as consequence a subject to change.
Parameters:
getNetmask [line 295]
String getNetmask(
String
$ip, [int
$bits = null])
|
|
Calculates the network prefix based on the netmask bits.
Parameters:
getNetmaskSpec [line 239]
String getNetmaskSpec(
String
$ip)
|
|
Returns a possible existing prefix length/netmask specification on an IP addresse.
Parameters:
getPrefixLength [line 265]
Mixed getPrefixLength(
String
$ip)
|
|
Tests for a prefix length specification in the address and returns the prefix length, if exists
The method is technically identical to getNetmaskSpec() and will be dropped in a future release.
Parameters:
isCompressible [line 792]
Boolean isCompressible(
String
$ip)
|
|
Checks, if an IPv6 adress can be compressed
Parameters:
isInNetmask [line 345]
boolean isInNetmask(
String
$ip, String
$netmask, [int
$bits = null])
|
|
Checks if an (compressed) IP is in a specific address space.
IF the IP does not contains the number of netmask bits (F8000::FFFF/16) then you have to use the $bits parameter.
Parameters:
parseAddress [line 975]
Array parseAddress(
String
$ipToParse, [String
$bits = null])
|
|
Returns the lowest and highest IPv6 address for a given IP and netmask specification
The netmask may be a part of the $ip or the number of netwask bits is provided via $bits
The result is an indexed array. The key 'start' contains the lowest possible IP adress. The key 'end' the highest address.
Parameters:
recommendedFormat [line 764]
String recommendedFormat(
String
$ip)
|
|
Represent IPv6 address in RFC5952 format.
Parameters:
removeNetmaskSpec [line 187]
String removeNetmaskSpec(
String
$ip)
|
|
Removes a possible existing prefix length/ netmask specification at an IP addresse.
Parameters:
removePrefixLength [line 213]
String removePrefixLength(
String
$ip)
|
|
Tests for a prefix length specification in the address and removes the prefix length, if exists
The method is technically identical to removeNetmaskSpec() and will be dropped in a future release.
Parameters:
separate [line 149]
Array separate(
String
$ip)
|
|
Separates an IPv6 address into the address and a prefix length part
Parameters:
SplitV64 [line 820]
Array SplitV64(
String
$ip, [Boolean
$uncompress = true])
|
|
Splits an IPv6 adress into the IPv6 and a possible IPv4 part
RFC 2373 allows you to note the last two parts of an IPv6 adress as an IPv4 compatible adress
Example: 0:0:0:0:0:0:13.1.68.3 0:0:0:0:0:FFFF:129.144.52.38
Parameters:
uncompress [line 529]
String uncompress(
String
$ip, [Boolean
$leadingZeros = false])
|
|
Uncompresses an IPv6 adress
RFC 2373 allows you to compress zeros in an adress to '::'. This function expects an valid IPv6 adress and expands the '::' to the required zeros.
Example: FF01::101 -> FF01:0:0:0:0:0:0:101 ::1 -> 0:0:0:0:0:0:0:1
Parameters:
_bin2Ip [line 1062]
String _bin2Ip(
String
$bin)
|
|
Converts an IPv6 address from Binary into Hex representation.
Parameters:
_ip2Bin [line 1031]
String _ip2Bin(
String
$ip)
|
|
Converts an IPv6 address from Hex into Binary representation.
Parameters: