class RMBufPacketPeek : public RMBufChain |
Extends RMBufChain to add functions to read packet data as a descriptor and as an IP header.
The RMBufChain is assumed to contain the raw packet, without the info block prepended (e.g. if this class is used for RMBufPacketBase derived handle, it must be in "unpacked" state).
Public Member Functions | |
---|---|
IMPORT_C TPtr8 | Access(TInt, TUint) |
IMPORT_C TIpHeader * | GetIpHeader() |
Inherited Attributes | |
---|---|
RCommsBufChain::iNext |
IMPORT_C TPtr8 | Access | ( | TInt | aSize, |
TUint | aOffset = 0 | |||
) |
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 into a TPtr8, by rearranging the RMBufs, if necessary.
If aSize amount is not available, the returned pointer maps the maximum available space (< aSize).
The length can be either less or larger than aSize. The caller must verify the returned length to detect whether Access succeeded.
TInt aSize | The 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. |
TUint aOffset = 0 | The offset to the beginning of the area. The value MUST be in range: 0 <= aOffset <= Length(). |
IMPORT_C TIpHeader * | GetIpHeader | ( | ) |
Access IP header (v4 or v6) from the packet at offset 0.
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.