Net_IPv6::getAddressType()

Net_IPv6::getAddressType() – Returns the type of an IP address

Synopsis

require_once 'Net/IPv6.php';

int Net_IPv6::getAddressType ( string $ip )

Description

RFC 1883, Section 2.3 describes several types of addresses in the IPv6 addresse space. This methods tries to find the type of address for the given IP.

Several address types are markers for reserved spaces and as consequence a subject to change.

Parameter

  • string $ip - the IP address in Hex format, compressed IPs are allowed

Return value

int - the addresstype

The type can be one of this constants:

  • NET_IPV6_MULTICAST

  • NET_IPV6_UNICAST_PROVIDER

  • NET_IPV6_LOCAL_LINK

  • NET_IPV6_LOCAL_SITE

  • NET_IPV6_UNKNOWN_TYPE

  • NET_IPV6_RESERVED_UNICAST_GEOGRAPHIC

  • NET_IPV6_RESERVED_IPX

  • NET_IPV6_RESERVED

  • NET_IPV6_RESERVED_NSAP

  • NET_IPV6_UNASSIGNED

Note

This function can be called statically.

Method available since: Release 1.1.0

Uncompresses an IPv6 address (Previous) Calculates the network prefix (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.