CVJDeCompressor Class Reference

class CVJDeCompressor : public CVJDeCompressorIf

Van Jacobson TCP/IP header decompressor (RFC 1144)

Inherits from

Public Member Functions
CVJDeCompressor()
~CVJDeCompressor()
voidCRCError()
voidConstructL(CVJCompFactory *, TUint)
TBool DecompVJComp(RMBufChain &)
TBool DecompVJUncomp(RMBufChain &)
Private Member Functions
TBool CheckStoredRxHeader(const TUint)
voidClearFlag(const TUint)
voidCopyInNewHeaderL(RMBufChain *, ThdrIP *, ThdrTCP *, TUint, TUint16, TUint16)
voidCopyRecvHeader(const TUint, ThdrIP *)
TUint16 DecodeDelta(TUint8 **)
voidDecompAck(TUint8 **, ThdrTCP *)
voidDecompIPId(const TUint, TUint8 **, ThdrIP *)
voidDecompPushFlag(const TUint, ThdrTCP *)
voidDecompSWAU(const TUint, TUint8 **, ThdrTCP *, TUint16)
voidDecompSeq(TUint8 **, ThdrTCP *)
voidDecompUrgent(TUint8 **, ThdrTCP *, TUint)
voidDecompWindow(TUint8 **, ThdrTCP *)
voidDecompressFrameL(RMBufChain &, TUint8, TUint8, TUint8 *const , TUint, TUint16)
voidDoIPChecksum(ThdrIP *, TUint16)
voidEncodeDelta(TUint8 **, TUint16)
ThdrIP *GetIPHeader(RMBufChain &)
voidGetStoredRxHeader(const TUint, ThdrIP *, ThdrTCP *)
TUint8 *GetVJPtr(RMBufChain &, TUint16 *)
voidSetFlag(const TUint)
TBool TestFlag(const TUint)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CObject::AccessCount()const
CObject::CObject()
CObject::Close()
CObject::Dec()
CObject::Extension_(TUint,TAny *&,TAny *)
CObject::FullName()const
CObject::Inc()
CObject::Name()const
CObject::Open()
CObject::Owner()const
CObject::SetName(const TDesC *)
CObject::SetNameL(const TDesC *)
CObject::SetOwner(CObject *)
CObject::UniqueID()const
CObject::~CObject()
CVJDeCompressorIf::CVJDeCompressorIf()
CVJDeCompressorIf::~CVJDeCompressorIf()
Private Attributes
TUint iFlags
TUint iLastRxConn
TUint iNumVJSlots
TVJCompHdr *iRxStates
Inherited Attributes
CVJDeCompressorIf::iFactory

Constructor & Destructor Documentation

CVJDeCompressor()

CVJDeCompressor()

~CVJDeCompressor()

~CVJDeCompressor()

Member Functions Documentation

CRCError()

voidCRCError()[virtual]

Sets the discard flag after receiving a bad frame so that future decompressed packets don't get out of sync.

CheckStoredRxHeader(const TUint)

TBool CheckStoredRxHeader(const TUintaConnection)const [private]

Checks if the given VJ connection number has previously been filled in.

Parameters

const TUint aConnectionValid VJ connection number to check

ClearFlag(const TUint)

voidClearFlag(const TUintaFlag)[private, inline]

Clear an internal flag.

Parameters

const TUint aFlagFlag value to clear

ConstructL(CVJCompFactory *, TUint)

voidConstructL(CVJCompFactory *aFactory,
TUintaSlots
)

Construct the CVJDeCompressor object.

Parameters

CVJCompFactory * aFactoryFactory that created this object
TUint aSlotsValue of the highest VJ connection number to be received

CopyInNewHeaderL(RMBufChain *, ThdrIP *, ThdrTCP *, TUint, TUint16, TUint16)

voidCopyInNewHeaderL(RMBufChain *aPacket,
ThdrIP *aIPHeader,
ThdrTCP *aTCPHeader,
TUintaCompressedHeaderLength,
TUint16aIPHeaderLength,
TUint16aTCPHeaderLength
)[private]

