Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: in_sock.h
Link against: insock.lib

Class TIp6Addr

class TIp6Addr;

Description

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

IPv4 addresses are stored in IPv4 mapped format.

Members

Defined in TIp6Addr:
IsEqual(), IsLinkLocal(), IsLoopback(), IsMulticast(), IsSiteLocal(), IsUnicast(), IsUnspecified(), IsV4Compat(), IsV4Mapped(), Match(), Scope(), iAddr16, iAddr32, iAddr8, u


Member functions


IsUnicast()

IMPORT_C TBool IsUnicast() const;

Description

Tests if the address is IPv6 unicast.

Return value

TBool

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


IsMulticast()

IMPORT_C TBool IsMulticast() const;

Description

Tests if the IPv6 address is multicast.

Return value

TBool

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


IsLoopback()

IMPORT_C TBool IsLoopback() const;

Description

Tests if the address is IPv6 loopback.

Return value

TBool

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


IsUnspecified()

IMPORT_C TBool IsUnspecified() const;

Description

Tests if the address is IPv6 unspecified.

Return value

TBool

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


IsLinkLocal()

IMPORT_C TBool IsLinkLocal() const;

Description

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

Return value

TBool

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


IsSiteLocal()

IMPORT_C TBool IsSiteLocal() const;

Description

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

Return value

TBool

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


IsV4Compat()

IMPORT_C TBool IsV4Compat() const;

Description

Tests if this address is an IPv4-compatible address.

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

Return value

TBool

ETrue, if this is a IPv4-compatible address (::x.x.x.x ); EFalse, otherwise.


IsV4Mapped()

IMPORT_C TBool IsV4Mapped() const;

Description

Tests if this address is an IPv4-mapped address.

Return value

TBool

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


IsEqual()

IMPORT_C TBool IsEqual(const TIp6Addr &aAddr) const;

Description

Tests if two addresses are equal.

Parameters

const TIp6Addr &aAddr

Address to compare with

Return value

TBool

ETrue, if the addresses are equal; EFalse, otherwise.


Match()

IMPORT_C TInt Match(const TIp6Addr &aAddr) const;

Description

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

Parameters

const TIp6Addr &aAddr

Address to compare with

Return value

TInt

The number of bits that match (the common prefix length).


Scope()

IMPORT_C TInt Scope() const;

Description

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:

Return value

TInt

The scope value of the address (e.g. KIp6AddrScopeNodeLocal, KIp6AddrScopeLinkLocal, KIp6AddrScopeSiteLocal, KIp6AddrScopeOrganization, KIp6AddrScopeGlobal or KIp6AddrScopeNetwork).

[Top]


Member data


iAddr8

TUint8 iAddr8;

Description


iAddr16

TUint16 iAddr16;

Description


iAddr32

TUint32 iAddr32;

Description


u

TIp6Addr::@25 u;

Description