Class SimplePie_Net_IPv6

Description

Class to validate and to work with IPv6 addresses.

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


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

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 removeNetmaskSpec (line 12337)

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 SplitV64 (line 12451)

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 Uncompress (line 12365)

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 Tue, 19 Nov 2013 15:13:50 +0100 by phpDocumentor 1.4.3