class TInet6HeaderIP |
************************* 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)
Public Member Functions | |
---|---|
TIp6Addr & | DstAddr () |
TBool | EcnIsCongestion () |
TUint8 * | EndPtr () |
TInt | FlowLabel () |
TInt | HeaderLength () |
TInt | HopLimit () |
void | Init () |
TInt | MaxHeaderLength () |
TInt | MinHeaderLength () |
TInt | NextHeader () |
TInt | PayloadLength () |
void | SetDstAddr (const TIp6Addr &) |
void | SetFlowLabel ( TInt ) |
void | SetHopLimit ( TInt ) |
void | SetNextHeader ( TInt ) |
void | SetPayloadLength ( TInt ) |
void | SetSrcAddr (const TIp6Addr &) |
void | SetTrafficClass ( TInt ) |
void | SetVersion ( TInt ) |
TIp6Addr & | SrcAddr () |
TInt | TrafficClass () |
TInt | Version () |
Public Member Enumerations | |
---|---|
enum | TOffsets { 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 |
TBool | EcnIsCongestion | ( | ) | [inline] |
Gets ECN congestion status.
see RFC-3168 for details.
TInt | HeaderLength | ( | ) | const [inline] |
Gets the header length.
Note that the header length is fixed.
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
TInt | MaxHeaderLength | ( | ) | [static, inline] |
Gets the maximum header length.
Note that the header length is fixed.
TInt | MinHeaderLength | ( | ) | [static, inline] |
Gets the minimum header length.
Note that the header length is fixed.
void | SetDstAddr | ( | const TIp6Addr & | anAddr | ) | [inline] |
Sets the destination address in the header.
const TIp6Addr & anAddr | Destination address |
void | SetFlowLabel | ( | TInt | aFlow | ) | [inline] |
Sets the flow label in the header.
TInt aFlow | Flow label (20 bit integer in host order) |
void | SetHopLimit | ( | TInt | aLimit | ) | [inline] |
Sets the hop limit in the header.
TInt aLimit | Hop limit (0..255) |
void | SetNextHeader | ( | TInt | aNextHeader | ) | [inline] |
Sets the next header selector from the header.
TInt aNextHeader | Next header selector (0..255) |
void | SetPayloadLength | ( | TInt | aLength | ) | [inline] |
Sets the payload length in the header.
TInt aLength | Payload length |
void | SetSrcAddr | ( | const TIp6Addr & | anAddr | ) | [inline] |
Sets the source address in the header.
const TIp6Addr & anAddr | Source address |
void | SetTrafficClass | ( | TInt | aClass | ) | [inline] |
Sets the traffic class in the header.
TInt aClass | Traffic class (0..255) |
void | SetVersion | ( | TInt | aVersion | ) | [inline] |
Sets the IP version in the header.
TInt aVersion | IP version (0..15, = 6 for IPv6) |
O_PayloadLength = 4 | |
O_NextHeader = 6 | |
O_HopLimit = 7 | |
O_SrcAddr = 8 | |
O_DstAddr = 24 |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.