Copy the uncompressed header into the proper location in the packet.

Parameters

RMBufChain * aPacketMBuf chain containing packet to be updated
ThdrIP * aIPHeaderIP packet header
ThdrTCP * aTCPHeaderTCP header
TUint aCompressedHeaderLengthLength of VJ compression header
TUint16 aIPHeaderLengthLength of IP header
TUint16 aTCPHeaderLengthLength of TCP header

CopyRecvHeader(const TUint, ThdrIP *)

voidCopyRecvHeader(const TUintaConnectionNumber,
ThdrIP *aHeader
)[private]

Caches a TCP/IP Header to be used as a reference to reconstruct future compressed headers.

Parameters

const TUint aConnectionNumberValid VJ connection number
ThdrIP * aHeaderTCP/IP header

DecodeDelta(TUint8 **)

TUint16 DecodeDelta(TUint8 **aVJCompHeader)[private]

Decodes a compressed delta value.

Parameters

TUint8 ** aVJCompHeaderPointer to pointer into VJ header buffer holding encoded value; returns with pointer incremented one past end of value

DecompAck(TUint8 **, ThdrTCP *)

voidDecompAck(TUint8 **aVJCompHeader,
ThdrTCP *aTCPHeader
)[private]

Decompresses the Acknowledgement Number field.

Parameters

TUint8 ** aVJCompHeaderPointer to the pointer to the VJ compressed header
ThdrTCP * aTCPHeaderTCP header to be updated

DecompIPId(const TUint, TUint8 **, ThdrIP *)

voidDecompIPId(const TUintaChanges,
TUint8 **aVJCompHeader,
ThdrIP *aIPHeader
)[private]

Decompresses the IP Identification field.

Parameters

const TUint aChangesThe VJ change mask
TUint8 ** aVJCompHeaderPointer to the pointer to the VJ compressed header
ThdrIP * aIPHeaderIP packet header to be updated

DecompPushFlag(const TUint, ThdrTCP *)

voidDecompPushFlag(const TUintaChanges,
ThdrTCP *aHeader
)[private]

Decompresses the Push flag.

Parameters

const TUint aChangesThe VJ change mask
ThdrTCP * aHeaderTCP header to be updated

DecompSWAU(const TUint, TUint8 **, ThdrTCP *, TUint16)

voidDecompSWAU(const TUintaChanges,
TUint8 **aVJCompHeader,
ThdrTCP *aTCPHeader,
TUint16aPreviousFrameLength
)[private]

Decompresses the special case SWAU type packet.

Parameters

const TUint aChangesThe VJ change mask
TUint8 ** aVJCompHeaderPointer to the pointer to the VJ compressed header
ThdrTCP * aTCPHeaderTCP header to be updated
TUint16 aPreviousFrameLengthLength of cached packet for this VJ connection

DecompSeq(TUint8 **, ThdrTCP *)

voidDecompSeq(TUint8 **aVJCompHeader,
ThdrTCP *aTCPHeader
)[private]

Decompresses the Sequence Number field.

Parameters

TUint8 ** aVJCompHeaderPointer to the pointer to the VJ compressed header
ThdrTCP * aTCPHeaderTCP header to be updated

DecompUrgent(TUint8 **, ThdrTCP *, TUint)

voidDecompUrgent(TUint8 **aVJCompHeader,
ThdrTCP *aTCPHeader,
TUintaChanges
)[private]

Decompresses the Urgent field.

Parameters

TUint8 ** aVJCompHeaderPointer to the pointer to the VJ compressed header
ThdrTCP * aTCPHeaderTCP header to be updated
TUint aChangesThe VJ change mask

DecompVJComp(RMBufChain &)

TBool DecompVJComp(RMBufChain &aPacket)[virtual]

Decompresses a VJ compressed packet in place.

DecompVJUncomp

Parameters

RMBufChain & aPacketMBuf chain containing packet

DecompVJUncomp(RMBufChain &)

TBool DecompVJUncomp(RMBufChain &aPacket)[virtual]

