TInet6Packet Class Reference

class TInet6Packet : public TInet6PacketBase

Encapsulates an IPv6 packet header as a section of an RMBufChain .

The T template parameter should represent a packet header type. It should support static functions MaxHeaderLength() and MinHeaderLength() that return TInt values for maximum and minimum header lengths respectively.

Since
v7.0

Inherits from

Constructor & Destructor Documentation

TInet6Packet(TAlign)

TInet6Packet ( TAlign aAlign = EAlign4 ) [inline]

Default constructor.

Construct an empty mapping. To be usable, the Set() function must be used.

Parameters

TAlign aAlign = EAlign4

TInet6Packet(RMBufChain &)

TInet6Packet ( RMBufChain & aPacket ) [inline]

Constructor specifying a RMBufChain object.

Verify and arrange it so that a class T can be mapped to a contiguous octets from the beginning of the RMBufChain content, and set iHdr to point this area.

If this is not possible, iHdr is initialized to NULL.

Parameters

RMBufChain & aPacket Packet containing the header T at offset = 0

TInet6Packet(RMBufChain &, TInt, TAlign)

TInet6Packet ( RMBufChain & aPacket,
TInt aOffset,
TAlign aAlign = EAlign4
) [inline]

Constructor specifying a RMBufChain object and an offset.

Verify and arrange it so that a class T can be mapped to a contiguous octets starting at specified offset of the RMBufChain content, and set iHdr to point this area.

If this is not possible, iHdr is initialized to NULL.

Parameters

RMBufChain & aPacket Packet containing the header T at aOffset
TInt aOffset Offset of the header to be mapped.
TAlign aAlign = EAlign4 The alignement requirement.

Member Functions Documentation

Set(RMBufChain &, TInt, TInt)

void Set ( RMBufChain & aPacket,
TInt aOffset,
TInt aSize
) [inline]

Sets the packet header from a specified RMBufChain object.

Verify and arrange it so that a aSize octets can be mapped to a contiguous octets starting at specified offset of the RMBufChain content, and set iHdr to point this area.

If this is not possible, iHdr is initialized to NULL.

Note that this differs from the contructors: the required size is a parameter, and not determined by the T::MinHeaderLength(). However, the "T* iHdr" is set to point the start of the requested area. It's a responsibility of the user of this method to know whether using this pointer is safe with the specified size parameter.

Parameters

RMBufChain & aPacket Packet containing the header T at aOffset
TInt aOffset Offset (position) of the header to be mapped
TInt aSize Length of required contiguous memory

operator()()

T & operator() ( ) [inline]

Member Data Documentation

T * iHdr

T * iHdr

The pointer to the mapped region (if non-NULL). If NULL, then there is no mapping, and iLength == 0.