SimplePie
[ class tree: SimplePie ] [ index: SimplePie ] [ all elements ]

Class: SimplePie_Net_IPv6

Source Location: /simplepie.inc

Class Overview


Class to validate and to work with IPv6 addresses.


Author(s):

Copyright:

  • 2003-2005 The PHP Group

Methods



Class Details

[line 12019]
Class to validate and to work with IPv6 addresses.



Tags:

author:  elfrink at introweb dot nl
author:  Alexander Merz <alexander.merz@web.de>
author:  Josh Peck <at joshpeck dot org jmp at joshpeck dot org>
author:  Geoffrey Sneddon <geoffers@gmail.com>
copyright:  2003-2005 The PHP Group
link:  http://pear.php.net/package/Net_IPv6
license:  http://www.opensource.org/licenses/bsd-license.php


[ Top ]


Class Methods


static method checkIPv6 [line 12170]

static bool checkIPv6( string $ip)

Checks an IPv6 address

Checks if the given IP is IPv6-compatible




Tags:

return:  true if $ip is an IPv6 address
access:  public


Parameters:

string   $ip   a valid IPv6-address

[ Top ]

static method removeNetmaskSpec [line 12030]

static string removeNetmaskSpec( string $ip)

Removes a possible existing netmask specification of an IP address.



Tags:

return:  the IP the without netmask
access:  public
since:  1.1.0


Parameters:

string   $ip   the (compressed) IP as Hex representation

[ Top ]

static method SplitV64 [line 12144]

static array SplitV64( string $ip)

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




Tags:

return:  [0] contains the IPv6 part, [1] the IPv4 part (hex format)
access:  public


Parameters:

string   $ip   a valid IPv6-address (hex format)

[ Top ]

static method Uncompress [line 12058]

static string Uncompress( string $ip)

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




Tags:

return:  the uncompressed IPv6-address (hex format)
access:  public


Parameters:

string   $ip   a valid IPv6-address (hex format)

[ Top ]


Documentation generated on Sat, 16 Aug 2008 07:54:09 -0700 by phpDocumentor 1.3.1