Handles a VJ uncompressed packet. Stores the packet header in the appropriate VJ connection slot.

DecompVJComp

Parameters

RMBufChain & aPacketMBuf chain containing packet

DecompWindow(TUint8 **, ThdrTCP *)

voidDecompWindow(TUint8 **aVJCompHeader,
ThdrTCP *aTCPHeader
)[private]

Decompresses the Window field.

Parameters

TUint8 ** aVJCompHeaderPointer to the pointer to the VJ compressed header
ThdrTCP * aTCPHeaderTCP header to be updated

DecompressFrameL(RMBufChain &, TUint8, TUint8, TUint8 *const, TUint, TUint16)

voidDecompressFrameL(RMBufChain &aPacket,
TUint8aConnection,
TUint8aChanges,
TUint8 *const aInitialHeaderPtr,
TUintOffset,
TUint16aCurrentFrameLength
)[private]

Uncompresses a VJ compressed TCP/IP header.

leave
KErrCorrupt if aPacket is corrupt

Parameters

RMBufChain & aPacketMBuf chain containing packet to be updated
TUint8 aConnectionVJ connection number
TUint8 aChangesThe VJ change mask
TUint8 *const aInitialHeaderPtrBeginning of the compressed VJ header
TUint OffsetOffset from start of packet to TCP checksum field
TUint16 aCurrentFrameLengthLength of the compressed packet

DoIPChecksum(ThdrIP *, TUint16)

voidDoIPChecksum(ThdrIP *aIPHeader,
TUint16aIPHeaderLength
)[private]

Calculate the IP checksum and store it in the given IP packet header. See RFC 1071.

Parameters

ThdrIP * aIPHeaderIP packet header
TUint16 aIPHeaderLengthLength of IP header in bytes (must be even)

EncodeDelta(TUint8 **, TUint16)

voidEncodeDelta(TUint8 **aVJCompHeader,
TUint16aValue
)[private]

Parameters

TUint8 ** aVJCompHeader
TUint16 aValue

GetIPHeader(RMBufChain &)

ThdrIP *GetIPHeader(RMBufChain &aChain)[private]

Extracts the IP Header from the packet even though there is a buffer of Info on the front. This is used in VJ, to avoid the awful hack in the main receive path. PRR 20-11-97

Parameters

RMBufChain & aChainMBuf chain containing packet

GetStoredRxHeader(const TUint, ThdrIP *, ThdrTCP *)

voidGetStoredRxHeader(const TUintaConnectionNumber,
ThdrIP *aIPHeader,
ThdrTCP *aTCPHeader
)[private]

Retrieves a packet header from the VJ connection cache.

Parameters

const TUint aConnectionNumberValid VJ connection number to retrieve
ThdrIP * aIPHeaderIP packet header
ThdrTCP * aTCPHeaderTCP header

GetVJPtr(RMBufChain &, TUint16 *)

TUint8 *GetVJPtr(RMBufChain &aChain,
TUint16 *aCurrentFrameLength
)[private]

Gets a pointer to the VJ Header even though there is a pseudo (Adam) buffer of Info on the front.

Parameters

RMBufChain & aChainMBuf chain containing packet
TUint16 * aCurrentFrameLengthReturns the length of the packet

SetFlag(const TUint)

voidSetFlag(const TUintaFlag)[private, inline]

Set an internal flag.

Parameters

const TUint aFlagFlag value to set

TestFlag(const TUint)

TBool TestFlag(const TUintaFlag)[private, inline]

Test if an internal flag is set.

Parameters

const TUint aFlagFlag value to test

Member Data Documentation

TUint iFlags

TUint iFlags[private]

Set to KVJDiscard while discarding received packets due to lost synchronization

TUint iLastRxConn

TUint iLastRxConn[private]

VJ connection number of the last valid packet received

TUint iNumVJSlots

TUint iNumVJSlots[private]

Index of the highest-numbered VJ connection

TVJCompHdr * iRxStates

TVJCompHdr *iRxStates[private]

Pointer to start of array of VJ connections