|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
This class specialises the generic socket server address class TSockAddr for the TCP/IP protocol family. More...
#include <in_sock.h>
Public Member Functions | |
| IMPORT_C | TInetAddr () |
| Constructs a basic TInetAddr object. | |
| IMPORT_C | TInetAddr (const TSockAddr &aAddr) |
| Constructs a TInetAddr from a TSockAddr. | |
| IMPORT_C | TInetAddr (TUint aPort) |
| Constructs a TInetAddr and initialises the port to the specified value, and the IP address is unspecified. | |
| IMPORT_C | TInetAddr (const TIp6Addr &aAddr, TUint aPort) |
| Constructs a TInetAddr and initialises the port to the specified value, and the IPv6 address to aAddr. | |
| IMPORT_C | TInetAddr (TUint32 aAddr, TUint aPort) |
| Constructs a TInetAddr and initialise the specified port value to aPort and the IP address to aAddr. | |
| IMPORT_C void | SetAddress (TUint32 aAddr) |
| Sets the IPv4 address value. | |
| IMPORT_C void | SetAddress (const TIp6Addr &aAddr) |
| Sets the IPv6 address value. | |
| IMPORT_C void | SetV4CompatAddress (TUint32 aAddr) |
| Creates an IPv4-compatible IPv6 address. | |
| IMPORT_C void | SetV4MappedAddress (TUint32 aAddr) |
| Creates an IPv4-mapped IPv6 address. | |
| IMPORT_C void | SetFlowLabel (TInt aLabel) |
| Sets the Flow Label. | |
| IMPORT_C TInt | FlowLabel () const |
| Gets the Flow Label. | |
| IMPORT_C const TIp6Addr & | Ip6Address () const |
| Gets the IPv6 address. | |
| IMPORT_C void | ConvertToV4Compat () |
| Converts an IPv4 address to an IPv4-compatible IPv6 address. | |
| IMPORT_C void | ConvertToV4Mapped () |
| Converts an IPv4 address to an IPv4-mapped IPv6 address. | |
| IMPORT_C void | ConvertToV4 () |
| Converts an IPv4-mapped or IPv4-comptatible address to IPv4. | |
| IMPORT_C TBool | CmpAddr (const TInetAddr &aAddr) const |
| Compares IP address and port values with those in another TInetAddr. | |
| IMPORT_C TBool | Match (const TInetAddr &aHost) const |
| Tests the IP address value with that in another TInetAddr. | |
| IMPORT_C TBool | Match (const TInetAddr &aNet, const TInetAddr &aMask) const |
| Tests if another TInetAddr is in the same subnet. | |
| IMPORT_C TBool | Match (const TInetAddr &aNet, TInt aPrefixLen) const |
| Tests if the specified number of left-most bits on addresses are same. | |
| IMPORT_C void | PrefixMask (TInt aPrefixLen) |
| Creates an IPv6 address with the specified number of left-most bits set to 1, and the rest set to 0. | |
| IMPORT_C void | Prefix (const TInetAddr &aAddr, TInt aPrefixLen) |
| Creates an IPv6 address with the specified number of left-most bits copied from another address, and remaining bits set to 0. | |
| IMPORT_C void | Output (TDes &aBuf) const |
| Writes the IP address into a string. | |
| IMPORT_C TInt | Input (const TDesC &aBuf) |
| Sets the IP address from a string containing a representation of an IP address, such as might be entered in a dialog. | |
| IMPORT_C TBool | IsUnicast () const |
| Tests if address is unicast address. | |
| IMPORT_C TBool | IsMulticast () const |
| Tests if the IP address is a multicast address. | |
| IMPORT_C TBool | IsLoopback () const |
| Tests if the IP address is a loopback address. | |
| IMPORT_C TBool | IsUnspecified () const |
| Tests if the IP address is unspecified. | |
| IMPORT_C TBool | IsLinkLocal () const |
| Tests if IP address is link-local address. | |
| IMPORT_C TBool | IsSiteLocal () const |
| Tests if IP address is site-local address. | |
| 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 TUint32 | Address () const |
| Gets the IPv4 address value. | |
| IMPORT_C void | NetMask (const TInetAddr &aAddr) |
| Sets the IP address to a mask suitable for extracting the network number part of the IP address (deprecated). | |
| IMPORT_C void | Net (const TInetAddr &aAddr) |
| Obtains a network mask corresponding to the class of the IP address, using the NetMask() function, and then applies this mask to the current IP address (deprecated). | |
| IMPORT_C void | NetBroadcast (const TInetAddr &aAddr) |
| Sets the IP address to be suitable for a network-directed broadcast address (deprecated). | |
| IMPORT_C void | SubNet (const TInetAddr &aAddr, const TInetAddr &aMask) |
| Sets the IP address to the network number and subnet parts of the IP address (that is, the original IP address with the host number part cleared). | |
| IMPORT_C void | SubNetBroadcast (const TInetAddr &aAddr, const TInetAddr &aMask) |
| Sets the IP address to be suitable for a subnet-directed broadcast address. | |
| IMPORT_C void | SetScope (TUint32 aScope) |
| Sets the scope id value. | |
| IMPORT_C TUint32 | Scope () const |
| Gets the scope id value. | |
| IMPORT_C void | Init (TUint aFamily) |
| Initialises the object properly according to the address family passed in. | |
| IMPORT_C void | OutputWithScope (TDes &aBuf) const |
| Writes the IP address into a string and appends the scope id. | |
Public Member Functions inherited from TSockAddr | |
| IMPORT_C | TSockAddr () |
| Default constructor initialises the address to be zero-filled. | |
| IMPORT_C | TSockAddr (TUint aFamily) |
| Constructs the address with the family member data specified. | |
| IMPORT_C TUint | Family () const |
| Gets the address family and thereby the type of address. | |
| IMPORT_C void | SetFamily (TUint aFamily) |
| Sets the address family of an address. | |
| IMPORT_C TUint | Port () const |
| Gets the port value. | |
| IMPORT_C void | SetPort (TUint aPort) |
| Sets the address port of an address. | |
| IMPORT_C TBool | CmpPort (const TSockAddr &anAddr) const |
| Compare two ports. | |
| IMPORT_C TInt | GetUserLen () |
| Gets the number of bytes a derived class has set beyond the SSockAddr part of the address. | |
IPv6 address constants.. | |
| |
| TBool | IsClassA () const |
| Tests if the IP address is Class A. | |
| TBool | IsClassB () const |
| Tests if the IP address is Class B. | |
| TBool | IsClassC () const |
| Tests if the IP address is Class C. | |
| TBool | IsBroadcast () const |
| Tests if the IP address is a limited broadcast address (255.255.255.255). | |
| TBool | IsWildAddr () const |
| Tests if the IP address is unspecified. | |
| TBool | IsWildPort () const |
| Tests if the port is zero. | |
| static TInetAddr & | Cast (const TSockAddr &aAddr) |
| Casts a TSockAddr to a TInetAddr reference. | |
| static TInetAddr & | Cast (const TSockAddr *aAddr) |
| Casts a TSockAddr to a TInetAddr reference. | |
| SInetAddr * | Addr4Ptr () const |
| Returns a pointer to KAfInet content format | |
| SInet6Addr * | AddrPtr () const |
| Returns a pointer to KAfInet6 content format. | |
| static TInt | AddrLen () |
| Returns the size of the KAfInet6 content format. | |
Additional Inherited Members | |
Protected Member Functions inherited from TSockAddr | |
| IMPORT_C void | SetUserLen (TInt aLen) |
| Sets the length of data it appends after the base class' data. | |
| TUint8 * | UserPtr () const |
| Gets an offset to place data after the base class data. | |
This class specialises the generic socket server address class TSockAddr for the TCP/IP protocol family.
It represents an IP address and stores either an IPv4 or an IPv6 address in its buffer after the generic data defined by TSockAddr. The protocol family field provided by the TSockAddr base class can be set to KAfInet, KAfInet6 or KAFUnspec.
The address family defines the format of the stored address:
The flow label and scope id fields exist only in KAfInet6 format. However, the access functions TInetAddr::FlowLabel and TInetAddr::Scope will also work for other address formats by always returning 0.
Any function which sets or changes the address bits, will always reset the scope id and flow label to 0 (the TInetAddr::Init is always called internally). These are reasonable defaults, and normal application user does not normally need to worry about flow label or scope id.
When address is returned from the stack, it will often be in KAfInet6 format, and may contain non-zero values for flow label and scope id fields. When copying addresses, the full TInetAddr (or at least SInet6Addr) should be copied to preserve these fields.
| IMPORT_C TInetAddr::TInetAddr | ( | ) |
Constructs a basic TInetAddr object.
The port is initialised to 0, and the IP address is unspecified. The resulting address family is KAFUnspec.
(generated from Original Symbian implementation)
| IMPORT_C TInetAddr::TInetAddr | ( | const TSockAddr & | aAddr | ) |
Constructs a TInetAddr from a TSockAddr.
The port and IP address values are copied from aAddr. The resulting address family is same as that of aAddr.
The function does a raw copy operation of the TSockAddr. No checks are made at this point.
| aAddr | TSockAddr to be used as initial content. |
(generated from Original Symbian implementation)
| IMPORT_C TInetAddr::TInetAddr | ( | TUint | aPort | ) |
Constructs a TInetAddr and initialises the port to the specified value, and the IP address is unspecified.
The resulting address family is KAFUnspec.
| aPort | Value to which to set the port. |
(generated from Original Symbian implementation)
| IMPORT_C TInetAddr::TInetAddr | ( | const TIp6Addr & | aAddr, |
| TUint | aPort | ||
| ) |
Constructs a TInetAddr and initialises the port to the specified value, and the IPv6 address to aAddr.
The resulting address family is KAfInet6.
| aAddr | Value to which to set the IPv6 address. |
| aPort | Value to which to set the port. |
(generated from Original Symbian implementation)
| IMPORT_C TInetAddr::TInetAddr | ( | TUint32 | aAddr, |
| TUint | aPort | ||
| ) |
Constructs a TInetAddr and initialise the specified port value to aPort and the IP address to aAddr.
The resulting address family is KAfInet
| aAddr | Value to which to set the IP address. |
| aPort | Value to which to set the port. |
(generated from Original Symbian implementation)
|
inlineprotected |
| IMPORT_C TUint32 TInetAddr::Address | ( | ) | const |
Gets the IPv4 address value.
If the stored address is not an IPv4 address, the returned value is ZERO.
This works also for IPv4 addresses which are stored in IPv4-mapped or IPv4-compatible format. (since 7.0).
(generated from Original Symbian implementation)
|
inlinestaticprotected |
|
inlineprotected |
| IMPORT_C TBool TInetAddr::CmpAddr | ( | const TInetAddr & | aAddr | ) | const |
Compares IP address and port values with those in another TInetAddr.
| aAddr | TInetAddr with which to compare |
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::ConvertToV4 | ( | ) |
Converts an IPv4-mapped or IPv4-comptatible address to IPv4.
The function assumes that the previous content is IPv4 address and accesses this using TInetAddr::Address() function. If the previous content was not IPv4 address (in any format), function acts as if the old content was 0.0.0.0.
The address family is set to KAfInet.
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::ConvertToV4Compat | ( | ) |
Converts an IPv4 address to an IPv4-compatible IPv6 address.
The function assumes that the previous content is IPv4 address and accesses this using TInetAddr::Address() function. If the previous content was not IPv4 address (in any format), function acts as if the old content was 0.0.0.0.
The IPv4-compatible format is ::x.x.x.x.
The resulting address family is KAfInet6. The scope id and flow label are zeroed.
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::ConvertToV4Mapped | ( | ) |
Converts an IPv4 address to an IPv4-mapped IPv6 address.
The function assumes that the previous content is IPv4 address and accesses this using TInetAddr::Address() function. If the previous content was not IPv4 address (in any format), function acts as if the old content was "0.0.0.0".
The IPv4-mapped format is ::ffff:x.x.x.x. Internally, all IPv4 addresses are stored in this format.
The resulting address family is KAfInet6. The scope id and flow label are zeroed.
(generated from Original Symbian implementation)
| IMPORT_C TInt TInetAddr::FlowLabel | ( | ) | const |
Gets the Flow Label.
Only for KAfInet6, return zero for KAfInet.
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::Init | ( | TUint | aFamily | ) |
Initialises the object properly according to the address family passed in.
| aFamily | The address family. Valid values are |
(generated from Original Symbian implementation)
| IMPORT_C TInt TInetAddr::Input | ( | const TDesC & | aBuf | ) |
Sets the IP address from a string containing a representation of an IP address, such as might be entered in a dialog.
The string must contain an ASCII representation of the address. The format may be one of the following examples:
192.168.40.4) 192.168.10244) 192.11020292) 3232245764) 2001:618:400:6a:0:0:0:abc)Use at most one '::' to denote consecutive zeroes (eg. 2001:618:400:6a::abc), IPv4-compatible address (eg. ::192.168.40.4), and IPv4-mapped address (eg. ::ffff:192.168.40.4)
Any of the address notations above can be followed by "%scope-id" and the scope id of the TInetAddress is also set accordingly. If a dotted IPv4 address is associated with scope id, the address is stored as IPv4-mapped. If scope is not specified, the value defaults to zero. The flow label is set to zero.
The hexadecimal numbers may be either upper or lower case.
| aBuf | Descriptor containing a string representation of an IP address |
(generated from Original Symbian implementation)
| IMPORT_C const TIp6Addr & TInetAddr::Ip6Address | ( | ) | const |
Gets the IPv6 address.
Only for KAfInet6, undefined for KAfInet.
This function returns a reference to a location where IPv6 address would be stored. No check on family is made, and using this function for any other address family except KAfInet6 does not cause an error, but returned reference does not point to valid IPv6 address (unless content is converted to KAfInet6).
(generated from Original Symbian implementation)
|
inline |
|
inline |
Tests if the IP address is Class A.
|
inline |
Tests if the IP address is Class B.
|
inline |
Tests if the IP address is Class C.
| IMPORT_C TBool TInetAddr::IsLinkLocal | ( | ) | const |
Tests if IP address is link-local address.
For IPv4 this returns true, if the address belongs to the link-local net (169.254.x.x).
For IPv6 this returns true, if the address is IPv6 link-local address (fe80:..).
(generated from Original Symbian implementation)
| IMPORT_C TBool TInetAddr::IsLoopback | ( | ) | const |
Tests if the IP address is a loopback address.
For IPv4 addresses this returns true, if address belongs to the loopback net (127.x.x.x). IPv4 address can be in KAfInet or in IPv4-mapped/compatible formats.
For IPv6 address this returns true for IPv6 loopback address (= ::1).
(generated from Original Symbian implementation)
| IMPORT_C TBool TInetAddr::IsMulticast | ( | ) | const |
Tests if the IP address is a multicast address.
For IPv4 addresses this returns true, if address is Class D (multicast). IPv4 address can be in KAfInet or KAfInet6 (IPv4-mapped or IPv4-compatible) formats.
For IPv6 addresses this returns true, if address is IPv6 multicast address (start with 0xff byte).
(generated from Original Symbian implementation)
| IMPORT_C TBool TInetAddr::IsSiteLocal | ( | ) | const |
Tests if IP address is site-local address.
Always false for IPv4 addressess.
For IPv6 this returns true, if the address is IPv6 site-local address (fec0:...)
(generated from Original Symbian implementation)
| IMPORT_C TBool TInetAddr::IsUnicast | ( | ) | const |
Tests if address is unicast address.
This is just a "shorthand" notation for a test that none of the following is true
For exact semantics of IsUnicast, see the descriptions of the above functions.
Caution: the test is based purely on the address, and it should be kept in mind that this test has no way of detecting IPv4 net broadcast addresses (because the netmask is not known).
(generated from Original Symbian implementation)
| IMPORT_C TBool TInetAddr::IsUnspecified | ( | ) | const |
Tests if the IP address is unspecified.
The address is unspecified if the
:: 0.0.0.0 0.0.0.0(generated from Original Symbian implementation)
| IMPORT_C TBool TInetAddr::IsV4Compat | ( | ) | const |
Tests if this address is an IPv4-compatible address.
This is always false, if address is in KAfInet format.
(generated from Original Symbian implementation)
| IMPORT_C TBool TInetAddr::IsV4Mapped | ( | ) | const |
Tests if this address is an IPv4-mapped address.
This is always false, if address is in KAfInet format.
(generated from Original Symbian implementation)
|
inline |
Tests if the IP address is unspecified.
This is same as IsUnspecified()
|
inline |
| IMPORT_C TBool TInetAddr::Match | ( | const TInetAddr & | aHost | ) | const |
Tests the IP address value with that in another TInetAddr.
| aHost | TInetAddr with which to compare |
(generated from Original Symbian implementation)
Tests if another TInetAddr is in the same subnet.
The function applies the subnet mask passed through aMask to the IP address and to the IP address in aNet. If the resulting values are the same, this indicates that the addresses are part of the same subnet, and ETrue is returned.
| aNet | TInetAddr with which to compare. |
| aMask | TInetAddr object with the IP address set to the relevant subnet mask. |
(generated from Original Symbian implementation)
| IMPORT_C TBool TInetAddr::Match | ( | const TInetAddr & | aNet, |
| TInt | aPrefixLen | ||
| ) | const |
Tests if the specified number of left-most bits on addresses are same.
Return ETrue if leftmost aPrefixLen bits on addresses are same (both families must be the same).
| aNet | TInetAddr with which to compare. |
| aPrefixLen | Number of left-most bits to compare. |
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::Net | ( | const TInetAddr & | aAddr | ) |
Obtains a network mask corresponding to the class of the IP address, using the NetMask() function, and then applies this mask to the current IP address (deprecated).
The resulting address family is KAfInet
| aAddr | TInetAddr from which to obtain IP address for creating the network mask. |
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::NetBroadcast | ( | const TInetAddr & | aAddr | ) |
Sets the IP address to be suitable for a network-directed broadcast address (deprecated).
The function obtains a network mask corresponding to the class of the IP address in aAddr, using the NetMask() function. It then applies this mask to the current IP address to separate the network number part of the address. The mask is then used again to set all host number bits to 1 (which signifies, broadcast to all hosts on the network).
The resulting address family is KAfInet
| aAddr | TInetAddr from which to obtain IP address for creating the network mask. |
Works only for IPv4.
This function works only for IPv4. It assumes the old IPv4 address classes (A, B, C). Applications using this function may not work properly in the current internet environment.
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::NetMask | ( | const TInetAddr & | aAddr | ) |
Sets the IP address to a mask suitable for extracting the network number part of the IP address (deprecated).
This function assumes the IPv4 address classes (A, B, C). Applications using this function may not work properly in the current internet environment.
The function tests whether the IP address in aAddr is a Class A, B, C, or other address. It then sets the IP address to suitable mask values as follows:
The resulting address family is KAfInet.
| aAddr | TInetAddr from which to obtain IP address |
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::Output | ( | TDes & | aBuf | ) | const |
Writes the IP address into a string.
For an IPv4 address, the format is d.d.d.d, where "d" is an 8-bit decimal number. (An example IPv4 address: 127.0.0.1).
For an IPv6 address, the format is h:h:h:h:h:h:h:h, where "h" is a 16-bit hexadecimal number. (An example IPv6 address: 2001:618:40C:20:2C0:4FFF:FE24:AA79).
If address family is not KAfInet or KAfInet6, then empty string is returned (aBuf.Length() == 0).
If the family is KAfInet6, the output buffer must be at least 39 characters. If less, the buffer is filled with '*' characters.
| [out] | aBuf | contains a string representation of the IP address. |
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::OutputWithScope | ( | TDes & | aBuf | ) | const |
Writes the IP address into a string and appends the scope id.
The IP address is formatted with as with the standard Output.
If the scope id has non-zero value and if there is room in the output buffer, the scope id is appended to the address using the "%scope-id"-notation.
| [out] | aBuf | contains a string representation of the address. |
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::Prefix | ( | const TInetAddr & | aAddr, |
| TInt | aPrefixLen | ||
| ) |
Creates an IPv6 address with the specified number of left-most bits copied from another address, and remaining bits set to 0.
The function does not check the family of the aAddr, and for anything else but KAfInet6 the resulting prefix value is undefined.
The resulting address family is KAfInet6. The scope id and flow label are zeroed.
| aAddr | The address to copy the prefix from. |
| aPrefixLen | Number of left-most bits to set to copy from aAddr. |
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::PrefixMask | ( | TInt | aPrefixLen | ) |
Creates an IPv6 address with the specified number of left-most bits set to 1, and the rest set to 0.
The previous content does not matter, and is overwritten.
| aPrefixLen | Number of left-most bits to set to 1. |
(generated from Original Symbian implementation)
| IMPORT_C TUint32 TInetAddr::Scope | ( | ) | const |
Gets the scope id value.
Only for KAfInet6, return zero for KAfInet.
When an IPv4 address is stored in IPv4-mapped format (KAfInet6), then non-zero scopes are also possible for IPv4 (and needed for proper handling of overlapping private address ranges or for IPv4 link local addresses).
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::SetAddress | ( | const TIp6Addr & | aAddr | ) |
Sets the IPv6 address value.
The resulting address family is KAfInet6. The scope id and flow label are zeroed.
| aAddr | Value to which to set the IPv6 address. |
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::SetAddress | ( | TUint32 | aAddr | ) |
Sets the IPv4 address value.
The resulting address family is KAfInet.
| aAddr | Value to which to set the IPv4 address. |
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::SetFlowLabel | ( | TInt | aLabel | ) |
Sets the Flow Label.
Only for KAfInet6, undefined (ignored) for KAfInet.
| aLabel | The flow label (only low 20 bits used) |
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::SetScope | ( | TUint32 | aScope | ) |
Sets the scope id value.
Only for KAfInet6, undefined (ignored) for KAfInet.
When an IPv4 address is stored in IPv4-mapped format (KAfInet6), then non-zero scopes are also possible for IPv4 (and needed for proper handling of overlapping private address ranges or for IPv4 link local addresses).
| aScope | The scope id of the address. |
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::SetV4CompatAddress | ( | TUint32 | aAddr | ) |
Creates an IPv4-compatible IPv6 address.
The IPv4-compatible format is ::x.x.x.x.
The resulting address family is KAfInet6. The scope id and flow label are zeroed.
| aAddr | IPv4 address from which the IPv6 address is generated. |
(generated from Original Symbian implementation)
| IMPORT_C void TInetAddr::SetV4MappedAddress | ( | TUint32 | aAddr | ) |
Creates an IPv4-mapped IPv6 address.
The IPv4-mapped format is ::ffff:x.x.x.x. Internally, all IPv4 addresses are stored in this format.
The resulting address family is KAfInet6. The scope id and flow label are zeroed.
| aAddr | IPv4 address from which the IPv6 address is generated. |
(generated from Original Symbian implementation)
Sets the IP address to the network number and subnet parts of the IP address (that is, the original IP address with the host number part cleared).
This is obtained by applying the mask value in aMask to the IP address in aAddr. The result is undefined if address and mask have different address family.
| aAddr | TInetAddr from which to obtain IP address |
| aMask | TInetAddr object with the IP address set to the relevant subnet mask. |
(generated from Original Symbian implementation)
Sets the IP address to be suitable for a subnet-directed broadcast address.
To achieve this, the subnet mask value in aMask is applied to the IP address in aAddr. The mask is then used again to set all host number bits to 1 (which signifies, broadcast to all hosts on the subnet).
Only for IPv4. The function does not have a sensible interpretation in IPv6. An application that uses this needs to code separate branches for IPv4 and IPv6 cases.
| aAddr | TInetAddr from which to obtain IP address |
| aMask | TInetAddr object with the IP address set to the relevant subnet mask. |
(generated from Original Symbian implementation)