TInet6HeaderIP Class Reference

class TInet6HeaderIP
Encapsulates an IPv6 IP header.
        *************************
 Extract from the RFC-2460
 *************************

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Version| Traffic Class |           Flow Label                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Payload Length        |  Next Header  |   Hop Limit   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                         Source Address                        +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                      Destination Address                      +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Version              4-bit Internet Protocol version number = 6.

   Traffic Class        8-bit traffic class field.  See section 7.

   Flow Label           20-bit flow label.  See section 6.

   Payload Length       16-bit unsigned integer.  Length of the IPv6
                        payload, i.e., the rest of the packet following
                        this IPv6 header, in octets.  (Note that any
                        extension headers [section 4] present are
                        considered part of the payload, i.e., included
                        in the length count.)

   Next Header          8-bit selector.  Identifies the type of header
                        immediately following the IPv6 header.  Uses the
                        same values as the IPv4 Protocol field [RFC-1700
                        et seq.].

   Hop Limit            8-bit unsigned integer.  Decremented by 1 by
                        each node that forwards the packet. The packet
                        is discarded if Hop Limit is decremented to
                        zero.

   Source Address       128-bit address of the originator of the packet.

   Destination Address  128-bit address of the intended recipient of the
                        packet (possibly not the ultimate recipient, if
                        a Routing header is present)
       
Since
v7.0

Member Functions Documentation

DstAddr()

TIp6Addr & DstAddr ( ) const [inline]

Gets the destination address from the header.

EcnIsCongestion()

TBool EcnIsCongestion ( ) [inline]

Gets ECN congestion status.

see RFC-3168 for details.

EndPtr()

TUint8 * EndPtr ( ) [inline]

Gets a pointer to the byte following the header.

FlowLabel()

TInt FlowLabel ( ) const [inline]

Gets the flow label from the header.

HeaderLength()

TInt HeaderLength ( ) const [inline]

Gets the header length.

Note that the header length is fixed.

HopLimit()

TInt HopLimit ( ) const [inline]

Init()

void Init ( ) [inline]

Initialises the header to basic initial values.

  • Version = 6

  • Traffic Class = 0

  • Flow Label = 0

  • Payload Length = 0

  • Next Header = 0

  • Hop Limit = 0

The Source and Destination address fields are not touched.

MaxHeaderLength()

TInt MaxHeaderLength ( ) [static, inline]

Gets the maximum header length.

Note that the header length is fixed.

MinHeaderLength()

TInt MinHeaderLength ( ) [static, inline]

Gets the minimum header length.

Note that the header length is fixed.

NextHeader()

TInt NextHeader ( ) const [inline]

Gets the next header selector from the header.

PayloadLength()

TInt PayloadLength ( ) const [inline]

Gets the payload length from the header.

SetDstAddr(const TIp6Addr &)

void SetDstAddr ( const TIp6Addr & anAddr ) [inline]

Sets the destination address in the header.

Parameters

const TIp6Addr & anAddr Destination address

SetFlowLabel(TInt)

void SetFlowLabel ( TInt aFlow ) [inline]

Sets the flow label in the header.

Parameters

TInt aFlow Flow label (20 bit integer in host order)

SetHopLimit(TInt)

void SetHopLimit ( TInt aLimit ) [inline]

Sets the hop limit in the header.

Parameters

TInt aLimit Hop limit (0..255)

SetNextHeader(TInt)

void SetNextHeader ( TInt aNextHeader ) [inline]

Sets the next header selector from the header.

Parameters

TInt aNextHeader Next header selector (0..255)

SetPayloadLength(TInt)

void SetPayloadLength ( TInt aLength ) [inline]

Sets the payload length in the header.

Parameters

TInt aLength Payload length

SetSrcAddr(const TIp6Addr &)

void SetSrcAddr ( const TIp6Addr & anAddr ) [inline]

Sets the source address in the header.

Parameters

const TIp6Addr & anAddr Source address

SetTrafficClass(TInt)

void SetTrafficClass ( TInt aClass ) [inline]

Sets the traffic class in the header.

Parameters

TInt aClass Traffic class (0..255)

SetVersion(TInt)

void SetVersion ( TInt aVersion ) [inline]

Sets the IP version in the header.

Parameters

TInt aVersion IP version (0..15, = 6 for IPv6)

SrcAddr()

TIp6Addr & SrcAddr ( ) const [inline]

Gets the source address from the header.

TrafficClass()

TInt TrafficClass ( ) const [inline]

Gets the traffic class from the header.

Version()

TInt Version ( ) const [inline]

Gets the IP version from the header.

Member Enumerations Documentation

Enum TOffsets

Enumerators

O_PayloadLength = 4
O_NextHeader = 6
O_HopLimit = 7
O_SrcAddr = 8
O_DstAddr = 24

Member Data Documentation

union TInet6HeaderIP::@32 @33

union TInet6HeaderIP::@32 @33 [private]

TUint8 i

TUint8 i

TUint32 iAlign

TUint32 iAlign