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

Error information for TCP/IP protocols. More...

#include <in_sock.h>

Public Attributes

TInt iStatus
 The error code returned by the last ESOCK API function called.
 
TInt iErrType
 The value of the Type field of the last ICMP message.
 
TInt iErrCode
 The value of the Code field of the last ICMP message.
 
TInetAddr iSrcAddr
 A TInetAddr with the IP address and port set to the source address and port of the failed datagram.
 
TInetAddr iDstAddr
 A TInetAddr with the IP address and port set to the destination address and port of the failed datagram.
 
TInetAddr iErrAddr
 A TInetAddr with the IP address set to the address of the host that generated the error.
 

Detailed Description

Error information for TCP/IP protocols.

An object of this class is returned packaged as a TPckgBuf<TSoInetLastErr> in the option argument of RSocket::GetOpt(), when this function is called with (KSolInetIp, KSoInetLastError). The data members of this object are updated whenever a packet carrying an ICMP message is received.

Note
This class is originally defined only for the IPv4 environment, and there is no definite way of knowing whether the fields iErrType and iErrCode contain ICMPv4 or ICMPv6 codes. A solution that will give the correct answer in most normal cases, is
... if (p.iErrAddr.Family() == KAfInet || p.iErrAddr.IsV4Mapped())
// assume ICMPv4 type and code
else
// assume ICMPv6 type and code
IMPORT_C TBool IsV4Mapped() const
Tests if this address is an IPv4-mapped address.
Error information for TCP/IP protocols.
Definition in_sock.h:2042
TInetAddr iErrAddr
A TInetAddr with the IP address set to the address of the host that generated the error.
Definition in_sock.h:2058
IMPORT_C TUint Family() const
Gets the address family and thereby the type of address.
const TUint KAfInet
Identifies the TCP/IP protocol family and v4 address family.
Definition in_sock.h:59

Alternatively, the error can be interpreted based on the member variable iStatus, if it contains one of the extended error codes. These are are common for both IPv4 and IPv6.

API status
Published to all clients. Released API.

Definition at line 2011 of file in_sock.h.

Member Data Documentation

◆ iDstAddr

TInetAddr TSoInetLastErr::iDstAddr

A TInetAddr with the IP address and port set to the destination address and port of the failed datagram.

Definition at line 2055 of file in_sock.h.

◆ iErrAddr

TInetAddr TSoInetLastErr::iErrAddr

A TInetAddr with the IP address set to the address of the host that generated the error.

Definition at line 2058 of file in_sock.h.

◆ iErrCode

TInt TSoInetLastErr::iErrCode

The value of the Code field of the last ICMP message.

Definition at line 2049 of file in_sock.h.

◆ iErrType

TInt TSoInetLastErr::iErrType

The value of the Type field of the last ICMP message.

Definition at line 2047 of file in_sock.h.

◆ iSrcAddr

TInetAddr TSoInetLastErr::iSrcAddr

A TInetAddr with the IP address and port set to the source address and port of the failed datagram.

Definition at line 2052 of file in_sock.h.

◆ iStatus

TInt TSoInetLastErr::iStatus

The error code returned by the last ESOCK API function called.

Definition at line 2045 of file in_sock.h.


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