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
Public Member Functions
TIp6Addr &DstAddr()
TBool EcnIsCongestion()
TUint8 *EndPtr()
TInt FlowLabel()
TInt HeaderLength()
TInt HopLimit()
voidInit()
TInt MaxHeaderLength()
TInt MinHeaderLength()
TInt NextHeader()
TInt PayloadLength()
voidSetDstAddr(const TIp6Addr &)
voidSetFlowLabel(TInt)
voidSetHopLimit(TInt)
voidSetNextHeader(TInt)
voidSetPayloadLength(TInt)
voidSetSrcAddr(const TIp6Addr &)
voidSetTrafficClass(TInt)
voidSetVersion(TInt)
TIp6Addr &SrcAddr()
TInt TrafficClass()
TInt Version()
Public Member Enumerations
enumTOffsets { O_PayloadLength = 4, O_NextHeader = 6, O_HopLimit = 7, O_SrcAddr = 8, O_DstAddr = 24 }
Public Attributes
TUint8 i
TUint32 iAlign
Private Attributes
union TInet6HeaderIP::@32@33

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()

voidInit()[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 &)

voidSetDstAddr(const TIp6Addr &anAddr)[inline]

Sets the destination address in the header.

Parameters

const TIp6Addr & anAddrDestination address

SetFlowLabel(TInt)

voidSetFlowLabel(TIntaFlow)[inline]

Sets the flow label in the header.

Parameters

TInt aFlowFlow label (20 bit integer in host order)

SetHopLimit(TInt)

voidSetHopLimit(TIntaLimit)[inline]

Sets the hop limit in the header.

Parameters

TInt aLimitHop limit (0..255)

SetNextHeader(TInt)

voidSetNextHeader(TIntaNextHeader)[inline]

Sets the next header selector from the header.

Parameters

TInt aNextHeaderNext header selector (0..255)

SetPayloadLength(TInt)

voidSetPayloadLength(TIntaLength)[inline]

Sets the payload length in the header.

Parameters

TInt aLengthPayload length

SetSrcAddr(const TIp6Addr &)

voidSetSrcAddr(const TIp6Addr &anAddr)[inline]

Sets the source address in the header.

Parameters

const TIp6Addr & anAddrSource address

SetTrafficClass(TInt)

voidSetTrafficClass(TIntaClass)[inline]

Sets the traffic class in the header.

Parameters

TInt aClassTraffic class (0..255)

SetVersion(TInt)

voidSetVersion(TIntaVersion)[inline]

Sets the IP version in the header.

Parameters

TInt aVersionIP 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