TInet6PacketBase Class Reference

class TInet6PacketBase

Thin base class for the TInet6Packet.

Public Member Functions
TInet6PacketBase(TAlign)
IMPORT_C TUint8 *Access(RMBufChain &, TInt, TInt, TInt)
voidSetAlign(TAlign)
Public Member Enumerations
enumTAlign { EAlign1 = 0, EAlign2 = 1, EAlign4 = 3, EAlign8 = 7 }
Public Attributes
TInt iLength
Protected Attributes
TAlign iAlign

Constructor & Destructor Documentation

TInet6PacketBase(TAlign)

TInet6PacketBase(TAlignaAlign)[inline]

Constructor.

Parameters

TAlign aAlignThe align requirement.

Member Functions Documentation

Access(RMBufChain &, TInt, TInt, TInt)

IMPORT_C TUint8 *Access(RMBufChain &aPacket,
TIntaOffset,
TIntaSize,
TIntaMin
)

Accesses a contiguous block of memory within RMBufChain starting at specified offset.

Attempts to map aSize amount of contiguous RMBuf space at the specified offset, by rearranging the RMBufs, if necessary.

If aSize amount is not available, the returned pointer maps the maximum available space (< aSize).

Note:

The length can be either less or larger than aSize. The caller must verify the returned length to detect whether Access succeeded.

Parameters

RMBufChain & aPacket
TInt aOffsetThe offset to the beginning of the area. The value MUST be in range: 0 <= aOffset <= Length().
TInt aSizeThe size of the requested contiguous mapping (in octets). The value cannot be larger than KMBufSmallSize. If aSize <= 1, the method will return availabe contiguous mapping at the indicated offset without rearranging the RMBuf chain. Values larger than 1 may require rearrangement to get the requested area into single RMBuf.
TInt aMinThe minimum accepted iLength. If iLength is less that aMin, then returns NULL.

SetAlign(TAlign)

voidSetAlign(TAlignaAlign)[inline]

Changes the align requirement.

Parameters

TAlign aAlignThe new align requirement.

Member Enumerations Documentation

Enum TAlign

Enumerators

EAlign1 = 0
EAlign2 = 1
EAlign4 = 3
EAlign8 = 7

Member Data Documentation

TAlign iAlign

TAlign iAlign[protected]

The align requirement.

TInt iLength

TInt iLength

Length of the mapped region.

The real mapped length as computed by the Access function. If access returned non-NULL, the following is always TRUE:

  • aMin <= iLength