Connected: An Internet Encyclopedia
3.2.3 Compressor processing

Up: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1144
Up: 3 The compression algorithm
Up: 3.2 The ugly details
Prev: 3.2.2 Compressed packet format
Next: 3.2.4 Decompressor processing

3.2.3 Compressor processing

3.2.3 Compressor processing

The compressor is called with the IP packet to be processed and the compression state structure for the outgoing serial line. It returns a packet ready for final framing and the link level `type' of that packet.

As the last section noted, the compressor converts every input packet into either a TYPE_IP, UNCOMPRESSED_TCP or COMPRESSED_TCP packet. A

TYPE_IP packet is an unmodified copy/16/ of the input packet and processing it doesn't change the compressor's state in any way.

An UNCOMPRESSED_TCP packet is identical to the input packet except the IP protocol field (byte 9) is changed from `6' (protocol TCP) to a connection number. In addition, the state slot associated with the connection number is updated with a copy of the input packet's IP and TCP headers and the connection number is recorded as the last connection sent on this serial line (for the C compression described below).

A COMPRESSED_TCP packet contains the data, if any, from the original packet but the IP and TCP headers are completely replaced with a new, compressed header. The connection state slot and last connection sent are updated by the input packet exactly as for an UNCOMPRESSED_TCP packet.

The compressor's decision procedure is:

If a packet makes it through the above checks, it will be sent as either UNCOMPRESSED_TCP or COMPRESSED_TCP: If all the `unchanging' fields match, an attempt is made to compress the current packet: Once the U, W, A and S changes have been determined, the special-case encodings can be checked: Finally, the TCP/IP header on the outgoing packet is replaced with a compressed header:

At this point, the compressed TCP packet is passed to the framer for transmission.


Next: 3.2.4 Decompressor processing

Connected: An Internet Encyclopedia
3.2.3 Compressor processing