BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
IP.php File Reference

Classes

class  IP
 

Variables

const RE_IP_BYTE '(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|0?[0-9]?[0-9])'
 
const RE_IP_ADD RE_IP_BYTE . '\.' . RE_IP_BYTE . '\.' . RE_IP_BYTE . '\.' . RE_IP_BYTE
 
const RE_IP_PREFIX '(3[0-2]|[12]?\d)'
 
const RE_IP_BLOCK RE_IP_ADD . '\/' . RE_IP_PREFIX
 
const RE_IPV6_WORD '([0-9A-Fa-f]{1,4})'
 
const RE_IPV6_PREFIX '(12[0-8]|1[01][0-9]|[1-9]?\d)'
 
const RE_IPV6_ADD '(?:' . ':(?::|(?::' . RE_IPV6_WORD . '){1,7})' . '|' . RE_IPV6_WORD . '(?::' . RE_IPV6_WORD . '){0,6}::' . '|' . RE_IPV6_WORD . '(?::((?(-1)|:))?' . RE_IPV6_WORD . '){1,6}(?(-2)|^)' . '|' . RE_IPV6_WORD . '(?::' . RE_IPV6_WORD . '){7}' . ')'
 
const RE_IPV6_BLOCK RE_IPV6_ADD . '\/' . RE_IPV6_PREFIX
 
const RE_IPV6_GAP ':(?:0+:)*(?::(?:0+:)*)?'
 
const RE_IPV6_V4_PREFIX '0*' . RE_IPV6_GAP . '(?:ffff:)?'
 
const IP_ADDRESS_STRING '(?:' . RE_IP_ADD . '(?:\/' . RE_IP_PREFIX . ')?' . '|' . RE_IPV6_ADD . '(?:\/' . RE_IPV6_PREFIX . ')?' . ')'
 

Detailed Description

Functions and constants to play with IP addresses and ranges

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Author
Antoine Musso "<hashar at free dot fr>", Aaron Schulz