class CVJCompressor : public CVJCompressorIf |
Van Jacobson TCP/IP header compressor (RFC 1144)
Public Member Functions | |
---|---|
CVJCompressor () | |
~CVJCompressor () | |
void | ConstructL ( CVJCompFactory *, TUint , TBool ) |
TInt | VJCompressFrame ( RMBufChain &) |
Private Attributes | |
---|---|
TBool | iCompressConnId |
TUint | iLastTxConn |
TVJCompHdr * | iLastTxHdr |
TUint | iMaxVJSlots |
TVJCompHdr * | iTxStates |
Inherited Attributes | |
---|---|
CVJCompressorIf::iFactory |
TBool | CompressAck | ( | TUint8 ** | aVJPtr, |
TUint8 * | aChanges, | |||
ThdrTCP * | aTCPHeader, | |||
ThdrTCP * | aRetrievedTCPHdr | |||
) | [private] |
Compresses the TCP Acknowledgement Number field.
TUint8 ** aVJPtr | Pointer to the pointer within the VJ header to be modified; returns pointing one past the last header location used |
TUint8 * aChanges | The VJ change mask to be updated |
ThdrTCP * aTCPHeader | TCP header |
ThdrTCP * aRetrievedTCPHdr | Cached TCP header from which to make a delta for aTCPHeader |
TBool | CompressFrame | ( | RMBufChain & | aPacket, |
ThdrIP * | aIPHeader, | |||
ThdrTCP * | aTCPHeader, | |||
TUint | aConnection, | |||
ThdrIP * | aRetrievedIPHdr, | |||
ThdrTCP * | aRetrievedTCPHdr | |||
) | [private] |
Compresses a TCP/IP header if possible.
TBool | CompressIPId | ( | TUint8 ** | aVJPtr, |
TUint8 * | aChanges, | |||
ThdrIP * | aIPHeader, | |||
ThdrIP * | aRetrievedIPHdr | |||
) | [private] |
Compresses the IP Packet ID field.
TUint8 ** aVJPtr | Pointer to the pointer within the VJ header to be modified; returns pointing one past the last header location used |
TUint8 * aChanges | The VJ change mask to be updated |
ThdrIP * aIPHeader | IP header |
ThdrIP * aRetrievedIPHdr | Cached IP header from which to make a delta for aIPHeader |
TBool | CompressPush | ( | TUint8 * | aChanges, |
ThdrTCP * | aTCPHeader | |||
) | [private] |
Compresses the TCP Push flag.
TBool | CompressSeq | ( | TUint8 ** | aVJPtr, |
TUint8 * | aChanges, | |||
ThdrTCP * | aTCPHeader, | |||
ThdrTCP * | aRetrievedTCPHdr | |||
) | [private] |
Compresses the TCP Sequence Number field.
TUint8 ** aVJPtr | Pointer to the pointer within the VJ header to be modified; returns pointing one past the last header location used |
TUint8 * aChanges | The VJ change mask to be updated |
ThdrTCP * aTCPHeader | TCP header |
ThdrTCP * aRetrievedTCPHdr | Cached TCP header from which to make a delta for aTCPHeader |
TBool | CompressSpecialCases | ( | TUint8 ** | aVJPtr, |
TUint8 *const | aVJInitialDeltaPtr, | |||
TUint8 * | aChanges, | |||
ThdrTCP * | aTCPHeader, | |||
ThdrTCP * | aRetrievedTCPHdr, | |||
ThdrIP * | aIPHeader, | |||
ThdrIP * | aRetrievedIPHdr | |||
) | [private] |
Compresses special case TCP/IP packets. See RFC 1144 sec. 3.2.3
TUint8 ** aVJPtr | Pointer to the pointer within the VJ header to be modified; returns pointing one past the last header location used |
TUint8 *const aVJInitialDeltaPtr | Beginning of the compressed VJ header |
TUint8 * aChanges | The VJ change mask to be updated |
ThdrTCP * aTCPHeader | TCP header |
ThdrTCP * aRetrievedTCPHdr | Cached TCP header from which to make a delta for aTCPHeader |
ThdrIP * aIPHeader | IP header |
ThdrIP * aRetrievedIPHdr | Cached IP header from which to make a delta for aIPHeader |
TBool | CompressUrgentPtr | ( | TUint8 ** | aVJPtr, |
TUint8 * | aChanges, | |||
ThdrTCP * | aTCPHeader, | |||
ThdrTCP * | aRetrievedTCPHdr | |||
) | [private] |
Compresses the TCP Urgent pointer field.
TUint8 ** aVJPtr | Pointer to the pointer within the VJ header to be modified; returns pointing one past the last header location used |
TUint8 * aChanges | The VJ change mask to be updated |
ThdrTCP * aTCPHeader | TCP header |
ThdrTCP * aRetrievedTCPHdr | Cached TCP header from which to make a delta for aTCPHeader |
TBool | CompressWindow | ( | TUint8 ** | aVJPtr, |
TUint8 * | aChanges, | |||
ThdrTCP * | aTCPHeader, | |||
ThdrTCP * | aRetrievedTCPHdr | |||
) | [private] |
Compresses the TCP Window field.
TUint8 ** aVJPtr | Pointer to the pointer within the VJ header to be modified; returns pointing one past the last header location used |
TUint8 * aChanges | The VJ change mask to be updated |
ThdrTCP * aTCPHeader | TCP header |
ThdrTCP * aRetrievedTCPHdr | Cached TCP header from which to make a delta for aTCPHeader |
void | ConstructL | ( | CVJCompFactory * | aFactory, |
TUint | aMaxSlot, | |||
TBool | aCompressConnId | |||
) |
Construct the CVJCompressor object.
CVJCompFactory * aFactory | Factory that created this object |
TUint aMaxSlot | Value of the highest VJ connection number to be sent |
TBool aCompressConnId | Whether to compress the connection number |
void | ConvertFrameToUncompVJ | ( | ThdrIP * | aIPHeader, |
TUint | aConnection | |||
) | [private] |
The frame is to be sent as an Uncompressed VJ frame, so set the connection number in place of the protocol type, and save the header.
void | CopyInNewTxHeader | ( | RMBufChain & | aPacket, |
TUint8 * | aCompressedHdr, | |||
TUint | aOldHeaderLength, | |||
TUint | aNewHeaderLength | |||
) | [private] |
Copies the compressed header into the packet.
RMBufChain & aPacket | MBuf chain containing packet |
TUint8 * aCompressedHdr | VJ compressed header |
TUint aOldHeaderLength | Length of the current TCP/IP header in aPacket |
TUint aNewHeaderLength | Length of VJ compressed header |
void | CopyTxHeader | ( | ThdrIP * | aIPHeader, |
TUint | aConnection | |||
) | [private] |
Copies the given TCP/IP header into the storage slot for the given connection number.
void | DecrementPacketLen | ( | RMBufChain & | aPacket, |
TUint | SizeDecrease | |||
) | [private] |
There is a header prepended to the frame, one element is the length which has now changed, so change it
RMBufChain & aPacket | MBuf chain containing packet |
TUint SizeDecrease | Amount by which to reduce the length metadata |
void | EncodeDelta | ( | TUint8 ** | aVJCompHeader, |
TInt16 | aValue | |||
) | [private] |
Encodes a delta value in VJ compressed format.
ThdrIP * | GetIPHeader | ( | RMBufChain & | aChain | ) | [private] |
Get the IP Header 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
RMBufChain & aChain | MBuf chain containing packet |
TBool | GetStoredTxHeader | ( | TUint * | aConnection, |
ThdrIP * | aIPHeader, | |||
ThdrTCP * | aTCPHeader, | |||
ThdrIP * | aRetrievedIPHdr, | |||
ThdrTCP * | aRetrievedTCPHdr | |||
) | [private] |
Retrieves a packet header from the VJ connection cache. The packet must match on the IP source and destination address and on the TCP source and destination port numbers.
TUint8 * | GetTCPOpts | ( | ThdrTCP * | aTCPHeader | ) | const [private, inline] |
Returns a pointer to the start of the TCP options (if there are any).
ThdrTCP * aTCPHeader | TCP header |
TBool | IPAddressesMatch | ( | ThdrIP * | aIPHeader, |
ThdrIP * | aNotherIPHdr | |||
) | [private] |
Compares the addresses in two IP headers.
TBool | IsDeltaCompressible | ( | TUint32 | aDelta | ) | const [private, inline] |
Tests if the delta value is compressible into the 16 bit VJ delta format. The aDelta value actually needs a 33 bit signed integer to hold the entire possible range, but the twos complement math works out if it's just stored as a 32 bit unsigned integer.
TUint32 aDelta | Delta value to test |
TBool | IsIPCompressible | ( | ThdrIP * | aIPHeader, |
ThdrIP * | aRetrievedIPHdr | |||
) | [private] |
Compares two IP headers to see if the seldom-changing fields match.
TBool | IsSameConnAsLast | ( | TUint * | aCompressedHdrLen, |
TUint | aConnection | |||
) | [private] |
Determines whether the given VJ connection number is the same as that of the last compressed packet sent and returns the size of the compressed header.
TBool | IsTCPCompressible | ( | ThdrTCP * | aTCPHeader, |
ThdrTCP * | aRetrievedTCPHdr | |||
) | [private] |
Compares two TCP headers to see if the options, ECN & reserved bits match. Everything else in the TCP header is handled specially by the VJ compression algorithm.
TBool | SendAsRawIP | ( | ThdrIP * | aIPHeader, |
ThdrTCP * | aTCPHeader | |||
) | [private] |
Determines if the packet must bypass VJ compression altogether. This happens with fragmented IP packets and certain TCP flags.
void | SetFirstFewBytes | ( | TUint8 * | aChanges, |
TBool | aNewConnection, | |||
TUint8 ** | aVJHeader, | |||
ThdrTCP * | aTCPHeader, | |||
TUint | aConnection | |||
) | [private] |
Sets the change mask, connection number (if necessary) and TCP checksum bytes in the VJ compressed header.
TUint8 * aChanges | The VJ change mask to be copied and potentially modified |
TBool aNewConnection | Whether this is a new connection, requiring the number in the header |
TUint8 ** aVJHeader | Pointer to the pointer to the VJ header to be modified |
ThdrTCP * aTCPHeader | TCP header |
TUint aConnection | VJ connection number |
TBool | SuitableForVJCompression | ( | ThdrIP * | aIPHeader, |
ThdrTCP * | aTCPHeader, | |||
TUint * | aConnection, | |||
ThdrIP * | aRetrievedIPHdr, | |||
ThdrTCP * | aRetrievedTCPHdr | |||
) | [private] |
Sees if a packet header is stored in the VJ connection cache.
TBool | TCPPortsMatch | ( | ThdrTCP * | aHeader, |
ThdrTCP * | aNotherHdr | |||
) | [private] |
Compares the TCP port numbers TCP headers.
TInt | VJCompressFrame | ( | RMBufChain & | aPacket | ) | [virtual] |
Takes a packet and transforms it for sending. It may end up VJ compressed, VJ uncompressed or untouched.
RMBufChain & aPacket | MBuf chain containing packet |
TBool | iCompressConnId | [private] |
Whether VJ was configured to compress the connection number
TVJCompHdr * | iLastTxHdr | [private] |
Pointer to the last element in the LRU circular list
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.