Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
TIp6Addr Class Reference

The 128 bits of IPv6 or IPv4 address stored in network byte order. More...

#include <in_sock.h>

Public Member Functions

IMPORT_C TBool IsUnicast () const
 Tests if the address is IPv6 unicast.
 
IMPORT_C TBool IsMulticast () const
 Tests if the IPv6 address is multicast.
 
IMPORT_C TBool IsLoopback () const
 Tests if the address is IPv6 loopback.
 
IMPORT_C TBool IsUnspecified () const
 Tests if the address is IPv6 unspecified.
 
IMPORT_C TBool IsLinkLocal () const
 Tests if the address is an IPv6 link-local address.
 
IMPORT_C TBool IsSiteLocal () const
 Tests if this address is an IPv6 site-local address (fec0::/10).
 
IMPORT_C TBool IsV4Compat () const
 Tests if this address is an IPv4-compatible address.
 
IMPORT_C TBool IsV4Mapped () const
 Tests if this address is an IPv4-mapped address.
 
IMPORT_C TBool IsEqual (const TIp6Addr &aAddr) const
 Tests if two addresses are equal.
 
IMPORT_C TInt Match (const TIp6Addr &aAddr) const
 Compares two raw IPv6 addresses from left to right and returns the number of bits that match.
 
IMPORT_C TInt Scope () const
 Return the scope level of the addres.
 

Public Attributes

union { 
 
   TUint8   iAddr8 [16] 
 
   TUint16   iAddr16 [8] 
 
   TUint32   iAddr32 [4] 
 
} u 
 

Detailed Description

The 128 bits of IPv6 or IPv4 address stored in network byte order.

IPv4 addresses are stored in IPv4 mapped format.

Since
7.0
API status
Published to all clients. Released API.

Definition at line 313 of file in_sock.h.

Member Function Documentation

◆ IsEqual()

IMPORT_C TBool TIp6Addr::IsEqual ( const TIp6Addr &  aAddr) const

Tests if two addresses are equal.

Parameters
aAddrAddress to compare with
Since
7.0

(generated from Symbian Developer Library)

◆ IsLinkLocal()

IMPORT_C TBool TIp6Addr::IsLinkLocal ( ) const

Tests if the address is an IPv6 link-local address.

Returns
ETrue, if this address is an IPv6 link-local address (fe80::/10); EFalse, otherwise.
Since
7.0

(generated from Original Symbian implementation)

Since
7.0

(generated from Symbian Developer Library)

◆ IsLoopback()

IMPORT_C TBool TIp6Addr::IsLoopback ( ) const

Tests if the address is IPv6 loopback.

Returns
ETrue, if the address is loopback (::1); EFalse, otherwise.
Since
7.0

(generated from Original Symbian implementation)

Since
7.0

(generated from Symbian Developer Library)

◆ IsMulticast()

IMPORT_C TBool TIp6Addr::IsMulticast ( ) const

Tests if the IPv6 address is multicast.

Returns
ETrue, if the IP address value is IPv6 multicast (ff00::/8); EFalse, otherwise.
Since
7.0

(generated from Original Symbian implementation)

Since
7.0

(generated from Symbian Developer Library)

◆ IsSiteLocal()

IMPORT_C TBool TIp6Addr::IsSiteLocal ( ) const

Tests if this address is an IPv6 site-local address (fec0::/10).

Returns
ETrue, if this is an IPv6 site-local address (fec0::/10); EFalse, otherwise.
Since
7.0

(generated from Original Symbian implementation)

Since
7.0

(generated from Symbian Developer Library)

◆ IsUnicast()

IMPORT_C TBool TIp6Addr::IsUnicast ( ) const

Tests if the address is IPv6 unicast.

Returns
ETrue, if the address is unicast (not IPv6 unspecified or multicast); EFalse, otherwise.
Since
7.0

(generated from Original Symbian implementation)

Since
7.0

(generated from Symbian Developer Library)

◆ IsUnspecified()

IMPORT_C TBool TIp6Addr::IsUnspecified ( ) const

Tests if the address is IPv6 unspecified.

Returns
ETrue, if the IP address value is zero (= ::); EFalse, otherwise.
Since
7.0

(generated from Original Symbian implementation)

Since
7.0

(generated from Symbian Developer Library)

◆ IsV4Compat()

IMPORT_C TBool TIp6Addr::IsV4Compat ( ) const

Tests if this address is an IPv4-compatible address.

returns EFalse for ::0.0.0.0 (= ::) and ::0.0.0.1 (= ::1).

Since
7.0

(generated from Symbian Developer Library)

◆ IsV4Mapped()

IMPORT_C TBool TIp6Addr::IsV4Mapped ( ) const

Tests if this address is an IPv4-mapped address.

Returns
ETrue, if this address is an IPv4-mapped address (::ffff:x.x.x.x); EFalse, otherwise.
Since
7.0

(generated from Original Symbian implementation)

Since
7.0

(generated from Symbian Developer Library)

◆ Match()

IMPORT_C TInt TIp6Addr::Match ( const TIp6Addr &  aAddr) const

Compares two raw IPv6 addresses from left to right and returns the number of bits that match.

Parameters
aAddrAddress to compare with
Since
7.0

(generated from Symbian Developer Library)

◆ Scope()

IMPORT_C TInt TIp6Addr::Scope ( ) const

Return the scope level of the addres.

All IP addresses (IPv4 and IPv6) have a scope level as defined by this function. The scope level is a positive integer in range [1..16].

This function may also return 0, which is an invalid level. This can happen only, because IPv6 multicast addresses specify their scope level explicitly.

The scope level determines the interpretation of the scope identifier in TInetAddr (see TInetAddr::Scope(), TInetAddr::SetScope()).

Each network interface has a vector of 16 scope identifiers. The scope identifier in the destination address selects a subset of the possible interfaces: only the interfaces which have the correct matching scope identifier in the vector entry matching the scope level, are valid destinations for that address.

The scope level of an IP address is computed as follows:

  • ffyz::/10 – IPv6 multicast addressess, the scope level is extracted from the address (= z)
  • fe80::/10 – IPv6 link local addresses, return KIp6AddrScopeLinkLocal
  • fec0::/10 – IPv6 site local addresses, return KIp6AddrScopeSiteLocal
  • ::1/128 – IPv6 loopback address, return KIp6AddrScopeNodeLocal
  • ::/128 – IPv6 unspecified address, return KIp6AddrScopeNodeLocal
  • ffff:0.0.0.0 – IPv4 unspecified address, return KIp6AddrScopeNodeLocal
  • ffff:169.254.x.x/112 – IPv4 link local range, return KIp6AddrScopeLinkLocal
  • ffff:224.0.0.x/120 – IPv4 link local multicast range, return KIp6AddrScopeLinkLocal
  • ffff:127.x.x.x/104 – IPv4 loopback addresses, return KIp6AddrScopeNodeLocal
  • ffff:0.0.0.0/96 – all other IPv4 addresses, return KIp6AddrScopeNetwork
  • None of the above – assume global IPv6 addresses, return KIp6AddrScopeGlobal
Since
7.0

(generated from Symbian Developer Library)

Member Data Documentation

◆ iAddr16

TUint16 TIp6Addr::iAddr16[8]

Definition at line 341 of file in_sock.h.

◆ iAddr32

TUint32 TIp6Addr::iAddr32[4]

Definition at line 342 of file in_sock.h.

◆ iAddr8

TUint8 TIp6Addr::iAddr8[16]

Definition at line 340 of file in_sock.h.

◆ [union]

union { ... } TIp6Addr::u

The documentation for this class was generated from the following files: