Class SimplePie_Net_IPv6

Description

Class to validate and to work with IPv6 addresses.

Located in /libraries/simplepie/simplepie.php (line 12321)


	
			
Method Summary
static bool checkIPv6 (string $ip)
static string removeNetmaskSpec (string $ip)
static array SplitV64 (string $ip)
static string Uncompress (string $ip)
Methods
static method checkIPv6 (line 12472)

Checks an IPv6 address

Checks if the given IP is IPv6-compatible

  • return: true if $ip is an IPv6 address
  • access: public
static bool checkIPv6 (string $ip)
  • string $ip: a valid IPv6-address
static method removeNetmaskSpec (line 12332)

Removes a possible existing netmask specification of an IP address.

  • return: the IP the without netmask
  • since: 1.1.0
  • access: public
static string removeNetmaskSpec (string $ip)
  • string $ip: the (compressed) IP as Hex representation
static method SplitV64 (line 12446)

Splits an IPv6 address into the IPv6 and a possible IPv4 part

RFC 2373 allows you to note the last two parts of an IPv6 address as an IPv4 compatible address

Example: 0:0:0:0:0:0:13.1.68.3 0:0:0:0:0:FFFF:129.144.52.38

  • return: [0] contains the IPv6 part, [1] the IPv4 part (hex format)
  • access: public
static array SplitV64 (string $ip)
  • string $ip: a valid IPv6-address (hex format)
static method Uncompress (line 12360)

Uncompresses an IPv6 address

RFC 2373 allows you to compress zeros in an address to '::'. This function expects an valid IPv6 address 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

  • return: the uncompressed IPv6-address (hex format)
  • access: public
static string Uncompress (string $ip)
  • string $ip: a valid IPv6-address (hex format)

Documentation generated on Mon, 25 Jun 2012 13:59:35 -0500 by phpDocumentor 1.4.4