TInet6Packet Class Reference

#include <in_pkt.h>

Link against: addressinfo.lib

class TInet6Packet : public TInet6PacketBase

Inherits from

Detailed Description

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

Member Attribute Documentation

iHdr

T *iHdr

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

Constructor & Destructor Documentation

TInet6Packet ( TAlign )

TInet6Packet(TAlignaAlign = EAlign4)[inline]

Default constructor.

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

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.

ParameterDescription
aPacketPacket containing the header T at offset = 0

TInet6Packet ( RMBufChain &, TInt, TAlign )

TInet6Packet(RMBufChain &aPacket,
TIntaOffset,
TAlignaAlign = 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.

ParameterDescription
aPacketPacket containing the header T at aOffset
aOffsetOffset of the header to be mapped.
aAlignThe alignement requirement.

Member Function Documentation

Set ( RMBufChain &, TInt, TInt )

voidSet(RMBufChain &aPacket,
TIntaOffset,
TIntaSize
)[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.

ParameterDescription
aPacketPacket containing the header T at aOffset
aOffsetOffset (position) of the header to be mapped
aSizeLength of required contiguous memory

operator() ( )

T &operator()()[inline]