RMBufPacketPeek Class Reference

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

Since
v7.0

Inherits from

Public Member Functions
IMPORT_C TPtr8 Access ( TInt , TUint )
IMPORT_C TIpHeader * GetIpHeader ()
Inherited Functions
RCommsBufChain::Alloc(TInt,TCommsBufAllocator &)
RCommsBufChain::Alloc(TInt,TInt,TCommsBufAllocator &)
RCommsBufChain::Alloc(TInt,TInt,TInt,TCommsBufAllocator &)
RCommsBufChain::Append(RCommsBuf *)
RCommsBufChain::Append(RCommsBufChain &)
RCommsBufChain::Assign(RCommsBufChain &)
RCommsBufChain::Goto(TInt,TInt &,TInt &)const
RCommsBufChain::Goto(TInt,TInt &,TInt &,RCommsBuf *&)const
RCommsBufChain::Prepend(RCommsBuf *)
RCommsBufChain::Prepend(RCommsBufChain &)
RCommsBufChain::RCommsBufChain()
RCommsBufChain::RCommsBufChain(RCommsBuf *)
RCommsBufChain::Read(TDes8 &,TInt)const
RCommsBufChain::Split(TInt,RCommsBufChain &)
RCommsBufChain::Write(const TDesC8 &,TInt)
RMBufChain::Align(TInt)
RMBufChain::Alloc(TInt)
RMBufChain::Alloc(TInt,RMBufAllocator &)
RMBufChain::Alloc(TInt,TInt)
RMBufChain::Alloc(TInt,TInt,RMBufAllocator &)
RMBufChain::Alloc(TInt,TInt,TInt)
RMBufChain::Alloc(TInt,TInt,TInt,RMBufAllocator &)
RMBufChain::AllocL(TInt)
RMBufChain::AllocL(TInt,RMBufAllocator &)
RMBufChain::Append(RMBufChain &)
RMBufChain::Append(TInt)
RMBufChain::Append(TInt,RMBufAllocator &)
RMBufChain::AppendL(TInt)
RMBufChain::Assign(RMBufChain &)
RMBufChain::Assign(RMBufQ &)
RMBufChain::Copy(RMBufChain &)const
RMBufChain::Copy(RMBufChain &,TInt)const
RMBufChain::Copy(RMBufChain &,TInt,TInt)const
RMBufChain::Copy(RMBufChain &,TInt,TInt,TInt)const
RMBufChain::CopyIn(const TDesC8 &,TInt)
RMBufChain::CopyL(RMBufChain &,TInt,TInt)const
RMBufChain::CopyOut(TDes8 &,TInt)const
RMBufChain::Create(const TDesC8 &,TInt)
RMBufChain::CreateL(const TDesC8 &,TInt)
RMBufChain::FillZ(TInt)
RMBufChain::First()
RMBufChain::First()const
RMBufChain::Free()
RMBufChain::Goto(TInt,RMBuf *&,TInt &,TInt &)const
RMBufChain::Goto(TInt,RMBuf *&,TInt &,TInt &,RMBuf *&)const
RMBufChain::Init()
RMBufChain::IsEmpty()const
RMBufChain::Last()const
RMBufChain::Length()const
RMBufChain::Link(RMBufChain &)
RMBufChain::Next()
RMBufChain::Next()const
RMBufChain::NumBufs()const
RMBufChain::Prepend(RMBuf *)
RMBufChain::Prepend(RMBufChain &)
RMBufChain::Prepend(TInt)
RMBufChain::Prepend(TInt,RMBufAllocator &)
RMBufChain::PrependL(TInt)
RMBufChain::RMBufChain()
RMBufChain::RMBufChain(RCommsBuf *)
RMBufChain::ReAlloc(TInt)
RMBufChain::ReAllocL(TInt)
RMBufChain::Remove()
RMBufChain::Split(TInt,RMBufChain &)
RMBufChain::Split(TInt,RMBufChain &,RMBufAllocator &)
RMBufChain::SplitL(TInt,RMBufChain &)
RMBufChain::TrimEnd(TInt)
RMBufChain::TrimStart(TInt)
RMBufChain::Unlink()
RMBufChain::operator=(RMBuf *)
Inherited Attributes
RCommsBufChain::iNext

Member Functions Documentation

Access(TInt, TUint)

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

Note:

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

Parameters

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

GetIpHeader()

IMPORT_C TIpHeader * GetIpHeader ( )

Access IP header (v4 or v6) from the packet at offset 0.