MediaWiki REL1_33
|
Functions and constants to play with IP addresses and ranges. More...
Go to the source code of this file.
Classes | |
class | IP |
A collection of public static functions to play with IP address and IP ranges. More... | |
Variables | |
const | IP_ADDRESS_STRING '(?:' . RE_IP_ADD . '(?:\/' . RE_IP_PREFIX . ')?' . '|' . RE_IPV6_ADD . '(?:\/' . RE_IPV6_PREFIX . ')?' . ')' |
const | RE_IP_ADD RE_IP_BYTE . '\.' . RE_IP_BYTE . '\.' . RE_IP_BYTE . '\.' . RE_IP_BYTE |
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_PREFIX '(3[0-2]|[12]?\d)' |
const | RE_IP_RANGE RE_IP_ADD . '\/' . RE_IP_PREFIX |
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_GAP ':(?:0+:)*(?::(?:0+:)*)?' |
const | RE_IPV6_PREFIX '(12[0-8]|1[01][0-9]|[1-9]?\d)' |
const | RE_IPV6_RANGE RE_IPV6_ADD . '\/' . RE_IPV6_PREFIX |
const | RE_IPV6_V4_PREFIX '0*' . RE_IPV6_GAP . '(?:ffff:)?' |
const | RE_IPV6_WORD '([0-9A-Fa-f]{1,4})' |
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
Definition in file IP.php.
const IP_ADDRESS_STRING '(?:' . RE_IP_ADD . '(?:\/' . RE_IP_PREFIX . ')?' . '|' . RE_IPV6_ADD . '(?:\/' . RE_IPV6_PREFIX . ')?' . ')' |
const RE_IP_ADD RE_IP_BYTE . '\.' . RE_IP_BYTE . '\.' . RE_IP_BYTE . '\.' . RE_IP_BYTE |
const RE_IP_BYTE '(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|0?[0-9]?[0-9])' |
Definition at line 29 of file IP.php.
Referenced by ApiBase\validateUser().
const RE_IP_RANGE RE_IP_ADD . '\/' . RE_IP_PREFIX |
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_RANGE RE_IPV6_ADD . '\/' . RE_IPV6_PREFIX |
const RE_IPV6_V4_PREFIX '0*' . RE_IPV6_GAP . '(?:ffff:)?' |