draft-ietf-rohc-rfc3095bis-rohcv2-profiles-02.txt   draft-ietf-rohc-rfc3095bis-rohcv2-profiles-03.txt 
Robust Header Compression G. Pelletier Robust Header Compression G. Pelletier
Internet-Draft K. Sandlund Internet-Draft K. Sandlund
Intended status: Standards Track Ericsson Intended status: Standards Track Ericsson
Expires: April 4, 2008 October 2, 2007 Expires: June 15, 2008 December 13, 2007
RObust Header Compression Version 2 (ROHCv2): Profiles for RTP, UDP, IP, RObust Header Compression Version 2 (ROHCv2): Profiles for RTP, UDP, IP,
ESP and UDP Lite ESP and UDP Lite
draft-ietf-rohc-rfc3095bis-rohcv2-profiles-02 draft-ietf-rohc-rfc3095bis-rohcv2-profiles-03
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79. aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
skipping to change at page 1, line 35 skipping to change at page 1, line 35
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on April 4, 2008. This Internet-Draft will expire on June 15, 2008.
Copyright Notice Copyright Notice
Copyright (C) The IETF Trust (2007). Copyright (C) The IETF Trust (2007).
Abstract Abstract
This document specifies ROHC (Robust Header Compression) profiles This document specifies ROHC (Robust Header Compression) profiles
that efficiently compress RTP/UDP/IP (Real-Time Transport Protocol, that efficiently compress RTP/UDP/IP (Real-Time Transport Protocol,
User Datagram Protocol, Internet Protocol), RTP/UDP-Lite/IP (User User Datagram Protocol, Internet Protocol), RTP/UDP-Lite/IP (User
skipping to change at page 2, line 40 skipping to change at page 2, line 40
5.2. Decompressor Concepts . . . . . . . . . . . . . . . . . . 14 5.2. Decompressor Concepts . . . . . . . . . . . . . . . . . . 14
5.2.1. Decompressor State Machine . . . . . . . . . . . . . 14 5.2.1. Decompressor State Machine . . . . . . . . . . . . . 14
5.2.2. Decompressor Context Management . . . . . . . . . . . 17 5.2.2. Decompressor Context Management . . . . . . . . . . . 17
5.2.3. Feedback logic . . . . . . . . . . . . . . . . . . . 19 5.2.3. Feedback logic . . . . . . . . . . . . . . . . . . . 19
6. ROHCv2 Profiles (Normative) . . . . . . . . . . . . . . . . . 19 6. ROHCv2 Profiles (Normative) . . . . . . . . . . . . . . . . . 19
6.1. Channel Parameters, Segmentation and Reordering . . . . . 19 6.1. Channel Parameters, Segmentation and Reordering . . . . . 19
6.2. Profile Operation, per-context . . . . . . . . . . . . . 19 6.2. Profile Operation, per-context . . . . . . . . . . . . . 19
6.3. Control Fields . . . . . . . . . . . . . . . . . . . . . 20 6.3. Control Fields . . . . . . . . . . . . . . . . . . . . . 20
6.3.1. Master Sequence Number (MSN) . . . . . . . . . . . . 21 6.3.1. Master Sequence Number (MSN) . . . . . . . . . . . . 21
6.3.2. Reordering Ratio . . . . . . . . . . . . . . . . . . 21 6.3.2. Reordering Ratio . . . . . . . . . . . . . . . . . . 21
6.3.3. IP-ID behavior . . . . . . . . . . . . . . . . . . . 21 6.3.3. IP-ID behavior . . . . . . . . . . . . . . . . . . . 22
6.3.4. UDP-Lite Coverage Behavior . . . . . . . . . . . . . 22 6.3.4. UDP-Lite Coverage Behavior . . . . . . . . . . . . . 22
6.3.5. Timestamp Stride . . . . . . . . . . . . . . . . . . 22 6.3.5. Timestamp Stride . . . . . . . . . . . . . . . . . . 22
6.3.6. Time Stride . . . . . . . . . . . . . . . . . . . . . 22 6.3.6. Time Stride . . . . . . . . . . . . . . . . . . . . . 22
6.3.7. CRC-3 for Control Fields . . . . . . . . . . . . . . 22 6.3.7. CRC-3 for Control Fields . . . . . . . . . . . . . . 22
6.4. Reconstruction and Verification . . . . . . . . . . . . . 23 6.4. Reconstruction and Verification . . . . . . . . . . . . . 23
6.5. Compressed Header Chains . . . . . . . . . . . . . . . . 23 6.5. Compressed Header Chains . . . . . . . . . . . . . . . . 23
6.6. Packet Formats and Encoding Methods . . . . . . . . . . . 25 6.6. Packet Formats and Encoding Methods . . . . . . . . . . . 25
6.6.1. baseheader_extension_headers . . . . . . . . . . . . 25 6.6.1. baseheader_extension_headers . . . . . . . . . . . . 25
6.6.2. baseheader_outer_headers . . . . . . . . . . . . . . 25 6.6.2. baseheader_outer_headers . . . . . . . . . . . . . . 26
6.6.3. inferred_udp_length . . . . . . . . . . . . . . . . . 25 6.6.3. inferred_udp_length . . . . . . . . . . . . . . . . . 26
6.6.4. inferred_ip_v4_header_checksum . . . . . . . . . . . 26 6.6.4. inferred_ip_v4_header_checksum . . . . . . . . . . . 26
6.6.5. inferred_mine_header_checksum . . . . . . . . . . . . 26 6.6.5. inferred_mine_header_checksum . . . . . . . . . . . . 27
6.6.6. inferred_ip_v4_length . . . . . . . . . . . . . . . . 27 6.6.6. inferred_ip_v4_length . . . . . . . . . . . . . . . . 27
6.6.7. inferred_ip_v6_length . . . . . . . . . . . . . . . . 27 6.6.7. inferred_ip_v6_length . . . . . . . . . . . . . . . . 28
6.6.8. Scaled RTP Timestamp Encoding . . . . . . . . . . . . 28 6.6.8. Scaled RTP Timestamp Compression . . . . . . . . . . 28
6.6.9. timer_based_lsb . . . . . . . . . . . . . . . . . . . 29 6.6.9. timer_based_lsb . . . . . . . . . . . . . . . . . . . 30
6.6.10. inferred_scaled_field . . . . . . . . . . . . . . . . 30 6.6.10. inferred_scaled_field . . . . . . . . . . . . . . . . 31
6.6.11. control_crc3_encoding . . . . . . . . . . . . . . . . 31 6.6.11. control_crc3_encoding . . . . . . . . . . . . . . . . 31
6.6.12. inferred_sequential_ip_id . . . . . . . . . . . . . . 32 6.6.12. inferred_sequential_ip_id . . . . . . . . . . . . . . 32
6.6.13. list_csrc(cc_value) . . . . . . . . . . . . . . . . . 32 6.6.13. list_csrc(cc_value) . . . . . . . . . . . . . . . . . 33
6.7. Encoding Methods With External Parameters . . . . . . . . 36 6.7. Encoding Methods With External Parameters as Arguments . 37
6.8. Packet Formats . . . . . . . . . . . . . . . . . . . . . 39 6.8. Packet Formats . . . . . . . . . . . . . . . . . . . . . 39
6.8.1. Initialization and Refresh Packet (IR) . . . . . . . 39 6.8.1. Initialization and Refresh Packet (IR) . . . . . . . 39
6.8.2. Compressed Packet Formats (CO) . . . . . . . . . . . 40 6.8.2. Compressed Packet Formats (CO) . . . . . . . . . . . 41
6.9. Feedback Formats and Options . . . . . . . . . . . . . . 99 6.9. Feedback Formats and Options . . . . . . . . . . . . . . 99
6.9.1. Feedback Formats . . . . . . . . . . . . . . . . . . 99 6.9.1. Feedback Formats . . . . . . . . . . . . . . . . . . 99
6.9.2. Feedback Options . . . . . . . . . . . . . . . . . . 101 6.9.2. Feedback Options . . . . . . . . . . . . . . . . . . 101
7. Security Considerations . . . . . . . . . . . . . . . . . . . 103 7. Security Considerations . . . . . . . . . . . . . . . . . . . 103
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 103 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 103
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 104 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 104
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 105 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 105
10.1. Normative References . . . . . . . . . . . . . . . . . . 105 10.1. Normative References . . . . . . . . . . . . . . . . . . 105
10.2. Informative References . . . . . . . . . . . . . . . . . 106 10.2. Informative References . . . . . . . . . . . . . . . . . 106
Appendix A. Detailed classification of header fields . . . . . 106 Appendix A. Detailed classification of header fields . . . . . 106
skipping to change at page 3, line 43 skipping to change at page 3, line 43
Appendix A.6. ESP Header Fields . . . . . . . . . . . . . . . . 114 Appendix A.6. ESP Header Fields . . . . . . . . . . . . . . . . 114
Appendix A.7. IPv6 Extension Header Fields . . . . . . . . . . . 114 Appendix A.7. IPv6 Extension Header Fields . . . . . . . . . . . 114
Appendix A.8. GRE Header Fields . . . . . . . . . . . . . . . . 115 Appendix A.8. GRE Header Fields . . . . . . . . . . . . . . . . 115
Appendix A.9. MINE Header Fields . . . . . . . . . . . . . . . . 116 Appendix A.9. MINE Header Fields . . . . . . . . . . . . . . . . 116
Appendix A.10. AH Header Fields . . . . . . . . . . . . . . . . . 117 Appendix A.10. AH Header Fields . . . . . . . . . . . . . . . . . 117
Appendix B. Compressor Implementation Guidelines . . . . . . . 117 Appendix B. Compressor Implementation Guidelines . . . . . . . 117
Appendix B.1. Reference Management . . . . . . . . . . . . . . . 118 Appendix B.1. Reference Management . . . . . . . . . . . . . . . 118
Appendix B.2. Window-based LSB Encoding (W-LSB) . . . . . . . . 118 Appendix B.2. Window-based LSB Encoding (W-LSB) . . . . . . . . 118
Appendix B.3. W-LSB Encoding and Timer-based Compression . . . . 118 Appendix B.3. W-LSB Encoding and Timer-based Compression . . . . 118
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 119 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 119
Intellectual Property and Copyright Statements . . . . . . . . . 120 Intellectual Property and Copyright Statements . . . . . . . . . 121
1. Introduction 1. Introduction
The ROHC WG has developed a header compression framework on top of The ROHC WG has developed a header compression framework on top of
which various profiles can be defined for different protocol sets or which various profiles can be defined for different protocol sets or
compression requirements. The ROHC framework was first documented in compression requirements. The ROHC framework was first documented in
[RFC3095], together with profiles for compression of RTP/UDP/IP [RFC3095], together with profiles for compression of RTP/UDP/IP
(Real-Time Transport Protocol, User Datagram Protocol, Internet (Real-Time Transport Protocol, User Datagram Protocol, Internet
Protocol), UDP/IP, IP and ESP/IP (Encapsulating Security Payload) Protocol), UDP/IP, IP and ESP/IP (Encapsulating Security Payload)
headers. Additional profiles for compression of IP headers [RFC3843] headers. Additional profiles for compression of IP headers [RFC3843]
skipping to change at page 4, line 35 skipping to change at page 4, line 35
o ESP/IP : profile 0x0103 o ESP/IP : profile 0x0103
o IP : profile 0x0104 o IP : profile 0x0104
o RTP/UDP-Lite/IP : profile 0x0107 o RTP/UDP-Lite/IP : profile 0x0107
o UDP-Lite/IP : profile 0x0108 o UDP-Lite/IP : profile 0x0108
ROHCv2 compresses the following type of extension headers: ROHCv2 compresses the following type of extension headers:
o AH [RFC4302] o AH [RFC4302]
o GRE [RFC2784][RFC2890] o GRE [RFC2784][RFC2890]
o MINE [RFC2004] o MINE [RFC2004]
o NULL-encrypted ESP [RFC4303]
o IPv6 Destination Options header[RFC2460] o IPv6 Destination Options header[RFC2460]
o IPv6 Hop-by-hop Options header[RFC2460] o IPv6 Hop-by-hop Options header[RFC2460]
o IPv6 Routing header [RFC2460]. o IPv6 Routing header [RFC2460].
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
This document is consistent with the terminology found in the ROHC This document is consistent with the terminology found in the ROHC
framework [RFC4995] and in the formal notation for ROHC [RFC4997]. framework [RFC4995] and in the formal notation for ROHC [RFC4997].
In addition, this document uses or defines the following terms: In addition, this document uses or defines the following terms:
Acknowledgment Number Acknowledgment Number
The Acknowledgment Number identifies what packet is being The Acknowledgment Number identifies what packet is being
acknowledged in the RoHCv2 feedback element. The value of this acknowledged in the RoHCv2 feedback element (See Section 6.9).
field normally corresponds to the Master Sequence Number (MSN) of The value of this field normally corresponds to the Master
the header that was last successfully decompressed, for the Sequence Number (MSN) of the header that was last successfully
compression context (CID) for which the feedback information decompressed, for the compression context (CID) for which the
applies. feedback information applies.
Chaining of Items Chaining of Items
A chain of items groups fields based on similar characteristics. A chain of items groups fields based on similar characteristics.
ROHCv2 defines chain items for static, dynamic and irregular ROHCv2 defines chain items for static, dynamic and irregular
fields. Chaining is achieved by appending to the chain an item fields. Chaining is achieved by appending to the chain an item
for e.g. each header in their order of appearance in the for each header in their order of appearance in the uncompressed
uncompressed packet. Chaining is useful to construct compressed packet. Chaining is useful to construct compressed headers from
headers from an arbitrary number of any of the protocol headers an arbitrary number of any of the protocol headers for which a
for which a ROHCv2 profile defines a compressed format. ROHCv2 profile defines a compressed format.
CRC-3 Control Validation CRC-3 Control Fields Validation
The CRC-3 control validation refers to the validation of the The CRC-3 control fields validation refers to the validation of
control fields when receiving a CO header that contains a 3-bit the control fields. This validation is performed by the
CRC calculated over the control fields that it carries and over decompressor when it receives a CO header that contains a 3-bit
specific control fields in the context. In the formal definition CRC calculated over control fields. This 3-bit CRC covers
of the header formats, the 3-bit CRC is labelled "control_crc3" controls fields carried in the CO header as well as specific
and uses the "control_crc3_encoding" (See also Section 6.6.11). control fields in the context. In the formal definition of the
header formats, this 3-bit CRC is labelled "control_crc3" and uses
the "control_crc3_encoding" (See also Section 6.6.11).
Delta Delta
The delta refers to the difference in the absolute value of a The delta refers to the difference in the absolute value of a
field between two consecutive packets being processed by the same field between two consecutive packets being processed by the same
compression endpoint. compression endpoint.
Reordering Depth Reordering Depth
The number of packets by which a packet is received late within The number of packets by which a packet is received late within
skipping to change at page 8, line 37 skipping to change at page 8, line 37
the UDP-Lite Checksum Coverage may in some cases be compressible. the UDP-Lite Checksum Coverage may in some cases be compressible.
For IPv4, a similar correlation as the one of the RTP TS to the RTP For IPv4, a similar correlation as the one of the RTP TS to the RTP
SN is often observed between the Identifier field (IP-ID) and the SN is often observed between the Identifier field (IP-ID) and the
master sequence number used for compression (e.g. the RTP SN when master sequence number used for compression (e.g. the RTP SN when
compressing RTP headers). compressing RTP headers).
4.2. Improvements of ROHCv2 over RFC3095 profiles 4.2. Improvements of ROHCv2 over RFC3095 profiles
The ROHCv2 profiles can achieve compression efficiency and robustness The ROHCv2 profiles can achieve compression efficiency and robustness
that are both at least equivalent to RFC3095 profiles, when used that are both at least equivalent to RFC3095 profiles [RFC3095], when
under the same operating conditions. In particular, the size and bit used under the same operating conditions. In particular, the size
layout of the smallest compressed header (i.e. PT-0 format U/O-0 in and bit layout of the smallest compressed header (i.e. PT-0 format
RFC3095, and pt_0_crc3 in ROHCv2) are identical. U/O-0 in RFC3095, and pt_0_crc3 in ROHCv2) are identical.
There are a number of differences and improvements between profiles There are a number of differences and improvements between profiles
defined in this document and their earlier version defined in RFC3095 defined in this document and their earlier version defined in
[RFC3095]. This section provides an overview of some of the most RFC3095. This section provides an overview of some of the most
significant improvements: significant improvements:
Tolerance to reordering Tolerance to reordering
Profiles defined in RFC3095 require that the channel between Profiles defined in RFC3095 require that the channel between
compressor and decompressor provide in-order delivery between compressor and decompressor provide in-order delivery between
compression endpoints. ROHCv2 profiles, however, can handle compression endpoints. ROHCv2 profiles, however, can handle
robustly and efficiently a limited amount of reordering before and robustly and efficiently a limited amount of reordering after the
after the compression point as part of the compression algorithm compression point as part of the compression algorithm itself. In
itself. addition, this improved support for reordering makes it possible
for ROHCv2 profiles to handle prelink reordering more efficiently.
Operational logic Operational logic
Profiles in RFC3095 define multiple operational modes, each with Profiles in RFC3095 define multiple operational modes, each with
different updating logic and compressed header formats. ROHCv2 different updating logic and compressed header formats. ROHCv2
profiles operate in unidirectional operation until feedback is profiles operate in unidirectional operation until feedback is
first received for a context (CID), at which point bidirectional first received for a context (CID), at which point bidirectional
is used; the formats are independent of what operational logic is operation is used; the formats are independent of what operational
used. logic is used.
IP extension header IP extension header
Profiles in RFC3095 compressed IP Extension headers using list Profiles in RFC3095 compress IP Extension headers using list
compression. ROHCv2 profiles instead treat extension headers in compression. ROHCv2 profiles instead treat extension headers in
the same manner as other protocol headers, i.e. using the chaining the same manner as other protocol headers, i.e. using the chaining
mechanism; it thus assumes that extension header are not added or mechanism; it thus assumes that extension header are not added or
removed during the lifetime of a context (CID), otherwise removed during the lifetime of a context (CID), otherwise
compression has to be restarted for this flow. compression has to be restarted for this flow.
IP encapsulation IP encapsulation
Profiles in RFC3095 can compress at most two levels of IP headers. Profiles in RFC3095 can compress at most two levels of IP headers.
ROHCv2 profiles can compress an arbitrary number of IP headers. ROHCv2 profiles can compress an arbitrary number of IP headers.
List compression List compression
ROHCv2 profiles does not support reference-based list compression. ROHCv2 profiles do not support reference-based list compression.
Robustness and repairs Robustness and repairs
ROHCv2 profiles do not define a format for the IR-DYN packet; ROHCv2 profiles do not define a format for the IR-DYN packet;
instead, each profile defines a compressed header that can be used instead, each profile defines a compressed header that can be used
to perform a more robust context repair using a 7-bit CRC to perform a more robust context repair using a 7-bit CRC
verification. This also implies that only the IR header can verification. This also implies that only the IR header can
change the association between a CID and the profile it uses. change the association between a CID and the profile it uses.
Feedback Feedback
ROHCv2 profiles define a CRC in the format of the FEEDBACK-2, and ROHCv2 profiles mandate a CRC in the format of the FEEDBACK-2,
different feedback options are available. while this is optional in RFC 3095. A different set of feedback
options is also used in ROHCv2 compared to RFC 3095.
4.3. Operational Characteristics of ROHCv2 Profiles 4.3. Operational Characteristics of ROHCv2 Profiles
Robust header compression can be used over many type of link Robust header compression can be used over many type of link
technologies. Section 4.4 of [RFC4995] lists the operational technologies. Section 4.4 of [RFC4995] lists the operational
characteristics of the ROHC channel. The ROHCv2 profiles address a characteristics of the ROHC channel. The ROHCv2 profiles address a
wide range of applications, and this section summarizes some of the wide range of applications, and this section summarizes some of the
operational characteristics that are specific to these profiles. operational characteristics that are specific to these profiles.
Packet length Packet length
ROHCv2 profiles assume that the lower layer indicates the length ROHCv2 profiles assume that the lower layer indicates the length
of a compressed packet. ROHCv2 compressed headers do not contain of a compressed packet. ROHCv2 compressed headers do not contain
length information for the payload. length information for the payload.
Out-of-order delivery between compression endpoints Out-of-order delivery between compression endpoints
The definition of the ROHCv2 profiles places no strict requirement The definition of the ROHCv2 profiles places no strict requirement
on the delivery sequence between the compression endpoints, i.e. on the delivery sequence between the compression endpoints, i.e.
packets may be received in a different order than the compressor packets may be received in a different order than the compressor
sent them and still have a fair probability to be successfully has sent them and still have a fair probability to be successfully
decompressed. decompressed.
However, frequent out-of-order delivery and/or significant However, frequent out-of-order delivery and/or significant
reordering depth will negatively impact the compression reordering depth will negatively impact the compression
efficiency. More specifically, if the compressor can operate efficiency. More specifically, if the compressor can operate
using a proper estimate of the reordering characteristics of the using a proper estimate of the reordering characteristics of the
path between the compression endpoints, larger headers can be sent path between the compression endpoints, larger headers can be sent
more often to increase the robustness against decompression more often to increase the robustness against decompression
failures due to out-of-order delivery. Otherwise, the compression failures due to out-of-order delivery. Otherwise, the compression
efficiency will be impaired from an increase in the frequency of efficiency will be impaired from an increase in the frequency of
skipping to change at page 11, line 16 skipping to change at page 11, line 16
Header compression can be conceptually characterized as the Header compression can be conceptually characterized as the
interaction of a compressor with a decompressor state machine, one interaction of a compressor with a decompressor state machine, one
per context. The responsibility of the compressor is to convey the per context. The responsibility of the compressor is to convey the
information needed to successfully decompress a packet, based on a information needed to successfully decompress a packet, based on a
certain confidence regarding the state of the decompressor context. certain confidence regarding the state of the decompressor context.
This confidence is obtained from the frequency and the type of This confidence is obtained from the frequency and the type of
information the compressor sends when updating the decompressor information the compressor sends when updating the decompressor
context, from the optimistic approach (Section 5.1.1) and optionally context, from the optimistic approach (Section 5.1.1) and optionally
from feedback messages received from the decompressor. from feedback messages (See Section 6.9) received from the
decompressor.
5.1.1. Optimistic Approach 5.1.1. Optimistic Approach
A compressor always uses the optimistic approach when it performs A compressor always uses the optimistic approach when it performs
context updates. The compressor normally repeats the same type of context updates. The compressor normally repeats the same type of
update until it is fairly confident that the decompressor has update until it is fairly confident that the decompressor has
successfully received the information. If the decompressor successfully received the information. If the decompressor
successfully receives any of the headers containing this update, successfully receives any of the headers containing this update,
state will be available for the decompressor to process smaller state will be available for the decompressor to process smaller
compressed headers. compressed headers.
skipping to change at page 11, line 45 skipping to change at page 11, line 46
The number of repetitions that is needed to obtain this confidence is The number of repetitions that is needed to obtain this confidence is
normally related to the packet loss and out-of-order delivery normally related to the packet loss and out-of-order delivery
characteristics of the link where header compression is used; it is characteristics of the link where header compression is used; it is
thus not defined in this document and is left open to thus not defined in this document and is left open to
implementations. implementations.
5.1.2. Tradeoff between robustness to losses and to reordering 5.1.2. Tradeoff between robustness to losses and to reordering
The ability of a header compression algorithm to handle sequentially The ability of a header compression algorithm to handle sequentially
late packets is mainly limited by two factors: the interpretation late packets is mainly limited by two factors: the interpretation
interval offset of the sliding window used for LSB encoded fields interval offset of the sliding window used for lsb encoded fields
[RFC4997], and the optimistic approach (See Section 5.1.1) for seldom [RFC4997], and the optimistic approach (See Section 5.1.1) for seldom
changing fields. changing fields.
LSB encoded fields: lsb encoded fields:
The interpretation interval offset specifies an upper limit for The interpretation interval offset specifies an upper limit for
the maximum reordering depth, by which is it possible for the the maximum reordering depth, by which is it possible for the
decompressor to recover the original value of a dynamically decompressor to recover the original value of a dynamically
changing (i.e. sequentially incrementing) field that is encoded changing (i.e. sequentially incrementing) field that is encoded
using W-LSB. Its value is bound to the number of LSB compressed using a window-based lsb encoding. Its value is typically bound
bits in the compressed header format, and grows with the number of to the number of lsb compressed bits in the compressed header
bits transmitted. However, the offset and the LSB encoding only format, and thus grows with the number of bits transmitted.
provide robustness for the field that it compresses, and However, the offset and the lsb encoding only provide robustness
(implicitly) for other sequentially changing fields that are for the field that it compresses, and (implicitly) for other
derived from that field. sequentially changing fields that are derived from that field.
This is shown in the figure below: This is shown in the figure below:
<--- interpretation interval (size is 2^k) ----> <--- interpretation interval (size is 2^k) ---->
|------------------+---------------------------| |------------------+---------------------------|
v_ref-p v_ref v_ref + (2^k-1) - p v_ref-p v_ref v_ref + (2^k-1) - p
Lower Upper Lower Upper
Bound Bound Bound Bound
<--- reordering --> <--------- losses ---------> <--- reordering --> <--------- losses --------->
where p is the maximum negative delta, corresponding to the where p is the maximum negative delta, corresponding to the
maximum reordering depth for which the lsb encoding can recover maximum reordering depth for which the lsb encoding can recover
the original value of the field; the original value of the field;
where (2^k-1) - p is the maximum positive delta, corresponding where (2^k-1) - p is the maximum positive delta, corresponding
to the maximum number of consecutive losses for which the lsb to the maximum number of consecutive losses for which the lsb
encoding can recover the original value of the field encoding can recover the original value of the field;
where v_ref is the reference value, as defined in the lsb where v_ref is the reference value, as defined in the lsb
encoding method in [RFC4997]. encoding method in [RFC4997].
There is thus a tradeoff between the robustness against reordering There is thus a tradeoff between the robustness against reordering
and the robustness against packet losses, with respect to the and the robustness against packet losses, with respect to the
number of MSN bits needed and the distribution of the number of MSN bits needed and the distribution of the
interpretation interval between negative and positive deltas in interpretation interval between negative and positive deltas in
the MSN. the MSN.
skipping to change at page 13, line 8 skipping to change at page 13, line 7
for the maximum reordering depth for seldom changing fields. for the maximum reordering depth for seldom changing fields.
There is thus a tradeoff between compression efficiency and There is thus a tradeoff between compression efficiency and
robustness. When only information on the MSN needs to be conveyed to robustness. When only information on the MSN needs to be conveyed to
the decompressor, the tradeoff relates to the number of compressed the decompressor, the tradeoff relates to the number of compressed
MSN bits in the compressed header format. Otherwise, the tradeoff MSN bits in the compressed header format. Otherwise, the tradeoff
relates to the implementation of the optimistic approach. relates to the implementation of the optimistic approach.
In particular, compressor implementations should adjust their In particular, compressor implementations should adjust their
optimistic approach strategy to match both packet loss and reordering optimistic approach strategy to match both packet loss and reordering
characteristics. For example, the number of repetitions for each characteristics of the link over which header compression is applied.
update of a non-LSB encoded field can be increased. The compressor For example, the number of repetitions for each update of a non-lsb
can ensure that each update is repeated until it is reasonably encoded field can be increased. The compressor can ensure that each
confident that at least one packet containing the change has reached update is repeated until it is reasonably confident that at least one
the decompressor before the first packet sent after this sequence. packet containing the change has reached the decompressor before the
first packet sent after this sequence.
5.1.3. Interactions with the Decompressor Context 5.1.3. Interactions with the Decompressor Context
The compressor normally starts compression with the initial The compressor normally starts compression with the initial
assumption that the decompressor has no useful information to process assumption that the decompressor has no useful information to process
the new flow, and sends Initialization and Refresh (IR) packets. the new flow, and sends Initialization and Refresh (IR) packets.
Initially, when sending the first IR packet for a compressed flow, Initially, when sending the first IR packet for a compressed flow,
the compressor does not expect to receive feedback for that flow, the compressor does not expect to receive feedback for that flow,
until such feedback is first received. At this point, the compressor until such feedback is first received. At this point, the compressor
may then assume that the decompressor will continue to send feedback may then assume that the decompressor will continue to send feedback
in order to repair its context when necessary. The former is in order to repair its context when necessary. The former is
referred to as unidirectional operation, while the latter is called referred to as unidirectional operation, while the latter is called
bidirectional operation. bidirectional operation.
The compressor can then adjust the compression level (i.e. what The compressor can then adjust the compression level (i.e. what
header format it selects) based on its confidence that the header format it selects) based on its confidence that the
decompressor has the necessary information to successfully process decompressor has the necessary information to successfully process
the compressed headers that it selects. In other words, the the compressed headers that it selects.
responsibility of the compressor is to ensure that the decompressor
operates with state information that is sufficient to allow
decompression of the most efficient compressed header(s), and to
allow the decompressor to successfully recover that state information
as soon as possible otherwise.
The compressor thus has the entire responsibility to ensure that the In other words, the responsibility of the compressor are to ensure
decompressor has the proper information to decompress the type of that the decompressor operates with state information that is
compressed header that it sends. In other words, the choice of sufficient to successfully decompress the type of compressed
compressed header depends on the following factors: header(s) it receives, and to allow the decompressor to successfully
recover that state information as soon as possible otherwise. The
compressor therefore selects the type of compressed header based on
the following factors:
o the outcome of the encoding method applied to each field; o the outcome of the encoding method applied to each field;
o the optimistic approach, with respect to the characteristics of o the optimistic approach, with respect to the characteristics of
the channel; the channel;
o the type of operation (unidirectional or bidirectional), and if in o the type of operation (unidirectional or bidirectional), and if in
birectional operation, feedback received from the decompressor bidirectional operation, feedback received from the decompressor
(ACKs, NACKs, STATIC-NACK, and options). (ACKs, NACKs, STATIC-NACK, and options).
Encoding methods normally use previous value(s) from a history of Encoding methods normally use previous value(s) from a history of
packets whose headers it has previously compressed. The optimistic packets whose headers it has previously compressed. The optimistic
approach is meant to ensure that at least one compressed header approach is meant to ensure that at least one compressed header
containing the information to update the state for a field is containing the information to update the state for a field is
received. Finally, feedback indicates what actions the decompressor received. Finally, feedback indicates what actions the decompressor
has taken with respect to its assumptions regarding the validity of has taken with respect to its assumptions regarding the validity of
its context (Section 5.2.2); it indicates what type of compressed its context (Section 5.2.2); it indicates what type of compressed
header the decompressor can or cannot decompress. header the decompressor can or cannot decompress.
skipping to change at page 14, line 28 skipping to change at page 14, line 25
responsible for the failure. The compressor is thus always responsible for the failure. The compressor is thus always
responsible to determine what is the most suitable response to a responsible to determine what is the most suitable response to a
negative acknowledgement, using the confidence it has in the state of negative acknowledgement, using the confidence it has in the state of
the decompressor context, when selecting the type of compressed the decompressor context, when selecting the type of compressed
header it will use when compressing a header. header it will use when compressing a header.
5.2. Decompressor Concepts 5.2. Decompressor Concepts
The decompressor normally uses the last received and successfully The decompressor normally uses the last received and successfully
validated (IR packets) or verified (CO packets) header as the validated (IR packets) or verified (CO packets) header as the
reference for future decompression. If the received packet is older reference for future decompression.
than the current reference packet based on the MSN in the compressed
header, the decompressor may refrain from using this packet as the
new reference packet, even if the correctness of its header was
successfully verified.
The decompressor is responsible to always verify the outcome of the The decompressor is responsible to always verify the outcome of the
decompression attempt, to update its context when successful and decompression attempt, to update its context when successful and
finally to request context repairs by making coherent usage of finally to request context repairs by making coherent usage of
feedback, once it has started using feedback. feedback, once it has started using feedback.
Specifically, the outcome of every decompression attempt is verified Specifically, the outcome of every decompression attempt is verified
using the CRC present in the compressed header; the decompressor using the CRC present in the compressed header; the decompressor
updates the context information when this outcome is successfully updates the context information when this outcome is successfully
verified; finally if the decompressor uses feedback once for a verified; finally if the decompressor uses feedback once for a
skipping to change at page 15, line 15 skipping to change at page 15, line 7
The decompressor starts without a valid context, the NC state. Upon The decompressor starts without a valid context, the NC state. Upon
receiving an IR packet, the decompressor validates the integrity of receiving an IR packet, the decompressor validates the integrity of
its header using the CRC-8 validation. If the IR header is its header using the CRC-8 validation. If the IR header is
successfully validated, the decompressor updates the context and uses successfully validated, the decompressor updates the context and uses
this header as the reference header, and moves to the FC state. The this header as the reference header, and moves to the FC state. The
decompressor state machine normally does not leave the FC state once decompressor state machine normally does not leave the FC state once
it has entered this state; only repeated decompression failures will it has entered this state; only repeated decompression failures will
force the decompressor to transit downwards to a lower state. When force the decompressor to transit downwards to a lower state. When
context damage is detected, the decompressor moves to the repair context damage is detected, the decompressor moves to the repair
context (RC) state, where it stays until it successfully verifies a context (RC) state, where it stays until it successfully verifies a
decompression attempt for a compressed header with a 7-bit CRC or for decompression attempt for a compressed header with a 7-bit CRC or
an IR header. When static context damage is detected, the until it successfully validates an IR header. When static context
decompressor moves back to the NC state. damage is detected, the decompressor moves back to the NC state.
Below is the state machine for the decompressor. Details of the Below is the state machine for the decompressor. Details of the
transitions between states and decompression logic are given in the transitions between states and decompression logic are given in the
sub-sections following the figure. sub-sections following the figure.
CRC-8(IR) Validation CRC-8(IR) Validation
+----->----->----->----->----->----->----->----->----->----->----+ +----->----->----->----->----->----->----->----->----->----->----+
| CRC-8(IR) | | CRC-8(IR) |
| !CRC-8(IR) or CRC-7(CO) or or CRC-7(CO) | | !CRC-8(IR) or CRC-7(CO) or or CRC-7(CO) |
| PT not allowed CRC-8(IR) or CRC-3(CO) | | PT not allowed CRC-8(IR) or CRC-3(CO) |
skipping to change at page 15, line 40 skipping to change at page 15, line 32
| | v | v | v v | | v | v | v v
+-----------------+ +----------------------+ +--------------------+ +-----------------+ +----------------------+ +--------------------+
| No Context (NC) | | Repair Context (RC) | | Full Context (FC) | | No Context (NC) | | Repair Context (RC) | | Full Context (FC) |
+-----------------+ +----------------------+ +--------------------+ +-----------------+ +----------------------+ +--------------------+
^ ^ Static Context | ^ !CRC-7(CO) or | ^ Context Damage | | ^ ^ Static Context | ^ !CRC-7(CO) or | ^ Context Damage | |
| | Damage Detected | | PT not allowed | | Detected | | | | Damage Detected | | PT not allowed | | Detected | |
| +--<-----<-----<--+ +----<------<----+ +--<-----<-----<--+ | | +--<-----<-----<--+ +----<------<----+ +--<-----<-----<--+ |
| | | |
| Static Context Damage Detected | | Static Context Damage Detected |
+--<-----<-----<-----<-----<-----<-----<-----<-----<---------+ +--<-----<-----<-----<-----<-----<-----<-----<-----<---------+
where: where:
CRC-8(IR): successful CRC-8 validation for the IR header.
CRC-8(IR) : Successful CRC-8 validation for the IR header.
!CRC-8(IR): Unsuccessful CRC-8 validation for the IR header. !CRC-8(IR): Unsuccessful CRC-8 validation for the IR header.
CRC-7(CO) and/or CRC-3(CO): successful CRC verification for the CRC-7(CO) and/or
decompression of a CO header, based on the number of CRC bits CRC-3(CO) : Successful CRC verification for the decompression
of a CO header, based on the number of CRC bits
carried in the CO header. carried in the CO header.
!CRC-7(CO): failure to CRC verify the decompression of a CO header !CRC-7(CO) : Failure to CRC verify the decompression of a CO
carrying a 7-bit CRC. header carrying a 7-bit CRC.
PT not allowed : The decompressor has received a packet type (PT)
for which the decompressor's current context does
not provide enough valid state information to
decompress the packet.
PT not allowed: the decompressor has received a packet type (PT) Static Context Damage Detected: See definition in Section 5.2.2.
for which the decompressor's current context does not provide Context Damage Detected: See definition in Section 5.2.2.
enough valid state information for that packet to be decompressed.
Static Context Damaged Detected: see definition in Section 5.2.2.
Context Damage Detected: see definition in Section 5.2.2.
5.2.1.1. No Context (NC) State 5.2.1.1. No Context (NC) State
Initially, while working in the No Context (NC) state, the Initially, while working in the No Context (NC) state, the
decompressor has not yet successfully validated an IR header. decompressor has not yet successfully validated an IR header.
Attempting decompression: Attempting decompression:
In the NC state, only packets carrying sufficient information on In the NC state, only packets carrying sufficient information on
the static fields (i.e. IR packets) can be decompressed. the static fields (i.e. IR packets) can be decompressed.
Upward transition: Upward transition:
The decompressor can move to the Full Context (FC) state when the The decompressor can move to the Full Context (FC) state when the
CRC validation of an 8-bit CRC in an IR header is successful. CRC validation of an 8-bit CRC in an IR header is successful.
Feedback logic: Feedback logic:
In the No Context state, the decompressor should send a STATIC- In the NC state, the decompressor should send a STATIC-NACK if a
NACK if a packet of a type other than IR is received, or if an IR packet of a type other than IR is received, or if an IR header has
header has failed the CRC-8 validation, subject to the feedback failed the CRC-8 validation, subject to the feedback rate
rate limitation as described in Section 5.2.3. limitation as described in Section 5.2.3.
5.2.1.2. Repair Context (RC) State 5.2.1.2. Repair Context (RC) State
In the Repair Context (RC) state, the decompressor has successfully In the Repair Context (RC) state, the decompressor has successfully
decompressed packets for this context, but does not have confidence decompressed packets for this context, but does not have confidence
that the entire context is valid. that the entire context is valid.
Attempting decompression: Attempting decompression:
In the RC state, only headers covered by an 8-bit CRC (i.e. IR) In the RC state, only headers covered by an 8-bit CRC (i.e. IR)
skipping to change at page 17, line 11 skipping to change at page 17, line 11
validation of an 8-bit CRC in an IR header. validation of an 8-bit CRC in an IR header.
Downward transition: Downward transition:
The decompressor moves back to the NC state if it assumes static The decompressor moves back to the NC state if it assumes static
context damage. context damage.
Feedback logic: Feedback logic:
In the RC state, the decompressor should send a STATIC-NACK when In the RC state, the decompressor should send a STATIC-NACK when
CRC-8 validation of an IR fails, or when a CO header carrying a CRC-8 validation of an IR header fails, or when a CO header
7-bit CRC fails and static context damage is assumed, subject to carrying a 7-bit CRC fails and static context damage is assumed,
the feedback rate limitation as described in Section 5.2.3. If subject to the feedback rate limitation as described in
any other packet type is received, the decompressor should treat Section 5.2.3. If any other packet type is received, the
it as a CRC verification failure when deciding if a NACK is to be decompressor should treat it as a CRC verification failure to
sent. determine if NACK is to be sent.
5.2.1.3. Full Context (FC) State 5.2.1.3. Full Context (FC) State
In the Full Context (FC) state, the decompressor assumes that its In the Full Context (FC) state, the decompressor assumes that its
entire context is valid. entire context is valid.
Attempting decompression: Attempting decompression:
In the FC state, decompression can be attempted regardless of the In the FC state, decompression can be attempted regardless of the
type of packet received. type of packet received.
skipping to change at page 17, line 38 skipping to change at page 17, line 38
Downward transition: Downward transition:
The decompressor moves back to the RC state if it assumes context The decompressor moves back to the RC state if it assumes context
damage. If the decompressor assumes static context damage, it damage. If the decompressor assumes static context damage, it
moves directly to the NC state. moves directly to the NC state.
Feedback logic: Feedback logic:
In the FC state, the decompressor should send a NACK when CRC-8 In the FC state, the decompressor should send a NACK when CRC-8
validation or CRC verification of any header type fails and if validation or CRC verification of any header type fails and if
context damage is assumed, or STATIC-NACK if static context damage context damage is assumed, or it should send a STATIC-NACK if
is assumed, subject to the feedback rate limitation as described static context damage is assumed; this is subject to the feedback
in Section 5.2.3. rate limitation described in Section 5.2.3.
5.2.2. Decompressor Context Management 5.2.2. Decompressor Context Management
All header formats carry a CRC and are context updating. A packet All header formats carry a CRC and are context updating. A packet
for which the CRC succeeds updates the reference values of all header for which the CRC succeeds updates the reference values of all header
fields, either explicitly (from the information about a field carried fields, either explicitly (from the information about a field carried
within the compressed header) or implicitly (fields that are inferred within the compressed header) or implicitly (fields inferred from
from other fields). other fields).
The decompressor may assume that some or the entire context is The decompressor may assume that some or the entire context is
invalid, when it fails to validate or to verify one or more headers invalid, when it fails to validate or to verify one or more headers
using the CRC. Because the decompressor cannot know the exact using the CRC. Because the decompressor cannot know the exact
reason(s) for a CRC failure or what field caused it, the validity of reason(s) for a CRC failure or what field caused it, the validity of
the context hence does not refer to what specific part(s) of the the context hence does not refer to what specific part(s) of the
context is deemed valid or not. context is deemed valid or not.
Validity of the context rather relates to the detection of a problem Validity of the context rather relates to the detection of a problem
with the context. The decompressor first assume that the type of with the context. The decompressor first assumes that the type of
information that most likely caused the failure(s) is the state that information that most likely caused the failure(s) is the state that
normally changes for each packet, i.e. context damage of the dynamic normally changes for each packet, i.e. context damage of the dynamic
part of the context. Upon repeated decompression failures and part of the context. Upon repeated decompression failures and
unsuccessful repairs, the decompressor then assumes that the entire unsuccessful repairs, the decompressor then assumes that the entire
context, including the static part, needs to be repaired, i.e. static context, including the static part, needs to be repaired, i.e. static
context damage. Failure to validate the 3-bit CRC that protects context damage. Failure to validate the 3-bit CRC that protects
control fields should be treated as a decompression failure when the control fields should be treated as a decompression failure when the
decompressor asserts the validity of its context. decompressor asserts the validity of its context.
Context Damage Detection Context Damage Detection
skipping to change at page 19, line 16 skipping to change at page 19, line 16
ROHCv2 profiles may be used in environments with or without feedback ROHCv2 profiles may be used in environments with or without feedback
capabilities from decompressor to compressor. ROHCv2 however assumes capabilities from decompressor to compressor. ROHCv2 however assumes
that if a ROHC feedback channel is available and if this channel is that if a ROHC feedback channel is available and if this channel is
used at least once by the decompressor for a specific context, this used at least once by the decompressor for a specific context, this
channel will be used during the entire compression operation for that channel will be used during the entire compression operation for that
context (i.e. bidirectional operation). context (i.e. bidirectional operation).
The ROHC framework defines 3 types of feedback messages: ACKs, NACKs The ROHC framework defines 3 types of feedback messages: ACKs, NACKs
and STATIC-NACKs. The semantics of each message if defined in and STATIC-NACKs. The semantics of each message if defined in
section 5.2.3.1. of [RFC4995]. What feedback to send is coupled to section 5.2.4.1. of [RFC4995]. What feedback to send is coupled to
the context management of the decompressor, i.e. to the the context management of the decompressor, i.e. to the
implementation of the context damage detection algorithms as implementation of the context damage detection algorithms as
described in Section 5.2.2. described in Section 5.2.2.
The decompressor should send a NACK when it assumes context damage, The decompressor should send a NACK when it assumes context damage,
and it should send a STATIC-NACK when it assumes static context and it should send a STATIC-NACK when it assumes static context
damage. The decompressor is not strictly expected to send ACK damage. The decompressor is not strictly expected to send ACK
feedback upon successful decompression, other than for the purpose of feedback upon successful decompression, other than for the purpose of
improving compression efficiency. improving compression efficiency.
When ROHCv2 profiles are used over a channel that cannot guarantee When ROHCv2 profiles are used over a channel that cannot guarantee
in-order delivery, the decompressor may refrain to send ACK feedback in-order delivery, the decompressor may refrain from sending ACK
for a sequentially late packet that is successfully decompressed. feedback for a sequentially late packet that is successfully
decompressed.
The decompressor should limit the rate at which it sends feedback, The decompressor should limit the rate at which it sends feedback,
for both ACKs and STATIC-NACK/NACKs, and should avoid sending for both ACKs and STATIC-NACK/NACKs, and should avoid sending
unnecessary duplicates of the same type of feedback message that may unnecessary duplicates of the same type of feedback message that may
be associated to the same event. be associated to the same event.
6. ROHCv2 Profiles (Normative) 6. ROHCv2 Profiles (Normative)
6.1. Channel Parameters, Segmentation and Reordering 6.1. Channel Parameters, Segmentation and Reordering
The compressor MUST NOT use ROHC segmentation (see [RFC4995] section The compressor MUST NOT use ROHC segmentation (see [RFC4995] section
5.2.5), i.e. MRRU MUST be set to 0), if the configuration of the 5.2.5), i.e. MRRU MUST be set to 0, if the configuration of the ROHC
ROHC channel contains at least one ROHCv2 profile in the list of channel contains at least one ROHCv2 profile in the list of supported
supported profiles (i.e. the PROFILES parameter) and if the channel profiles (i.e. the PROFILES parameter) and if the channel cannot
cannot guarantee in-order delivery of packets between compression guarantee in-order delivery of packets between compression endpoints.
endpoints.
6.2. Profile Operation, per-context 6.2. Profile Operation, per-context
ROHCv2 profiles operate differently, per context, depending on how ROHCv2 profiles operate differently, per context, depending on how
the decompressor makes use of the feedback channel, if any. Once the the decompressor makes use of the feedback channel, if any. Once the
decompressor uses the feedback channel for a context, it establishes decompressor uses the feedback channel for a context, it establishes
the feedback channel for that CID. the feedback channel for that CID.
The compressor always start assuming that the decompressor will not The compressor always start assuming that the decompressor will not
send feedback when it initializes a new context (see also the send feedback when it initializes a new context (see also the
definition of a new context insection 5.1.1. of [RFC4995]), i.e. definition of a new context insection 5.1.1. of [RFC4995]), i.e.
there is no established feedback channel for the new context. There there is no established feedback channel for the new context. At
will always be a possibility of decompression failure with the this point, despite the use of the optimistic approach, decompression
optimistic approach, because the decompressor may not have received failure is still possible because the decompressor may not have
sufficient information for correct decompression. Therefore, until received sufficient information to correctly decompress the packets;
the decompressor has established a feedback channel, the compressor therefore, until the decompressor has established a feedback channel,
SHOULD periodically send IR packets. The periodicity can be based on the compressor SHOULD periodically send IR packets. The periodicity
timeouts, on the number of compressed packets sent for the flow, or can be based on timeouts, on the number of compressed packets sent
any other strategy the implementer chooses. for the flow, or any other strategy the implementer chooses.
The reception of either positive feedback (ACKs) or negative feedback The reception of either positive feedback (ACKs) or negative feedback
(NACKs or STATIC-NACKs) establishes the feedback channel from the (NACKs or STATIC-NACKs) from the decompressor establishes the
decompressor for the context (CID) for which the feedback was feedback channel for the context (CID) for which the feedback was
received. Once there is an established feedback channel for a received. Once there is an established feedback channel for a
specific context, the compressor can make use of this feedback to specific context, the compressor can make use of this feedback to
estimate the current state of the decompressor. This helps estimate the current state of the decompressor. This helps
increasing the compression efficiency by providing the information increasing the compression efficiency by providing the information
needed for the compressor to achieve the necessary confidence level. needed for the compressor to achieve the necessary confidence level.
When the feedback channel is established, it becomes superfluous for When the feedback channel is established, it becomes superfluous for
the compressor to send periodic refreshes, and instead it can rely the compressor to send periodic refreshes, and instead it can rely
entirely on the optimistic approach and feedback from the entirely on the optimistic approach and feedback from the
decompressor. decompressor.
The decompressor MAY send positive feedback (ACKs) to initially The decompressor MAY send positive feedback (ACKs) to initially
establish the feedback channel for a particular flow. Either establish the feedback channel for a particular flow. Either
positive feedback (ACKs) or negative feedback (NACKs) establishes positive feedback (ACKs) or negative feedback (NACKs) establishes
this channel. The decompressor is REQUIRED to continue sending this channel. Once it has established a feedback channel for a CID,
feedback once it has established a feedback channel for a CID, for the decompressor is REQUIRED to continue sending feedback for the
the lifetime of the context, i.e. until the CID is associated with a lifetime of the context (i.e. until it receives an IR packet that
different profile from the reception of an IR packet, to send error associates the CID to a different profile), to send error recovery
recovery requests and (optionally) acknowledgments of significant requests and (optionally) acknowledgments of significant context
context updates. updates.
Compression without an established feedback channel will be less Compression without an established feedback channel will be less
efficient, because of the periodic refreshes and from the lack of efficient, because of the periodic refreshes and from the lack of
feedback for initiation of error recovery; there will also be a feedback to trigger error recovery; there will also be a slightly
slightly higher probability of loss propagation compared to the case higher probability of loss propagation compared to the case where the
where the decompressor uses feedback. decompressor uses feedback.
6.3. Control Fields 6.3. Control Fields
ROHCv2 defines a number of control fields that are used by the ROHCv2 defines a number of control fields that are used by the
decompressor in its interpretation of the packet formats received decompressor in its interpretation of the packet formats received
from the compressor. The control fields listed in the following from the compressor. The control fields listed in the following
subsections are all defined in Section 6.8.2.4 using ROHC-FN subsections are defined using the formal notation [RFC4997] in
[RFC4995]. Section 6.8.2.4.
6.3.1. Master Sequence Number (MSN) 6.3.1. Master Sequence Number (MSN)
The Master Sequence Number (MSN) field is either taken from a field The Master Sequence Number (MSN) field is either taken from a field
that already exists in each of the headers of the protocol that the that already exists in one of the headers of the protocol that the
profile compresses (e.g. RTP SN), or alternatively it is created at profile compresses (e.g. RTP SN), or alternatively it is created at
the compressor. There is one MSN space per context (CID). the compressor. There is one MSN space per context (CID).
The MSN field has the following two functions: The MSN field has the following two functions:
o Differentiating between reference headers when receiving feedback o Differentiating between reference headers when receiving feedback
data. data;
o Inferring the value of incrementing fields (e.g. IPv4 o Inferring the value of incrementing fields (e.g. IPv4
Identifier). Identifier).
The MSN field is present in every ROHCv2 header sent by the There is one MSN field in every ROHCv2 header, i.e. the MSN is always
compressor. The MSN is sent in full in IR packets, while it can be present in each packet type sent by the compressor. The MSN is sent
sent LSB encoded within CO header formats. The decompressor always in full in IR packets, while it can be lsb encoded within CO header
includes LSBs of the MSN in the Acknowledgment Number field in formats. The decompressor always includes LSBs of the MSN in the
feedback (see Section 6.9). The compressor can later use this field Acknowledgment Number field in feedback (see Section 6.9). The
to infer what packet the decompressor is acknowledging. compressor can later use this field to infer what packet the
decompressor is acknowledging.
For profiles for which the MSN is created by the compressor, the For profiles for which the MSN is created by the compressor (i.e.
following applies: 0x0102, 0x0104 and 0x0108), the following applies:
o The compressor should only initialize a new MSN for the initial IR o The compressor only initializes the MSN for a context when that
sent for a CID that corresponds to a context that is not already context is first created or when the profile associated with a
associated with this profile; context changes;
o When the MSN is initialized, it is initialized to a random value; o When the MSN is initialized, it is initialized to a random value;
o The value of the MSN is incremented by one for each packet that o The value of the MSN SHOULD be incremented by one for each packet
the compressor sends for a specific CID. that the compressor sends for a specific CID.
6.3.2. Reordering Ratio 6.3.2. Reordering Ratio
The control field reorder_ratio specifies how much reordering is The control field reorder_ratio specifies how much reordering is
handled by the LSB encoding of the MSN. This is useful when header handled by the lsb encoding of the MSN. This is useful when header
compression is performed over links with varying reordering compression is performed over links with varying reordering
characteristics. The reorder_ratio control field is a means for the characteristics. The reorder_ratio control field provides the means
compressor to adjust the robustness characteristics of the LSB for the compressor to adjust the robustness characteristics of the
encoding method with respect to reordering and consecutive losses, as lsb encoding method with respect to reordering and consecutive
described in Section 5.1.2. losses, as described in Section 5.1.2.
6.3.3. IP-ID behavior 6.3.3. IP-ID behavior
The IP-ID field of the IPv4 header can have different change The IP-ID field of the IPv4 header can have different change
patterns: sequential in network byte order, sequential byte-swapped, patterns: sequential in network byte order, sequential byte-swapped,
random or constant (a constant value of zero, although not conformant random or constant (a constant value of zero, although not conformant
with [RFC0791], has been observed in practice). There is one IP-ID with [RFC0791], has been observed in practice). There is one IP-ID
behavior control field per IP header. The control field for the behavior control field per IP header. The control field for the
IP-ID behavior of the innermost IP header determines which set of IP-ID behavior of the innermost IP header determines which set of
header formats will be used. The IP-ID behavior control field is header formats is used. The IP-ID behavior control field is also
also used to determine the contents of the irregular chain item, for used to determine the contents of the irregular chain item, for each
each IP header. IP header.
ROHCv2 profiles can assign a sequential behavior (network byte order ROHCv2 profiles MUST NOT assign a sequential behavior (network byte
or byte-swapped) only to the IP-ID of innermost IP header, when order or byte-swapped) to any IP-ID but the one in the innermost IP
compressing more than one level of IP headers. This is because only header, when compressing more than one level of IP headers. This is
the IP-ID of the innermost IP header is likely to have a sufficiently because only the IP-ID of the innermost IP header is likely to have a
close correlation with the MSN to compress it as a sequentially sufficiently close correlation with the MSN to compress it as a
changing field. Therefore, a compressor MUST assign either the sequentially changing field. Therefore, a compressor MUST assign
constant zero IP-ID or the random IP-ID behavior to tunneling either the constant zero IP-ID or the random IP-ID behavior to
headers. tunneling headers.
6.3.4. UDP-Lite Coverage Behavior 6.3.4. UDP-Lite Coverage Behavior
The control field coverage_behavior specifies how the checksum The control field coverage_behavior specifies how the checksum
coverage field of the UDP-Lite header is compressed with RoHCv2. It coverage field of the UDP-Lite header is compressed with RoHCv2. It
can indicate one of he following encoding methods: irregular, static can indicate one of the following encoding methods: irregular, static
or inferred compression. or inferred encoding.
6.3.5. Timestamp Stride 6.3.5. Timestamp Stride
The ts_stride control field is used in scaled RTP timestamp encoding The ts_stride control field is used in scaled RTP timestamp encoding
(see Section 6.6.8). It defines the expected increase in the RTP (see Section 6.6.8). It defines the expected increase in the RTP
timestamp between consecutive RTP sequence numbers. timestamp between consecutive RTP sequence numbers.
6.3.6. Time Stride 6.3.6. Time Stride
The time_stride control field is used in timer-based compression The time_stride control field is used in timer-based compression
encoding (see Section 6.6.9). When timer-based compression is used, encoding (see Section 6.6.9). When timer-based compression is used,
time_stride should be set to the expected difference in arrival time time_stride should be set to the expected difference in arrival time
between consecutive RTP packets. between consecutive RTP packets.
6.3.7. CRC-3 for Control Fields 6.3.7. CRC-3 for Control Fields
ROHCv2 profiles define a CRC-3 calculated over a number of control ROHCv2 profiles define a CRC-3 calculated over a number of control
fields. This 3-bit CRC protecting the control fields is present in fields. This 3-bit CRC protecting the control fields is present in
the header format for the co_common and co_repair header types. the header format for the co_common and co_repair header types.
The decompressor MUST always validate the integrity of the control
fields covered by this 3-bit CRC when processing a co_common or a
co_repair compressed header.
Failure to validate the control fields using this CRC should be Failure to validate the control fields using this CRC should be
considered as a decompression failure by the decompressor, in the considered as a decompression failure by the decompressor, in the
algorithm that assesses the validity of the context. However, if the algorithm that assesses the validity of the context. However, if the
decompression attempt can be verified using either the CRC-3 or the decompression attempt can be verified using either the CRC-3 or the
CRC-7 calculated over the uncompressed header, the decompressor may CRC-7 calculated over the uncompressed header, the decompressor MAY
still forward the decompressed header to upper layers. This is still forward the decompressed header to upper layers. This is
because the protected control fields are not always used for because the protected control fields are not always used to
decompression of the specific co_common or the co_repair header that decompress the header (i.e. co_common or co_repair) that updates
updates their respective value. their respective value.
The CRC polynomial and coverage of this CRC-3 is defined in The CRC polynomial and coverage of this CRC-3 is defined in
Section 6.6.11. Section 6.6.11.
6.4. Reconstruction and Verification 6.4. Reconstruction and Verification
Validation of the IR header (8-bit CRC) Validation of the IR header (8-bit CRC)
The decompressor MUST always validate the integrity of the IR The decompressor MUST always validate the integrity of the IR
header using the 8-bit CRC carried within the IR header. When the header using the 8-bit CRC carried within the IR header. When the
header is validated, the decompressor updates the context with the header is validated, the decompressor updates the context with the
information in the IR header. Otherwise, if the IR cannot be information in the IR header. Otherwise, if the IR cannot be
validated, the context MUST NOT be updated and the IR header MUST validated, the context MUST NOT be updated and the IR header MUST
NOT be delivered to upper layers. NOT be delivered to upper layers.
Verification of CO headers (3-bit CRC or 7-bit CRC) Verification of CO headers (3-bit CRC or 7-bit CRC)
The CRC carried within compressed headers MUST be used to verify The decompressor MUST always verify the decompression of a CO
decompression of CO headers. When the decompression is verified header using the CRC carried within the compressed header. When
and successful, the decompressor updates the context with the the decompression is verified and successful, the decompressor
information received in the CO header; otherwise if the updates the context with the information received in the CO
reconstructed header fails the CRC verification, these updates header; otherwise if the reconstructed header fails the CRC
MUST NOT be performed. verification, these updates MUST NOT be performed.
A packet for which the decompression attempt cannot be verified A packet for which the decompression attempt cannot be verified
using the CRC MUST NOT be delivered to upper layers. using the CRC MUST NOT be delivered to upper layers.
Decompressor implementations may attempt corrective or repair Decompressor implementations may attempt corrective or repair
measures on CO headers prior to performing the above actions, and measures on CO headers prior to performing the above actions, and
the result of any decompression attempt MUST be verified using the the result of any decompression attempt MUST be verified using the
CRC. CRC.
6.5. Compressed Header Chains 6.5. Compressed Header Chains
Some packet types use one or more chains containing sub-header Some packet types use one or more chains containing sub-header
information. The function of a chain is to group fields based on information. The function of a chain is to group fields based on
similar characteristics, such as static, dynamic or irregular fields. similar characteristics, such as static, dynamic or irregular fields.
skipping to change at page 23, line 48 skipping to change at page 24, line 10
6.5. Compressed Header Chains 6.5. Compressed Header Chains
Some packet types use one or more chains containing sub-header Some packet types use one or more chains containing sub-header
information. The function of a chain is to group fields based on information. The function of a chain is to group fields based on
similar characteristics, such as static, dynamic or irregular fields. similar characteristics, such as static, dynamic or irregular fields.
Chaining is done by appending an item for each header to the chain in Chaining is done by appending an item for each header to the chain in
their order of appearance in the uncompressed packet, starting from their order of appearance in the uncompressed packet, starting from
the fields in the outermost header. the fields in the outermost header.
In the text below, the term <protocol_name> is used to identify
formal notation names corresponding to different protocol headers.
The mapping between these is defined in the following table:
+---------------------------------+---------------+
| Protocol | protocol_name |
+---------------------------------+---------------+
| IPv4 RFC791 | ipv4 |
| IPv6 RFC2460 | ipv6 |
| UDP RFC768 | udp |
| RTP RFC3550 | rtp |
| ESP RFC4303 | esp |
| UDP-Lite RFC3828 | udp_lite |
| AH RFC4302 | ah |
| GRE RFC2784,RFC2890 | gre |
| MINE RFC2004 | mine |
| IPv6 Destination Option RFC2460 | dest_opt |
| IPv6 Hop-by-hop Options RFC2460 | hop_opt |
| IPv6 Routing Header RFC2460 | rout_opt |
+---------------------------------+---------------+
Static chain: Static chain:
The static chain consists of one item for each header of the chain The static chain consists of one item for each header of the chain
of protocol headers to be compressed, starting from the outermost of protocol headers that is compressed, starting from the
IP header. In the formal description of the packet formats, this outermost IP header. In the formal description of the packet
static chain item for each header type is labelled formats, this static chain item for each header type is labelled
<protocol_name>_static. The static chain is only used in the IR <protocol_name>_static. The static chain is only used in the IR
header format. header format.
Dynamic chain: Dynamic chain:
The dynamic chain consists of one item for each header of the The dynamic chain consists of one item for each header of the
chain of protocol headers to be compressed, starting from the chain of protocol headers that is compressed, starting from the
outermost IP header. In the formal description of the packet outermost IP header. In the formal description of the packet
formats, the dynamic chain item for each header type is labelled formats, the dynamic chain item for each header type is labelled
<protocol_name>_dynamic. The dynamic chain is only used in the IR <protocol_name>_dynamic. The dynamic chain is only used in the IR
header format. header format.
Irregular chain: Irregular chain:
The structure of the irregular chain is analogous to the structure The structure of the irregular chain is analogous to the structure
of the static chain. For each compressed packet, the irregular of the static chain. For each compressed packet, the irregular
chain is appended at the specified location in the general format chain is appended at a specific location in the general format of
of the compressed packets as defined in Section 6.8. The the compressed packets as defined in Section 6.8. In the formal
irregular chain is used in all CO packets. description of the packet formats, the irregular chain item for
each header type is a format whose name is suffixed by
"_irregular". The irregular chain is used in all CO packets.
The format of the irregular chain for the innermost IP header The format of the irregular chain for the innermost IP header
differs from the format used for the outer IP headers, because differs from the format used for the outer IP headers, because
this header is part of the compressed base header. In the this header is part of the compressed base header. In the
definition of the packet formats using the formal notation, the definition of the packet formats using the formal notation, the
argument "is_innermost" passed to the corresponding encoding argument "is_innermost" passed to the corresponding encoding
method (ipv4 or ipv6) determines what irregular chain items to method (ipv4 or ipv6) determines what irregular chain items to
use. The format of the irregular chain item for the outer IP use. The format of the irregular chain item for the outer IP
headers is also determined using one flag for TTL/Hop Limit and headers is also determined using one flag for TTL/Hop Limit and
one for TOS/TC. These flags are defined in the format of some of one for TOS/TC. These flags are defined in the format of some of
the compressed base headers. the compressed base headers.
ROHCv2 profiles compresses extension headers as other headers, and ROHCv2 profiles compresses extension headers as other headers, and
thus extension headers have a static chain, a dynamic chain and an thus extension headers have a static chain, a dynamic chain and an
irregular chain. irregular chain.
ROHCv2 profiles define chains for all headers that can be compressed, ROHCv2 profiles define chains for all headers that can be compressed,
i.e. RTP [RFC3550], UDP [RFC0768], UDP Lite [RFC3828], IPv4 i.e. RTP [RFC3550], UDP [RFC0768], ESP[RFC4303], UDP Lite [RFC3828],
[RFC0791], IPv6 [RFC2460], AH [RFC4302], GRE [RFC2784][RFC2890], MINE IPv4 [RFC0791], IPv6 [RFC2460], AH [RFC4302], GRE [RFC2784][RFC2890],
[RFC2004], NULL-encrypted ESP [RFC4303], IPv6 Destination Options MINE [RFC2004], IPv6 Destination Options header[RFC2460], IPv6 Hop-
header[RFC2460], IPv6 Hop-by-hop Options header[RFC2460] and IPv6 by-hop Options header [RFC2460] and IPv6 Routing header [RFC2460].
Routing header [RFC2460].
6.6. Packet Formats and Encoding Methods 6.6. Packet Formats and Encoding Methods
The packet formats are defined using the ROHC formal notation. Some The packet formats are defined using the ROHC formal notation. Some
of the encoding methods used in the packet formats are defined in of the encoding methods used in the packet formats are defined in
[RFC4997], while other methods are defined in this section. [RFC4997], while other methods are defined in this section.
6.6.1. baseheader_extension_headers 6.6.1. baseheader_extension_headers
The baseheader_extension_headers encoding method skips over all The baseheader_extension_headers encoding method skips over all
fields of the extension headers of the innermost IP header, without fields of the extension headers of the innermost IP header, without
encoding any of the them. Fields in these extension headers are encoding any of them. Fields in these extension headers are instead
instead encoded in the irregular chain. encoded in the irregular chain.
This encoding is used in CO headers (see Section 6.8.2). The This encoding is used in CO headers (see Section 6.8.2). The
innermost IP header is combined with other header(s) (i.e. UDP, UDP innermost IP header is combined with other header(s) (i.e. UDP, UDP
Lite, RTP) to create the compressed base header. In this case, there Lite, RTP) to create the compressed base header. In this case, there
may be a number of extension headers between the IP headers and the may be a number of extension headers between the IP headers and the
other headers. other headers.
The base header defines a representation of the extension headers, to The base header defines a representation of the extension headers, to
comply with the syntax of the formal notation; this encoding method comply with the syntax of the formal notation; this encoding method
provides this representation. provides this representation.
skipping to change at page 25, line 47 skipping to change at page 26, line 28
packet formats syntactically correct. It describes tunneling IP packet formats syntactically correct. It describes tunneling IP
headers and their respective extension headers (i.e. all headers headers and their respective extension headers (i.e. all headers
located before the innermost IP header) for CO headers (see located before the innermost IP header) for CO headers (see
Section 6.8.2). Section 6.8.2).
6.6.3. inferred_udp_length 6.6.3. inferred_udp_length
The decompressor infers the value of the UDP length field as being The decompressor infers the value of the UDP length field as being
the size of the UDP payload. The compressor must therefore ensure the size of the UDP payload. The compressor must therefore ensure
that the UDP length field is consistent with the length field(s) of that the UDP length field is consistent with the length field(s) of
preceeding subheaders, i.e., there must not be any padding after the preceding subheaders, i.e., there must not be any padding after the
UDP payload that is covered by the IP Length. UDP payload that is covered by the IP Length.
This encoding method is also used for the UDP-Lite Checksum Coverage This encoding method is also used for the UDP-Lite Checksum Coverage
field, when it behaves in the same manner as the UDP length field field, when it behaves in the same manner as the UDP length field
(i.e. when the checksum always covers the entire UDP-Lite payload). (i.e. when the checksum always covers the entire UDP-Lite payload).
6.6.4. inferred_ip_v4_header_checksum 6.6.4. inferred_ip_v4_header_checksum
This encoding method compresses the header checksum field of the IPv4 This encoding method compresses the header checksum field of the IPv4
header. This checksum is defined in RFC 791 [RFC0791] as follows: header. This checksum is defined in RFC 791 [RFC0791] as follows:
skipping to change at page 28, line 8 skipping to change at page 28, line 38
extension headers present are considered part of the payload, extension headers present are considered part of the payload,
i.e., included in the length count.) i.e., included in the length count.)
The "inferred_ip_v6_length" encoding method compresses the payload The "inferred_ip_v6_length" encoding method compresses the payload
length field of the IPv6 header down to a size of zero bits, i.e. no length field of the IPv6 header down to a size of zero bits, i.e. no
bits are transmitted in compressed headers for this field. Using bits are transmitted in compressed headers for this field. Using
this encoding method, the decompressor infers the value of this field this encoding method, the decompressor infers the value of this field
by counting in octets the length of the entire packet after by counting in octets the length of the entire packet after
decompression. decompression.
6.6.8. Scaled RTP Timestamp Encoding 6.6.8. Scaled RTP Timestamp Compression
This section provide additional details on encodings used to scale
the RTP timestamp, as defined in the formal notation in
Section 6.8.2.4.
The RTP timestamp (TS) usually increases by a multiple of the RTP The RTP timestamp (TS) usually increases by a multiple of the RTP
Sequence Number's (SN) increase and is therefore a suitable candidate Sequence Number's (SN) increase and is therefore a suitable candidate
for scaled encoding. This scaling factor is labeled ts_stride in the for scaled encoding. This scaling factor is labeled ts_stride in the
definition of the profile in ROHC-FN Section 6.8. The compressor definition of the profile in the formal notation . The compressor
sets the scaling factor based on the change in TS with respect to the sets the scaling factor based on the change in TS with respect to the
change in the RTP SN. change in the RTP SN.
As defined in Section 6.8.2.4, the initial value of the scaling The default value of the scaling factor ts_stride is 160, as defined
factor ts_stride is always set to 160. For the compressor to start in Section 6.8.2.4. To use a different value for ts_stride, the
using scaled encoding using a value different than this default compressor explicitly updates the value of ts_stride to the
value, it must first explicitly transmit the new value of ts_stride decompressor using one of the packet types that can carry this
to the decompressor, using one of the packet types that can carry information.
this information. If the compressor decides to use the default
value, the stride does not need to be transmit in this step.
Once the value of the scaling factor is established, before using the When the compressor uses a scaling factor that is different than the
new scaling factor, the compressor must have enough confidence that default value of ts_stride, it can only use the new scaling factor
the decompressor has successfully calculated the residue (ts_offset) once it has have enough confidence that the decompressor has
of the scaling function for the timestamp. This is done by sending successfully calculated the residue (ts_offset) of the scaling
unscaled timestamp values to allow the decompressor to establish the function for the timestamp. The compressor achieves this by sending
unscaled timestamp values, to allow the decompressor to establish the
residue based on the current ts_stride. The compressor MAY send the residue based on the current ts_stride. The compressor MAY send the
unscaled timestamp in the same packets as the ones establishing the unscaled timestamp in the same compressed header(s) used to establish
new ts_stride value. the value of ts_stride.
Once the compressor has gained enough confidence that both the value Once the compressor has gained enough confidence that both the value
of the scaling factor and the value of the residue have been of the scaling factor and the value of the residue have been
established in the decompressor, the compressor can start compressing established in the decompressor, the compressor can start compressing
packets using the new scaling factor. packets using the new scaling factor.
If the compressor notices that the residue (ts_offset) value changes, When the compressor detects that the residue (ts_offset) value has
the compressor cannot use scaled timestamp packet formats until it changed, it MUST NOT select a compressed header format that uses the
has re-established the residue as described above. scaled timestamp encoding before it has re-established the residue as
described above.
If the decompressor receives a packet containing scaled timestamp
bits while the ts_stride equals zero, it MUST NOT deliver the packet
to upper layers.
When the value of the timestamp field wraps around, the value of the When the value of the timestamp field wraps around, the value of the
residue of the scaling function is likely to change. When this residue of the scaling function is likely to change. When this
occurs, the compressor re-establishes the new residue value as occurs, the compressor re-establishes the new residue value as
described above. described above.
The compressor MAY use the scaled timestamp encoding; what value it If the decompressor receives a compressed header containing scaled
will use as the scaling factor is up to the compressor timestamp bits while the ts_stride equals zero, it MUST NOT deliver
implementation, but to achive any gains from the scaling, the the packet to upper layers and it SHOULD treat this as a CRC
ts_stride should be set to the value of the expected incease in verification failure.
timestamp between consecutive sequence numbers.
Whether or not the scaling is applied to the RTP TS field is up to
the compressor implementation (i.e. The use of scaling is optional),
and is indicated by the tsc_indicator control field. In case scaling
is applied to the RTP TS field, the value of ts_stride used by the
compressor is up to the implementation. A value of ts_stride that is
set to the expected increase in RTP timestamp between consecutive
unit increase of the RTP SN will provide the most gain for the scaled
encoding. Other values may provide the same gain in some situations,
but may reduce the gain in others.
When scaled timestamp encoding is used for packet formats that do not When scaled timestamp encoding is used for packet formats that do not
transmit any LSB-encoded timestamp bits at all, the transmit any lsb-encoded timestamp bits at all, the
inferred_scaled_field encoding of Section 6.6.10 is used for encoding inferred_scaled_field encoding of Section 6.6.10 is used for encoding
the timestamp. the timestamp.
6.6.9. timer_based_lsb 6.6.9. timer_based_lsb
The timer-based compression encoding method, "timer_based_lsb", The timer-based compression encoding method, "timer_based_lsb",
compresses a field whose change pattern approximates a linear compresses a field whose change pattern approximates a linear
function of the time of day. function of the time of day.
This encoding uses the local clock to obtain an approximation of the This encoding uses the local clock to obtain an approximation of the
value that it encodes. The approximated value is then used as a value that it encodes. The approximated value is then used as a
reference value together with the num_lsbs_param least-significant reference value together with the num_lsbs_param least-significant
bits received as the encoded value, where num_lsbs_param represents a bits received as the encoded value, where num_lsbs_param represents a
number of bits that is sufficient to uniquely represent the encoded number of bits that is sufficient to uniquely represent the encoded
value in the presence of jitter between compression endpoints. value in the presence of jitter between compression endpoints.
The clock resolution of the compressor or decompressor can be less
than time_stride; in this case, the difference, i.e., actual
resolution - time_stride, is treated as additional jitter in the
calculation of the number of LSBs that needs to be transmitted.
ts_scaled =:= timer_based_lsb(<time_stride_param>, ts_scaled =:= timer_based_lsb(<time_stride_param>,
<num_lsbs_param>, <offset_param>) <num_lsbs_param>, <offset_param>)
The parameters "num_lsbs_param" and "offset_param" are the parameters The parameters "num_lsbs_param" and "offset_param" are the parameters
to use for the lsb encoding, i.e. the number of least significant to use for the lsb encoding, i.e. the number of least significant
bits and the interpretation interval offset, respectively. The bits and the interpretation interval offset, respectively. The
parameter "time_stride_param" represents the context value of the parameter "time_stride_param" represents the context value of the
control field time_stride. control field time_stride.
This encoding method always uses a scaled version of the field it This encoding method always uses a scaled version of the field it
compresses. compresses.
The value of the field is decoded by calculating an approximation of The value of the field is decoded by calculating an approximation of
the uncompressed value, using: the scaled value, using:
tsc_ref_advanced = tsc_ref + (a_n - a_ref) / time_stride. tsc_ref_advanced = tsc_ref + (a_n - a_ref) / time_stride.
where: where:
- tsc_ref is a reference value of the scaled representation - tsc_ref is a reference value of the scaled representation
of the field. of the field.
- a_n is the arrival time associated to the value to decode. - a_n is the arrival time associated to the value to decode.
- a_ref is the arrival time associated to the reference header. - a_ref is the arrival time associated to the reference header.
- tsc_ref_advanced is an approximation of the uncompressed value - tsc_ref_advanced is an approximation of the scaled value
of the field. of the field.
The lsb() encoding is then applied using the num_lsbs_param bits The lsb encoding is then applied using the num_lsbs_param bits
received in the CO header and tsc_ref_advanced as "ref_value" (as per received in the compressed header and tsc_ref_advanced as "ref_value"
Section 4.11.5 of [RFC4997]). (as per Section 4.11.5 of [RFC4997]).
Appendix B.3 provides an example on how the compressor can calculate Appendix B.3 provides an example on how the compressor can calculate
jitter. jitter.
The control field time_stride controls whether or not the The control field time_stride controls whether or not the
timer_based_lsb method is used in the CO header. The decompressor timer_based_lsb method is used in the CO header. The decompressor
SHOULD send the CLOCK_RESOLUTION option if it receives a non-zero SHOULD send the CLOCK_RESOLUTION option with a zero value, if:
time_stride value and it has not previously informed the compressor
that it supports timer-based compression using the CLOCK_RESOLUTION o it receives a non-zero time_stride value, and
option with a non-zero value. Whether the CLOCK_RESOLUTION is set to o it has not previously sent a CLOCK_RESOLUTION feedback with a non-
a non-zero value or to a zero value is up to the implementation. zero value.
This is to allow compression to recover from the case where a
compressor erroneously activates timer-based compression.
The support and usage of timer-based compression is optional for both The support and usage of timer-based compression is optional for both
the compressor and the decompressor; the compressor is never required the compressor and the decompressor; the compressor is not required
to set the time_stride control field to a non-zero value when it has to set the time_stride control field to a non-zero value when it has
received a non-zero value for the CLOCK_RESOLUTION option. received a non-zero value for the CLOCK_RESOLUTION option.
6.6.10. inferred_scaled_field 6.6.10. inferred_scaled_field
The "inferred_scaled_field" encoding method is used to encode a field The "inferred_scaled_field" encoding method encodes a field that is
that is defined as changing in relation to the MSN but for each defined as changing in relation to the MSN, and for which the
increase is scaled by an established scaling factor. This encoding increase with respect to the MSN can be scaled by some scaling
method is to be used in the case when a packet format contains MSN factor. This encoding method is used in compressed header formats
bits, but does not contain any bits for the scaled field. In this that do not contain any bits for the scaled field. In this case, the
case, the new value for the field being scaled is calculated decompressor infers the unscaled value of the scaled field from the
according to the following formula: MSN field, which value is calculated according to the following
formula:
unscaled_value = delta_msn * stride + reference_unscaled_value unscaled_value = delta_msn * stride + reference_unscaled_value
Where "delta_msn" is the difference in MSN between the reference Where "delta_msn" is the difference in MSN between the reference
value of the MSN in the context and the value of the MSN decompressed value of the MSN in the context and the value of the MSN decompressed
from this packet, "reference_unscaled_value" is the value of the from this packet, "reference_unscaled_value" is the value of the
field being scaled in the context, and "stride" is the scaling value field being scaled in the context, and "stride" is the scaling value
for this field. for this field.
For example, when this encoding method is applied to the RTP For example, when this encoding method is applied to the RTP
skipping to change at page 31, line 21 skipping to change at page 32, line 5
The "control_crc3_encoding" method provides a CRC calculated over a The "control_crc3_encoding" method provides a CRC calculated over a
number of control fields. The definition of this encoding method is number of control fields. The definition of this encoding method is
the same as for the "crc" encoding method specified in section 4.11.6 the same as for the "crc" encoding method specified in section 4.11.6
of [RFC4997], with the difference that the data that is covered by of [RFC4997], with the difference that the data that is covered by
the CRC is given by a concatenated list of control fields. the CRC is given by a concatenated list of control fields.
In other words, the definition of the control_crc3_encoding method is In other words, the definition of the control_crc3_encoding method is
equivalent to the following definition: equivalent to the following definition:
control_crc_encoding(data_value, data_length) control_crc_encoding(ctrl_data_value, ctrl_data_length)
{ {
UNCOMPRESSED { UNCOMPRESSED {
} }
COMPRESSED { COMPRESSED {
control_crc3 =:= control_crc3 =:=
crc(3, 0x06, 0x07, ctrl_data_value, ctrl_data_length) [ 3 ]; crc(3, 0x06, 0x07, ctrl_data_value, ctrl_data_length) [ 3 ];
} }
} }
where the parameter "ctrl_data_value" binds to the concatenated where the parameter "ctrl_data_value" binds to the concatenated
values of the following control fields, in the order listed below: values of the following control fields, in the order listed below:
o reorder_ratio, 2 bits padded by 6 MSB of zeroes o reorder_ratio, 2 bits padded with 6 MSB of zeroes
o ts_stride, 32 bits (applicable only for profiles 0x0101 and o ts_stride, 32 bits (only for profiles 0x0101 and 0x0107)
0x0107) o time_stride, 32 bits (only for profiles 0x0101 and 0x0107)
o time_stride, 32 bits (applicable only for profiles 0x0101 and o msn, 16 bits (not applicable for profiles 0x0101, 0x0103 and
0x0107) 0x0107)
o msn, 16 bits (not applicable for profiles 0x0101 and 0x0107, since o coverage_behavior, 2 bits padded with 6 MSB of zeroes (only to
the RTP Sequence Number is already verified as part of the profiles 0x0107 and 0x0108)
uncompressed header)
o coverage_behavior, 2 bits padded by 6 MSB of zeroes, applicable
only to profiles 0x0107 and 0x0108
o ip_id_behavior, one octet for each IP header in the compressible o ip_id_behavior, one octet for each IP header in the compressible
header chain starting from the outermost header. Each octet header chain starting from the outermost header. Each octet
consists of 2 bits padded by 6 MSBs of zeroes consists of 2 bits padded with 6 MSBs of zeroes
The "ctrl_data_length" binds to the sum of the length of the control The "ctrl_data_length" binds to the sum of the length of the control
field(s) that are applicable. field(s) that are applicable to the specific profile.
A 3-bit CRC is used to validate the control fields that are updated The decompressor uses the resulting 3-bit CRC to validate the control
by the co_common and co_repair packet types; it cannot verify the fields that are updated by the co_common and co_repair packet types;
outcome of a decompression attempt. The definition of this CRC comes this CRC cannot be used to verify the outcome of a decompression
from the fact that the decompression of a header that carries and attempt.
updates control fields does not necessarily make use of these control
fields, and the update to the control fields is thus not protected by
the CRC-7 validation.
For example, without a verification of the updates to the control This CRC protects the update of control fields, as the updated values
fields, there would be a possibility that a decompression attempt are not always used to decompress the header that carries them and
succeeds for a co_common or for a co_repair packet for which the thus are not protected by the CRC-7 verification. This prevents
decompressor would send a positive feedback, even in the case where impairments that could occur in case the decompression of a co_common
one of the control fields had been corrupted on the link between the or of a co_repair succeeds and the decompressor would send positive
compression endpoints. feedback, while for some reason the control fields would be
incorrectly updated.
6.6.12. inferred_sequential_ip_id 6.6.12. inferred_sequential_ip_id
This encoding method is used when a sequential IP-ID behavior is used This encoding method is used with a sequential IP-ID behavior
(sequential or sequential byte-swapped) and no coded IP-ID bits are (sequential or sequential byte-swapped) and when there are no coded
present in the compressed header. When these packet types are used, IP-ID bits in the compressed header. In this case, the IP-ID offset
the IP-ID offset from the MSN will be constant, and therefore, the from the MSN is constant, and the IP-ID increases by the same amount
IP-ID will increase by the same amount as the MSN increases by as the MSN (similar to the inferred_scaled_field encoding method).
(similar to the inferred_scaled_field encoding method).
Therefore, the new value for the IP-ID is calculated according to the The decompressor calculates the value for the IP-ID according to the
following formula: following formula:
IP-ID = delta_msn + reference_IP_ID_value IP-ID = delta_msn + reference_IP_ID_value
Where "delta_msn" is the difference is MSN between the reference where "delta_msn" is the difference between the reference value of
value of MSN in the context and the value of the MSN decompressed the MSN in the context and the uncompressed value of the MSN
from this packet, "previous_IP_ID_value" is the value of the IP-ID in associated to the compressed header, and where
"reference_IP_ID_value" is the value of the IP-ID in the context.
For swapped IP-ID behavior (i.e. when ip_id_behavior_innermost is set
to IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED), "reference_IP_ID_value" and
"IP-ID" are byte-swapped with regard to the corresponding fields in
the context. the context.
If the IP-ID behavior is random or zero, this encoding method does If the IP-ID behavior is random or zero, this encoding method does
not update any fields. not update any fields.
6.6.13. list_csrc(cc_value) 6.6.13. list_csrc(cc_value)
This encoding method describes how the list of CSRC identifiers can This encoding method compresses the list of RTP CSRC identifiers
be compressed using list compression. This list compression operates using list compression. This encoding establishes a content for the
by establishing content for the different CSRC identifiers (items) different CSRC identifiers (items) and a list describing the order in
and list describing the order that they appear. which they appear.
The argument to this encoding method (cc_value) is the value of the The compressor passes an argument (cc_value) to this encoding method:
CC field from the RTP header which the compressor passes to this this is the value of the CC field taken from the RTP header. The
encoding method. The decompressor is required to bind the value of decompressor is required to bind the value of this argument to the
this argument to the number of items in the list, which will allow number of items in the list, which will allow the decompressor to
the decompressor to corectly reconstruct the CC field. correctly reconstruct the CC field.
6.6.13.1. List Compression 6.6.13.1. List Compression
The CSRC identifiers in the uncompressed packet can be represented as The CSRC identifiers in the uncompressed packet can be represented as
an ordered list, whose order and presence are usually constant an ordered list, whose order and presence are usually constant
between packets. The generic structure of such a list is as follows: between packets. The generic structure of such a list is as follows:
+--------+--------+--...--+--------+ +--------+--------+--...--+--------+
list: | item 1 | item 2 | | item n | list: | item 1 | item 2 | | item n |
+--------+--------+--...--+--------+ +--------+--------+--...--+--------+
When performing list compression on a CSRC list, each item is the When performing list compression on a CSRC list, each item is the
uncompressed value of one CSRC identifier. uncompressed value of one CSRC identifier.
The basic principles of list-based compression are the following: The basic principles of list-based compression are the following:
1) When a context is being initialized, a complete representation When initializing the context:
of the list of CSRC identifiers is transmitted.
1) The complete representation of the list of CSRC identifiers is
transmitted.
Then, once the context has been initialized: Then, once the context has been initialized:
2) When the structure of the list is unchanged, no information 2) When the structure of the list is unchanged, no information
about the list is sent in compressed headers. about the list is sent in compressed headers.
3) When the structure of the list changes, a compressed list is 3) When the structure of the list changes, a compressed list is
sent in the compressed header, including a representation of its sent in the compressed header, including a representation of its
structure and order. Previously unknown items are sent structure and order. Previously unknown items are sent
uncompressed in the list, while previously known items are only uncompressed in the list, while previously known items are only
represented by an index pointing to the context. represented by an index pointing to the item stored in the
context.
6.6.13.2. Table-based Item Compression 6.6.13.2. Table-based Item Compression
The Table-based item compression compresses individual items sent in The table-based item compression compresses individual items sent in
compressed lists. The compressor assigns a unique identifier, compressed lists. The compressor assigns a unique identifier,
"Index", to each item "Item" of a list. "Index", to each item "Item" of a list.
Compressor Logic Compressor Logic
The compressor conceptually maintains an Item Table containing all The compressor conceptually maintains an Item Table containing all
items, indexed using "Index". The (Index, Item) pair is sent items, indexed using "Index". The (Index, Item) pair is sent
together in compressed lists until the compressor gains enough together in compressed lists until the compressor gains enough
confidence that the decompressor has observed the mapping between confidence that the decompressor has observed the mapping between
items and their respective index. Confidence is obtained from the items and their respective index. Confidence is obtained from the
reception of an acknowledgment from the decompressor, or by reception of an acknowledgment from the decompressor, or by
sending (Index, Item) pairs using the optimistic approach. Once sending (Index, Item) pairs using the optimistic approach. Once
confidence is obtained, the index alone is sent in compressed confidence is obtained, the index alone is sent in compressed
lists to indicate the presence of the item corresponding to this lists to indicate the presence of the item corresponding to this
index. index.
The compressor may reset its item table upon receiving negative The compressor MAY reset its item table upon receiving negative
acknowledgement. acknowledgement.
The compressor may reassign an existing index to a new item, by
The compressor MAY reassign an existing index to a new item, by
re-establishing the mapping using the procedure described above. re-establishing the mapping using the procedure described above.
Decompressor Logic Decompressor Logic
The decompressor conceptually maintains an Item Table that The decompressor conceptually maintains an Item Table that
contains all (Index, Item) pairs received. The Item Table is contains all (Index, Item) pairs received. The Item Table is
updated whenever an (Index, Item) pair is received and updated whenever an (Index, Item) pair is received and
decompression is successfully verified using the CRC. The decompression is successful (CRC verification, or CRC-8
decompressor retrieves the item from the table whenever an Index validation). The decompressor retrieves the item from the table
without an accompanying Item is received. whenever an Index is received without an accompanying Item.
If an index without an accompanying item is received and the If an index is received without an accompanying Item and the
decompressor does not have any context for this index, the packet decompressor does not have any context for this index, the
MUST NOT be delivered to upper layers. decompressor MUST NOT deliver the packet to upper layers.
6.6.13.3. Encoding of Compressed Lists 6.6.13.3. Encoding of Compressed Lists
Each item present in a compressed list is represented by: Each item present in a compressed list is represented by:
o an index into the table of items, and o an index into the table of items, and
o a presence bit indicating if a compressed representation of the o a presence bit indicating if a compressed representation of the
item is present in the list. item is present in the list.
o an item (if the presence bit is set) o an item (if the presence bit is set)
skipping to change at page 35, line 4 skipping to change at page 35, line 36
| Reserved |PS | m | | Reserved |PS | m |
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
| XI_1, ..., XI_m | m octets, or m * 4 bits | XI_1, ..., XI_m | m octets, or m * 4 bits
/ --- --- --- ---/ / --- --- --- ---/
| : Padding : if PS = 0 and m is odd | : Padding : if PS = 0 and m is odd
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
| | | |
/ item_1, ..., item_n / variable / item_1, ..., item_n / variable
| | | |
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
Reserved: Must be set to zero.
Reserved: MUST be set to zero; otherwise, the decompressor MUST
discard the packet.
PS: Indicates size of XI fields: PS: Indicates size of XI fields:
PS = 0 indicates 4-bit XI fields; PS = 0 indicates 4-bit XI fields;
PS = 1 indicates 8-bit XI fields. PS = 1 indicates 8-bit XI fields.
m: Number of XI item(s) in the compressed list. Also the value of m: Number of XI item(s) in the compressed list. Also the value of
the cc_value argument. the cc_value argument of the list_csrc encoding (Section 6.6.13).
XI_1, ..., XI_m: m XI items. Each XI represents one item in the XI_1, ..., XI_m: m XI items. Each XI represents one item in the
list of item of the uncompressed header, in the same order as they list of item of the uncompressed header, in the same order as they
appear in the uncompressed header. appear in the uncompressed header.
The format of an XI item is as follows: The format of an XI item is as follows:
+---+---+---+---+ +---+---+---+---+
PS = 0: | X | Index | PS = 0: | X | Index |
+---+---+---+---+ +---+---+---+---+
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
PS = 1: | X | Reserved | Index | PS = 1: | X | Reserved | Index |
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
X: Indicates whether the item present in the list: X: Indicates whether the item is present in the list:
X = 1 indicates that the item corresponding to the Index is X = 1 indicates that the item corresponding to the Index is
sent in the item_1, ..., item_n list; sent in the item_1, ..., item_n list;
X = 0 indicates that the item corresponding to the Index is X = 0 indicates that the item corresponding to the Index is
not sent. not sent.
Reserved: Set to zero when sending, ignored when received. Reserved: MUST be set to zero; otherwise the decompressor MUST
discard the packet.
Index: An index into the item table. See Section 6.6.13.4 Index: An index into the item table. See Section 6.6.13.4
When 4-bit XI items are used and, the XI items are placed in When 4-bit XI items are used, the XI items are placed in octets
octets in the following manner: in the following manner:
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
| XI_k | XI_k + 1 | | XI_k | XI_k + 1 |
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
Padding: A 4-bit padding field is present when PS = 0 and the Padding: A 4-bit padding field is present when PS = 0 and the
number of XIs is odd. The Padding field is set to zero when number of XIs is odd. The Padding field MUST be set to zero;
sending and ignored when receiving. otherwise, the decompressor MUST discard the packet.
Item 1, ..., item n: Each item corresponds to an XI with X = 1 in Item 1, ..., item n: Each item corresponds to an XI with X = 1 in
XI 1, ..., XI m. Each entry in the item list is the uncompressed XI 1, ..., XI m. Each entry in the item list is the uncompressed
representation of one CSRC identifier. representation of one CSRC identifier.
6.6.13.4. Item Table Mappings 6.6.13.4. Item Table Mappings
The item table for list compression is limited to 16 different items, The item table for list compression is limited to 16 different items,
since the RTP header can only carry at most 15 simultaneous CSRC since the RTP header can only carry at most 15 simultaneous CSRC
identifiers. The effect of having more than 16 items will only cause identifiers. The effect of having more than 16 items in the item
a slight overhead to the compressor when items are swapped in/out of table will only cause a slight overhead to the compressor when items
the item table. are swapped in/out of the item table.
6.6.13.5. Compressed Lists in Dynamic Chain 6.6.13.5. Compressed Lists in Dynamic Chain
A compressed list that is part of the dynamic chain (i.e. in IR A compressed list that is part of the dynamic chain (i.e. in IR
packets) must have all its list items present, i.e. all X-bits in the packets) must have all its list items present, i.e. all X-bits in the
XI list MUST be set. All items previously established in the item XI list MUST be set. All items previously established in the item
table that are not present in the list decompressed from this packet table that are not present in the list decompressed from this packet
MUST also be retained in the decompressor context. MUST also be retained in the decompressor context.
6.7. Encoding Methods With External Parameters 6.7. Encoding Methods With External Parameters as Arguments
A number of encoding methods in Section 6.8.2.4 have one or more A number of encoding methods in Section 6.8.2.4 have one or more
arguments for which the derivation of the parameter's value is arguments for which the derivation of the parameter's value is
outside the scope of the ROHC-FN specification of the header formats. outside the scope of the ROHC-FN specification of the header formats.
This section lists the encoding methods together with a definition of
each of their parameters.
o esp_null(next_header_value):
next_header_value: Set to the value of the Next Header field
located in the ESP trailer, usually 12 octets from the end of
the packet. Compression of null-encrypted ESP headers should
only be performed when the compressor has prior knowledge of
the exact location of the next header field.
o ipv6(profile, is_innermost, outer_ip_flag)):
profile: Set to the 16-bit profile number of the profile used
to compress this packet.
is_innermost: This boolean flag is set to 1 when processing the
innermost IP header; otherwise it is set to 0.
outer_ip_flag: This parameter is set to 1 if one or more of a
number of semi-static fields in outer IP headers have changed
compared to their reference values in the context, otherwise it
is set to 0. The value used for this parameter is also used
for the "outer_ip_flag" argument for a number of encoding
methods defined above, when these are processing the irregular
chain. This flag may only be set to 1 for the "co_common"
packet format in the different profiles.
o ipv4(profile, is_innermost, outer_ip_flag)
See definition of arguments for "ipv6" above.
o udp(profile)
profile: Set to the 16-bit profile number of the profile used
to compress this packet.
o rtp(profile, ts_stride_value, time_stride_value)
profile: Set to the 16-bit profile number of the profile used
to compress this packet.
ts_stride_value: The value of this parameter should be set to List of encoding methods with external parameters as arguments, from
the expected increase in the RTP Timestamp between consecutive Section 6.8.2.4:
RTP sequence numbers and the selected value is implementation-
specific. See also Section 6.6.8.
time_stride_value: The value of this parameter should be set to
the expected inter-arrival time between consecutive packets for
the flow, and the selected value is implementation-specific.
It MUST NOT be set to a non-zero value, unless the compressor
has received a feedback message with the CLOCK_RESOLUTION
option set to a non-zero value. See also Section 6.6.9.
o esp(profile)
profile: Set to the 16-bit profile number of the profile used
to compress this packet.
o udp_lite(profile)
profile: Set to the 16-bit profile number of the profile used
to compress this packet.
o udp(profile, reorder_ratio_value)
o udp_lite(profile, reorder_ratio_value, coverage_behavior_value)
o esp(profile, reorder_ratio_value)
o rtp(profile, ts_stride_value, time_stride_value,
reorder_ratio_value)
o ipv4(profile, is_innermost, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value))
o ipv6(profile, is_innermost, outer_ip_flag, reorder_ratio_value))
o iponly_baseheader(profile, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
o udp_baseheader(profile, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
o udplite_baseheader(profile, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
o esp_baseheader(profile, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
o rtp_baseheader(profile, ts_stride_value, time_stride_value, o rtp_baseheader(profile, ts_stride_value, time_stride_value,
outer_ip_flag): outer_ip_flag, ip_id_behavior_value, reorder_ratio_value)
o udplite_rtp_baseheader(profile, ts_stride_value,
time_stride_value, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value, coverage_behavior_value)
profile: Set to the 16-bit profile number of the profile used List of external arguments with their respective definition:
to compress this packet.
ts_stride_value: The value of this parameter should be set to o profile:
the expected increase in the RTP Timestamp between consecutive
RTP sequence numbers and the selected value is implementation-
specific. See also Section 6.6.8.
time_stride_value: The value of this parameter should be set to Set to the 16-bit number that identifies the profile used to
the expected inter-arrival time between consecutive packets for compress this packet.
the flow, and the selected value is implementation-specific.
It MUST NOT be set to a non-zero value, unless the compressor
has received a feedback message with the CLOCK_RESOLUTION
option set to a non-zero value. See also Section 6.6.9.
outer_ip_flag: This parameter is set to 1 if one or more of a o reorder_ratio_value:
number of semi-static fields in outer IP headers have changed
compared to their reference values in the context, otherwise it
is set to 0. The value used for this parameter is also used
for the "outer_ip_flag" argument for a number of encoding
methods defined above, when these are processing the irregular
chain. This flag may only be set to 1 either for the
"co_common" packet format in the different profiles.
o udp_baseheader(profile, outer_ip_flag): Set to a 2-bit integer value, using one of the constants whose
name begins with the prefix REORDERING_ and as defined in
Section 6.8.2.4.
profile: Set to the 16-bit profile number of the profile used o ip_id_behavior_value:
to compress this packet.
outer_ip_flag: See definition of this argument for Set to a 2-bit integer value, using one of the constants whose
"rtp_baseheader" above. name begins with the prefix IP_ID_BEHAVIOR_ and as defined in
Section 6.8.2.4.
o esp_baseheader(profile, outer_ip_flag): o coverage_behavior_value:
See definition of arguments for "udp_baseheader" above. Set to a 2-bit integer value, using one of the constants whose
name begins with the prefix UDP_LITE_COVERAGE_ and as defined
in Section 6.8.2.4.
o iponly_baseheader(profile, outer_ip_flag): o outer_ip_flag:
See definition of arguments for "udp_baseheader" above. This parameter is set to 1 if at least one of the semi-static
fields in outer IP headers has changed compared to their
reference values in the context, otherwise it is set to 0. The
value used for this parameter is also used for the
"outer_ip_flag" argument for a number of encoding methods
defined above, when these are processing the irregular chain.
This flag may only be set to 1 for the "co_common" packet
format in the different profiles.
o udplite_rtp_baseheader(profile, ts_stride_value, o is_innermost:
time_stride_value, outer_ip_flag):
See definition of arguments for "rtp_baseheader" above. This boolean flag is set to 1 when processing the innermost IP
header; otherwise it is set to 0.
o udplite_baseheader(profile, outer_ip_flag): o ts_stride_value
See definition of arguments for "udp_baseheader" above. The value of this parameter should be set to the expected
increase in the RTP Timestamp between consecutive RTP sequence
numbers. The value selected is implementation-specific. See
also Section 6.6.8.
o time_stride_value
The value of this parameter should be set to the expected
inter-arrival time between consecutive packets for the flow.
The value selected is implementation-specific. This parameter
MUST be set to zero, unless the compressor has received a
feedback message with the CLOCK_RESOLUTION option set to a non-
zero value. See also Section 6.6.9.
6.8. Packet Formats 6.8. Packet Formats
ROHCv2 profiles use two different packet types: the Initialization ROHCv2 profiles use two different packet types: the Initialization
and Refresh (IR) packet type, and the Compressed packet type (CO). and Refresh (IR) packet type, and the Compressed packet type (CO).
Each packet type defines a number of packet formats: An IR packet The CO packet type defines a number of packet formats: there are two
format, and two sets base header formats are defined for the CO type sets of base header formats, with a few additional formats that are
with a few additional formats that are common to both sets. common to both sets.
6.8.1. Initialization and Refresh Packet (IR) 6.8.1. Initialization and Refresh Packet (IR)
The IR packet format uses the structure of the ROHC IR packet as The IR packet format uses the structure of the ROHC IR packet as
defined in [RFC4995], section 5.2.2.1. defined in [RFC4995], section 5.2.2.1.
Packet type: IR Packet type: IR
This packet type communicates the static part and the dynamic part This packet type communicates the static part and the dynamic part
of the context. of the context.
skipping to change at page 40, line 34 skipping to change at page 40, line 34
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| | | |
/ Dynamic chain / variable length / Dynamic chain / variable length
| | | |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| | | |
/ Payload / variable length / Payload / variable length
| | | |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CRC: 8-bit CRC over the entire IR-header, including any CID fields
and up until the end of the dynamic chain, using the polynomial
defined in [RFC4995]. For purposes of computing the CRC, the CRC
field is zero.
Static chain: See Section 6.5. Static chain: See Section 6.5.
Dynamic chain: See Section 6.5. Dynamic chain: See Section 6.5.
Payload: The payload of the corresponding original packet, if any. Payload: The payload of the corresponding original packet, if any.
The payload consists of all data after the last octet of the last The payload consists of all data after the last octet of the last
header compressed by the current profile. The presence of a header compressed by the profile indicated in the Profile field.
payload is inferred from the packet length. The presence of a payload is inferred from the packet length.
6.8.2. Compressed Packet Formats (CO) 6.8.2. Compressed Packet Formats (CO)
6.8.2.1. Design rationale for compressed base headers 6.8.2.1. Design rationale for compressed base headers
The compressed packet formats are defined as two separate sets for The compressed packet formats are defined as two separate sets for
each profile: one set for the packets where the innermost IP header each profile: one set for the packets where the innermost IP header
contains a sequential IP-ID (either network byte order or byte contains a sequential IP-ID (either network byte order or byte
swapped), and one set for the packets without sequential IP-ID swapped), and one set for the packets without sequential IP-ID
(either random, zero, or no IP-ID). There are also a number of (either random, zero, or no IP-ID). There are also a number of
common packet format shared between both sets. When described below, common packet format shared between both sets. In the description
the packet formats belonging to the sequential set contain "seq" in below, the naming convention used for packet formats that belong to
their names, while those belonging to the non-sequential set contain the sequential set is to include "seq" in the name of the format,
the "rnd" in their names. while similarly "rnd" is used for those that belong to the non-
sequential set.
The design of the packet formats is derived from the field behavior The design of the packet formats is derived from the field behavior
analysis found in Appendix A. analysis found in Appendix A.
All of the compressed base headers transmit LSB-encoded MSN bits and All of the compressed base headers transmit lsb-encoded MSN bits and
a CRC. a CRC.
The following packet formats exist for all profiles defined in this The following packet formats exist for all profiles defined in this
document, both for the sequential and random packet format sets: document, and are common to both the sequential and the random packet
format sets:
o co_common: The common packet format is designed so that it can be
used for changes to any dynamic field in the context, but can not
always transmit all such fields uncompressed. It is therefore
useful for when some of the more rarely changing fields in the
headers change. Since this packet format may modify the value of
the control fields that determine how the decompressor interprets
different compressed header format, it carries a 7-bit CRC to
reduce the probability of context corruption. This packet format
uses a large set of flags to provide information about which
fields are present in the packet format and can therefore be of
very varied size. This packet format is similar to the UOR-2-
extension 3 packet format in [RFC3095]
o co_repair: This format is intended to be used when context damage o co_common: This format can be used to update the context when the
has been assumed, and therefore changing fields are transmit established change pattern of a dynamic field changes, for any of
uncompressed in this format and contains a complete dynamic chain. the dynamic fields. However, not all dynamic fields are updated
This packet format should be considered a replacement for the IR- by conveying their uncompressed value; some fields can only be
DYN packet format which is not defined for the profiles defined in transmitted using a compressed representation. This format is
this document. especially useful when a rarely changing field needs to be
updated. This format contains a set of flags to indicate what
fields are present in the header, and its size can vary
accordingly. This format is protected by a 7-bit CRC. It can
update controls fields, and it thus also carries a 3-bit CRC to
protect those fields as well. This format is similar in purpose
to the UOR-2-extension 3 format of [RFC3095].
o co_repair: This format can be used to update the context of all
the dynamic fields by conveying their uncompressed value. This is
especially useful when context damage is assumed (e.g. from the
reception of a NACK) and a context repair is performed. This
format is protected by a 7-bit CRC. It also carries a 3-bit CRC
over the control fields, which control fields it can also update.
This format is similar in purpose to the IR-DYN format of
[RFC3095] when performing context repairs.
o pt_0_crc3: This packet format only transmits the MSN, and can o pt_0_crc3: This format conveys only the MSN; it can therefore only
therefore only be used to update the MSN and fields that are update the MSN and fields that are derived from the MSN, such as
derived from the MSN, such as IP-ID and the RTP Timestamp (where IP-ID and the RTP Timestamp (for applicable profiles). It is
applicable). This packet format is equivalent to the UO-0 packet protected by a 3-bit CRC. This format is equivalent to the UO-0
format in [RFC3095] packet format in [RFC3095].
o pt_0_crc7: This packet has the same properties as pt_0_crc3, but o pt_0_crc7: This format has the same properties as pt_0_crc3, but
is instead protected by a 7-bit CRC and contains a larger amount is instead protected by a 7-bit CRC and contains a larger amount
of LSB-encoded MSN bits. This format can for example be used on of lsb-encoded MSN bits. This format is useful in environments
ROHC channels that expect a high amount of reordering or link where a high amount of reordering or a high residual error rate
layers with high residual error rates. can occur.
The following packet format descriptions apply to profiles 0x101 and The following packet format descriptions apply to profiles 0x0101 and
0x107. 0x0107.
o pt_1_rnd: This format is a replacement for the UO-1 packet format o pt_1_rnd: This format can convey changes to the MSN, to the RTP
in [RFC3095] and can be used to transmit changes in the MSN, RTP
Marker bit and it can update the RTP timestamp using scaled Marker bit and it can update the RTP timestamp using scaled
timestamp encoding. timestamp encoding. It is protected by a 3-bit CRC. It is
similar in purpose to the UO-1 format in [RFC3095].
o pt_1_seq_id: This format is a replacement for the UO-1-ID packet
format in [RFC3095] and can be used to transmit changes in the MSN
and IP-ID.
o pt_1_seq_ts: This format is a replacement for the UO-1-TS packet o pt_1_seq_id: This format can convey changes to the MSN and to the
format in [RFC3095] and can be used to transmit changes in the IP-ID. It is protected by a 3-bit CRC. It is similar in purpose
MSN, RTP Marker bit and can update the RTP Timestamp using scaled to the UO-1-ID format in [RFC3095].
timestamp encoding.
o pt_2_rnd: This format is a replacement for the UOR-2 packet format o pt_1_seq_ts: This format can convey changes to the MSN, to the RTP
in [RFC3095] and can be used to transmit changes in the MSN, RTP Marker bit and it can update the RTP Timestamp using scaled
Marker bit and the RTP Timestamp, and is protected by a 7-bit CRC. timestamp encoding. It is protected by a 3-bit CRC. It is
similar in purpose to the UO-1-TS format in [RFC3095].
o pt_2_seq_id: This format is a replacement for the UO-2-ID packet o pt_2_rnd: This format can convey changes to the MSN, to the RTP
format in [RFC3095] and can be used to transmit changes in the MSN Marker bit and to the RTP Timestamp. It is protected by a 7-bit
and IP-ID. This format is also protected by a 7-bit CRC. CRC. It is similar in purpose to the UOR-2 format in [RFC3095].
o pt_2_seq_ts: This format is a replacement for the UO-2-TS packet o pt_2_seq_id: This format can convey changes to the MSN and to the
format in [RFC3095] and can be used to transmit changes in the IP-ID. It is protected by a 7-bit CRC. It is similar in purpose
MSN, RTP Marker bit and can update the RTP Timestamp using scaled to the UO-2-ID format in [RFC3095].
timestamp encoding. This format is also protected by a 7-bit CRC.
o pt_2_seq_both: This format is replaces the UOR-2-ID extension 1 o pt_2_seq_ts: This format can convey changes to the MSN, to the RTP
format in [RFC3095] and can carry changes in both the RTP Marker bit and it can update the RTP Timestamp using scaled
Timestamp and IP-ID in addition to the MSN and Marker bit. timestamp encoding. It is protected by a 7-bit CRC. It is
similar in purpose to the UO-2-TS format in [RFC3095].
The following packet formats descriptions apply to profiles 0x102, o pt_2_seq_both: This format can convey changes to both the RTP
0x103, 0x104 and 0x108. Timestamp and IP-ID, in addition to the MSN and to the Marker bit.
It is protected by a 7-bit CRC. It is similar in purpose to the
UOR-2-ID extension 1 format in [RFC3095].
o pt_1_seq_id: This format is a replacement for the UO-1-ID packet The following packet formats descriptions apply to profiles 0x0102,
format in [RFC3095] and can be used to transmit changes in the MSN 0x0103, 0x0104 and 0x0108.
and IP-ID.
o pt_2_rnd: This format is a replacement for the UOR-2 packet format o pt_1_seq_id: This format can convey changes to the MSN and to the
in [RFC3095] and can be used to transmit changes in the MSN and is IP-ID. It is protected by a 7-bit CRC. It is similar in purpose
protected by a 7-bit CRC. to the UO-1-ID format in [RFC3095].
o pt_2_seq_id: This format is a replacement for the UO-2-ID packet o pt_2_seq_id: This format can convey changes to the MSN and to the
format in [RFC3095] and can be used to transmit changes in the MSN IP-ID. It is protected by a 7-bit CRC. It is similar in purpose
and IP-ID. This format is also protected by a 7-bit CRC. to the UO-2-ID format in [RFC3095].
6.8.2.2. co_repair Header Format 6.8.2.2. co_repair Header Format
The ROHCv2 co_repair packet has the following format: The ROHCv2 co_repair packet has the following format:
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
: Add-CID octet : if for small CIDs and CID 1-15 : Add-CID octet : if for small CIDs and CID 1-15
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
| 1 1 1 1 1 0 1 1 | discriminator | 1 1 1 1 1 0 1 1 | discriminator
skipping to change at page 43, line 42 skipping to change at page 43, line 49
/ Payload / variable length / Payload / variable length
| | | |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
r1: MUST be set to zero; otherwise, the decompressor MUST discard r1: MUST be set to zero; otherwise, the decompressor MUST discard
the packet. the packet.
CRC-7: A 7-bit CRC over the entire uncompressed header, computed CRC-7: A 7-bit CRC over the entire uncompressed header, computed
using the crc7(data_value, data_length) encoding method defined in using the crc7(data_value, data_length) encoding method defined in
Section 6.8.2.4, where data_value corresponds to the entire Section 6.8.2.4, where data_value corresponds to the entire
uncompressed header chain and data_length the length of this uncompressed header chain and where data_length corresponds to the
header chain. length of this header chain.
r2: MUST be set to zero; otherwise, the decompressor MUST discard r2: MUST be set to zero; otherwise, the decompressor MUST discard
the packet. the packet.
CRC-3: See Section 6.6.11. CRC-3: Encoded using the control_crc3_encoding method defined in
Section 6.6.11.
Dynamic chain: See Section 6.5. Dynamic chain: See Section 6.5.
Payload: The payload of the corresponding original packet, if any. Payload: The payload of the corresponding original packet, if any.
The payload consists of all data after the last octet of the last The payload consists of all data after the last octet of the last
header compressed by the current profile. The presence of a header compressed by the current profile. The presence of a
payload is inferred from the packet length. payload is inferred from the packet length.
6.8.2.3. General CO Header Format 6.8.2.3. General CO Header Format
The CO packets communicate irregularities in the packet header. All The CO header format communicates irregularities in the packet
CO packets carry a CRC and can update the context. All CO formats header. All CO formats carry a CRC and can update the context. All
except for co_repair which is defined in Section 6.8.2.2 use the CO header formats use the general format defined in this section,
general format defined in this section. with the exception of the co_repair format which is defined in
Section 6.8.2.2 .
The general format for a compressed header is as follows: The general format for a compressed header is as follows:
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
: Add-CID octet : if for small CIDs and CID 1-15 : Add-CID octet : if for small CIDs and CID 1-15
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
| first octet of base header | (with type indication) | first octet of base header | (with type indication)
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
: : : :
/ 0, 1, or 2 octets of CID / 1-2 octets if large CIDs / 0, 1, or 2 octets of CID / 1-2 octets if large CIDs
: : : :
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
/ remainder of base header / variable number of octets / remainder of base header / variable length
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
: : : :
/ Irregular Chain / variable / Irregular Chain / variable length
: : : :
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
The base header in the figure above is the compressed representation The base header in the figure above is the compressed representation
of the innermost IP header and other header(s), if any, in the of the innermost IP header and other header(s), if any, in the
uncompressed packet. uncompressed packet. The base header formats are defined in
Section 6.8.2.4. In the formal description of the packet formats,
the base header for each profile is labelled
<profile_name>_baseheader, where <profile_name> is defined in the
following table:
The entire set of base headers are defined in Section 6.8.2.4 using +------------------+----------------+
the ROHC Formal notation [RFC4997] . | Profile number | profile_name |
+------------------+----------------+
| 0x0101 | rtp |
| 0x0102 | udp |
| 0x0103 | esp |
| 0x0104 | ip |
| 0x0107 | udplite_rtp |
| 0x0108 | udplite |
+------------------+----------------+
6.8.2.4. Header Formats in ROHC-FN 6.8.2.4. Header Formats in ROHC-FN
This section defines the complete set of base header formats for
ROHCv2 profiles. The base header formats are defined using the ROHC
Formal notation [RFC4997] .
// NOTE The irregular, static and dynamic chains (see section 6.5)
// are defined across multiple encoding methods and are embodied
// in the correspondingly named formats within those encoding
// methods. In particular note that the static and dynamic
// chains ordinarily go together. The uncompressed fields are
// defined across these two formats combined, rather than in one
// or the other of them. The irregular chain items are likewise
// combined with a baseheader format.
//////////////////////////////////////////// ////////////////////////////////////////////
// Constants // Constants
//////////////////////////////////////////// ////////////////////////////////////////////
// IP-ID behavior constants // IP-ID behavior constants
IP_ID_BEHAVIOR_SEQUENTIAL = 0; IP_ID_BEHAVIOR_SEQUENTIAL = 0;
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED = 1; IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED = 1;
IP_ID_BEHAVIOR_RANDOM = 2; IP_ID_BEHAVIOR_RANDOM = 2;
IP_ID_BEHAVIOR_ZERO = 3; IP_ID_BEHAVIOR_ZERO = 3;
// UDP-lite checksum coverage behavior constants // UDP-lite checksum coverage behavior constants
UDP_LITE_COVERAGE_INFERRED = 0; UDP_LITE_COVERAGE_INFERRED = 0;
UDP_LITE_COVERAGE_STATIC = 1; UDP_LITE_COVERAGE_STATIC = 1;
UDP_LITE_COVERAGE_IRREGULAR = 2; UDP_LITE_COVERAGE_IRREGULAR = 2;
skipping to change at page 45, line 14 skipping to change at page 45, line 45
// IP-ID behavior constants // IP-ID behavior constants
IP_ID_BEHAVIOR_SEQUENTIAL = 0; IP_ID_BEHAVIOR_SEQUENTIAL = 0;
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED = 1; IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED = 1;
IP_ID_BEHAVIOR_RANDOM = 2; IP_ID_BEHAVIOR_RANDOM = 2;
IP_ID_BEHAVIOR_ZERO = 3; IP_ID_BEHAVIOR_ZERO = 3;
// UDP-lite checksum coverage behavior constants // UDP-lite checksum coverage behavior constants
UDP_LITE_COVERAGE_INFERRED = 0; UDP_LITE_COVERAGE_INFERRED = 0;
UDP_LITE_COVERAGE_STATIC = 1; UDP_LITE_COVERAGE_STATIC = 1;
UDP_LITE_COVERAGE_IRREGULAR = 2; UDP_LITE_COVERAGE_IRREGULAR = 2;
UDP_LITE_COVERAGE_RESERVED = 3; // The value 3 is reserved and cannot be used for coverage behavior
// Variable reordering offset // Variable reordering offset
REORDERING_NONE = 0; REORDERING_NONE = 0;
REORDERING_QUARTER = 1; REORDERING_QUARTER = 1;
REORDERING_HALF = 2; REORDERING_HALF = 2;
REORDERING_THREEQUARTERS = 3; REORDERING_THREEQUARTERS = 3;
// Profile names and versions // Profile names and versions
PROFILE_RTP_0101 = 0x0101; PROFILE_RTP_0101 = 0x0101;
PROFILE_UDP_0102 = 0x0102; PROFILE_UDP_0102 = 0x0102;
skipping to change at page 45, line 41 skipping to change at page 46, line 24
TS_STRIDE_DEFAULT = 160; TS_STRIDE_DEFAULT = 160;
TIME_STRIDE_DEFAULT = 0; TIME_STRIDE_DEFAULT = 0;
//////////////////////////////////////////// ////////////////////////////////////////////
// Global control fields // Global control fields
//////////////////////////////////////////// ////////////////////////////////////////////
CONTROL { CONTROL {
msn [ 16 ]; msn [ 16 ];
reorder_ratio [ 2 ]; reorder_ratio [ 2 ];
ip_id_offset [ 16 ]; // Used if innermost IP is IPv4 // ip_id fields are for innermost IP header only
ip_id_offset [ 16 ];
ip_id_behavior_innermost [ 16 ];
// The following are only used in RTP-based profiles
ts_stride [ 32 ];
time_stride [ 32 ];
ts_scaled [ 32 ];
ts_offset [ 32 ];
} }
/////////////////////////////////////////////// ///////////////////////////////////////////////
// Encoding methods not specified in FN syntax: // Encoding methods not specified in FN syntax:
/////////////////////////////////////////////// ///////////////////////////////////////////////
baseheader_extension_headers "defined in Section 6.6.1"; baseheader_extension_headers "defined in Section 6.6.1";
baseheader_outer_headers "defined in Section 6.6.2"; baseheader_outer_headers "defined in Section 6.6.2";
control_crc3_encoding "defined in Section 6.6.11"; control_crc3_encoding "defined in Section 6.6.11";
inferred_ip_v4_header_checksum "defined in Section 6.6.4"; inferred_ip_v4_header_checksum "defined in Section 6.6.4";
skipping to change at page 46, line 15 skipping to change at page 47, line 4
inferred_ip_v6_length "defined in Section 6.6.7"; inferred_ip_v6_length "defined in Section 6.6.7";
inferred_mine_header_checksum "defined in Section 6.6.5"; inferred_mine_header_checksum "defined in Section 6.6.5";
inferred_scaled_field "defined in Section 6.6.10"; inferred_scaled_field "defined in Section 6.6.10";
inferred_sequential_ip_id "defined in Section 6.6.12"; inferred_sequential_ip_id "defined in Section 6.6.12";
inferred_udp_length "defined in Section 6.6.3"; inferred_udp_length "defined in Section 6.6.3";
list_csrc(cc_value) "defined in Section 6.6.13"; list_csrc(cc_value) "defined in Section 6.6.13";
timer_based_lsb(time_stride, k, p) "defined in Section 6.6.9"; timer_based_lsb(time_stride, k, p) "defined in Section 6.6.9";
//////////////////////////////////////////// ////////////////////////////////////////////
// General encoding methods // General encoding methods
////////////////////////////////////////////
reorder_choice
{
UNCOMPRESSED {
ratio [ 2 ];
}
DEFAULT {
ratio =:= irregular(2);
}
COMPRESSED none { ////////////////////////////////////////////
ENFORCE(ratio.UVALUE == REORDERING_NONE);
ratio [ 2 ];
}
COMPRESSED quarter {
ENFORCE(ratio.UVALUE == REORDERING_QUARTER);
ratio [ 2 ];
}
COMPRESSED half {
ENFORCE(ratio.UVALUE == REORDERING_HALF);
ratio [ 2 ];
}
COMPRESSED three_quarters {
ENFORCE(ratio.UVALUE == REORDERING_THREEQUARTERS);
ratio [ 2 ];
}
}
static_or_irreg(flag, width) static_or_irreg(flag, width)
{ {
UNCOMPRESSED { UNCOMPRESSED {
field [ width ]; field [ width ];
} }
COMPRESSED irreg_enc { COMPRESSED irreg_enc {
ENFORCE(flag == 1); ENFORCE(flag == 1);
field =:= irregular(width) [ width ]; field =:= irregular(width) [ width ];
skipping to change at page 50, line 33 skipping to change at page 50, line 40
} }
COMPRESSED { COMPRESSED {
crc_value =:= crc(7, 0x79, 0x7f, data_value, data_length) [ 7 ]; crc_value =:= crc(7, 0x79, 0x7f, data_value, data_length) [ 7 ];
} }
} }
// Encoding method for updating a scaled field and its associated // Encoding method for updating a scaled field and its associated
// control fields. Should be used both when the value is scaled // control fields. Should be used both when the value is scaled
// or unscaled in a compressed format. // or unscaled in a compressed format.
field_scaling(stride_value, scaled_value, unscaled_value) // Does not have an uncompressed side.
field_scaling(stride_value, scaled_value, unscaled_value, residue_value)
{ {
UNCOMPRESSED { UNCOMPRESSED {
residue_field [ 32 ]; // Nothing
} }
COMPRESSED no_scaling { COMPRESSED no_scaling {
ENFORCE(stride_value == 0); ENFORCE(stride_value == 0);
ENFORCE(residue_field.UVALUE == unscaled_value); ENFORCE(residue_value == unscaled_value);
ENFORCE(scaled_value == 0); ENFORCE(scaled_value == 0);
} }
COMPRESSED scaling_used { COMPRESSED scaling_used {
ENFORCE(stride_value != 0); ENFORCE(stride_value != 0);
ENFORCE(residue_field.UVALUE == (unscaled_value % stride_value)); ENFORCE(residue_value == (unscaled_value % stride_value));
ENFORCE(unscaled_value == ENFORCE(unscaled_value ==
scaled_value * stride_value + residue_field.UVALUE); scaled_value * stride_value + residue_value);
} }
} }
//////////////////////////////////////////// ////////////////////////////////////////////
// IPv6 Destination options header // IPv6 Destination options header
//////////////////////////////////////////// ////////////////////////////////////////////
ip_dest_opt ip_dest_opt
{ {
UNCOMPRESSED { UNCOMPRESSED {
next_header [ 8 ]; next_header [ 8 ];
length [ 8 ]; length [ 8 ];
value [ length.UVALUE * 64 + 48 ]; value [ length.UVALUE * 64 + 48 ];
skipping to change at page 54, line 4 skipping to change at page 54, line 12
value =:= compressed_value(0, 0) [ 0 ]; value =:= compressed_value(0, 0) [ 0 ];
reserved1 =:= compressed_value(0, 0) [ 0 ]; reserved1 =:= compressed_value(0, 0) [ 0 ];
} }
} }
gre_proto gre_proto
{ {
UNCOMPRESSED { UNCOMPRESSED {
protocol [ 16 ]; protocol [ 16 ];
} }
COMPRESSED ether_v4 { COMPRESSED ether_v4 {
discriminator =:= compressed_value(1, 0) [ 1 ]; discriminator =:= '0' [ 1 ];
protocol =:= uncompressed_value(16, 0x0800) [ 0 ]; protocol =:= uncompressed_value(16, 0x0800) [ 0 ];
} }
COMPRESSED ether_v6 { COMPRESSED ether_v6 {
discriminator =:= compressed_value(1, 1) [ 1 ]; discriminator =:= '1' [ 1 ];
protocol =:= uncompressed_value(16, 0x86DD) [ 0 ]; protocol =:= uncompressed_value(16, 0x86DD) [ 0 ];
} }
} }
gre gre
{ {
UNCOMPRESSED { UNCOMPRESSED {
c_flag [ 1 ]; c_flag [ 1 ];
r_flag =:= uncompressed_value(1, 0) [ 1 ]; r_flag =:= uncompressed_value(1, 0) [ 1 ];
k_flag [ 1 ]; k_flag [ 1 ];
skipping to change at page 54, line 40 skipping to change at page 54, line 49
DEFAULT { DEFAULT {
c_flag =:= static; c_flag =:= static;
k_flag =:= static; k_flag =:= static;
s_flag =:= static; s_flag =:= static;
protocol =:= static; protocol =:= static;
key =:= static; key =:= static;
sequence_number =:= static; sequence_number =:= static;
} }
COMPRESSED gre_static { COMPRESSED gre_static {
ENFORCE((c_flag.UVALUE == 1 && checksum_and_res.ULENGTH == 32)
|| checksum_and_res.ULENGTH == 0);
ENFORCE((s_flag.UVALUE == 1 && sequence_number.ULENGTH == 32)
|| sequence_number.ULENGTH == 0);
protocol =:= gre_proto [ 1 ]; protocol =:= gre_proto [ 1 ];
c_flag =:= irregular(1) [ 1 ]; c_flag =:= irregular(1) [ 1 ];
k_flag =:= irregular(1) [ 1 ]; k_flag =:= irregular(1) [ 1 ];
s_flag =:= irregular(1) [ 1 ]; s_flag =:= irregular(1) [ 1 ];
padding =:= compressed_value(4, 0) [ 4 ]; padding =:= compressed_value(4, 0) [ 4 ];
key =:= optional_32(k_flag.UVALUE) [ 0, 32 ]; key =:= optional_32(k_flag.UVALUE) [ 0, 32 ];
} }
COMPRESSED gre_dynamic { COMPRESSED gre_dynamic {
checksum_and_res =:= checksum_and_res =:=
skipping to change at page 56, line 39 skipping to change at page 57, line 4
next_header =:= irregular(8) [ 8 ]; next_header =:= irregular(8) [ 8 ];
length =:= irregular(8) [ 8 ]; length =:= irregular(8) [ 8 ];
spi =:= irregular(32) [ 32 ]; spi =:= irregular(32) [ 32 ];
} }
COMPRESSED ah_dynamic { COMPRESSED ah_dynamic {
sequence_number =:= irregular(32) [ 32 ]; sequence_number =:= irregular(32) [ 32 ];
icv =:= icv =:=
irregular(length.UVALUE*32-32) [ length.UVALUE*32-32 ]; irregular(length.UVALUE*32-32) [ length.UVALUE*32-32 ];
} }
COMPRESSED ah_irregular { COMPRESSED ah_irregular {
sequence_number =:= lsb_7_or_31 [ 8, 32 ]; sequence_number =:= lsb_7_or_31 [ 8, 32 ];
icv =:= icv =:=
irregular(length.UVALUE*32-32) [ length.UVALUE*32-32 ]; irregular(length.UVALUE*32-32) [ length.UVALUE*32-32 ];
} }
} }
///////////////////////////////////////////// /////////////////////////////////////////////
// ESP header (NULL encrypted)
/////////////////////////////////////////////
// The value of the next header field from the trailer
// part of the packet is passed as a parameter.
esp_null(next_header_value)
{
UNCOMPRESSED {
spi [ 32 ];
sequence_number [ 32 ];
}
CONTROL {
nh_field [ 8 ];
}
DEFAULT {
spi =:= static;
sequence_number =:= static;
nh_field =:= static;
}
COMPRESSED esp_static {
nh_field =:= compressed_value(8, next_header_value) [ 8 ];
spi =:= irregular(32) [ 32 ];
}
COMPRESSED esp_dynamic {
sequence_number =:= irregular(32) [ 32 ];
}
COMPRESSED esp_irregular {
sequence_number =:= lsb_7_or_31 [ 8, 32 ];
}
}
/////////////////////////////////////////////
// IPv6 Header // IPv6 Header
///////////////////////////////////////////// /////////////////////////////////////////////
fl_enc fl_enc
{ {
UNCOMPRESSED { UNCOMPRESSED {
flow_label [ 20 ]; flow_label [ 20 ];
} }
COMPRESSED fl_zero { COMPRESSED fl_zero {
skipping to change at page 58, line 12 skipping to change at page 57, line 34
flow_label =:= uncompressed_value(20, 0) [ 0 ]; flow_label =:= uncompressed_value(20, 0) [ 0 ];
reserved =:= '0000' [ 4 ]; reserved =:= '0000' [ 4 ];
} }
COMPRESSED fl_non_zero { COMPRESSED fl_non_zero {
discriminator =:= '1' [ 1 ]; discriminator =:= '1' [ 1 ];
flow_label =:= irregular(20) [ 20 ]; flow_label =:= irregular(20) [ 20 ];
} }
} }
ipv6(profile, is_innermost, outer_ip_flag) ipv6(profile, is_innermost, outer_ip_flag, reorder_ratio_value)
{ {
UNCOMPRESSED { UNCOMPRESSED {
version =:= uncompressed_value(4, 6) [ 4 ]; version =:= uncompressed_value(4, 6) [ 4 ];
tos_tc [ 8 ]; tos_tc [ 8 ];
flow_label [ 20 ]; flow_label [ 20 ];
payload_length [ 16 ]; payload_length [ 16 ];
next_header [ 8 ]; next_header [ 8 ];
ttl_hopl [ 8 ]; ttl_hopl [ 8 ];
src_addr [ 128 ]; src_addr [ 128 ];
dst_addr [ 128 ]; dst_addr [ 128 ];
} }
CONTROL {
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
}
DEFAULT { DEFAULT {
tos_tc =:= static; tos_tc =:= static;
flow_label =:= static; flow_label =:= static;
payload_length =:= inferred_ip_v6_length; payload_length =:= inferred_ip_v6_length;
next_header =:= static; next_header =:= static;
ttl_hopl =:= static; ttl_hopl =:= static;
src_addr =:= static; src_addr =:= static;
dst_addr =:= static; dst_addr =:= static;
} }
skipping to change at page 59, line 14 skipping to change at page 58, line 40
src_addr =:= irregular(128) [ 128 ]; src_addr =:= irregular(128) [ 128 ];
dst_addr =:= irregular(128) [ 128 ]; dst_addr =:= irregular(128) [ 128 ];
} }
COMPRESSED ipv6_endpoint_dynamic { COMPRESSED ipv6_endpoint_dynamic {
ENFORCE((is_innermost == 1) && ENFORCE((is_innermost == 1) &&
(profile == PROFILE_IP_0104)); (profile == PROFILE_IP_0104));
tos_tc =:= irregular(8) [ 8 ]; tos_tc =:= irregular(8) [ 8 ];
ttl_hopl =:= irregular(8) [ 8 ]; ttl_hopl =:= irregular(8) [ 8 ];
reserved =:= compressed_value(6, 0) [ 6 ]; reserved =:= compressed_value(6, 0) [ 6 ];
reorder_ratio =:= reorder_choice [ 2 ]; reorder_ratio =:= irregular(2) [ 2 ];
msn =:= irregular(16) [ 16 ]; msn =:= irregular(16) [ 16 ];
} }
COMPRESSED ipv6_regular_dynamic { COMPRESSED ipv6_regular_dynamic {
ENFORCE((is_innermost == 0) || ENFORCE((is_innermost == 0) ||
(profile != PROFILE_IP_0104)); (profile != PROFILE_IP_0104));
tos_tc =:= irregular(8) [ 8 ]; tos_tc =:= irregular(8) [ 8 ];
ttl_hopl =:= irregular(8) [ 8 ]; ttl_hopl =:= irregular(8) [ 8 ];
} }
skipping to change at page 60, line 44 skipping to change at page 60, line 22
ENFORCE(behavior == IP_ID_BEHAVIOR_RANDOM); ENFORCE(behavior == IP_ID_BEHAVIOR_RANDOM);
ip_id =:= irregular(16) [ 16 ]; ip_id =:= irregular(16) [ 16 ];
} }
COMPRESSED ip_id_zero { COMPRESSED ip_id_zero {
ENFORCE(behavior == IP_ID_BEHAVIOR_ZERO); ENFORCE(behavior == IP_ID_BEHAVIOR_ZERO);
ip_id =:= uncompressed_value(16, 0) [ 0 ]; ip_id =:= uncompressed_value(16, 0) [ 0 ];
} }
} }
ip_id_behavior_choice(is_inner) ipv4(profile, is_innermost, outer_ip_flag, ip_id_behavior_value,
{ reorder_ratio_value)
UNCOMPRESSED {
behavior [ 2 ];
}
DEFAULT {
behavior =:= irregular(2);
}
COMPRESSED sequential {
ENFORCE(is_inner == 1);
ENFORCE(behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL);
behavior [ 2 ];
}
COMPRESSED sequential_swapped {
ENFORCE(is_inner == 1);
ENFORCE(behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED);
behavior [ 2 ];
}
COMPRESSED random {
ENFORCE(behavior.UVALUE == IP_ID_BEHAVIOR_RANDOM);
behavior [ 2 ];
}
COMPRESSED zero {
ENFORCE(behavior.UVALUE == IP_ID_BEHAVIOR_ZERO);
behavior [ 2 ];
}
}
ipv4(profile, is_innermost, outer_ip_flag)
{ {
UNCOMPRESSED { UNCOMPRESSED {
version =:= uncompressed_value(4, 4) [ 4 ]; version =:= uncompressed_value(4, 4) [ 4 ];
hdr_length =:= uncompressed_value(4, 5) [ 4 ]; hdr_length =:= uncompressed_value(4, 5) [ 4 ];
tos_tc [ 8 ]; tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ]; length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ]; ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ]; rf =:= uncompressed_value(1, 0) [ 1 ];
df [ 1 ]; df [ 1 ];
mf =:= uncompressed_value(1, 0) [ 1 ]; mf =:= uncompressed_value(1, 0) [ 1 ];
frag_offset =:= uncompressed_value(13, 0) [ 13 ]; frag_offset =:= uncompressed_value(13, 0) [ 13 ];
ttl_hopl [ 8 ]; ttl_hopl [ 8 ];
protocol [ 8 ]; protocol [ 8 ];
checksum =:= inferred_ip_v4_header_checksum [ 16 ]; checksum =:= inferred_ip_v4_header_checksum [ 16 ];
src_addr [ 32 ]; src_addr [ 32 ];
dst_addr [ 32 ]; dst_addr [ 32 ];
} }
CONTROL { CONTROL {
ip_id_behavior [ 2 ]; ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(ip_id_behavior.UVALUE == ip_id_behavior_value);
ip_id_behavior_outer [ 2 ];
} }
DEFAULT { DEFAULT {
tos_tc =:= static; tos_tc =:= static;
df =:= static; df =:= static;
ttl_hopl =:= static; ttl_hopl =:= static;
protocol =:= static; protocol =:= static;
src_addr =:= static; src_addr =:= static;
dst_addr =:= static; dst_addr =:= static;
ip_id_behavior =:= static; ip_id_behavior =:= static;
} }
skipping to change at page 62, line 33 skipping to change at page 61, line 29
ENFORCE((is_innermost == 1) && ENFORCE((is_innermost == 1) &&
(profile == PROFILE_IP_0104)); (profile == PROFILE_IP_0104));
version_flag =:= '0' [ 1 ]; version_flag =:= '0' [ 1 ];
innermost_indicator =:= compressed_value(1, 1) [ 1 ]; innermost_indicator =:= compressed_value(1, 1) [ 1 ];
reserved =:= '000000' [ 6 ]; reserved =:= '000000' [ 6 ];
protocol =:= irregular(8) [ 8 ]; protocol =:= irregular(8) [ 8 ];
src_addr =:= irregular(32) [ 32 ]; src_addr =:= irregular(32) [ 32 ];
dst_addr =:= irregular(32) [ 32 ]; dst_addr =:= irregular(32) [ 32 ];
} }
COMPRESSED ipv4_endpoint_dynamic { COMPRESSED ipv4_endpoint_innermost_dynamic {
ENFORCE((is_innermost == 1) && ENFORCE((is_innermost == 1) &&
(profile == PROFILE_IP_0104)); (profile == PROFILE_IP_0104));
reserved =:= '000' [ 3 ]; reserved =:= '000' [ 3 ];
reorder_ratio =:= reorder_choice [ 2 ]; reorder_ratio =:= irregular(2) [ 2 ];
df =:= irregular(1) [ 1 ]; df =:= irregular(1) [ 1 ];
ip_id_behavior =:= ip_id_behavior_choice(is_innermost) [ 2 ]; ip_id_behavior_innermost =:= irregular(2) [ 2 ];
tos_tc =:= irregular(8) [ 8 ]; tos_tc =:= irregular(8) [ 8 ];
ttl_hopl =:= irregular(8) [ 8 ]; ttl_hopl =:= irregular(8) [ 8 ];
ip_id =:= ip_id_enc_dyn(ip_id_behavior.UVALUE) [ 0, 16 ]; ip_id =:= ip_id_enc_dyn(ip_id_behavior.UVALUE) [ 0, 16 ];
msn =:= irregular(16) [ 16 ]; msn =:= irregular(16) [ 16 ];
} }
COMPRESSED ipv4_regular_dynamic { COMPRESSED ipv4_endpoint_outer_dynamic {
ENFORCE((is_innermost == 0) &&
(profile == PROFILE_IP_0104));
reserved =:= '000' [ 3 ];
reorder_ratio =:= irregular(2) [ 2 ];
df =:= irregular(1) [ 1 ];
ip_id_behavior_outer =:= irregular(2) [ 2 ];
tos_tc =:= irregular(8) [ 8 ];
ttl_hopl =:= irregular(8) [ 8 ];
ip_id =:= ip_id_enc_dyn(ip_id_behavior.UVALUE) [ 0, 16 ];
msn =:= irregular(16) [ 16 ];
}
COMPRESSED ipv4_regular_innermost_dynamic {
ENFORCE((is_innermost == 1) ||
(profile != PROFILE_IP_0104));
reserved =:= '00000' [ 5 ];
df =:= irregular(1) [ 1 ];
ip_id_behavior_innermost =:= irregular(2) [ 2 ];
tos_tc =:= irregular(8) [ 8 ];
ttl_hopl =:= irregular(8) [ 8 ];
ip_id =:= ip_id_enc_dyn(ip_id_behavior.UVALUE) [ 0, 16 ];
}
COMPRESSED ipv4_regular_outer_dynamic {
ENFORCE((is_innermost == 0) || ENFORCE((is_innermost == 0) ||
(profile != PROFILE_IP_0104)); (profile != PROFILE_IP_0104));
reserved =:= '00000' [ 5 ]; reserved =:= '00000' [ 5 ];
df =:= irregular(1) [ 1 ]; df =:= irregular(1) [ 1 ];
ip_id_behavior =:= ip_id_behavior_choice(is_innermost) [ 2 ]; ip_id_behavior_outer =:= irregular(2) [ 2 ];
tos_tc =:= irregular(8) [ 8 ]; tos_tc =:= irregular(8) [ 8 ];
ttl_hopl =:= irregular(8) [ 8 ]; ttl_hopl =:= irregular(8) [ 8 ];
ip_id =:= ip_id_enc_dyn(ip_id_behavior.UVALUE) [ 0, 16 ]; ip_id =:= ip_id_enc_dyn(ip_id_behavior.UVALUE) [ 0, 16 ];
} }
COMPRESSED ipv4_outer_irregular { COMPRESSED ipv4_outer_irregular {
ENFORCE(is_innermost == 0); ENFORCE(is_innermost == 0);
ip_id =:= ip_id_enc_irreg(ip_id_behavior.UVALUE) [ 0, 16 ]; ip_id =:=
ip_id_enc_irreg(ip_id_behavior_outer.UVALUE) [ 0, 16 ];
tos_tc =:= static_or_irreg(outer_ip_flag, 8) [ 0, 8 ]; tos_tc =:= static_or_irreg(outer_ip_flag, 8) [ 0, 8 ];
ttl_hopl =:= static_or_irreg(outer_ip_flag, 8) [ 0, 8 ]; ttl_hopl =:= static_or_irreg(outer_ip_flag, 8) [ 0, 8 ];
} }
COMPRESSED ipv4_innermost_irregular { COMPRESSED ipv4_innermost_irregular {
ip_id =:= ip_id_enc_irreg(ip_id_behavior.UVALUE) [ 0, 16 ];
ENFORCE(is_innermost == 1); ENFORCE(is_innermost == 1);
ip_id =:=
ip_id_enc_irreg(ip_id_behavior_innermost.UVALUE) [ 0, 16 ];
} }
} }
///////////////////////////////////////////// /////////////////////////////////////////////
// UDP Header // UDP Header
///////////////////////////////////////////// /////////////////////////////////////////////
udp(profile) udp(profile, reorder_ratio_value)
{ {
UNCOMPRESSED { UNCOMPRESSED {
ENFORCE((profile == PROFILE_RTP_0101) || ENFORCE((profile == PROFILE_RTP_0101) ||
(profile == PROFILE_UDP_0102)); (profile == PROFILE_UDP_0102));
src_port [ 16 ]; src_port [ 16 ];
dst_port [ 16 ]; dst_port [ 16 ];
udp_length =:= inferred_udp_length [ 16 ]; udp_length =:= inferred_udp_length [ 16 ];
checksum [ 16 ]; checksum [ 16 ];
} }
CONTROL { CONTROL {
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
checksum_used [ 1 ]; checksum_used [ 1 ];
} }
DEFAULT { DEFAULT {
src_port =:= static; src_port =:= static;
dst_port =:= static; dst_port =:= static;
} }
COMPRESSED udp_static { COMPRESSED udp_static {
src_port =:= irregular(16) [ 16 ]; src_port =:= irregular(16) [ 16 ];
skipping to change at page 64, line 4 skipping to change at page 63, line 26
DEFAULT { DEFAULT {
src_port =:= static; src_port =:= static;
dst_port =:= static; dst_port =:= static;
} }
COMPRESSED udp_static { COMPRESSED udp_static {
src_port =:= irregular(16) [ 16 ]; src_port =:= irregular(16) [ 16 ];
dst_port =:= irregular(16) [ 16 ]; dst_port =:= irregular(16) [ 16 ];
} }
COMPRESSED udp_endpoint_dynamic { COMPRESSED udp_endpoint_dynamic {
ENFORCE(profile == PROFILE_UDP_0102); ENFORCE(profile == PROFILE_UDP_0102);
ENFORCE(checksum_used.UVALUE == (checksum.UVALUE != 0)); ENFORCE(checksum_used.UVALUE == (checksum.UVALUE != 0));
checksum =:= irregular(16) [ 16 ]; checksum =:= irregular(16) [ 16 ];
msn =:= irregular(16) [ 16 ]; msn =:= irregular(16) [ 16 ];
reserved =:= compressed_value(6, 0) [ 6 ]; reserved =:= compressed_value(6, 0) [ 6 ];
reorder_ratio =:= reorder_choice [ 2 ]; reorder_ratio =:= irregular(2) [ 2 ];
} }
COMPRESSED udp_regular_dynamic { COMPRESSED udp_regular_dynamic {
ENFORCE(profile == PROFILE_RTP_0101); ENFORCE(profile == PROFILE_RTP_0101);
ENFORCE(checksum_used == (checksum.UVALUE != 0)); ENFORCE(checksum_used == (checksum.UVALUE != 0));
checksum =:= irregular(16) [ 16 ]; checksum =:= irregular(16) [ 16 ];
} }
COMPRESSED udp_zero_checksum_irregular { COMPRESSED udp_zero_checksum_irregular {
ENFORCE(checksum_used.UVALUE == 0); ENFORCE(checksum_used.UVALUE == 0);
skipping to change at page 65, line 4 skipping to change at page 64, line 28
ENFORCE(cc_value == 0); ENFORCE(cc_value == 0);
ENFORCE(presence == 0); ENFORCE(presence == 0);
csrc_list =:= uncompressed_value(0, 0) [ 0 ]; csrc_list =:= uncompressed_value(0, 0) [ 0 ];
} }
COMPRESSED list_present { COMPRESSED list_present {
ENFORCE(presence == 1); ENFORCE(presence == 1);
csrc_list =:= list_csrc(cc_value) [ VARIABLE ]; csrc_list =:= list_csrc(cc_value) [ VARIABLE ];
} }
} }
rtp(profile, ts_stride_value, time_stride_value)
rtp(profile, ts_stride_value, time_stride_value,
reorder_ratio_value)
{ {
UNCOMPRESSED { UNCOMPRESSED {
ENFORCE((profile == PROFILE_RTP_0101) || ENFORCE((profile == PROFILE_RTP_0101) ||
(profile == PROFILE_RTP_0107)); (profile == PROFILE_RTP_0107));
rtp_version =:= uncompressed_value(2, 0) [ 2 ]; rtp_version =:= uncompressed_value(2, 0) [ 2 ];
pad_bit [ 1 ]; pad_bit [ 1 ];
extension [ 1 ]; extension [ 1 ];
cc [ 4 ]; cc [ 4 ];
marker [ 1 ]; marker [ 1 ];
payload_type [ 7 ]; payload_type [ 7 ];
sequence_number [ 16 ]; sequence_number [ 16 ];
timestamp [ 32 ]; timestamp [ 32 ];
ssrc [ 32 ]; ssrc [ 32 ];
csrc_list [ cc.UVALUE * 32 ]; csrc_list [ cc.UVALUE * 32 ];
} }
CONTROL { CONTROL {
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(time_stride_value == time_stride.UVALUE); ENFORCE(time_stride_value == time_stride.UVALUE);
ENFORCE(ts_stride_value == ts_stride.UVALUE); ENFORCE(ts_stride_value == ts_stride.UVALUE);
ts_stride [ 32 ]; dummy_field =:= field_scaling(ts_stride.UVALUE,
time_stride [ 32 ]; ts_scaled.UVALUE, timestamp.UVALUE, ts_offset.UVALUE) [ 0 ];
ts_scaled [ 32 ];
ts_offset =:=
field_scaling(ts_stride.UVALUE, ts_scaled.UVALUE,
timestamp.UVALUE) [ 32 ];
} }
INITIAL { INITIAL {
ts_stride =:= uncompressed_value(32, TS_STRIDE_DEFAULT); ts_stride =:= uncompressed_value(32, TS_STRIDE_DEFAULT);
time_stride =:= uncompressed_value(32, TIME_STRIDE_DEFAULT); time_stride =:= uncompressed_value(32, TIME_STRIDE_DEFAULT);
} }
DEFAULT { DEFAULT {
ENFORCE(msn.UVALUE == sequence_number.UVALUE); ENFORCE(msn.UVALUE == sequence_number.UVALUE);
pad_bit =:= static; pad_bit =:= static;
extension =:= static; extension =:= static;
cc =:= static; cc =:= static;
marker =:= static; marker =:= static;
payload_type =:= static; payload_type =:= static;
sequence_number =:= static; sequence_number =:= static;
timestamp =:= static; timestamp =:= static;
ssrc =:= static; ssrc =:= static;
csrc_list =:= static; csrc_list =:= static;
ts_stride =:= static;
time_stride =:= static;
ts_scaled =:= static;
ts_offset =:= static;
} }
COMPRESSED rtp_static { COMPRESSED rtp_static {
ssrc =:= irregular(32) [ 32 ]; ssrc =:= irregular(32) [ 32 ];
} }
COMPRESSED rtp_dynamic { COMPRESSED rtp_dynamic {
reserved =:= compressed_value(1, 0) [ 1 ]; reserved =:= compressed_value(1, 0) [ 1 ];
reorder_ratio =:= reorder_choice [ 2 ]; reorder_ratio =:= irregular(2) [ 2 ];
list_present =:= irregular(1) [ 1 ]; list_present =:= irregular(1) [ 1 ];
tss_indicator =:= irregular(1) [ 1 ]; tss_indicator =:= irregular(1) [ 1 ];
tis_indicator =:= irregular(1) [ 1 ]; tis_indicator =:= irregular(1) [ 1 ];
pad_bit =:= irregular(1) [ 1 ]; pad_bit =:= irregular(1) [ 1 ];
extension =:= irregular(1) [ 1 ]; extension =:= irregular(1) [ 1 ];
marker =:= irregular(1) [ 1 ]; marker =:= irregular(1) [ 1 ];
payload_type =:= irregular(7) [ 7 ]; payload_type =:= irregular(7) [ 7 ];
sequence_number =:= irregular(16) [ 16 ]; sequence_number =:= irregular(16) [ 16 ];
timestamp =:= irregular(32) [ 32 ]; timestamp =:= irregular(32) [ 32 ];
ts_stride =:= sdvl_or_default(tss_indicator, ts_stride =:= sdvl_or_default(tss_indicator,
skipping to change at page 67, line 30 skipping to change at page 67, line 8
ENFORCE(behavior == UDP_LITE_COVERAGE_STATIC); ENFORCE(behavior == UDP_LITE_COVERAGE_STATIC);
checksum_coverage =:= static [ 0 ]; checksum_coverage =:= static [ 0 ];
} }
COMPRESSED irregular_coverage { COMPRESSED irregular_coverage {
ENFORCE(behavior == UDP_LITE_COVERAGE_IRREGULAR); ENFORCE(behavior == UDP_LITE_COVERAGE_IRREGULAR);
checksum_coverage =:= irregular(16) [ 16 ]; checksum_coverage =:= irregular(16) [ 16 ];
} }
} }
udp_lite(profile) udp_lite(profile, reorder_ratio_value, coverage_behavior_value)
{ {
UNCOMPRESSED { UNCOMPRESSED {
ENFORCE((profile == PROFILE_RTP_0107) || ENFORCE((profile == PROFILE_RTP_0107) ||
(profile == PROFILE_UDPLITE_0108)); (profile == PROFILE_UDPLITE_0108));
src_port [ 16 ]; src_port [ 16 ];
dst_port [ 16 ]; dst_port [ 16 ];
checksum_coverage [ 16 ]; checksum_coverage [ 16 ];
checksum [ 16 ]; checksum [ 16 ];
} }
CONTROL { CONTROL {
ENFORCE(coverage_behavior.UVALUE == coverage_behavior_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
coverage_behavior [ 2 ]; coverage_behavior [ 2 ];
} }
DEFAULT { DEFAULT {
src_port =:= static; src_port =:= static;
dst_port =:= static; dst_port =:= static;
} }
COMPRESSED udp_lite_static { COMPRESSED udp_lite_static {
src_port =:= irregular(16) [ 16 ]; src_port =:= irregular(16) [ 16 ];
dst_port =:= irregular(16) [ 16 ]; dst_port =:= irregular(16) [ 16 ];
} }
COMPRESSED udp_lite_endpoint_dynamic { COMPRESSED udp_lite_endpoint_dynamic {
ENFORCE(profile == PROFILE_UDPLITE_0108); ENFORCE(profile == PROFILE_UDPLITE_0108);
reserved =:= compressed_value(4, 0) [ 4 ]; reserved =:= compressed_value(4, 0) [ 4 ];
coverage_behavior =:= irregular(2) [ 2 ]; coverage_behavior =:= irregular(2) [ 2 ];
reorder_ratio =:= reorder_choice [ 2 ]; reorder_ratio =:= irregular(2) [ 2 ];
checksum_coverage =:= checksum_coverage =:=
checksum_coverage_dynchain(coverage_behavior.UVALUE) [ 16 ]; checksum_coverage_dynchain(coverage_behavior.UVALUE) [ 16 ];
checksum =:= irregular(16) [ 16 ]; checksum =:= irregular(16) [ 16 ];
msn =:= irregular(16) [ 16 ]; msn =:= irregular(16) [ 16 ];
} }
COMPRESSED udp_lite_regular_dynamic { COMPRESSED udp_lite_regular_dynamic {
coverage_behavior =:= irregular(2) [ 2 ]; coverage_behavior =:= irregular(2) [ 2 ];
reserved =:= compressed_value(6, 0) [ 6 ]; reserved =:= compressed_value(6, 0) [ 6 ];
checksum_coverage =:= checksum_coverage =:=
skipping to change at page 68, line 34 skipping to change at page 68, line 14
} }
COMPRESSED udp_lite_irregular { COMPRESSED udp_lite_irregular {
checksum_coverage =:= checksum_coverage =:=
checksum_coverage_irregular(coverage_behavior.UVALUE) [ 0, 16 ]; checksum_coverage_irregular(coverage_behavior.UVALUE) [ 0, 16 ];
checksum =:= irregular(16) [ 16 ]; checksum =:= irregular(16) [ 16 ];
} }
} }
///////////////////////////////////////////// /////////////////////////////////////////////
// ESP Header (Non-NULL encrypted // ESP Header
// i.e. only used for the ESP profile)
///////////////////////////////////////////// /////////////////////////////////////////////
esp(profile) esp(profile, reorder_ratio_value)
{ {
UNCOMPRESSED { UNCOMPRESSED {
ENFORCE(profile == PROFILE_ESP_0103); ENFORCE(profile == PROFILE_ESP_0103);
ENFORCE(msn.UVALUE == sequence_number.UVALUE % 65536); ENFORCE(msn.UVALUE == sequence_number.UVALUE % 65536);
spi [ 32 ]; spi [ 32 ];
sequence_number [ 32 ]; sequence_number [ 32 ];
} }
CONTROL {
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
}
DEFAULT { DEFAULT {
spi =:= static; spi =:= static;
sequence_number =:= static; sequence_number =:= static;
} }
COMPRESSED esp_static { COMPRESSED esp_static {
// Needs to be discriminated from ESP NULL headers,
// and therefore we have a dummy protocol field here.
discriminator =:= uncompressed_value(8, 255) [ 8 ];
spi =:= irregular(32) [ 32 ]; spi =:= irregular(32) [ 32 ];
} }
COMPRESSED esp_dynamic { COMPRESSED esp_dynamic {
sequence_number =:= irregular(32) [ 32 ]; sequence_number =:= irregular(32) [ 32 ];
reserved =:= compressed_value(6, 0) [ 6 ]; reserved =:= compressed_value(6, 0) [ 6 ];
reorder_ratio =:= reorder_choice [ 2 ]; reorder_ratio =:= irregular(2) [ 2 ];
} }
COMPRESSED esp_irregular { COMPRESSED esp_irregular {
} }
} }
/////////////////////////////////////////////////// ///////////////////////////////////////////////////
// Encoding methods used in the profiles' CO packets // Encoding methods used in the profiles' CO packets
/////////////////////////////////////////////////// ///////////////////////////////////////////////////
skipping to change at page 72, line 22 skipping to change at page 71, line 51
scaled_ts_lsb(time_stride_value, k) scaled_ts_lsb(time_stride_value, k)
{ {
UNCOMPRESSED { UNCOMPRESSED {
timestamp [ 32 ]; timestamp [ 32 ];
} }
COMPRESSED timerbased { COMPRESSED timerbased {
ENFORCE(time_stride_value != 0); ENFORCE(time_stride_value != 0);
timestamp =:= timer_based_lsb(time_stride_value, k, timestamp =:= timer_based_lsb(time_stride_value, k,
((2^k) / 4) - 1); ((2^k) / 2) - 1);
} }
COMPRESSED regular { COMPRESSED regular {
ENFORCE(time_stride_value == 0); ENFORCE(time_stride_value == 0);
timestamp =:= lsb(k, ((2^k) / 4) - 1); timestamp =:= lsb(k, ((2^k) / 4) - 1);
} }
} }
// Self-describing variable length encoding with reordering offset // Self-describing variable length encoding with reordering offset
sdvl_sn_lsb(field_width) { sdvl_sn_lsb(field_width)
{
UNCOMPRESSED { UNCOMPRESSED {
field [ field_width ]; field [ field_width ];
} }
COMPRESSED lsb7 { COMPRESSED lsb7 {
discriminator =:= '0' [ 1 ]; discriminator =:= '0' [ 1 ];
field =:= msn_lsb(7) [ 7 ]; field =:= msn_lsb(7) [ 7 ];
} }
COMPRESSED lsb14 { COMPRESSED lsb14 {
skipping to change at page 73, line 48 skipping to change at page 73, line 28
discriminator =:= '1110' [ 4 ]; discriminator =:= '1110' [ 4 ];
field =:= lsb(28, ((2^28) / 4) - 1) [ 28 ]; field =:= lsb(28, ((2^28) / 4) - 1) [ 28 ];
} }
COMPRESSED lsb32 { COMPRESSED lsb32 {
discriminator =:= '11111111' [ 8 ]; discriminator =:= '11111111' [ 8 ];
field =:= irregular(field_width) [ field_width ]; field =:= irregular(field_width) [ field_width ];
} }
} }
variable_scaled_timestamp(tss_flag, tsc_flag, ts_stride) sdvl_scaled_ts_lsb(time_stride)
{ {
UNCOMPRESSED { UNCOMPRESSED {
timestamp [ 32 ]; field [ 32 ];
}
COMPRESSED lsb7 {
discriminator =:= '0' [ 1 ];
field =:= scaled_ts_lsb(time_stride, 7) [ 7 ];
}
COMPRESSED lsb14 {
discriminator =:= '10' [ 2 ];
field =:= scaled_ts_lsb(time_stride, 14) [ 14 ];
}
COMPRESSED lsb21 {
discriminator =:= '110' [ 3 ];
field =:= scaled_ts_lsb(time_stride, 21) [ 21 ];
}
COMPRESSED lsb28 {
discriminator =:= '1110' [ 4 ];
field =:= scaled_ts_lsb(time_stride, 28) [ 28 ];
}
COMPRESSED lsb32 {
discriminator =:= '11111111' [ 8 ];
field =:= irregular(32) [ 32 ];
}
}
variable_scaled_timestamp(tss_flag, tsc_flag, ts_stride, time_stride)
{
UNCOMPRESSED {
scaled_value [ 32 ];
} }
COMPRESSED present { COMPRESSED present {
ENFORCE((tss_flag == 0) && (tsc_flag == 1)); ENFORCE((tss_flag == 0) && (tsc_flag == 1));
ENFORCE(ts_stride != 0); ENFORCE(ts_stride != 0);
timestamp =:= sdvl_lsb(32) [ VARIABLE ]; scaled_value =:= sdvl_scaled_ts_lsb(time_stride) [ VARIABLE ];
} }
COMPRESSED not_present { COMPRESSED not_present {
ENFORCE(((tss_flag == 1) && (tsc_flag == 0)) || ENFORCE(((tss_flag == 1) && (tsc_flag == 0)) ||
((tss_flag == 0) && (tsc_flag == 0))); ((tss_flag == 0) && (tsc_flag == 0)));
} }
} }
variable_unscaled_timestamp(tss_flag, tsc_flag) variable_unscaled_timestamp(tss_flag, tsc_flag)
{ {
skipping to change at page 75, line 14 skipping to change at page 75, line 26
ip_id_behavior =:= static; ip_id_behavior =:= static;
reorder_ratio =:= static; reorder_ratio =:= static;
} }
COMPRESSED present { COMPRESSED present {
ENFORCE(flag == 1); ENFORCE(flag == 1);
ip_outer_indicator =:= irregular(1) [ 1 ]; ip_outer_indicator =:= irregular(1) [ 1 ];
ttl_hopl_indicator =:= irregular(1) [ 1 ]; ttl_hopl_indicator =:= irregular(1) [ 1 ];
tos_tc_indicator =:= irregular(1) [ 1 ]; tos_tc_indicator =:= irregular(1) [ 1 ];
df =:= dont_fragment(ip_version) [ 1 ]; df =:= dont_fragment(ip_version) [ 1 ];
ip_id_behavior =:= ip_id_behavior_choice(1) [ 2 ]; ip_id_behavior =:= irregular(2) [ 2 ];
reorder_ratio =:= reorder_choice [ 2 ]; reorder_ratio =:= irregular(2) [ 2 ];
} }
} }
profile_1_flags2_enc(flag, ip_version) profile_1_flags2_enc(flag, ip_version)
{ {
UNCOMPRESSED { UNCOMPRESSED {
list_indicator [ 1 ]; list_indicator [ 1 ];
pt_indicator [ 1 ]; pt_indicator [ 1 ];
pad_bit [ 1 ]; pad_bit [ 1 ];
extension [ 1 ]; extension [ 1 ];
skipping to change at page 76, line 20 skipping to change at page 76, line 32
ENFORCE(flag == 0); ENFORCE(flag == 0);
ENFORCE(ip_outer_indicator.CVALUE == 0); ENFORCE(ip_outer_indicator.CVALUE == 0);
df =:= static; df =:= static;
ip_id_behavior =:= static; ip_id_behavior =:= static;
} }
COMPRESSED present { COMPRESSED present {
ENFORCE(flag == 1); ENFORCE(flag == 1);
ip_outer_indicator =:= irregular(1) [ 1 ]; ip_outer_indicator =:= irregular(1) [ 1 ];
df =:= dont_fragment(ip_version) [ 1 ]; df =:= dont_fragment(ip_version) [ 1 ];
ip_id_behavior =:= ip_id_behavior_choice(1) [ 2 ]; ip_id_behavior =:= irregular(2) [ 2 ];
reserved =:= compressed_value(4, 0) [ 4 ]; reserved =:= compressed_value(4, 0) [ 4 ];
} }
} }
profile_8_flags_enc(flag, ip_version) profile_8_flags_enc(flag, ip_version)
{ {
UNCOMPRESSED { UNCOMPRESSED {
ip_outer_indicator [ 1 ]; ip_outer_indicator [ 1 ];
df [ 1 ]; df [ 1 ];
ip_id_behavior [ 2 ]; ip_id_behavior [ 2 ];
skipping to change at page 76, line 47 skipping to change at page 77, line 11
df =:= static; df =:= static;
ip_id_behavior =:= static; ip_id_behavior =:= static;
coverage_behavior =:= static; coverage_behavior =:= static;
} }
COMPRESSED present { COMPRESSED present {
ENFORCE(flag == 1); ENFORCE(flag == 1);
reserved =:= compressed_value(2, 0) [ 2 ]; reserved =:= compressed_value(2, 0) [ 2 ];
ip_outer_indicator =:= irregular(1) [ 1 ]; ip_outer_indicator =:= irregular(1) [ 1 ];
df =:= dont_fragment(ip_version) [ 1 ]; df =:= dont_fragment(ip_version) [ 1 ];
ip_id_behavior =:= ip_id_behavior_choice(1) [ 2 ]; ip_id_behavior =:= irregular(2) [ 2 ];
coverage_behavior =:= irregular(2) [ 2 ]; coverage_behavior =:= irregular(2) [ 2 ];
} }
} }
profile_7_flags2_enc(flag, ip_version) profile_7_flags2_enc(flag, ip_version)
{ {
UNCOMPRESSED { UNCOMPRESSED {
list_indicator [ 1 ]; list_indicator [ 1 ];
pt_indicator [ 1 ]; pt_indicator [ 1 ];
time_stride_indicator [ 1 ]; time_stride_indicator [ 1 ];
pad_bit [ 1 ]; pad_bit [ 1 ];
extension [ 1 ]; extension [ 1 ];
coverage_behavior [ 2 ]; coverage_behavior [ 2 ];
} }
skipping to change at page 77, line 42 skipping to change at page 78, line 6
extension =:= irregular(1) [ 1 ]; extension =:= irregular(1) [ 1 ];
coverage_behavior =:= irregular(2) [ 2 ]; coverage_behavior =:= irregular(2) [ 2 ];
} }
} }
//////////////////////////////////////////// ////////////////////////////////////////////
// RTP profile // RTP profile
//////////////////////////////////////////// ////////////////////////////////////////////
rtp_baseheader(profile, ts_stride_value, time_stride_value, rtp_baseheader(profile, ts_stride_value, time_stride_value,
outer_ip_flag) outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
{ {
UNCOMPRESSED v4 { UNCOMPRESSED v4 {
ENFORCE(msn.UVALUE == sequence_number.UVALUE); ENFORCE(msn.UVALUE == sequence_number.UVALUE);
outer_headers =:= baseheader_outer_headers [ VARIABLE ]; outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 4) [ 4 ]; ip_version =:= uncompressed_value(4, 4) [ 4 ];
header_length =:= uncompressed_value(4, 5) [ 4 ]; header_length =:= uncompressed_value(4, 5) [ 4 ];
tos_tc [ 8 ]; tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ]; length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ]; ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ]; rf =:= uncompressed_value(1, 0) [ 1 ];
skipping to change at page 79, line 16 skipping to change at page 79, line 28
timestamp [ 32 ]; timestamp [ 32 ];
ssrc [ 32 ]; ssrc [ 32 ];
csrc_list [ VARIABLE ]; csrc_list [ VARIABLE ];
df =:= uncompressed_value(0,0) [ 0 ]; df =:= uncompressed_value(0,0) [ 0 ];
ip_id =:= uncompressed_value(0,0) [ 0 ]; ip_id =:= uncompressed_value(0,0) [ 0 ];
} }
CONTROL { CONTROL {
ENFORCE(time_stride.UVALUE == time_stride_value); ENFORCE(time_stride.UVALUE == time_stride_value);
ENFORCE(ts_stride.UVALUE == ts_stride_value); ENFORCE(ts_stride.UVALUE == ts_stride_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(ip_id_behavior.UVALUE == ip_id_behavior_value);
ENFORCE(profile == PROFILE_RTP_0101); ENFORCE(profile == PROFILE_RTP_0101);
ts_stride [ 32 ];
time_stride [ 32 ];
ts_scaled [ 32 ];
ts_offset =:= field_scaling(ts_stride.UVALUE, ts_scaled.UVALUE,
timestamp.UVALUE) [ 32 ];
ip_id_behavior [ 2 ]; ip_id_behavior [ 2 ];
dummy_field =:= field_scaling(ts_stride.UVALUE,
ts_scaled.UVALUE, timestamp.UVALUE, ts_offset.UVALUE) [ 0 ];
} }
INITIAL { INITIAL {
ts_stride =:= uncompressed_value(32, TS_STRIDE_DEFAULT); ts_stride =:= uncompressed_value(32, TS_STRIDE_DEFAULT);
time_stride =:= uncompressed_value(32, TIME_STRIDE_DEFAULT); time_stride =:= uncompressed_value(32, TIME_STRIDE_DEFAULT);
} }
DEFAULT { DEFAULT {
ENFORCE(outer_ip_flag == 0); ENFORCE(outer_ip_flag == 0);
tos_tc =:= static; tos_tc =:= static;
skipping to change at page 80, line 4 skipping to change at page 80, line 15
pad_bit =:= static; pad_bit =:= static;
extension =:= static; extension =:= static;
cc =:= static; cc =:= static;
// When marker not present in packets, it is assumed 0 // When marker not present in packets, it is assumed 0
marker =:= uncompressed_value(1, 0); marker =:= uncompressed_value(1, 0);
payload_type =:= static; payload_type =:= static;
sequence_number =:= static; sequence_number =:= static;
timestamp =:= static; timestamp =:= static;
ssrc =:= static; ssrc =:= static;
csrc_list =:= static; csrc_list =:= static;
ts_stride =:= static;
time_stride =:= static;
ts_scaled =:= static;
ts_offset =:= static;
} }
// Replacement for UOR-2-ext3 // Replacement for UOR-2-ext3
COMPRESSED co_common { COMPRESSED co_common {
ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE); ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE);
discriminator =:= '11111010' [ 8 ]; discriminator =:= '11111010' [ 8 ];
marker =:= irregular(1) [ 1 ]; marker =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
flags1_indicator =:= irregular(1) [ 1 ]; flags1_indicator =:= irregular(1) [ 1 ];
flags2_indicator =:= irregular(1) [ 1 ]; flags2_indicator =:= irregular(1) [ 1 ];
tsc_indicator =:= irregular(1) [ 1 ]; tsc_indicator =:= irregular(1) [ 1 ];
tss_indicator =:= irregular(1) [ 1 ]; tss_indicator =:= irregular(1) [ 1 ];
ip_id_indicator =:= irregular(1) [ 1 ]; ip_id_indicator =:= irregular(1) [ 1 ];
control_crc3 =:= control_crc3_encoding [ 3 ]; control_crc3 =:= control_crc3_encoding [ 3 ];
outer_ip_indicator : ttl_hopl_indicator : outer_ip_indicator : ttl_hopl_indicator :
tos_tc_indicator : ip_id_behavior : reorder_ratio =:= tos_tc_indicator : df : ip_id_behavior : reorder_ratio =:=
profile_1_7_flags1_enc(flags1_indicator.CVALUE) [ 0, 8 ]; profile_1_7_flags1_enc(flags1_indicator.CVALUE) [ 0, 8 ];
list_indicator : pt_indicator : tis_indicator :pad_bit : list_indicator : pt_indicator : tis_indicator :pad_bit :
extension : df =:= profile_1_flags2_enc(flags2_indicator.CVALUE, extension =:= profile_1_flags2_enc(flags2_indicator.CVALUE,
ip_version.UVALUE) [ 0, 8 ]; ip_version.UVALUE) [ 0, 8 ];
tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ]; tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ];
ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE, ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE,
ttl_hopl.ULENGTH) [ 0, 8 ]; ttl_hopl.ULENGTH) [ 0, 8 ];
payload_type =:= pt_irr_or_static(pt_indicator) [ 0, 8 ]; payload_type =:= pt_irr_or_static(pt_indicator) [ 0, 8 ];
sequence_number =:= sequence_number =:=
sdvl_sn_lsb(sequence_number.ULENGTH) [ VARIABLE ]; sdvl_sn_lsb(sequence_number.ULENGTH) [ VARIABLE ];
ip_id =:= ip_id_sequential_variable(ip_id_behavior.UVALUE, ip_id =:= ip_id_sequential_variable(ip_id_behavior.UVALUE,
ip_id_indicator.CVALUE) [ 0, 8, 16 ]; ip_id_indicator.CVALUE) [ 0, 8, 16 ];
ts_scaled =:= variable_scaled_timestamp(tss_indicator.CVALUE, ts_scaled =:= variable_scaled_timestamp(tss_indicator.CVALUE,
tsc_indicator, ts_stride.UVALUE) [ VARIABLE ]; tsc_indicator.CVALUE, ts_stride.UVALUE,
time_stride.UVALUE) [ VARIABLE ];
timestamp =:= variable_unscaled_timestamp(tss_indicator.CVALUE, timestamp =:= variable_unscaled_timestamp(tss_indicator.CVALUE,
tsc_indicator) [ VARIABLE ]; tsc_indicator.CVALUE) [ VARIABLE ];
ts_stride =:= sdvl_or_static(tss_indicator.CVALUE) [ VARIABLE ]; ts_stride =:= sdvl_or_static(tss_indicator.CVALUE) [ VARIABLE ];
time_stride =:= sdvl_or_static(tis_indicator.CVALUE) [ VARIABLE ]; time_stride =:= sdvl_or_static(tis_indicator.CVALUE) [ VARIABLE ];
csrc_list =:= csrc_list_presence(list_indicator.CVALUE, csrc_list =:= csrc_list_presence(list_indicator.CVALUE,
cc.UVALUE) [ VARIABLE ]; cc.UVALUE) [ VARIABLE ];
} }
// UO-0 // UO-0
COMPRESSED pt_0_crc3 { COMPRESSED pt_0_crc3 {
discriminator =:= '0' [ 1 ]; discriminator =:= '0' [ 1 ];
msn =:= msn_lsb(4) [ 4 ]; msn =:= msn_lsb(4) [ 4 ];
skipping to change at page 82, line 36 skipping to change at page 82, line 51
// UOR-2-ID-ext1 replacement (both TS and IP-ID) // UOR-2-ID-ext1 replacement (both TS and IP-ID)
COMPRESSED pt_2_seq_both { COMPRESSED pt_2_seq_both {
ENFORCE(ts_stride.UVALUE != 0); ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) || ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior.UVALUE == (ip_id_behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED)); IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '11001' [ 5 ]; discriminator =:= '11001' [ 5 ];
msn =:= msn_lsb(7) [ 7 ]; msn =:= msn_lsb(7) [ 7 ];
ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 5) [ 5 ]; ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 5) [ 5 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 8) [ 8 ]; ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 7) [ 7 ];
marker =:= irregular(1) [ 1 ];
} }
// UOR-2-TS replacement // UOR-2-TS replacement
COMPRESSED pt_2_seq_ts { COMPRESSED pt_2_seq_ts {
ENFORCE(ts_stride.UVALUE != 0); ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) || ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior.UVALUE == (ip_id_behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED)); IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '1101' [ 4 ]; discriminator =:= '1101' [ 4 ];
msn =:= msn_lsb(7) [ 7 ]; msn =:= msn_lsb(7) [ 7 ];
skipping to change at page 83, line 4 skipping to change at page 83, line 20
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) || ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior.UVALUE == (ip_id_behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED)); IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '1101' [ 4 ]; discriminator =:= '1101' [ 4 ];
msn =:= msn_lsb(7) [ 7 ]; msn =:= msn_lsb(7) [ 7 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 5) [ 5 ]; ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 5) [ 5 ];
marker =:= irregular(1) [ 1 ]; marker =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
} }
} }
//////////////////////////////////////////// ////////////////////////////////////////////
// UDP profile // UDP profile
//////////////////////////////////////////// ////////////////////////////////////////////
udp_baseheader(profile, outer_ip_flag) udp_baseheader(profile, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
{ {
UNCOMPRESSED v4 { UNCOMPRESSED v4 {
outer_headers =:= baseheader_outer_headers [ VARIABLE ]; outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 4) [ 4 ]; ip_version =:= uncompressed_value(4, 4) [ 4 ];
header_length =:= uncompressed_value(4, 5) [ 4 ]; header_length =:= uncompressed_value(4, 5) [ 4 ];
tos_tc [ 8 ]; tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ]; length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ]; ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ]; rf =:= uncompressed_value(1, 0) [ 1 ];
df [ 1 ]; df [ 1 ];
skipping to change at page 84, line 4 skipping to change at page 84, line 22
src_addr [ 128 ]; src_addr [ 128 ];
dest_addr [ 128 ]; dest_addr [ 128 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ]; extension_headers =:= baseheader_extension_headers [ VARIABLE ];
src_port [ 16 ]; src_port [ 16 ];
dst_port [ 16 ]; dst_port [ 16 ];
udp_length =:= inferred_udp_length [ 16 ]; udp_length =:= inferred_udp_length [ 16 ];
udp_checksum [ 16 ]; udp_checksum [ 16 ];
df =:= uncompressed_value(0,0) [ 0 ]; df =:= uncompressed_value(0,0) [ 0 ];
ip_id =:= uncompressed_value(0,0) [ 0 ]; ip_id =:= uncompressed_value(0,0) [ 0 ];
} }
CONTROL { CONTROL {
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(ip_id_behavior.UVALUE == ip_id_behavior_value);
ENFORCE(profile == PROFILE_UDP_0102); ENFORCE(profile == PROFILE_UDP_0102);
ip_id_behavior [ 2 ]; ip_id_behavior [ 2 ];
} }
DEFAULT { DEFAULT {
ENFORCE(outer_ip_flag == 0); ENFORCE(outer_ip_flag == 0);
tos_tc =:= static; tos_tc =:= static;
dest_addr =:= static; dest_addr =:= static;
ip_version =:= static; ip_version =:= static;
ttl_hopl =:= static; ttl_hopl =:= static;
skipping to change at page 84, line 33 skipping to change at page 85, line 6
// Replacement for UOR-2-ext3 // Replacement for UOR-2-ext3
COMPRESSED co_common { COMPRESSED co_common {
ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE); ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE);
discriminator =:= '11111010' [ 8 ]; discriminator =:= '11111010' [ 8 ];
ip_id_indicator =:= irregular(1) [ 1 ]; ip_id_indicator =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
flags_indicator =:= irregular(1) [ 1 ]; flags_indicator =:= irregular(1) [ 1 ];
ttl_hopl_indicator =:= irregular(1) [ 1 ]; ttl_hopl_indicator =:= irregular(1) [ 1 ];
tos_tc_indicator =:= irregular(1) [ 1 ]; tos_tc_indicator =:= irregular(1) [ 1 ];
reorder_ratio =:= reorder_choice [ 2 ]; reorder_ratio =:= irregular(2) [ 2 ];
control_crc3 =:= control_crc3_encoding [ 3 ]; control_crc3 =:= control_crc3_encoding [ 3 ];
outer_ip_indicator : df : ip_id_behavior =:= outer_ip_indicator : df : ip_id_behavior =:=
profile_2_3_4_flags_enc( profile_2_3_4_flags_enc(
flags_indicator.CVALUE, ip_version.UVALUE) [ 0, 8 ]; flags_indicator.CVALUE, ip_version.UVALUE) [ 0, 8 ];
tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ]; tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ];
ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE, ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE,
ttl_hopl.ULENGTH) [ 0, 8 ]; ttl_hopl.ULENGTH) [ 0, 8 ];
msn =:= msn_lsb(8) [ 8 ]; msn =:= msn_lsb(8) [ 8 ];
ip_id =:= ip_id_sequential_variable(ip_id_behavior.UVALUE, ip_id =:= ip_id_sequential_variable(ip_id_behavior.UVALUE,
ip_id_indicator.CVALUE) [ 0, 8, 16 ]; ip_id_indicator.CVALUE) [ 0, 8, 16 ];
skipping to change at page 85, line 25 skipping to change at page 85, line 46
COMPRESSED pt_1_seq_id { COMPRESSED pt_1_seq_id {
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) || ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior.UVALUE == (ip_id_behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED)); IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '101' [ 3 ]; discriminator =:= '101' [ 3 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ]; header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
msn =:= msn_lsb(6) [ 6 ]; msn =:= msn_lsb(6) [ 6 ];
ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 4) [ 4 ]; ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 4) [ 4 ];
} }
// UOR-2 replacement
COMPRESSED pt_2_rnd {
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_RANDOM) ||
(ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_ZERO));
discriminator =:= '110' [ 3 ];
msn =:= msn_lsb(6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
}
// UOR-2-ID replacement // UOR-2-ID replacement
COMPRESSED pt_2_seq_id { COMPRESSED pt_2_seq_id {
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) || ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior.UVALUE == (ip_id_behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED)); IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '1100' [ 4 ]; discriminator =:= '110' [ 3 ];
ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 5) [ 5 ]; ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
msn =:= msn_lsb(8) [ 8 ]; msn =:= msn_lsb(8) [ 8 ];
} }
} }
//////////////////////////////////////////// ////////////////////////////////////////////
// ESP profile // ESP profile
//////////////////////////////////////////// ////////////////////////////////////////////
esp_baseheader(profile, outer_ip_flag) esp_baseheader(profile, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
{ {
UNCOMPRESSED v4 { UNCOMPRESSED v4 {
ENFORCE(msn.UVALUE == sequence_number.UVALUE % 65536); ENFORCE(msn.UVALUE == sequence_number.UVALUE % 65536);
outer_headers =:= baseheader_outer_headers [ VARIABLE ]; outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 4) [ 4 ]; ip_version =:= uncompressed_value(4, 4) [ 4 ];
header_length =:= uncompressed_value(4, 5) [ 4 ]; header_length =:= uncompressed_value(4, 5) [ 4 ];
tos_tc [ 8 ]; tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ]; length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ]; ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ]; rf =:= uncompressed_value(1, 0) [ 1 ];
skipping to change at page 86, line 46 skipping to change at page 87, line 11
src_addr [ 128 ]; src_addr [ 128 ];
dest_addr [ 128 ]; dest_addr [ 128 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ]; extension_headers =:= baseheader_extension_headers [ VARIABLE ];
spi [ 32 ]; spi [ 32 ];
sequence_number [ 32 ]; sequence_number [ 32 ];
df =:= uncompressed_value(0,0) [ 0 ]; df =:= uncompressed_value(0,0) [ 0 ];
ip_id =:= uncompressed_value(0,0) [ 0 ]; ip_id =:= uncompressed_value(0,0) [ 0 ];
} }
CONTROL { CONTROL {
ENFORCE(ip_id_behavior.UVALUE == ip_id_behavior_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(profile == PROFILE_ESP_0103); ENFORCE(profile == PROFILE_ESP_0103);
ip_id_behavior [ 2 ]; ip_id_behavior [ 2 ];
} }
DEFAULT { DEFAULT {
ENFORCE(outer_ip_indicator == 0); ENFORCE(outer_ip_indicator == 0);
tos_tc =:= static; tos_tc =:= static;
dest_addr =:= static; dest_addr =:= static;
ttl_hopl =:= static; ttl_hopl =:= static;
src_addr =:= static; src_addr =:= static;
skipping to change at page 87, line 25 skipping to change at page 87, line 40
// Replacement for UOR-2-ext3 // Replacement for UOR-2-ext3
COMPRESSED co_common { COMPRESSED co_common {
ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE); ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE);
discriminator =:= '11111010' [ 8 ]; discriminator =:= '11111010' [ 8 ];
ip_id_indicator =:= irregular(1) [ 1 ]; ip_id_indicator =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
flags_indicator =:= irregular(1) [ 1 ]; flags_indicator =:= irregular(1) [ 1 ];
ttl_hopl_indicator =:= irregular(1) [ 1 ]; ttl_hopl_indicator =:= irregular(1) [ 1 ];
tos_tc_indicator =:= irregular(1) [ 1 ]; tos_tc_indicator =:= irregular(1) [ 1 ];
reorder_ratio =:= reorder_choice [ 2 ]; reorder_ratio =:= irregular(2) [ 2 ];
control_crc3 =:= control_crc3_encoding [ 3 ]; control_crc3 =:= control_crc3_encoding [ 3 ];
outer_ip_indicator : df : ip_id_behavior =:= outer_ip_indicator : df : ip_id_behavior =:=
profile_2_3_4_flags_enc( profile_2_3_4_flags_enc(
flags_indicator.CVALUE, ip_version.UVALUE) [ 0, 8 ]; flags_indicator.CVALUE, ip_version.UVALUE) [ 0, 8 ];
tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ]; tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ];
ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE, ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE,
ttl_hopl.ULENGTH) [ 0, 8 ]; ttl_hopl.ULENGTH) [ 0, 8 ];
sequence_number =:= sequence_number =:=
sdvl_sn_lsb(sequence_number.ULENGTH) [ VARIABLE ]; sdvl_sn_lsb(sequence_number.ULENGTH) [ VARIABLE ];
skipping to change at page 88, line 14 skipping to change at page 88, line 29
sequence_number =:= msn_lsb(6) [ 6 ]; sequence_number =:= msn_lsb(6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
ip_id =:= inferred_sequential_ip_id [ 0 ]; ip_id =:= inferred_sequential_ip_id [ 0 ];
} }
// UO-1-ID replacement (PT-1 only used for sequential) // UO-1-ID replacement (PT-1 only used for sequential)
COMPRESSED pt_1_seq_id { COMPRESSED pt_1_seq_id {
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) || ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior.UVALUE == (ip_id_behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED)); IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminato =:= '101' [ 3 ]; discriminator =:= '101' [ 3 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ]; header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
sequence_number =:= msn_lsb(6) [ 6 ]; sequence_number =:= msn_lsb(6) [ 6 ];
ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 4) [ 4 ]; ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 4) [ 4 ];
} }
// UOR-2 replacement
COMPRESSED pt_2_rnd {
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_RANDOM) ||
(ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_ZERO));
discriminator =:= '110' [ 3 ];
sequence_number =:= msn_lsb(6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
}
// UOR-2-ID replacement // UOR-2-ID replacement
COMPRESSED pt_2_seq_id { COMPRESSED pt_2_seq_id {
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) || ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior.UVALUE == (ip_id_behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED)); IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '1100' [ 4 ]; discriminator =:= '110' [ 3 ];
ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 5) [ 5 ]; ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
sequence_number =:= msn_lsb(8) [ 8 ]; sequence_number =:= msn_lsb(8) [ 8 ];
} }
} }
//////////////////////////////////////////// ////////////////////////////////////////////
// IP-only profile // IP-only profile
//////////////////////////////////////////// ////////////////////////////////////////////
iponly_baseheader(profile, outer_ip_flag) iponly_baseheader(profile, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value)
{ {
UNCOMPRESSED v4 { UNCOMPRESSED v4 {
outer_headers =:= baseheader_outer_headers [ VARIABLE ]; outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 4) [ 4 ]; ip_version =:= uncompressed_value(4, 4) [ 4 ];
header_length =:= uncompressed_value(4, 5) [ 4 ]; header_length =:= uncompressed_value(4, 5) [ 4 ];
tos_tc [ 8 ]; tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ]; length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ]; ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ]; rf =:= uncompressed_value(1, 0) [ 1 ];
df [ 1 ]; df [ 1 ];
skipping to change at page 89, line 35 skipping to change at page 89, line 42
next_header [ 8 ]; next_header [ 8 ];
ttl_hopl [ 8 ]; ttl_hopl [ 8 ];
src_addr [ 128 ]; src_addr [ 128 ];
dest_addr [ 128 ]; dest_addr [ 128 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ]; extension_headers =:= baseheader_extension_headers [ VARIABLE ];
df =:= uncompressed_value(0,0) [ 0 ]; df =:= uncompressed_value(0,0) [ 0 ];
ip_id =:= uncompressed_value(0,0) [ 0 ]; ip_id =:= uncompressed_value(0,0) [ 0 ];
} }
CONTROL { CONTROL {
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(ip_id_behavior.UVALUE == ip_id_behavior_value);
ENFORCE(profile == PROFILE_IP_0104); ENFORCE(profile == PROFILE_IP_0104);
ip_id_behavior [ 2 ]; ip_id_behavior [ 2 ];
} }
DEFAULT { DEFAULT {
ENFORCE(outer_ip_indicator == 0); ENFORCE(outer_ip_indicator == 0);
tos_tc =:= static; tos_tc =:= static;
dest_addr =:= static; dest_addr =:= static;
ttl_hopl =:= static; ttl_hopl =:= static;
src_addr =:= static; src_addr =:= static;
skipping to change at page 90, line 12 skipping to change at page 90, line 21
// Replacement for UOR-2-ext3 // Replacement for UOR-2-ext3
COMPRESSED co_common { COMPRESSED co_common {
ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE); ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE);
discriminator =:= '11111010' [ 8 ]; discriminator =:= '11111010' [ 8 ];
ip_id_indicator =:= irregular(1) [ 1 ]; ip_id_indicator =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
flags_indicator =:= irregular(1) [ 1 ]; flags_indicator =:= irregular(1) [ 1 ];
ttl_hopl_indicator =:= irregular(1) [ 1 ]; ttl_hopl_indicator =:= irregular(1) [ 1 ];
tos_tc_indicator =:= irregular(1) [ 1 ]; tos_tc_indicator =:= irregular(1) [ 1 ];
reorder_ratio =:= reorder_choice [ 2 ]; reorder_ratio =:= irregular(2) [ 2 ];
control_crc3 =:= control_crc3_encoding [ 3 ]; control_crc3 =:= control_crc3_encoding [ 3 ];
outer_ip_indicator : df : ip_id_behavior =:= outer_ip_indicator : df : ip_id_behavior =:=
profile_2_3_4_flags_enc( profile_2_3_4_flags_enc(
flags_indicator.CVALUE, ip_version.UVALUE) [ 0, 8 ]; flags_indicator.CVALUE, ip_version.UVALUE) [ 0, 8 ];
tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ]; tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ];
ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE, ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE,
ttl_hopl.ULENGTH) [ 0, 8 ]; ttl_hopl.ULENGTH) [ 0, 8 ];
msn =:= msn_lsb(8) [ 8 ]; msn =:= msn_lsb(8) [ 8 ];
ip_id =:= ip_id_sequential_variable(ip_id_behavior.UVALUE, ip_id =:= ip_id_sequential_variable(ip_id_behavior.UVALUE,
ip_id_indicator.CVALUE) [ 0, 8, 16 ]; ip_id_indicator.CVALUE) [ 0, 8, 16 ];
skipping to change at page 90, line 36 skipping to change at page 90, line 45
COMPRESSED pt_0_crc3 { COMPRESSED pt_0_crc3 {
discriminator =:= '0' [ 1 ]; discriminator =:= '0' [ 1 ];
msn =:= msn_lsb(4) [ 4 ]; msn =:= msn_lsb(4) [ 4 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ]; header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
ip_id =:= inferred_sequential_ip_id [ 0 ]; ip_id =:= inferred_sequential_ip_id [ 0 ];
} }
// New format, Type 0 with strong CRC and more SN bits // New format, Type 0 with strong CRC and more SN bits
COMPRESSED pt_0_crc7 { COMPRESSED pt_0_crc7 {
discriminator =:= '100' [ 3 ]; discriminator =:= '100' [ 3 ];
msn =:= msn_lsb(6) [ 6 ]; msn =:= msn_lsb(7) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
ip_id =:= inferred_sequential_ip_id [ 0 ]; ip_id =:= inferred_sequential_ip_id [ 0 ];
} }
// UO-1-ID replacement (PT-1 only used for sequential) // UO-1-ID replacement (PT-1 only used for sequential)
COMPRESSED pt_1_seq_id { COMPRESSED pt_1_seq_id {
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) || ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior.UVALUE == (ip_id_behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED)); IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '101' [ 3 ]; discriminator =:= '101' [ 3 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ]; header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
msn =:= msn_lsb(6) [ 6 ]; msn =:= msn_lsb(6) [ 6 ];
ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 4) [ 4 ]; ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 4) [ 4 ];
} }
// UOR-2 replacement
COMPRESSED pt_2_rnd {
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_RANDOM) ||
(ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_ZERO));
discriminator =:= '110' [ 3 ];
msn =:= msn_lsb(6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
}
// UOR-2-ID replacement // UOR-2-ID replacement
COMPRESSED pt_2_seq_id { COMPRESSED pt_2_seq_id {
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) || ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior.UVALUE == (ip_id_behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED)); IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '1100' [ 4 ]; discriminator =:= '110' [ 3 ];
ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 5) [ 5 ]; ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
msn =:= msn_lsb(8) [ 8 ]; msn =:= msn_lsb(8) [ 8 ];
} }
} }
//////////////////////////////////////////// ////////////////////////////////////////////
// UDP-lite/RTP profile // UDP-lite/RTP profile
//////////////////////////////////////////// ////////////////////////////////////////////
udplite_rtp_baseheader(profile, ts_stride_value, time_stride_value, udplite_rtp_baseheader(profile, ts_stride_value, time_stride_value,
outer_ip_flag) outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value, coverage_behavior_value)
{ {
UNCOMPRESSED v4 { UNCOMPRESSED v4 {
ENFORCE(msn.UVALUE == sequence_number.UVALUE); ENFORCE(msn.UVALUE == sequence_number.UVALUE);
outer_headers =:= baseheader_outer_headers [ VARIABLE ]; outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 4) [ 4 ]; ip_version =:= uncompressed_value(4, 4) [ 4 ];
header_length =:= uncompressed_value(4, 5) [ 4 ]; header_length =:= uncompressed_value(4, 5) [ 4 ];
tos_tc [ 8 ]; tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ]; length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ]; ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ]; rf =:= uncompressed_value(1, 0) [ 1 ];
skipping to change at page 92, line 51 skipping to change at page 93, line 4
timestamp [ 32 ]; timestamp [ 32 ];
ssrc [ 32 ]; ssrc [ 32 ];
csrc_list [ VARIABLE ]; csrc_list [ VARIABLE ];
df =:= uncompressed_value(0,0) [ 0 ]; df =:= uncompressed_value(0,0) [ 0 ];
ip_id =:= uncompressed_value(0,0) [ 0 ]; ip_id =:= uncompressed_value(0,0) [ 0 ];
} }
CONTROL { CONTROL {
ENFORCE(time_stride.UVALUE == time_stride_value); ENFORCE(time_stride.UVALUE == time_stride_value);
ENFORCE(ts_stride.UVALUE == ts_stride_value); ENFORCE(ts_stride.UVALUE == ts_stride_value);
ENFORCE(coverage_behavior.UVALUE == coverage_behavior_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(ip_id_behavior.UVALUE == ip_id_behavior_value);
ENFORCE(profile == PROFILE_RTP_0107); ENFORCE(profile == PROFILE_RTP_0107);
ip_id_behavior [ 2 ]; ip_id_behavior [ 2 ];
coverage_behavior [ 2 ]; coverage_behavior [ 2 ];
ts_stride [ 32 ]; dummy_field =:= field_scaling(ts_stride.UVALUE,
time_stride [ 32 ]; ts_scaled.UVALUE, timestamp.UVALUE, ts_offset.UVALUE) [ 0 ];
ts_scaled [ 32 ]; }
ts_offset =:= field_scaling(ts_stride.UVALUE, ts_scaled.UVALUE,
timestamp.UVALUE) [ 32 ]; INITIAL {
ts_stride =:= uncompressed_value(32, TS_STRIDE_DEFAULT);
time_stride =:= uncompressed_value(32, TIME_STRIDE_DEFAULT);
} }
DEFAULT { DEFAULT {
ENFORCE(outer_ip_indicator == 0); ENFORCE(outer_ip_indicator == 0);
tos_tc =:= static; tos_tc =:= static;
dest_addr =:= static; dest_addr =:= static;
ttl_hopl =:= static; ttl_hopl =:= static;
src_addr =:= static; src_addr =:= static;
df =:= static; df =:= static;
ip_id_behavior =:= static; ip_id_behavior =:= static;
skipping to change at page 93, line 35 skipping to change at page 93, line 41
pad_bit =:= static; pad_bit =:= static;
extension =:= static; extension =:= static;
cc =:= static; cc =:= static;
// When marker not present in packets, it is assumed 0 // When marker not present in packets, it is assumed 0
marker =:= uncompressed_value(1, 0); marker =:= uncompressed_value(1, 0);
payload_type =:= static; payload_type =:= static;
sequence_number =:= static; sequence_number =:= static;
timestamp =:= static; timestamp =:= static;
ssrc =:= static; ssrc =:= static;
csrc_list =:= static; csrc_list =:= static;
ts_stride =:= static;
time_stride =:= static;
ts_scaled =:= static;
ts_offset =:= static;
} }
// Replacement for UOR-2-ext3 // Replacement for UOR-2-ext3
COMPRESSED co_common { COMPRESSED co_common {
ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE); ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE);
discriminator =:= '11111010' [ 8 ]; discriminator =:= '11111010' [ 8 ];
marker =:= irregular(1) [ 1 ]; marker =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
flags1_indicator =:= irregular(1) [ 1 ]; flags1_indicator =:= irregular(1) [ 1 ];
flags2_indicator =:= irregular(1) [ 1 ]; flags2_indicator =:= irregular(1) [ 1 ];
tsc_indicator =:= irregular(1) [ 1 ]; tsc_indicator =:= irregular(1) [ 1 ];
tss_indicator =:= irregular(1) [ 1 ]; tss_indicator =:= irregular(1) [ 1 ];
ip_id_indicator =:= irregular(1) [ 1 ]; ip_id_indicator =:= irregular(1) [ 1 ];
control_crc3 =:= control_crc3_encoding [ 3 ]; control_crc3 =:= control_crc3_encoding [ 3 ];
outer_ip_indicator : ttl_hopl_indicator : outer_ip_indicator : ttl_hopl_indicator :
tos_tc_indicator : ip_id_behavior : reorder_ratio =:= tos_tc_indicator : df : ip_id_behavior : reorder_ratio =:=
profile_1_7_flags1_enc(flags1_indicator.CVALUE) [ 0, 8 ]; profile_1_7_flags1_enc(flags1_indicator.CVALUE) [ 0, 8 ];
list_indicator : tis_indicator : pt_indicator : pad_bit : list_indicator : tis_indicator : pt_indicator : pad_bit :
extension : df : coverage_behavior =:= extension : coverage_behavior =:=
profile_7_flags2_enc(flags2_indicator.CVALUE, profile_7_flags2_enc(flags2_indicator.CVALUE,
ip_version.UVALUE) [ 0, 8 ]; ip_version.UVALUE) [ 0, 8 ];
tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ]; tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ];
ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE, ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE,
ttl_hopl.ULENGTH) [ 0, 8 ]; ttl_hopl.ULENGTH) [ 0, 8 ];
payload_type =:= pt_irr_or_static(pt_indicator.CVALUE) [ 0, 8 ]; payload_type =:= pt_irr_or_static(pt_indicator.CVALUE) [ 0, 8 ];
sequence_number =:= sequence_number =:=
sdvl_sn_lsb(sequence_number.ULENGTH) [ VARIABLE ]; sdvl_sn_lsb(sequence_number.ULENGTH) [ VARIABLE ];
ip_id =:= ip_id_sequential_variable(ip_id_behavior.UVALUE, ip_id =:= ip_id_sequential_variable(ip_id_behavior.UVALUE,
ip_id_indicator.CVALUE) [ 0, 8, 16 ]; ip_id_indicator.CVALUE) [ 0, 8, 16 ];
ts_scaled =:= variable_scaled_timestamp(tss_indicator.CVALUE, ts_scaled =:= variable_scaled_timestamp(tss_indicator.CVALUE,
tsc_indicator.CVALUE, ts_stride.UVALUE) [ VARIABLE ]; tsc_indicator.CVALUE, ts_stride.UVALUE,
time_stride.UVALUE) [ VARIABLE ];
timestamp =:= variable_unscaled_timestamp(tss_indicator.CVALUE, timestamp =:= variable_unscaled_timestamp(tss_indicator.CVALUE,
tsc_indicator.CVALUE) [ VARIABLE ]; tsc_indicator.CVALUE) [ VARIABLE ];
ts_stride =:= sdvl_or_static(tss_indicator.CVALUE) [ VARIABLE ]; ts_stride =:= sdvl_or_static(tss_indicator.CVALUE) [ VARIABLE ];
time_stride =:= sdvl_or_static(tis_indicator.CVALUE) [ VARIABLE ]; time_stride =:= sdvl_or_static(tis_indicator.CVALUE) [ VARIABLE ];
csrc_list =:= csrc_list =:=
csrc_list_presence(list_indicator.CVALUE, csrc_list_presence(list_indicator.CVALUE,
cc.UVALUE) [ VARIABLE ]; cc.UVALUE) [ VARIABLE ];
} }
// UO-0 // UO-0
skipping to change at page 96, line 21 skipping to change at page 96, line 32
// UOR-2-ID-ext1 replacement (both TS and IP-ID) // UOR-2-ID-ext1 replacement (both TS and IP-ID)
COMPRESSED pt_2_seq_both { COMPRESSED pt_2_seq_both {
ENFORCE(ts_stride.UVALUE != 0); ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) || ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior.UVALUE == (ip_id_behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED)); IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '11001' [ 5 ]; discriminator =:= '11001' [ 5 ];
msn =:= msn_lsb(7) [ 7 ]; msn =:= msn_lsb(7) [ 7 ];
ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 5) [ 5 ]; ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 5) [ 5 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 8) [ 8 ]; ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 7) [ 7 ];
marker =:= irregular(1) [ 1 ];
} }
// UOR-2-TS replacement // UOR-2-TS replacement
COMPRESSED pt_2_seq_ts { COMPRESSED pt_2_seq_ts {
ENFORCE(ts_stride.UVALUE != 0); ENFORCE(ts_stride.UVALUE != 0);
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) || ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior.UVALUE == (ip_id_behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED)); IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '1101' [ 4 ]; discriminator =:= '1101' [ 4 ];
msn =:= msn_lsb(7) [ 7 ]; msn =:= msn_lsb(7) [ 7 ];
skipping to change at page 96, line 40 skipping to change at page 97, line 4
discriminator =:= '1101' [ 4 ]; discriminator =:= '1101' [ 4 ];
msn =:= msn_lsb(7) [ 7 ]; msn =:= msn_lsb(7) [ 7 ];
ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 5) [ 5 ]; ts_scaled =:= scaled_ts_lsb(time_stride.UVALUE, 5) [ 5 ];
marker =:= irregular(1) [ 1 ]; marker =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
} }
} }
//////////////////////////////////////////// ////////////////////////////////////////////
// UDP-lite profile // UDP-lite profile
//////////////////////////////////////////// ////////////////////////////////////////////
udplite_baseheader(profile, outer_ip_flag) udplite_baseheader(profile, outer_ip_flag, ip_id_behavior_value,
reorder_ratio_value, coverage_behavior_value)
{ {
UNCOMPRESSED v4 { UNCOMPRESSED v4 {
outer_headers =:= baseheader_outer_headers [ VARIABLE ]; outer_headers =:= baseheader_outer_headers [ VARIABLE ];
ip_version =:= uncompressed_value(4, 4) [ 4 ]; ip_version =:= uncompressed_value(4, 4) [ 4 ];
header_length =:= uncompressed_value(4, 5) [ 4 ]; header_length =:= uncompressed_value(4, 5) [ 4 ];
tos_tc [ 8 ]; tos_tc [ 8 ];
length =:= inferred_ip_v4_length [ 16 ]; length =:= inferred_ip_v4_length [ 16 ];
ip_id [ 16 ]; ip_id [ 16 ];
rf =:= uncompressed_value(1, 0) [ 1 ]; rf =:= uncompressed_value(1, 0) [ 1 ];
df [ 1 ]; df [ 1 ];
skipping to change at page 97, line 38 skipping to change at page 98, line 4
src_addr [ 128 ]; src_addr [ 128 ];
dest_addr [ 128 ]; dest_addr [ 128 ];
extension_headers =:= baseheader_extension_headers [ VARIABLE ]; extension_headers =:= baseheader_extension_headers [ VARIABLE ];
src_port [ 16 ]; src_port [ 16 ];
dst_port [ 16 ]; dst_port [ 16 ];
checksum_coverage [ 16 ]; checksum_coverage [ 16 ];
udp_checksum [ 16 ]; udp_checksum [ 16 ];
df =:= uncompressed_value(0,0) [ 0 ]; df =:= uncompressed_value(0,0) [ 0 ];
ip_id =:= uncompressed_value(0,0) [ 0 ]; ip_id =:= uncompressed_value(0,0) [ 0 ];
} }
CONTROL { CONTROL {
ENFORCE(coverage_behavior.UVALUE == coverage_behavior_value);
ENFORCE(reorder_ratio.UVALUE == reorder_ratio_value);
ENFORCE(ip_id_behavior.UVALUE == ip_id_behavior_value);
ENFORCE(profile == PROFILE_UDPLITE_0108); ENFORCE(profile == PROFILE_UDPLITE_0108);
ip_id_behavior [ 2 ]; ip_id_behavior [ 2 ];
coverage_behavior [ 2 ]; coverage_behavior [ 2 ];
} }
DEFAULT { DEFAULT {
ENFORCE(outer_ip_indicator == 0); ENFORCE(outer_ip_indicator == 0);
tos_tc =:= static; tos_tc =:= static;
dest_addr =:= static; dest_addr =:= static;
ttl_hopl =:= static; ttl_hopl =:= static;
skipping to change at page 98, line 20 skipping to change at page 98, line 36
// Replacement for UOR-2-ext3 // Replacement for UOR-2-ext3
COMPRESSED co_common { COMPRESSED co_common {
ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE); ENFORCE(outer_ip_flag == outer_ip_indicator.CVALUE);
discriminator =:= '11111010' [ 8 ]; discriminator =:= '11111010' [ 8 ];
ip_id_indicator =:= irregular(1) [ 1 ]; ip_id_indicator =:= irregular(1) [ 1 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
flags_indicator =:= irregular(1) [ 1 ]; flags_indicator =:= irregular(1) [ 1 ];
ttl_hopl_indicator =:= irregular(1) [ 1 ]; ttl_hopl_indicator =:= irregular(1) [ 1 ];
tos_tc_indicator =:= irregular(1) [ 1 ]; tos_tc_indicator =:= irregular(1) [ 1 ];
reorder_ratio =:= reorder_choice [ 2 ]; reorder_ratio =:= irregular(2) [ 2 ];
control_crc3 =:= control_crc3_encoding [ 3 ]; control_crc3 =:= control_crc3_encoding [ 3 ];
outer_ip_indicator : df : ip_id_behavior : outer_ip_indicator : df : ip_id_behavior :
coverage_behavior =:= coverage_behavior =:=
profile_8_flags_enc(flags_indicator.CVALUE, profile_8_flags_enc(flags_indicator.CVALUE,
ip_version.UVALUE) [ 0, 8 ]; ip_version.UVALUE) [ 0, 8 ];
tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ]; tos_tc =:= static_or_irreg(tos_tc_indicator.CVALUE, 8) [ 0, 8 ];
ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE, ttl_hopl =:= static_or_irreg(ttl_hopl_indicator.CVALUE,
ttl_hopl.ULENGTH) [ 0, 8 ]; ttl_hopl.ULENGTH) [ 0, 8 ];
msn =:= msn_lsb(8) [ 8 ]; msn =:= msn_lsb(8) [ 8 ];
ip_id =:= ip_id_sequential_variable(ip_id_behavior.UVALUE, ip_id =:= ip_id_sequential_variable(ip_id_behavior.UVALUE,
skipping to change at page 98, line 45 skipping to change at page 99, line 13
COMPRESSED pt_0_crc3 { COMPRESSED pt_0_crc3 {
discriminator =:= '0' [ 1 ]; discriminator =:= '0' [ 1 ];
msn =:= msn_lsb(4) [ 4 ]; msn =:= msn_lsb(4) [ 4 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ]; header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
ip_id =:= inferred_sequential_ip_id [ 0 ]; ip_id =:= inferred_sequential_ip_id [ 0 ];
} }
// New format, Type 0 with strong CRC and more SN bits // New format, Type 0 with strong CRC and more SN bits
COMPRESSED pt_0_crc7 { COMPRESSED pt_0_crc7 {
discriminator =:= '100' [ 3 ]; discriminator =:= '100' [ 3 ];
msn =:= msn_lsb(6) [ 6 ]; msn =:= msn_lsb(7) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
ip_id =:= inferred_sequential_ip_id [ 0 ]; ip_id =:= inferred_sequential_ip_id [ 0 ];
} }
// UO-1-ID replacement (PT-1 only used for sequential) // UO-1-ID replacement (PT-1 only used for sequential)
COMPRESSED pt_1_seq_id { COMPRESSED pt_1_seq_id {
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) || ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior.UVALUE == (ip_id_behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED)); IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '101' [ 3 ]; discriminator =:= '101' [ 3 ];
header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ]; header_crc =:= crc3(THIS.UVALUE, THIS.ULENGTH) [ 3 ];
msn =:= msn_lsb(6) [ 6 ]; msn =:= msn_lsb(6) [ 6 ];
ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 4) [ 4 ]; ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 4) [ 4 ];
} }
// UOR-2 replacement
COMPRESSED pt_2_rnd {
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_RANDOM) ||
(ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_ZERO));
discriminator =:= '110' [ 3 ];
msn =:= msn_lsb(6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
}
// UOR-2-ID replacement // UOR-2-ID replacement
COMPRESSED pt_2_seq_id { COMPRESSED pt_2_seq_id {
ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) || ENFORCE((ip_id_behavior.UVALUE == IP_ID_BEHAVIOR_SEQUENTIAL) ||
(ip_id_behavior.UVALUE == (ip_id_behavior.UVALUE ==
IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED)); IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
discriminator =:= '1100' [ 4 ]; discriminator =:= '110' [ 3 ];
ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 5) [ 5 ]; ip_id =:= ip_id_lsb(ip_id_behavior.UVALUE, 6) [ 6 ];
header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ]; header_crc =:= crc7(THIS.UVALUE, THIS.ULENGTH) [ 7 ];
msn =:= msn_lsb(8) [ 8 ]; msn =:= msn_lsb(8) [ 8 ];
} }
} }
6.9. Feedback Formats and Options 6.9. Feedback Formats and Options
6.9.1. Feedback Formats 6.9.1. Feedback Formats
This section describes the feedback format for ROHCv2 profiles, using This section describes the feedback format for ROHCv2 profiles, using
skipping to change at page 100, line 50 skipping to change at page 101, line 8
CRC: 8-bit CRC computed over the entire feedback payload including CRC: 8-bit CRC computed over the entire feedback payload including
any CID fields but excluding the packet type, the 'Size' field and any CID fields but excluding the packet type, the 'Size' field and
the 'Code' octet, using the polynomial defined in [RFC4995], the 'Code' octet, using the polynomial defined in [RFC4995],
Section 5.3.1.1. If the CID is given with an Add-CID octet, the Section 5.3.1.1. If the CID is given with an Add-CID octet, the
Add-CID octet immediately precedes the FEEDBACK-1 or FEEDBACK-2 Add-CID octet immediately precedes the FEEDBACK-1 or FEEDBACK-2
format. For purposes of computing the CRC, the CRC field is zero. format. For purposes of computing the CRC, the CRC field is zero.
Feedback options: A variable number of feedback options, see Feedback options: A variable number of feedback options, see
Section 6.9.2. Options may appear in any order. Section 6.9.2. Options may appear in any order.
A FEEDBACK-2 of type NACK or STATIC-NACK is always implicitely an A FEEDBACK-2 of type NACK or STATIC-NACK is always implicitly an
acknowlegement for a successfully decompressed packet, which acknowledgment for a successfully decompressed packet, which
corresponds to a packet whose LSBs match the Acknowledgment Number of corresponds to a packet whose LSBs match the Acknowledgment Number of
the feedback element, unless the ACKNUMBER-NOT-VALID option the feedback element, unless the ACKNUMBER-NOT-VALID option
Section 6.9.2.2 appears in the feedback element. Section 6.9.2.2 appears in the feedback element.
The FEEDBACK-2 format always carry a CRC and is thus more robust than The FEEDBACK-2 format always carry a CRC and is thus more robust than
the FEEDBACK-1 format. When receiving FEEDBACK-2, the compressor the FEEDBACK-1 format. When receiving FEEDBACK-2, the compressor
MUST verify the information by computing the CRC and comparing the MUST verify the information by computing the CRC and comparing the
result with the CRC carried in the feedback format. If the two are result with the CRC carried in the feedback format. If the two are
not identical, the feedback element MUST be discarded. not identical, the feedback element MUST be discarded.
6.9.2. Feedback Options 6.9.2. Feedback Options
A feedback option has variable length and the following general A feedback option has variable length and the following general
format: format:
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
| Opt Type | Opt Len | | Opt Type | Opt Len |
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
/ option data / Opt Length (octets) / option data / Opt Len (octets)
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
6.9.2.1. The REJECT option 6.9.2.1. The REJECT option
The REJECT option informs the compressor that the decompressor does The REJECT option informs the compressor that the decompressor does
not have sufficient resources to handle the flow. not have sufficient resources to handle the flow.
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
| Opt Type = 2 | Opt Len = 0 | | Opt Type = 2 | Opt Len = 0 |
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
skipping to change at page 102, line 4 skipping to change at page 102, line 11
The ACKNUMBER-NOT-VALID option indicates that the Acknowledgment The ACKNUMBER-NOT-VALID option indicates that the Acknowledgment
Number field of the feedback is not valid. Number field of the feedback is not valid.
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
| Opt Type = 3 | Opt Len = 0 | | Opt Type = 3 | Opt Len = 0 |
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
A compressor MUST NOT use the Acknowledgment Number of the feedback A compressor MUST NOT use the Acknowledgment Number of the feedback
to find the corresponding sent header when this option is present. to find the corresponding sent header when this option is present.
When this option is used, the Acknowledgment Number field of the When this option is used, the Acknowledgment Number field of the
FEEDBACK-2 format is set to zero. Consequently, a NACK or a STATIC- FEEDBACK-2 format is set to zero. Consequently, a NACK or a STATIC-
NACK feedback type sent with the ACKNUMBER-NOT-VALID option is NACK feedback type sent with the ACKNUMBER-NOT-VALID option is
equivalent to a STATIC-NACK with respect to the type of context equivalent to a STATIC-NACK with respect to the type of context
repair requested by the decompressor. repair requested by the decompressor.
The ACKNUMBER-NOT-VALID option MUST NOT appear more than once in the The ACKNUMBER-NOT-VALID option MUST NOT appear more than once in the
FEEDBACK-2 format and MUST NOT appear in the same feedback element as FEEDBACK-2 format, otherwise the compressor MUST discard the entire
the MSN option, otherwise the compressor MUST discard the entire
feedback element. feedback element.
6.9.2.3. The CONTEXT_MEMORY Feedback Option 6.9.2.3. The CONTEXT_MEMORY Feedback Option
The CONTEXT_MEMORY option informs the compressor that the The CONTEXT_MEMORY option informs the compressor that the
decompressor does not have sufficient memory resources to handle the decompressor does not have sufficient memory resources to handle the
context of the packet flow, as the flow is currently compressed. context of the packet flow, as the flow is currently compressed.
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
skipping to change at page 104, line 40 skipping to change at page 104, line 44
0xnn07 Reserved 0xnn07 Reserved
0x0008 ROHC UDP-Lite RFC 4019 0x0008 ROHC UDP-Lite RFC 4019
0x0108 ROHCv2 UDP-Lite [RFCXXXX (this)] 0x0108 ROHCv2 UDP-Lite [RFCXXXX (this)]
0xnn08 Reserved 0xnn08 Reserved
0x0009-0xnn7F To be Assigned by IANA 0x0009-0xnn7F To be Assigned by IANA
0xnn80-0xnnFE To be Assigned by IANA 0xnn80-0xnnFE To be Assigned by IANA
0xnnFF Reserved 0xnnFF Reserved
9. Acknowledgements 9. Acknowledgements
The authors would like to thank Carl Knutsson, Haipeng Jin and Rohit The authors would like to thank Mark West, Robert Finking, Haipeng
Kapoor for comments and discussions about these profiles. Also Jin and Rohit Kapoor for serving as committed document reviewers and
thanks to the many people who have contributed to previous ROHC also for constructive discussions during the development of this
specifications. document. Thanks also to Carl Knutsson, Jani Juvan and Anders
Edqvist for useful comments and feedback. Finally, thanks to the
many people who have contributed to previous ROHC specifications.
10. References 10. References
10.1. Normative References 10.1. Normative References
[RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768,
August 1980. August 1980.
[RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791, [RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791,
September 1981. September 1981.
skipping to change at page 112, line 47 skipping to change at page 112, line 47
+----------------+----------------+ +----------------+----------------+
Version Version
This field is expected to have the value two and the field is This field is expected to have the value two and the field is
therefore classified as STATIC-KNOWN. therefore classified as STATIC-KNOWN.
Padding Padding
The use of this field is application-dependent, but when payload The use of this field is application-dependent, but when payload
padding is used it is likely to be present in most or all packets. padding is used it is likely to be present in most or all packets.
The field is classified as RC to allow for the case where the The field is classified as RC to allow for the case where the
value of this field is changes. value of this field changes.
Extension Extension
If RTP extensions are used by the application, these extensions If RTP extensions are used by the application, these extensions
are often present in all packets, although the use of extensions are often present in all packets, although the use of extensions
is infrequent. To allow efficient compression of a flow using is infrequent. To allow efficient compression of a flow using
extensions in only a few packets, this field is classified as RC. extensions in only a few packets, this field is classified as RC.
CSRC Count CSRC Count
This field indicates the number of CSRC items present in the CSRC This field indicates the number of CSRC items present in the CSRC
list. This number is expected to be mostly constant on a packet- list. This number is expected to be mostly constant on a packet-
skipping to change at page 113, line 46 skipping to change at page 113, line 46
will thus mostly follow the RTP Sequence Number. When there will thus mostly follow the RTP Sequence Number. When there
has been a silent period and a new talkspurt begins, the has been a silent period and a new talkspurt begins, the
timestamp will jump in proportion to the length of the silent timestamp will jump in proportion to the length of the silent
period. However, the increment will probably be within a period. However, the increment will probably be within a
relatively limited range. relatively limited range.
In the video case: In the video case:
Between two consecutive packets, the timestamp will either be Between two consecutive packets, the timestamp will either be
unchanged or increase by a multiple of a fixed value unchanged or increase by a multiple of a fixed value
corresponding to the picture clock frequency. The timestamp corresponding to the picture clock frequency. The timestamp
can also decrease by a multiple of the fixed value for certain can also decrease by a multiple of the fixed value for certain
coding schemes. This increase, expressed as a multiple of the coding schemes. The change in timestamp value, expressed as a
picture clock frequency, is in most cases very limited. multiple of the picture clock frequency, is in most cases
within a limited range.
SSRC SSRC
This field is part of the definition of a flow and must thus be This field is part of the definition of a flow and must thus be
constant for all packets in the flow. The field is therefore constant for all packets in the flow. The field is therefore
classified as STATIC-DEF. classified as STATIC-DEF.
Contributing Sources (CSRC) Contributing Sources (CSRC)
The participants in a session, who are identified by the CSRC The participants in a session, who are identified by the CSRC
fields, are usually expected to be unchanged on a packet-to-packet fields, are usually expected to be unchanged on a packet-to-packet
basis, but will infrequently change by a few additions and/or basis, but will infrequently change by a few additions and/or
removals. removals.
Appendix A.6. ESP Header Fields Appendix A.6. ESP Header Fields
This classification applies both to the encrypted ESP header used in
profile 0x0103 and the NULL-encrypted ESP header used in all the
profiles of this document.
+------------------+-------------+ +------------------+-------------+
| Field | Class | | Field | Class |
+------------------+-------------+ +------------------+-------------+
| SPI | STATIC-DEF | | SPI | STATIC-DEF |
| Sequence Number | PATTERN | | Sequence Number | PATTERN |
+------------------+-------------+ +------------------+-------------+
SPI SPI
This field is used to identify a specific flow and only changes This field is used to identify a specific flow and only changes
when the sequence number wraps around, and is therefore classified when the sequence number wraps around, and is therefore classified
skipping to change at page 117, line 6 skipping to change at page 117, line 6
The reserved field is expected to be set to zero. The reserved field is expected to be set to zero.
Checksum Checksum
The header checksum protects individual routing hops from The header checksum protects individual routing hops from
processing a corrupted header. Since all fields of this header processing a corrupted header. Since all fields of this header
are compressed away, there is no need to include this checksum in are compressed away, there is no need to include this checksum in
compressed packets and it can be regenerated at the decompressor compressed packets and it can be regenerated at the decompressor
side. side.
Source and Destination Addresses Source and Destination Addresses
These fields can be used to define the flow are not expected to These fields can be used to define the flow and are not expected
change. to change.
Appendix A.10. AH Header Fields Appendix A.10. AH Header Fields
+---------------------+----------------+ +---------------------+----------------+
| Field | Class | | Field | Class |
+---------------------+----------------+ +---------------------+----------------+
| Next Header | STATIC-DEF | | Next Header | STATIC-DEF |
| Payload Length | STATIC | | Payload Length | STATIC |
| Reserved | STATIC-KNOWN | | Reserved | STATIC-KNOWN |
| SPI | STATIC-DEF | | SPI | STATIC-DEF |
skipping to change at page 117, line 43 skipping to change at page 117, line 43
SPI SPI
This field is used to identify a specific flow and only changes This field is used to identify a specific flow and only changes
when the sequence number wraps around, and is therefore classified when the sequence number wraps around, and is therefore classified
as STATIC-DEF. as STATIC-DEF.
Sequence Number Sequence Number
The Sequence Number will be incremented by one for each packet The Sequence Number will be incremented by one for each packet
sent. sent.
ICV ICV
The ICV is expected behave unpredictably and is therefore The ICV is expected to behave unpredictably and is therefore
classified as IRREGULAR. classified as IRREGULAR.
Appendix B. Compressor Implementation Guidelines Appendix B. Compressor Implementation Guidelines
This section describes some guiding principles for implementing a This section describes some guiding principles for implementing a
ROHCv2 compressor with focus on how to efficiently select appropriate ROHCv2 compressor with focus on how to efficiently select appropriate
packet formats. All the text in this appendix should be considered packet formats. The text in this appendix should be considered
guidelines and they have no normative impact on how a ROHCv2 guidelines; it does not define any normative requirement on how
implementation must be realized. ROHCv2 profiles are implemented.
Appendix B.1. Reference Management Appendix B.1. Reference Management
The compressor usually maintains a sliding window of reference The compressor usually maintains a sliding window of reference
headers which contains as many references as needed for the headers which contains as many references as needed for the
optimistic approach. Each reference contains a description of which optimistic approach. Each reference contains a description of which
changes occured in the flow between two consecutive headers in the changes occurred in the flow between two consecutive headers in the
flow, and a new reference is inserted into the window each time a flow, and a new reference is inserted into the window each time a
packet is compressed by this context. A reference may for example be packet is compressed by this context. A reference may for example be
implemented as a stored copy of the uncompressed header being implemented as a stored copy of the uncompressed header being
represented. When the compressor is confident that a specific represented. When the compressor is confident that a specific
reference is no longer used by the decompressor (for example by using reference is no longer used by the decompressor (for example by using
the optimistic approach or feedback received), the reference is the optimistic approach or feedback received), the reference is
removed from the sliding window. removed from the sliding window.
Appendix B.2. Window-based LSB Encoding (W-LSB) Appendix B.2. Window-based LSB Encoding (W-LSB)
Section 5.1.1 describes how the optimistic approach impacts the Section 5.1.1 describes how the optimistic approach impacts the
packet format selection for the compressor. Exactly how the packet format selection for the compressor. Exactly how the
compressor selects packet format is up to the implementation to compressor selects a packet format is up to the implementation to
decide, but the following is an example of how this process can be decide, but the following is an example of how this process can be
performed for LSB-encoded fields, though the use of Window-based LSB performed for lsb-encoded fields, through the use of Window-based LSB
encoding (W-LSB). encoding (W-LSB).
When using W-LSB encoding, the compressor uses a number of references With W-LSB encoding, the compressor uses a number of references (a
from its context decided by its optimistic approach and extracts the window) from its context. What references to use is determined by
value of the field to be encoded from each reference and finds the its optimistic approach. The compressor extracts the value of the
maximum and minimum values. When having obtained these limits, the field to be W-LSB encoded from each reference in the window, and
compressor assumes that the decompressor is currently using a value finds the maximum and minimum values. Once it determines these
in the range from the minimum to the maximum value (inclusive) as its values, the compressor uses the assumption that the decompressor has
reference. The compressor should then select a number of LSBs of the a value for this field within the range given by these boundaries
new value so that these can be decompressed both if the decompressor (inclusively) as its reference. The compressor can then select a
has the minimum value or the maximum value as its current reference. number of LSBs from the value to be compressed, so that the LSBs can
be decompressed no matter if the decompressor uses the minimum value,
the maximum value or any other value in the range of possible
references.
Appendix B.3. W-LSB Encoding and Timer-based Compression Appendix B.3. W-LSB Encoding and Timer-based Compression
Section 6.6.9 defines decompressor behavior for timer-based RTP Section 6.6.9 defines decompressor behavior for timer-based RTP
timestamp compression. This section gives guidelines on how the timestamp compression. This section gives guidelines on how the
compressor should select how many bits of timestamp LSBs need to compressor should determine the number of LSB bits it should send for
transmitted. When using timer-based compression, the number of bits the timestamp field. When using timer-based compression, this number
to transmit depend on the amount of jitter both before the compressor depends on the sum of the jitter before the compressor and the jitter
and the jitter between compressor and decompressor. The jitter between compressor and decompressor.
before the compressor can be estimated using the following
The jitter before the compressor can be estimated using the following
computation: computation:
Max_Jitter_BC = Max_Jitter_BC =
max {|(T_n - T_j) - ((a_n - a_j) / time_stride)|, max {|(T_n - T_j) - ((a_n - a_j) / time_stride)|,
for all headers j in the sliding window} for all headers j in the sliding window}
Where (T_n - T_j) is the difference in timestamp between the Where (T_n - T_j) is the difference in timestamp between the
currently compressed header and a reference header and (a_n - a_j) is currently compressed header and a reference header and (a_n - a_j) is
the difference in arrival time between those same two headers. the difference in arrival time between those same two headers.
In addition to this, the compressor needs to estimate an upper bound In addition to this, the compressor needs to estimate an upper bound
for the jitter between compressor and decompressor (Max_Jitter_CD). for the jitter between compressor and decompressor (Max_Jitter_CD).
This information may for example come from lower layers, but if such This information may for example come from lower layers.
information is not available, the compressor should use an upper
bound which is significantly higher than the link roundtrip time. A compressor implementation can determine whether the difference in
clock resolution between compressor and decompressor induces an error
when performing integer arithmetics; it can then treat this error as
additional jitter.
After obtaining estimates for the jitters, the number of bits needed After obtaining estimates for the jitters, the number of bits needed
to transmit is obtained using the following calculation: to transmit is obtained using the following calculation:
ceiling(log2(2 * (Max_Jitter_BC + Max_Jitter_CD + 2) + 1) ceiling(log2(2 * (Max_Jitter_BC + Max_Jitter_CD + 2) + 1)
This number is then used to select a packet format which contains at This number is then used to select a packet format which contains at
least this many scaled timestamp bits. least this many scaled timestamp bits.
Authors' Addresses Authors' Addresses
 End of changes. 290 change blocks. 
772 lines changed or deleted 805 lines changed or added

This html diff was produced by rfcdiff 1.34. The latest version is available from http://tools.ietf.org/tools/rfcdiff/