Home » Networking » Net_IPv6
Check and validate IPv6 addresses
This package is unmaintained.
Download latest release 1.3.0b4 (archived versions might be outdated)
License: BSD
Description
The class allows you to:
* check if an address is an IPv6 address
* compress/uncompress IPv6 addresses
* check for an IPv4 compatible ending in an IPv6 address
* check the assigned address space of an IPv6 address
* do netmask calculations
Documentation
Maintainers
- Alexander Merz (alexmerz) — lead, active
Dependencies
Required
- PHP (>= 5.0.0)
- PEAR Installer (>= 1.4.0b1)
Releases
- 1.3.0b4 (beta, 2018-07-09)
Release notes
License: BSD
fix #23755 _ip2Bin() incorrectly convert IPv4 mapped into binary
fix #23756 Compressed netmasks incorrectly detected in isInNetmask() - 1.3.0b3 (beta, 2017-07-27)
Release notes
License: BSD
fix #13006 failed compressing ipv6 with ip4 part
fix #21140 splitV64 for double-colon do not uncompress case - 1.3.0b2 (beta, 2016-05-25)
Release notes
License: BSD
#21046 checkIPv6 wrongly validates IPv6 IPs with leading and/or trailing :
- 1.3.0b1 (beta, 2015-06-14)
Release notes
License: BSD
#20558 String offset cast occurred
Use static keyword for class method declarations
Use public/protected keyword class method declarations - 1.2.2b2 (beta, 2012-03-23)
Release notes
License: BSD
#19334 CheckIPv6 accepted invalid characters
- 1.2.2b (beta, 2011-11-15)
Release notes
License: BSD
#18687 Add recommendedFormat() provided by Tetsuji Koyama to respect RFC5952 about shortening of 0-Byte
segments.
The method may become a part of compress() in a stable release.
#18976 Rok Potocnik spotted a missing range check for the netmask value while checking an IPv6 address. - 1.2.1 (stable, 2011-02-07)
Release notes
License: BSD
No Changes. Go to stable.
- 1.2.1RC1 (beta, 2010-12-30)
Release notes
License: BSD
Go to Release Candidate.
Updated Peardoc to reflect the API changes. - 1.2.1b1 (beta, 2010-12-22)
Release notes
License: BSD
Feature request:
+ add parameter to uncompress() to add leading zeros to an address (Pascal Uhlmann) - 1.2.1b (beta, 2010-11-25)
Release notes
License: BSD
#18085 Fix wrong file path
- 1.2.0b (beta, 2010-11-18)
Release notes
License: BSD
+ New method isCompressible()
+ New method separate()
+ compress() got a second parameter to enforce compression
+ add new address types
- deprecated getPrefixLength() (technical identical to getNetmaskSpec)
- deprecated removePrefixLength() (technical identical to removeNetmaskSpec) - 1.1.0 (stable, 2010-11-08)
Release notes
License: BSD
Jump from beta to stable.
Fixed:
#17819 documentation needs to be updated - 1.1.0b2 (beta, 2009-05-18)
Release notes
License: BSD
Fixed:
#14747 Compressing an already compressed IP returns the IP "as is" now
#15947 checkIPv6 returned true although the IP was too long
#16220 using the wrong variable in _bin2Ip - 1.1.0b1 (beta, 2008-10-27)
Release notes
License: BSD
Because this release adds a new method and some bug tickets are still open, the package
release is named as Beta, instead of releasing a 5th RC version.#14728 add parseAddress(), thanks to Nicholas Williams!
#14767 most CS issues should be solved - 1.1.0RC4 (beta, 2008-09-16)
Release notes
License: BSD
take care of prefix length specification in an address, thanks to Jens Ott
- 1.1.0RC3 (beta, 2007-11-21)
Release notes
License: BSD
Fix Bug #12442, thanks to pear at erikdebruijn dot nl
+ add getNetmaskSpec() - 1.1.0RC2 (beta, 2006-02-09)
Release notes
License: BSD
- fixed a notice, when removeNetmaskSpec is used on an IP
without a netmask - 1.1.0RC1 (beta, 2005-11-24)
Release notes
License: BSD
This new minor version adds some methods proposed
by Josh Peck (jmp @ joshpeck dot org).
+ Change license to BSD
+ Improved comments and docblocks
+ add removeNetmaskSpec()
+ add getNetmask()
+ add isInNetmask()
+ add getAddressType()
+ add _ip2Bin()
+ add _bin2Ip()
+ add serveral constants for address types - 1.0.5 (stable, 2005-09-01)
Release notes
License: BSD
Bug #3405 again: problem with compressing
Thanks to elfrink at introweb dot nl - 1.0.4 (stable, 2005-08-03)
Release notes
License: BSD
Bug #4977: trying to compress where nothing is to compress
Thanks to pvenegas at gmail dot com - 1.0.3 (stable, 2005-03-19)
Release notes
License: BSD
Bug #3851: IPv4-mapped/compatible IPv6 uncompress bug
Thanks to dtaylor at jasi dot com - 1.0.2 (stable, 2005-02-13)
- 1.0.1 (stable, 2004-11-24)
- 1.0 (stable, 2004-03-02)
Release notes
License: BSD
First official release
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #2802 | Closed | Bug | 2004-11-21 | compress() doesn't compress correctly | |
| #2803 | Closed | Bug | 2004-11-21 | compress() adds colon | |
| #3404 | Closed | Bug | 2005-02-08 | checkIPv6() is case sensitive | |
| #3405 | Closed | Bug | 2005-02-08 | compress() does not compress '0000' | |
| #3851 | Closed | Bug | 2005-03-16 | IPv4-mapped/compatible IPv6 uncompress bug | |
| #4977 | Closed | Bug | 2005-08-02 | Net_IPv6::compress() breaks on already-compressed addresses | |
| #12442 | Closed | Bug | 1.1.0RC2 | 2007-11-14 | Net_IPv6::Compress method confuses subnet for an ipv6 part |
| #13006 | Closed | Bug | 1.1.0RC3 | 2008-01-30 | Compressing a IPv6 with mixed IPv4 |
| #14728 | Closed | Req | 1.1.0RC4 | 2008-10-02 | Changes good, need a little more |
| #14747 | Closed | Bug | 1.1.0RC4 | 2008-10-05 | Net_IPv6::compress() Fails on Already-Compressed Addr |
| #14766 | Closed | Req | CVS | 2008-10-09 | Add a PHPUnit 3 test suite / improve unit tests |
| #14767 | Closed | Req | CVS | 2008-10-09 | Address PHPCS warnings |
| #15765 | Assigned | Req | 1.1.0b1 | 2009-01-25 | inet6_ntoa, inet6_aton |
| #15947 | Closed | Bug | 2009-02-26 | Invalid IPv6 address accepted on function Net_IPv6::checkIPv6 | |
| #16220 | Closed | Bug | 1.1.0b1 | 2009-05-12 | Error at _bin2Ip() |
| #16451 | Closed | Bug | CVS | 2009-07-18 | Unit tests vs directory layout |
| #16613 | Bogus | Req | 1.1.0b2 | 2009-09-16 | Integrate Net_IPv6 into PHP6 core |
| #17819 | Closed | Doc | 1.1.0b2 | 2010-08-25 | documentation needs to be updated |
| #18085 | Closed | Bug | 1.2.0b | 2010-11-25 | Wrong file path for IPv6.php |
| #18234 | Closed | Bug | 1.1.0 | 2011-02-03 | IPv6.php is installed as wrong path. |
| #18476 | Closed | Bug | 1.2.1 | 2011-04-25 | compress violates RFC 5952 Section 4.2.2. |
| #18477 | Feedback | Bug | 1.2.1 | 2011-04-25 | compress returns blank with the unspecified address (see RFC 4291) |
| #18687 | Closed | Req | 1.2.1 | 2011-07-26 | support RFC5952 compatible format |
| #18976 | Closed | Bug | 1.2.1 | 2011-11-09 | IPv6 validation problem |
| #19334 | Closed | Bug | 1.2.1 | 2012-03-16 | "False positive" |
| #19401 | Closed | Doc | 1.2.2b2 | 2012-04-27 | Please, add usage example |
| #20114 | Closed | Bug | 1.2.2b2 | 2013-11-04 | package.xml does not validate |
| #20558 | Closed | Bug | 1.2.2b2 | 2015-06-10 | String offset cast occurred [/usr/share/php/Net/IPv6.php, line 806] |
| #21046 | Closed | Bug | 1.2.1 | 2016-03-24 | checkIPv6 wrongly validates IPv6 IPs with leading and/or trailing : |
| #21069 | Bogus | Bug | 1.2.1 | 2016-05-28 | Different distfiles on different pear mirrors |
| #21094 | Closed | Doc | 1.3.0b2 | 2016-06-29 | Whitespace spelling grammar |
| #21106 | Closed | Bug | 1.3.0b2 | 2016-08-31 | Fix IP address validation issues |
| #21107 | Closed | Bug | 1.3.0b2 | 2016-08-31 | Fix IP address validation issues |
| #21139 | Closed | Bug | 1.3.0b2 | 2016-10-27 | compress zero address returns blank |
| #21140 | Closed | Bug | 1.3.0b2 | 2016-10-29 | SplitV64 with double-colon |
| #21141 | Closed | Bug | 1.3.0b2 | 2016-10-29 | Add test cases for invalid checkIPv6 |
| #21232 | Assigned | Req | Unknown | 2017-07-27 | Submit to packagist.org |
| #21233 | Duplicate | Req | Unknown | 2017-07-27 | Submit to packagist.org |
| #23737 | Assigned | Bug | 1.3.0b3 | 2018-02-13 | checkIPv6 validates IPv6 addresses with invalid charactes |
| #23755 | Closed | Bug | 1.3.0b3 | 2018-07-02 | _ip2Bin() incorrectly convert IPv4 mapped into binary |
| #23756 | Closed | Bug | 1.3.0b3 | 2018-07-02 | Compressed netmasks incorrectly detected in isInNetmask() |
| #27795 | Open | Bug | 1.3.0b4 | 2024-06-05 | isCompressible uses not existing variable |