TInet6HeaderICMP Class Reference

#include <icmp6_hdr.h>

class TInet6HeaderICMP
Public Attributes
TUint8 i
TUint32 iAlign
Protected Attributes
union TInet6HeaderICMP::@50@51
Public Member Functions
TInt Checksum()
TUint8 Code()
TUint8 *EndPtr()
TInt HeaderLength()
TInt MaxHeaderLength()
TInt MinHeaderLength()
TUint32 Parameter()
voidSetChecksum(TInt)
voidSetCode(TUint8)
voidSetParameter(TUint32)
voidSetType(TUint8)
TUint8 Type()

Detailed Description

ICMPv6 header common part layout.

The basic ICMP header format only covers the common part (4 bytes) and 4 bytes of the Message Body (can be accesses as "Parameter")
Extract from RFC-2462: General format of ICMP message

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |     Code      |          Checksum             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                         Message Body                          +
|                                                               |

Member Attribute Documentation

@51

union TInet6HeaderICMP::@50@51[protected]

i

iAlign

TUint32 iAlign

Member Function Documentation

Checksum ( )

TInt Checksum()const [inline]

Gets the Checksum from the header.

Returns: Header Checksum (TUint16 in NETWORK byte order)

Code ( )

TUint8 Code()const [inline]

Gets the ICMPv6 code from the header.

Returns: ICMPv6 code [0..255]

EndPtr ( )

TUint8 *EndPtr()const [inline]

Gets a pointer to the byte following the header.

Returns: Pointer to the byte following the minimum fixed header

HeaderLength ( )

TInt HeaderLength()const [inline]

Gets the header length.

Note:

This length is not the true length of the ICMP header. This only covers the fixed part.

Returns: Header length.

MaxHeaderLength ( )

TInt MaxHeaderLength()[static, inline]

Gets the maximum header length.

Note:

This length is not the true length of the ICMP header. This only covers the fixed part.

Returns: Maximum header length

MinHeaderLength ( )

TInt MinHeaderLength()[static, inline]

Gets the minimum header length.

Returns: Minimum header length

Parameter ( )

TUint32 Parameter()const [inline]

Gets the ICMPv6 Parameter.

Accesses the first 4 bytes of ICMP message body, and assumes they form a 32 bit integer in network byte order. Returns this integer in host order.

Returns: ICMPv6 Parameter (as an integer)

SetChecksum ( TInt )

voidSetChecksum(TIntaSum)[inline]

Sets the Checksum.

ParameterDescription
aSumThe Checksum [0..65535] (16 least significant bits stored as is (assumed to be in NETWORK byte order).

SetCode ( TUint8 )

voidSetCode(TUint8aCode)[inline]

Sets the ICMPv6 code.

ParameterDescription
aCodeICMPv6 code [0..255]

SetParameter ( TUint32 )

voidSetParameter(TUint32aValue)[inline]

Sets the ICMPv6 Parameter.

The value is converted into network byte order and stored as the first 4 bytes of the ICMP message body.

ParameterDescription
aValueThe parameter.

SetType ( TUint8 )

voidSetType(TUint8aType)[inline]

Sets the ICMPv6 type.

ParameterDescription
aTypeICMPv6 type [0..255]

Type ( )

TUint8 Type()const [inline]

Gets the ICMPv6 type from the header.

Returns: ICMPv6 type [0..255]