Network Working Group                 C. Bormann, Editor, TZI/Uni Bremen
Request for Comments: 3095                     C. Burmeister, Matsushita
Category: Standards Track                 M. Degermark, Univ. of Arizona
                                                H. Fukushima, Matsushita
                                                      H. Hannu, Ericsson
                                                  L-E. Jonsson, Ericsson
                                                R. Hakenberg, Matsushita
                                                         T. Koren, Cisco
                                                            K. Le, Nokia
                                                           Z. Liu, Nokia
                                                 A. Martensson, Ericsson
                                                 A. Miyazaki, Matsushita
                                                    K. Svanbro, Ericsson
                                                   T. Wiebke, Matsushita
                                                T. Yoshimura, NTT DoCoMo
                                                         H. Zheng, Nokia
                                                               July 2001
        
Network Working Group                 C. Bormann, Editor, TZI/Uni Bremen
Request for Comments: 3095                     C. Burmeister, Matsushita
Category: Standards Track                 M. Degermark, Univ. of Arizona
                                                H. Fukushima, Matsushita
                                                      H. Hannu, Ericsson
                                                  L-E. Jonsson, Ericsson
                                                R. Hakenberg, Matsushita
                                                         T. Koren, Cisco
                                                            K. Le, Nokia
                                                           Z. Liu, Nokia
                                                 A. Martensson, Ericsson
                                                 A. Miyazaki, Matsushita
                                                    K. Svanbro, Ericsson
                                                   T. Wiebke, Matsushita
                                                T. Yoshimura, NTT DoCoMo
                                                         H. Zheng, Nokia
                                                               July 2001
        

RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed

健壮的头压缩(ROHC):框架和四个配置文件:RTP、UDP、ESP和未压缩

Status of this Memo

本备忘录的状况

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2001). All Rights Reserved.

版权所有(C)互联网协会(2001年)。版权所有。

Abstract

摘要

This document specifies a highly robust and efficient header compression scheme for RTP/UDP/IP (Real-Time Transport Protocol, User Datagram Protocol, Internet Protocol), UDP/IP, and ESP/IP (Encapsulating Security Payload) headers.

本文档为RTP/UDP/IP(实时传输协议、用户数据报协议、互联网协议)、UDP/IP和ESP/IP(封装安全有效负载)报头指定了一种高度健壮和高效的报头压缩方案。

Existing header compression schemes do not work well when used over links with significant error rates and long round-trip times. For many bandwidth limited links where header compression is essential, such characteristics are common.

现有的报头压缩方案在错误率高、往返时间长的链路上使用时效果不佳。对于许多带宽有限的链路,报头压缩是必不可少的,这样的特性很常见。

This is done in a framework designed to be extensible. For example, a scheme for compressing TCP/IP headers will be simple to add, and is in development. Headers specific to Mobile IPv4 are not subject to special treatment, but are expected to be compressed sufficiently well by the provided methods for compression of sequences of extension headers and tunneling headers. For the most part, the same will apply to work in progress on Mobile IPv6, but future work might be required to handle some extension headers, when a standards track Mobile IPv6 has been completed.

这是在设计为可扩展的框架中完成的。例如,压缩TCP/IP头的方案将易于添加,并且正在开发中。特定于移动IPv4的报头不受特殊处理,但通过所提供的用于压缩扩展报头和隧道报头序列的方法,可以充分压缩。在大多数情况下,这同样适用于正在进行的移动IPv6工作,但在标准跟踪移动IPv6完成后,可能需要进一步处理一些扩展头。

Table of Contents

目录

   1.  Introduction....................................................6
   2.  Terminology.....................................................8
   2.1.  Acronyms.....................................................13
   3.  Background.....................................................14
   3.1.  Header compression fundamentals..............................14
   3.2.  Existing header compression schemes..........................14
   3.3.  Requirements on a new header compression scheme..............16
   3.4.  Classification of header fields..............................17
   4.  Header compression framework...................................18
   4.1.  Operating assumptions........................................18
   4.2.  Dynamicity...................................................19
   4.3.  Compression and decompression states.........................21
   4.3.1.  Compressor states..........................................21
   4.3.1.1.  Initialization and Refresh (IR) State....................22
   4.3.1.2.  First Order (FO) State...................................22
   4.3.1.3.  Second Order (SO) State..................................22
   4.3.2.  Decompressor states........................................23
   4.4.  Modes of operation...........................................23
   4.4.1.  Unidirectional mode -- U-mode..............................24
   4.4.2.  Bidirectional Optimistic mode -- O-mode....................25
   4.4.3.  Bidirectional Reliable mode -- R-mode......................25
   4.5.  Encoding methods.............................................25
   4.5.1.  Least Significant Bits (LSB) encoding .....................25
   4.5.2.  Window-based LSB encoding (W-LSB encoding).................28
   4.5.3.  Scaled RTP Timestamp encoding .............................28
   4.5.4.  Timer-based compression of RTP Timestamp...................31
   4.5.5.  Offset IP-ID encoding......................................34
   4.5.6.  Self-describing variable-length values ....................35
   4.5.7.  Encoded values across several fields in compressed headers 36
   4.6.  Errors caused by residual errors.............................36
   4.7.  Impairment considerations....................................37
   5.  The protocol...................................................39
   5.1.  Data structures..............................................39
   5.1.1.  Per-channel parameters.....................................39
   5.1.2.  Per-context parameters, profiles...........................40
   5.1.3.  Contexts and context identifiers ..........................41
        
   1.  Introduction....................................................6
   2.  Terminology.....................................................8
   2.1.  Acronyms.....................................................13
   3.  Background.....................................................14
   3.1.  Header compression fundamentals..............................14
   3.2.  Existing header compression schemes..........................14
   3.3.  Requirements on a new header compression scheme..............16
   3.4.  Classification of header fields..............................17
   4.  Header compression framework...................................18
   4.1.  Operating assumptions........................................18
   4.2.  Dynamicity...................................................19
   4.3.  Compression and decompression states.........................21
   4.3.1.  Compressor states..........................................21
   4.3.1.1.  Initialization and Refresh (IR) State....................22
   4.3.1.2.  First Order (FO) State...................................22
   4.3.1.3.  Second Order (SO) State..................................22
   4.3.2.  Decompressor states........................................23
   4.4.  Modes of operation...........................................23
   4.4.1.  Unidirectional mode -- U-mode..............................24
   4.4.2.  Bidirectional Optimistic mode -- O-mode....................25
   4.4.3.  Bidirectional Reliable mode -- R-mode......................25
   4.5.  Encoding methods.............................................25
   4.5.1.  Least Significant Bits (LSB) encoding .....................25
   4.5.2.  Window-based LSB encoding (W-LSB encoding).................28
   4.5.3.  Scaled RTP Timestamp encoding .............................28
   4.5.4.  Timer-based compression of RTP Timestamp...................31
   4.5.5.  Offset IP-ID encoding......................................34
   4.5.6.  Self-describing variable-length values ....................35
   4.5.7.  Encoded values across several fields in compressed headers 36
   4.6.  Errors caused by residual errors.............................36
   4.7.  Impairment considerations....................................37
   5.  The protocol...................................................39
   5.1.  Data structures..............................................39
   5.1.1.  Per-channel parameters.....................................39
   5.1.2.  Per-context parameters, profiles...........................40
   5.1.3.  Contexts and context identifiers ..........................41
        
   5.2.  ROHC packets and packet types................................41
   5.2.1.  ROHC feedback .............................................43
   5.2.2.  ROHC feedback format ......................................45
   5.2.3.  ROHC IR packet type .......................................47
   5.2.4.  ROHC IR-DYN packet type ...................................48
   5.2.5.  ROHC segmentation..........................................49
   5.2.5.1.  Segmentation usage considerations........................49
   5.2.5.2.  Segmentation protocol....................................50
   5.2.6.  ROHC initial decompressor processing.......................51
   5.2.7.  ROHC RTP packet formats from compressor to decompressor....53
   5.2.8.  Parameters needed for mode transition in ROHC RTP..........54
   5.3.  Operation in Unidirectional mode.............................55
   5.3.1.  Compressor states and logic (U-mode).......................55
   5.3.1.1.  State transition logic (U-mode)..........................55
   5.3.1.1.1.  Optimistic approach, upwards transition................55
   5.3.1.1.2.  Timeouts, downward transition..........................56
   5.3.1.1.3.  Need for updates, downward transition..................56
   5.3.1.2.  Compression logic and packets used (U-mode)..............56
   5.3.1.3.  Feedback in Unidirectional mode..........................56
   5.3.2.  Decompressor states and logic (U-mode).....................56
   5.3.2.1.  State transition logic (U-mode)..........................57
   5.3.2.2.  Decompression logic (U-mode).............................57
   5.3.2.2.1.  Decide whether decompression is allowed................57
   5.3.2.2.2.  Reconstruct and verify the header......................57
   5.3.2.2.3.  Actions upon CRC failure...............................58
   5.3.2.2.4.  Correction of SN LSB wraparound........................60
   5.3.2.2.5.  Repair of incorrect SN updates.........................61
   5.3.2.3.  Feedback in Unidirectional mode..........................62
   5.4.  Operation in Bidirectional Optimistic mode...................62
   5.4.1.  Compressor states and logic (O-mode).......................62
   5.4.1.1.  State transition logic...................................63
   5.4.1.1.1.  Negative acknowledgments (NACKs), downward transition..63
   5.4.1.1.2.  Optional acknowledgments, upwards transition...........63
   5.4.1.2.  Compression logic and packets used.......................63
   5.4.2.  Decompressor states and logic (O-mode).....................64
   5.4.2.1.  Decompression logic, timer-based timestamp decompression.64
   5.4.2.2.  Feedback logic (O-mode)..................................64
   5.5.  Operation in Bidirectional Reliable mode.....................65
   5.5.1.  Compressor states and logic (R-mode).......................65
   5.5.1.1.  State transition logic (R-mode)..........................65
   5.5.1.1.1.  Upwards transition.....................................65
   5.5.1.1.2.  Downward transition....................................66
   5.5.1.2.  Compression logic and packets used (R-mode)..............66
   5.5.2.  Decompressor states and logic (R-mode).....................68
   5.5.2.1.  Decompression logic (R-mode).............................68
   5.5.2.2.  Feedback logic (R-mode)..................................68
   5.6.  Mode transitions.............................................69
   5.6.1.  Compression and decompression during mode transitions......70
        
   5.2.  ROHC packets and packet types................................41
   5.2.1.  ROHC feedback .............................................43
   5.2.2.  ROHC feedback format ......................................45
   5.2.3.  ROHC IR packet type .......................................47
   5.2.4.  ROHC IR-DYN packet type ...................................48
   5.2.5.  ROHC segmentation..........................................49
   5.2.5.1.  Segmentation usage considerations........................49
   5.2.5.2.  Segmentation protocol....................................50
   5.2.6.  ROHC initial decompressor processing.......................51
   5.2.7.  ROHC RTP packet formats from compressor to decompressor....53
   5.2.8.  Parameters needed for mode transition in ROHC RTP..........54
   5.3.  Operation in Unidirectional mode.............................55
   5.3.1.  Compressor states and logic (U-mode).......................55
   5.3.1.1.  State transition logic (U-mode)..........................55
   5.3.1.1.1.  Optimistic approach, upwards transition................55
   5.3.1.1.2.  Timeouts, downward transition..........................56
   5.3.1.1.3.  Need for updates, downward transition..................56
   5.3.1.2.  Compression logic and packets used (U-mode)..............56
   5.3.1.3.  Feedback in Unidirectional mode..........................56
   5.3.2.  Decompressor states and logic (U-mode).....................56
   5.3.2.1.  State transition logic (U-mode)..........................57
   5.3.2.2.  Decompression logic (U-mode).............................57
   5.3.2.2.1.  Decide whether decompression is allowed................57
   5.3.2.2.2.  Reconstruct and verify the header......................57
   5.3.2.2.3.  Actions upon CRC failure...............................58
   5.3.2.2.4.  Correction of SN LSB wraparound........................60
   5.3.2.2.5.  Repair of incorrect SN updates.........................61
   5.3.2.3.  Feedback in Unidirectional mode..........................62
   5.4.  Operation in Bidirectional Optimistic mode...................62
   5.4.1.  Compressor states and logic (O-mode).......................62
   5.4.1.1.  State transition logic...................................63
   5.4.1.1.1.  Negative acknowledgments (NACKs), downward transition..63
   5.4.1.1.2.  Optional acknowledgments, upwards transition...........63
   5.4.1.2.  Compression logic and packets used.......................63
   5.4.2.  Decompressor states and logic (O-mode).....................64
   5.4.2.1.  Decompression logic, timer-based timestamp decompression.64
   5.4.2.2.  Feedback logic (O-mode)..................................64
   5.5.  Operation in Bidirectional Reliable mode.....................65
   5.5.1.  Compressor states and logic (R-mode).......................65
   5.5.1.1.  State transition logic (R-mode)..........................65
   5.5.1.1.1.  Upwards transition.....................................65
   5.5.1.1.2.  Downward transition....................................66
   5.5.1.2.  Compression logic and packets used (R-mode)..............66
   5.5.2.  Decompressor states and logic (R-mode).....................68
   5.5.2.1.  Decompression logic (R-mode).............................68
   5.5.2.2.  Feedback logic (R-mode)..................................68
   5.6.  Mode transitions.............................................69
   5.6.1.  Compression and decompression during mode transitions......70
        
   5.6.2.  Transition from Unidirectional to Optimistic mode..........71
   5.6.3.  From Optimistic to Reliable mode...........................72
   5.6.4.  From Unidirectional to Reliable mode.......................72
   5.6.5.  From Reliable to Optimistic mode...........................72
   5.6.6.  Transition to Unidirectional mode..........................73
   5.7.  Packet formats...............................................74
   5.7.1.  Packet type 0: UO-0, R-0, R-0-CRC .........................78
   5.7.2.  Packet type 1 (R-mode): R-1, R-1-TS, R-1-ID ...............79
   5.7.3.  Packet type 1 (U/O-mode): UO-1, UO-1-ID, UO-1-TS ..........80
   5.7.4.  Packet type 2: UOR-2 ......................................82
   5.7.5.  Extension formats..........................................83
   5.7.5.1.  RND flags and packet types...............................88
   5.7.5.2.  Flags/Fields in context..................................89
   5.7.6.  Feedback packets and formats...............................90
   5.7.6.1.  Feedback formats for ROHC RTP............................90
   5.7.6.2.  ROHC RTP Feedback options................................91
   5.7.6.3.  The CRC option...........................................92
   5.7.6.4.  The REJECT option........................................92
   5.7.6.5.  The SN-NOT-VALID option..................................92
   5.7.6.6.  The SN option............................................93
   5.7.6.7.  The CLOCK option.........................................93
   5.7.6.8.  The JITTER option........................................93
   5.7.6.9.  The LOSS option..........................................94
   5.7.6.10.  Unknown option types....................................94
   5.7.6.11.  RTP feedback example....................................94
   5.7.7.  RTP IR and IR-DYN packets..................................96
   5.7.7.1.  Basic structure of the IR packet.........................96
   5.7.7.2.  Basic structure of the IR-DYN packet.....................98
   5.7.7.3.  Initialization of IPv6 Header [IPv6].....................99
   5.7.7.4.  Initialization of IPv4 Header [IPv4, section 3.1].......100
   5.7.7.5.  Initialization of UDP Header [RFC-768]..................101
   5.7.7.6.  Initialization of RTP Header [RTP]......................102
   5.7.7.7.  Initialization of ESP Header [ESP, section 2]...........103
   5.7.7.8.  Initialization of Other Headers.........................104
   5.8.  List compression............................................104
   5.8.1.  Table-based item compression..............................105
   5.8.1.1.  Translation table in R-mode.............................105
   5.8.1.2.  Translation table in U/O-modes..........................106
   5.8.2.  Reference list determination..............................106
   5.8.2.1.  Reference list in R-mode and U/O-mode...................107
   5.8.3.  Encoding schemes for the compressed list..................109
   5.8.4.  Special handling of IP extension headers..................112
   5.8.4.1.  Next Header field.......................................112
   5.8.4.2.  Authentication Header (AH)..............................114
   5.8.4.3.  Encapsulating Security Payload Header (ESP).............115
   5.8.4.4.  GRE Header [RFC 2784, RFC 2890].........................117
   5.8.5.  Format of compressed lists in Extension 3.................119
   5.8.5.1.  Format of IP Extension Header(s) field..................119
        
   5.6.2.  Transition from Unidirectional to Optimistic mode..........71
   5.6.3.  From Optimistic to Reliable mode...........................72
   5.6.4.  From Unidirectional to Reliable mode.......................72
   5.6.5.  From Reliable to Optimistic mode...........................72
   5.6.6.  Transition to Unidirectional mode..........................73
   5.7.  Packet formats...............................................74
   5.7.1.  Packet type 0: UO-0, R-0, R-0-CRC .........................78
   5.7.2.  Packet type 1 (R-mode): R-1, R-1-TS, R-1-ID ...............79
   5.7.3.  Packet type 1 (U/O-mode): UO-1, UO-1-ID, UO-1-TS ..........80
   5.7.4.  Packet type 2: UOR-2 ......................................82
   5.7.5.  Extension formats..........................................83
   5.7.5.1.  RND flags and packet types...............................88
   5.7.5.2.  Flags/Fields in context..................................89
   5.7.6.  Feedback packets and formats...............................90
   5.7.6.1.  Feedback formats for ROHC RTP............................90
   5.7.6.2.  ROHC RTP Feedback options................................91
   5.7.6.3.  The CRC option...........................................92
   5.7.6.4.  The REJECT option........................................92
   5.7.6.5.  The SN-NOT-VALID option..................................92
   5.7.6.6.  The SN option............................................93
   5.7.6.7.  The CLOCK option.........................................93
   5.7.6.8.  The JITTER option........................................93
   5.7.6.9.  The LOSS option..........................................94
   5.7.6.10.  Unknown option types....................................94
   5.7.6.11.  RTP feedback example....................................94
   5.7.7.  RTP IR and IR-DYN packets..................................96
   5.7.7.1.  Basic structure of the IR packet.........................96
   5.7.7.2.  Basic structure of the IR-DYN packet.....................98
   5.7.7.3.  Initialization of IPv6 Header [IPv6].....................99
   5.7.7.4.  Initialization of IPv4 Header [IPv4, section 3.1].......100
   5.7.7.5.  Initialization of UDP Header [RFC-768]..................101
   5.7.7.6.  Initialization of RTP Header [RTP]......................102
   5.7.7.7.  Initialization of ESP Header [ESP, section 2]...........103
   5.7.7.8.  Initialization of Other Headers.........................104
   5.8.  List compression............................................104
   5.8.1.  Table-based item compression..............................105
   5.8.1.1.  Translation table in R-mode.............................105
   5.8.1.2.  Translation table in U/O-modes..........................106
   5.8.2.  Reference list determination..............................106
   5.8.2.1.  Reference list in R-mode and U/O-mode...................107
   5.8.3.  Encoding schemes for the compressed list..................109
   5.8.4.  Special handling of IP extension headers..................112
   5.8.4.1.  Next Header field.......................................112
   5.8.4.2.  Authentication Header (AH)..............................114
   5.8.4.3.  Encapsulating Security Payload Header (ESP).............115
   5.8.4.4.  GRE Header [RFC 2784, RFC 2890].........................117
   5.8.5.  Format of compressed lists in Extension 3.................119
   5.8.5.1.  Format of IP Extension Header(s) field..................119
        
   5.8.5.2.  Format of Compressed CSRC List..........................120
   5.8.6.  Compressed list formats...................................120
   5.8.6.1.  Encoding Type 0 (generic scheme)........................120
   5.8.6.2.  Encoding Type 1 (insertion only scheme).................122
   5.8.6.3.  Encoding Type 2 (removal only scheme)...................123
   5.8.6.4.  Encoding Type 3 (remove then insert scheme).............124
   5.8.7.  CRC coverage for extension headers........................124
   5.9.  Header compression CRCs, coverage and polynomials...........125
   5.9.1.  IR and IR-DYN packet CRCs.................................125
   5.9.2.  CRCs in compressed headers................................125
   5.10.  ROHC UNCOMPRESSED -- no compression (Profile 0x0000).......126
   5.10.1.  IR packet................................................126
   5.10.2.  Normal packet............................................127
   5.10.3.  States and modes.........................................128
   5.10.4.  Feedback.................................................129
   5.11.  ROHC UDP -- non-RTP UDP/IP compression (Profile 0x0002)....129
   5.11.1.  Initialization...........................................130
   5.11.2.  States and modes.........................................130
   5.11.3.  Packet types.............................................131
   5.11.4.  Extensions...............................................132
   5.11.5.  IP-ID....................................................133
   5.11.6.  Feedback.................................................133
   5.12.  ROHC ESP -- ESP/IP compression (Profile 0x0003)............133
   5.12.1.  Initialization...........................................133
   5.12.2.  Packet types.............................................134
   6.  Implementation issues.........................................134
   6.1.  Reverse decompression.......................................134
   6.2.  RTCP........................................................135
   6.3.  Implementation parameters and signals.......................136
   6.3.1.  ROHC implementation parameters at compressor..............137
   6.3.2.  ROHC implementation parameters at decompressor............138
   6.4.  Handling of resource limitations at the decompressor........139
   6.5.  Implementation structures...................................139
   6.5.1.  Compressor context........................................139
   6.5.2.  Decompressor context......................................141
   6.5.3.  List compression: Sliding windows in R-mode and U/O-mode..142
   7.  Security Considerations.......................................143
   8.  IANA Considerations...........................................144
   9.  Acknowledgments...............................................145
   10.  Intellectual Property Right Claim Considerations.............145
   11.  References...................................................146
   11.1.  Normative References.......................................146
   11.2.  Informative References.....................................147
   12.  Authors' Addresses...........................................148
   Appendix A.  Detailed classification of header fields.............152
   A.1.  General classification......................................153
   A.1.1.  IPv6 header fields........................................153
   A.1.2.  IPv4 header fields........................................155
        
   5.8.5.2.  Format of Compressed CSRC List..........................120
   5.8.6.  Compressed list formats...................................120
   5.8.6.1.  Encoding Type 0 (generic scheme)........................120
   5.8.6.2.  Encoding Type 1 (insertion only scheme).................122
   5.8.6.3.  Encoding Type 2 (removal only scheme)...................123
   5.8.6.4.  Encoding Type 3 (remove then insert scheme).............124
   5.8.7.  CRC coverage for extension headers........................124
   5.9.  Header compression CRCs, coverage and polynomials...........125
   5.9.1.  IR and IR-DYN packet CRCs.................................125
   5.9.2.  CRCs in compressed headers................................125
   5.10.  ROHC UNCOMPRESSED -- no compression (Profile 0x0000).......126
   5.10.1.  IR packet................................................126
   5.10.2.  Normal packet............................................127
   5.10.3.  States and modes.........................................128
   5.10.4.  Feedback.................................................129
   5.11.  ROHC UDP -- non-RTP UDP/IP compression (Profile 0x0002)....129
   5.11.1.  Initialization...........................................130
   5.11.2.  States and modes.........................................130
   5.11.3.  Packet types.............................................131
   5.11.4.  Extensions...............................................132
   5.11.5.  IP-ID....................................................133
   5.11.6.  Feedback.................................................133
   5.12.  ROHC ESP -- ESP/IP compression (Profile 0x0003)............133
   5.12.1.  Initialization...........................................133
   5.12.2.  Packet types.............................................134
   6.  Implementation issues.........................................134
   6.1.  Reverse decompression.......................................134
   6.2.  RTCP........................................................135
   6.3.  Implementation parameters and signals.......................136
   6.3.1.  ROHC implementation parameters at compressor..............137
   6.3.2.  ROHC implementation parameters at decompressor............138
   6.4.  Handling of resource limitations at the decompressor........139
   6.5.  Implementation structures...................................139
   6.5.1.  Compressor context........................................139
   6.5.2.  Decompressor context......................................141
   6.5.3.  List compression: Sliding windows in R-mode and U/O-mode..142
   7.  Security Considerations.......................................143
   8.  IANA Considerations...........................................144
   9.  Acknowledgments...............................................145
   10.  Intellectual Property Right Claim Considerations.............145
   11.  References...................................................146
   11.1.  Normative References.......................................146
   11.2.  Informative References.....................................147
   12.  Authors' Addresses...........................................148
   Appendix A.  Detailed classification of header fields.............152
   A.1.  General classification......................................153
   A.1.1.  IPv6 header fields........................................153
   A.1.2.  IPv4 header fields........................................155
        
   A.1.3.  UDP header fields.........................................157
   A.1.4.  RTP header fields.........................................157
   A.1.5.  Summary for IP/UDP/RTP....................................159
   A.2.  Analysis of change patterns of header fields................159
   A.2.1.  IPv4 Identification.......................................162
   A.2.2.  IP Traffic-Class / Type-Of-Service........................163
   A.2.3.  IP Hop-Limit / Time-To-Live...............................163
   A.2.4.  UDP Checksum..............................................163
   A.2.5.  RTP CSRC Counter..........................................164
   A.2.6.  RTP Marker................................................164
   A.2.7.  RTP Payload Type..........................................164
   A.2.8.  RTP Sequence Number.......................................164
   A.2.9.  RTP Timestamp.............................................164
   A.2.10.  RTP Contributing Sources (CSRC)..........................165
   A.3.  Header compression strategies...............................165
   A.3.1.  Do not send at all........................................165
   A.3.2.  Transmit only initially...................................165
   A.3.3.  Transmit initially, but be prepared to update.............166
   A.3.4.  Be prepared to update or send as-is frequently............166
   A.3.5.  Guarantee continuous robustness...........................166
   A.3.6.  Transmit as-is in all packets.............................167
   A.3.7.  Establish and be prepared to update delta.................167
   Full Copyright Statement..........................................168
        
   A.1.3.  UDP header fields.........................................157
   A.1.4.  RTP header fields.........................................157
   A.1.5.  Summary for IP/UDP/RTP....................................159
   A.2.  Analysis of change patterns of header fields................159
   A.2.1.  IPv4 Identification.......................................162
   A.2.2.  IP Traffic-Class / Type-Of-Service........................163
   A.2.3.  IP Hop-Limit / Time-To-Live...............................163
   A.2.4.  UDP Checksum..............................................163
   A.2.5.  RTP CSRC Counter..........................................164
   A.2.6.  RTP Marker................................................164
   A.2.7.  RTP Payload Type..........................................164
   A.2.8.  RTP Sequence Number.......................................164
   A.2.9.  RTP Timestamp.............................................164
   A.2.10.  RTP Contributing Sources (CSRC)..........................165
   A.3.  Header compression strategies...............................165
   A.3.1.  Do not send at all........................................165
   A.3.2.  Transmit only initially...................................165
   A.3.3.  Transmit initially, but be prepared to update.............166
   A.3.4.  Be prepared to update or send as-is frequently............166
   A.3.5.  Guarantee continuous robustness...........................166
   A.3.6.  Transmit as-is in all packets.............................167
   A.3.7.  Establish and be prepared to update delta.................167
   Full Copyright Statement..........................................168
        
1. Introduction
1. 介绍

During the last five years, two communication technologies in particular have become commonly used by the general public: cellular telephony and the Internet. Cellular telephony has provided its users with the revolutionary possibility of always being reachable with reasonable service quality no matter where they are. The main service provided by the dedicated terminals has been speech. The Internet, on the other hand, has from the beginning been designed for multiple services and its flexibility for all kinds of usage has been one of its strengths. Internet terminals have usually been general-purpose and have been attached over fixed connections. The experienced quality of some services (such as Internet telephony) has sometimes been low.

在过去五年中,有两种通信技术特别为公众所普遍使用:蜂窝电话和互联网。蜂窝电话技术为其用户提供了革命性的可能性,无论他们身在何处,都能以合理的服务质量随时联系到他们。专用终端提供的主要服务是语音。另一方面,互联网从一开始就是为多种服务而设计的,它对各种用途的灵活性是它的优势之一。互联网终端通常是通用的,通过固定连接连接。一些服务(如互联网电话)的经验质量有时很低。

Today, IP telephony is gaining momentum thanks to improved technical solutions. It seems reasonable to believe that in the years to come, IP will become a commonly used way to carry telephony. Some future cellular telephony links might also be based on IP and IP telephony. Cellular phones may have become more general-purpose, and may have IP stacks supporting not only audio and video, but also web browsing, email, gaming, etc.

今天,由于技术解决方案的改进,IP电话正在获得发展势头。似乎有理由相信,在未来几年里,IP将成为一种普遍使用的承载电话的方式。一些未来的蜂窝电话链路也可能基于IP和IP电话。手机可能已经变得更加通用,并且可能具有IP堆栈,不仅支持音频和视频,还支持网络浏览、电子邮件、游戏等。

One of the scenarios we are envisioning might then be the one in Figure 1.1, where two mobile terminals are communicating with each other. Both are connected to base stations over cellular links, and the base stations are connected to each other through a wired (or possibly wireless) network. Instead of two mobile terminals, there could of course be one mobile and one wired terminal, but the case with two cellular links is technically more demanding.

我们设想的场景之一可能是图1.1中的场景,其中两个移动终端正在相互通信。两者都通过蜂窝链路连接到基站,并且基站通过有线(或可能是无线)网络彼此连接。当然可以有一个移动终端和一个有线终端,而不是两个移动终端,但是两个蜂窝链路的情况在技术上要求更高。

Mobile Base Base Mobile Terminal Station Station Terminal

移动基站移动终端

         |  ~   ~   ~  \ /                       \ /  ~   ~   ~   ~  |
         |              |                         |                  |
      +--+              |                         |               +--+
      |  |              |                         |               |  |
      |  |              |                         |               |  |
      +--+              |                         |               +--+
                        |                         |
                        |=========================|
        
         |  ~   ~   ~  \ /                       \ /  ~   ~   ~   ~  |
         |              |                         |                  |
      +--+              |                         |               +--+
      |  |              |                         |               |  |
      |  |              |                         |               |  |
      +--+              |                         |               +--+
                        |                         |
                        |=========================|
        

Cellular Wired Cellular Link Network Link

蜂窝有线蜂窝链路网络链路

Figure 1.1 : Scenario for IP telephony over cellular links

图1.1:蜂窝链路上的IP电话场景

It is obvious that the wired network can be IP-based. With the cellular links, the situation is less clear. IP could be terminated in the fixed network, and special solutions implemented for each supported service over the cellular link. However, this would limit the flexibility of the services supported. If technically and economically feasible, a solution with pure IP all the way from terminal to terminal would have certain advantages. However, to make this a viable alternative, a number of problems have to be addressed, in particular problems regarding bandwidth efficiency.

显然,有线网络可以是基于IP的。有了蜂窝链路,情况就不那么清楚了。IP可以在固定网络中终止,并通过蜂窝链路为每个受支持的服务实施特殊解决方案。然而,这将限制所支持服务的灵活性。如果在技术上和经济上可行,一个从一个终端到另一个终端都使用纯IP的解决方案将具有一定的优势。然而,要使其成为可行的替代方案,必须解决许多问题,特别是有关带宽效率的问题。

For cellular phone systems, it is of vital importance to use the scarce radio resources in an efficient way. A sufficient number of users per cell is crucial, otherwise deployment costs will be prohibitive. The quality of the voice service should also be as good as in today's cellular systems. It is likely that even with support for new services, lower quality of the voice service is acceptable only if costs are significantly reduced.

对于移动电话系统来说,有效利用稀缺的无线资源至关重要。每个单元有足够数量的用户是至关重要的,否则部署成本将过高。语音服务的质量也应该和今天的蜂窝系统一样好。即使有了对新服务的支持,只有在成本显著降低的情况下,较低的语音服务质量也是可以接受的。

A problem with IP over cellular links when used for interactive voice conversations is the large header overhead. Speech data for IP telephony will most likely be carried by RTP [RTP]. A packet will then, in addition to link layer framing, have an IP [IPv4] header (20 octets), a UDP [UDP] header (8 octets), and an RTP header (12 octets) for a total of 40 octets. With IPv6 [IPv6], the IP header is 40 octets for a total of 60 octets. The size of the payload depends on the speech coding and frame sizes being used and may be as low as 15-20 octets.

当用于交互式语音对话时,IP over cellular链路存在一个问题,即头部开销过大。IP电话的语音数据很可能由RTP[RTP]承载。然后,除了链路层帧之外,数据包还将具有IP[IPv4]报头(20个八位字节)、UDP[UDP]报头(8个八位字节)和RTP报头(12个八位字节),总共有40个八位字节。对于IPv6[IPv6],IP头是40个八位字节,总共60个八位字节。有效载荷的大小取决于所使用的语音编码和帧大小,可以低至15-20个八位字节。

From these numbers, the need for reducing header sizes for efficiency reasons is obvious. However, cellular links have characteristics that make header compression as defined in [IPHC,CRTP] perform less than well. The most important characteristic is the lossy behavior of cellular links, where a bit error rate (BER) as high as 1e-3 must be accepted to keep the radio resources efficiently utilized. In severe operating situations, the BER can be as high as 1e-2. The other problematic characteristic is the long round-trip time (RTT) of the cellular link, which can be as high as 100-200 milliseconds. An additional problem is that the residual BER is nontrivial, i.e., lower layers can sometimes deliver frames containing undetected errors. A viable header compression scheme for cellular links must be able to handle loss on the link between the compression and decompression point as well as loss before the compression point.

从这些数字来看,出于效率原因而减少收割台尺寸的必要性是显而易见的。然而,蜂窝链路的特性使得[IPHC,CRTP]中定义的报头压缩性能不佳。最重要的特征是蜂窝链路的有损行为,其中必须接受高达1e-3的误码率(BER)以保持无线电资源的有效利用。在严重的操作情况下,误码率可高达1e-2。另一个有问题的特征是蜂窝链路的长往返时间(RTT),可能高达100-200毫秒。另一个问题是,剩余误码率是不常见的,即较低的层有时可以传送包含未检测到错误的帧。蜂窝链路的可行报头压缩方案必须能够处理压缩和解压缩点之间链路的丢失以及压缩点之前的丢失。

Bandwidth is the most costly resource in cellular links. Processing power is very cheap in comparison. Implementation or computational simplicity of a header compression scheme is therefore of less importance than its compression ratio and robustness.

带宽是蜂窝链路中最昂贵的资源。相比之下,处理能力非常便宜。因此,报头压缩方案的实现或计算简单性不如其压缩比和鲁棒性重要。

2. Terminology
2. 术语

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

本文件中的关键词“必须”、“不得”、“要求”、“应”、“不得”、“应”、“不应”、“建议”、“可”和“可选”应按照RFC 2119中的说明进行解释。

BER

伯尔

Bit Error Rate. Cellular radio links can have a fairly high BER. In this document BER is usually given as a probability, but one also needs to consider the error distribution as bit errors are not independent.

误码率。蜂窝无线链路可能具有相当高的误码率。在本文中,BER通常被作为一个概率给出,但是也需要考虑错误分布,因为位错误不是独立的。

Cellular links

蜂窝链路

Wireless links between mobile terminals and base stations.

移动终端和基站之间的无线链路。

Compression efficiency

压缩效率

The performance of a header compression scheme can be described with three parameters: compression efficiency, robustness and compression transparency. The compression efficiency is determined by how much the header sizes are reduced by the compression scheme.

报头压缩方案的性能可以用三个参数来描述:压缩效率、鲁棒性和压缩透明性。压缩效率由压缩方案减少的头大小决定。

Compression transparency

压缩透明度

The performance of a header compression scheme can be described with three parameters: compression efficiency, robustness, and compression transparency. The compression transparency is a measure of the extent to which the scheme ensures that the decompressed headers are semantically identical to the original headers. If all decompressed headers are semantically identical to the corresponding original headers, the transparency is 100 percent. Compression transparency is high when damage propagation is low.

报头压缩方案的性能可以用三个参数来描述:压缩效率、鲁棒性和压缩透明度。压缩透明度是方案确保解压缩的头与原始头在语义上相同的程度的度量。如果所有解压缩的头在语义上与相应的原始头相同,则透明度为100%。当损伤传播较低时,压缩透明度较高。

Context

上下文

The context of the compressor is the state it uses to compress a header. The context of the decompressor is the state it uses to decompress a header. Either of these or the two in combination are usually referred to as "context", when it is clear which is intended. The context contains relevant information from previous headers in the packet stream, such as static fields and possible reference values for compression and decompression. Moreover, additional information describing the packet stream is also part of the context, for example information about how the IP Identifier field changes and the typical inter-packet increase in sequence numbers or timestamps.

压缩器的上下文是它用来压缩头的状态。解压器的上下文是解压头所使用的状态。当清楚目的是什么时,这些或两者结合通常被称为“上下文”。上下文包含来自数据包流中以前的头的相关信息,例如静态字段和用于压缩和解压缩的可能参考值。此外,描述分组流的附加信息也是上下文的一部分,例如关于IP标识符字段如何改变以及序列号或时间戳中典型分组间增加的信息。

Context damage

环境损害

When the context of the decompressor is not consistent with the context of the compressor, decompression may fail to reproduce the original header. This situation can occur when the context of the decompressor has not been initialized properly or when packets have been lost or damaged between compressor and decompressor.

当解压器的上下文与压缩器的上下文不一致时,解压可能无法再现原始头。当解压器的上下文未正确初始化,或者数据包在压缩器和解压器之间丢失或损坏时,可能会发生这种情况。

Packets which cannot be decompressed due to inconsistent contexts are said to be lost due to context damage. Packets that are decompressed but contain errors due to inconsistent contexts are said to be damaged due to context damage.

由于上下文不一致而无法解压缩的数据包称为由于上下文损坏而丢失。已解压缩但包含由于上下文不一致而导致的错误的数据包称为由于上下文损坏而损坏。

Context repair mechanism

上下文修复机制

Context repair mechanisms are mechanisms that bring the contexts in sync when they were not. This is needed to avoid excessive loss due to context damage. Examples are the context request mechanism of CRTP, the NACK mechanisms of O- and R-mode, and the periodic refreshes of U-mode.

上下文修复机制是在上下文不同步时使其同步的机制。这是为了避免因环境破坏而造成的过度损失。例如CRTP的上下文请求机制、O模式和R模式的NACK机制以及U模式的定期刷新。

Note that there are also mechanisms that prevent (some) context inconsistencies from occurring, for example the ACK-based updates of the context in R-mode, the repetitions after change in U- and O-mode, and the CRCs which protect context updating information.

注意,还存在防止(某些)上下文不一致发生的机制,例如,R模式下基于ACK的上下文更新、U模式和O模式下更改后的重复,以及保护上下文更新信息的CRC。

CRC-DYNAMIC

CRC-DYNAMIC

Opposite of CRC-STATIC.

与CRC-STATIC相反。

CRC-STATIC

CRC-STATIC

A CRC over the original header is the primary mechanism used by ROHC to detect incorrect decompression. In order to decrease computational complexity, the fields of the header are conceptually rearranged when the CRC is computed, so that it is first computed over octets which are static (called CRC-STATIC in this document) and then over octets whose values are expected to change between packets (CRC-DYNAMIC). In this manner, the intermediate result of the CRC computation, after it has covered the CRC-STATIC fields, can be reused for several packets. The restarted CRC computation only covers the CRC-DYNAMIC octets. See section 5.9.

原始报头上的CRC是ROHC用于检测错误解压缩的主要机制。为了降低计算复杂度,在计算CRC时,在概念上重新排列报头的字段,以便首先在静态的八位字节(在本文档中称为CRC-static)上计算报头,然后在期望值在数据包之间变化的八位字节(CRC-DYNAMIC)上计算报头。以这种方式,在覆盖CRC-STATIC字段之后,CRC计算的中间结果可用于多个分组。重新启动的CRC计算仅覆盖CRC-动态八位字节。见第5.9节。

Damage propagation

损伤扩展

Delivery of incorrect decompressed headers, due to errors in (i.e., loss of or damage to) previous header(s) or feedback.

由于前一个报头或反馈中的错误(即丢失或损坏),交付不正确的解压缩报头。

Loss propagation

损耗传播

Loss of headers, due to errors in (i.e., loss of or damage to) previous header(s)or feedback.

由于先前标题或反馈中的错误(即丢失或损坏),导致标题丢失。

Error detection

错误检测

Detection of errors. If error detection is not perfect, there will be residual errors.

错误检测。如果错误检测不完美,就会有剩余错误。

Error propagation

误差传播

Damage propagation or loss propagation.

损害传播或损失传播。

Header compression profile

标题压缩配置文件

A header compression profile is a specification of how to compress the headers of a certain kind of packet stream over a certain kind of link. Compression profiles provide the details of the header compression framework introduced in this document. The profile concept makes use of profile identifiers to separate different profiles which are used when setting up the compression scheme. All variations and parameters of the header compression scheme that are not part of the context state are handled by different profile identifiers.

报头压缩配置文件是关于如何通过某种链路压缩某种数据包流的报头的规范。压缩配置文件提供了本文档中介绍的头压缩框架的详细信息。配置文件概念利用配置文件标识符来分离设置压缩方案时使用的不同配置文件。不属于上下文状态的头压缩方案的所有变体和参数都由不同的概要文件标识符处理。

Packet

小包裹

Generally, a unit of transmission and reception (protocol data unit). Specifically, when contrasted with "frame", the packet compressed and then decompressed by ROHC. Also called "uncompressed packet".

通常,一种发送和接收单元(协议数据单元)。具体来说,与“帧”相比,数据包先被压缩,然后被ROHC解压。也称为“未压缩数据包”。

Packet Stream

包流

A sequence of packets where the field values and change patterns of field values are such that the headers can be compressed using the same context.

一种数据包序列,其中字段值和字段值的变化模式使得可以使用相同的上下文压缩报头。

Pre-HC links

前HC链路

The Pre-HC links are all links that a packet has traversed before the header compression point. If we consider a path with cellular links as first and last hops, the Pre-HC links for the compressor at the last link are the first cellular link plus the wired links in between.

Pre-HC链路是数据包在报头压缩点之前经过的所有链路。如果我们考虑以蜂窝链路作为第一跳和最后跳的路径,则在最后一个链路上的压缩机的前HC链路是第一个蜂窝链路加上两个之间的有线链路。

Residual error

剩余误差

Error introduced during transmission and not detected by lower-layer error detection schemes.

传输过程中引入的错误,下层错误检测方案无法检测到。

Robustness

健壮性

The performance of a header compression scheme can be described with three parameters: compression efficiency, robustness, and compression transparency. A robust scheme tolerates loss and residual errors on the link over which header compression takes place without losing additional packets or introducing additional errors in decompressed headers.

报头压缩方案的性能可以用三个参数来描述:压缩效率、鲁棒性和压缩透明度。一个健壮的方案能够容忍链路上的丢失和残余错误,在链路上进行报头压缩,而不会丢失额外的数据包或在解压缩的报头中引入额外的错误。

RTT

RTT

The RTT (round-trip time) is the time elapsing from the moment the compressor sends a packet until it receives feedback related to that packet (when such feedback is sent).

RTT(往返时间)是从压缩器发送数据包到接收到与该数据包相关的反馈(发送此类反馈时)所经过的时间。

Spectrum efficiency

频谱效率

Radio resources are limited and expensive. Therefore they must be used efficiently to make the system economically feasible. In cellular systems this is achieved by maximizing the number of users served within each cell, while the quality of the provided services is kept at an acceptable level. A consequence of efficient spectrum use is a high rate of errors (frame loss and residual bit errors), even after channel coding with error correction.

无线电资源有限且昂贵。因此,必须有效地利用它们,使系统在经济上可行。在蜂窝系统中,这是通过最大化每个小区内服务的用户数量来实现的,同时所提供服务的质量保持在可接受的水平。有效频谱使用的一个结果是,即使在进行了纠错信道编码之后,错误率(帧丢失和残余比特错误)也很高。

String

一串

A sequence of headers in which the values of all fields being compressed change according to a pattern which is fixed with respect to a sequence number. Each header in a string can be compressed by representing it with a ROHC header which essentially only carries an encoded sequence number. Fields not being compressed (e.g., random IP-ID, UDP Checksum) are irrelevant to this definition.

一种报头序列,在该序列中,所有被压缩字段的值根据一种相对于序列号固定的模式而变化。字符串中的每个头都可以通过使用ROHC头来压缩,ROHC头基本上只携带编码序列号。未被压缩的字段(例如,随机IP-ID、UDP校验和)与此定义无关。

Timestamp stride

时间戳步长

The timestamp stride (TS_STRIDE) is the expected increase in the timestamp value between two RTP packets with consecutive sequence numbers.

时间戳步长(TS_步长)是具有连续序列号的两个RTP数据包之间时间戳值的预期增加。

2.1. Acronyms
2.1. 缩略词

This section lists most acronyms used for reference.

本节列出了大多数用于参考的首字母缩略词。

AH Authentication Header. CID Context Identifier. CRC Cyclic Redundancy Check. Error detection mechanism. CRTP Compressed RTP. RFC 2508. CTCP Compressed TCP. Also called VJ header compression. RFC 1144. ESP Encapsulating Security Payload. FC Full Context state (decompressor). FO First Order state (compressor). GRE Generic Routing Encapsulation. RFC 2784, RFC 2890. HC Header Compression. IPHC IP Header Compression. RFC 2507. IPX Flag in Extension 2. IR Initiation and Refresh state (compressor). Also IR packet. IR-DYN IR-DYN packet. LSB Least Significant Bits. MRRU Maximum Reconstructed Reception Unit. MTU Maximum Transmission Unit. MSB Most Significant Bits. NBO Flag indicating whether the IP-ID is in Network Byte Order. NC No Context state (decompressor). O-mode Bidirectional Optimistic mode. PPP Point-to-Point Protocol. R-mode Bidirectional Reliable mode. RND Flag indicating whether the IP-ID behaves randomly. ROHC RObust Header Compression. RTCP Real-Time Control Protocol. See RTP. RTP Real-Time Protocol. RFC 1889. RTT Round Trip Time (see section 2). SC Static Context state (decompressor). SN (compressed) Sequence Number. Usually RTP Sequence Number. SO Second Order state (compressor). SPI Security Parameters Index. SSRC Sending source. Field in RTP header. CSRC Contributing source. Optional list of CSRCs in RTP header. TC Traffic Class. Octet in IPv6 header. See also TOS. TOS Type Of Service. Octet in IPv4 header. See also TC. TS (compressed) RTP Timestamp. U-mode Unidirectional mode. W-LSB Window based LSB encoding. See section 4.5.2.

认证头。CID上下文标识符。循环冗余校验。错误检测机制。CRTP压缩RTP。RFC2508。CTCP压缩TCP。也称为VJ头压缩。RFC 1144。封装安全有效载荷的ESP。FC完整上下文状态(解压缩器)。FO一阶状态(压缩机)。GRE通用路由封装。RFC2784,RFC2890。HC头压缩。IPHC IP头压缩。RFC2507。扩展2中的IPX标志。IR启动和刷新状态(压缩机)。还有红外数据包。IR-DYN IR-DYN数据包。LSB最低有效位。最大重构接收单元。最大传输单位。最高有效位。NBO标志,指示IP-ID是否按网络字节顺序。NC无上下文状态(解压缩器)。O模式双向乐观模式。PPP点对点协议。R模式双向可靠模式。指示IP-ID行为是否随机的RND标志。ROHC鲁棒头压缩。实时控制协议。见RTP。实时协议。RFC1889。RTT往返时间(见第2节)。SC静态上下文状态(解压缩器)。SN(压缩)序列号。通常是RTP序列号。所以二阶状态(压缩机)。SPI安全参数索引。SSRC发送源。RTP标头中的字段。中国证监会消息来源。RTP标头中CSRC的可选列表。TC交通等级。IPv6标头中的八位字节。另见TOS。TOS服务类型。IPv4标头中的八位字节。另见TC。TS(压缩)RTP时间戳。U型单向模式。基于W-LSB窗口的LSB编码。见第4.5.2节。

3. Background
3. 出身背景

This chapter provides a background to the subject of header compression. The fundamental ideas are described together with existing header compression schemes. Their drawbacks and requirements are then discussed, providing motivation for new header compression solutions.

本章提供了标题压缩主题的背景知识。基本思想与现有的报头压缩方案一起描述。然后讨论了它们的缺点和需求,为新的报头压缩解决方案提供了动力。

3.1. Header compression fundamentals
3.1. 收割台压缩基础

The main reason why header compression can be done at all is the fact that there is significant redundancy between header fields, both within the same packet header but in particular between consecutive packets belonging to the same packet stream. By sending static field information only initially and utilizing dependencies and predictability for other fields, the header size can be significantly reduced for most packets.

可以进行报头压缩的主要原因是,报头字段之间存在显著冗余,这两个字段都位于同一数据包报头内,但特别是在属于同一数据包流的连续数据包之间。通过最初仅发送静态字段信息,并利用其他字段的依赖性和可预测性,大多数数据包的报头大小可以显著减小。

Relevant information from past packets is maintained in a context. The context information is used to compress (decompress) subsequent packets. The compressor and decompressor update their contexts upon certain events. Impairment events may lead to inconsistencies between the contexts of the compressor and decompressor, which in turn may cause incorrect decompression. A robust header compression scheme needs mechanisms for avoiding context inconsistencies and also needs mechanisms for making the contexts consistent when they were not.

在上下文中维护来自过去数据包的相关信息。上下文信息用于压缩(解压缩)后续数据包。压缩器和解压缩器根据特定事件更新其上下文。减值事件可能导致压缩机和减压器的上下文不一致,进而导致不正确的减压。一个健壮的报头压缩方案需要避免上下文不一致的机制,还需要使上下文在不一致时保持一致的机制。

3.2. Existing header compression schemes
3.2. 现有的报头压缩方案

The original header compression scheme, CTCP [VJHC], was invented by Van Jacobson. CTCP compresses the 40 octet IP+TCP header to 4 octets. The CTCP compressor detects transport-level retransmissions and sends a header that updates the context completely when they occur. This repair mechanism does not require any explicit signaling between compressor and decompressor.

最初的报头压缩方案CTCP[VJHC]是由Van Jacobson发明的。CTCP将40个八位字节的IP+TCP头压缩为4个八位字节。CTCP压缩器检测传输级别的重传,并在重传发生时发送一个完全更新上下文的报头。这种修复机制不需要压缩机和减压器之间的任何明确信号。

A general IP header compression scheme, IP header compression [IPHC], improves somewhat on CTCP and can compress arbitrary IP, TCP, and UDP headers. When compressing non-TCP headers, IPHC does not use delta encoding and is robust. When compressing TCP, the repair mechanism of CTCP is augmented with a link-level nacking scheme which speeds up the repair. IPHC does not compress RTP headers.

一种通用的IP报头压缩方案,IP报头压缩[IPHC],对CTCP有所改进,可以压缩任意IP、TCP和UDP报头。在压缩非TCP报头时,IPHC不使用增量编码,并且非常健壮。在压缩TCP时,CTCP的修复机制增加了一个链路级nacking方案,加快了修复速度。IPHC不压缩RTP头。

CRTP [CRTP, IPHC] by Casner and Jacobson is a header compression scheme that compresses 40 octets of IPv4/UDP/RTP headers to a minimum of 2 octets when the UDP Checksum is not enabled. If the UDP Checksum is enabled, the minimum CRTP header is 4 octets. CRTP

Casner和Jacobson提出的CRTP[CRTP,IPHC]是一种报头压缩方案,在未启用UDP校验和时,将IPv4/UDP/RTP报头的40个八位字节压缩到至少2个八位字节。如果启用UDP校验和,则最小CRTP报头为4个八位字节。CRTP

cannot use the same repair mechanism as CTCP since UDP/RTP does not retransmit. Instead, CRTP uses explicit signaling messages from decompressor to compressor, called CONTEXT_STATE messages, to indicate that the context is out of sync. The link round-trip time will thus limit the speed of this context repair mechanism.

无法使用与CTCP相同的修复机制,因为UDP/RTP不会重新传输。相反,CRTP使用从解压器到压缩器的显式信令消息(称为上下文状态消息)来指示上下文不同步。因此,链路往返时间将限制这种上下文修复机制的速度。

On lossy links with long round-trip times, such as most cellular links, CRTP does not perform well. Each lost packet over the link causes several subsequent packets to be lost since the context is out of sync during at least one link round-trip time. This behavior is documented in [CRTPC]. For voice conversations such long loss events will degrade the voice quality. Moreover, bandwidth is wasted by the large headers sent by CRTP when updating the context. [CRTPC] found that CRTP did not perform well enough for a lossy cellular link. It is clear that CRTP alone is not a viable header compression scheme for IP telephony over cellular links.

在往返时间较长的有损链路上,如大多数蜂窝链路,CRTP性能不佳。链路上的每个丢失的数据包都会导致几个后续数据包丢失,因为上下文在至少一个链路往返时间内不同步。此行为记录在[CRTPC]中。对于语音对话,此类长时间丢失事件将降低语音质量。此外,在更新上下文时,CRTP发送的大报头会浪费带宽。[CRTPC]发现CRTP对于有损蜂窝链路的性能不够好。显然,CRTP本身并不是蜂窝链路上IP电话的可行报头压缩方案。

To avoid losing packets due to the context being out of sync, CRTP decompressors can attempt to repair the context locally by using a mechanism known as TWICE. Each CRTP packet contains a counter which is incremented by one for each packet sent out by the CRTP compressor. If the counter increases by more than one, at least one packet was lost over the link. The decompressor then attempts to repair the context by guessing how the lost packet(s) would have updated it. The guess is then verified by decompressing the packet and checking the UDP Checksum -- if it succeeds, the repair is deemed successful and the packet can be forwarded or delivered. TWICE derives its name from the observation that when the compressed packet stream is regular, the correct guess is to apply the update in the current packet twice. [CRTPC] found that even with TWICE, CRTP doubled the number of lost packets. TWICE improves CRTP performance significantly. However, there are several problems with using TWICE:

为了避免由于上下文不同步而丢失数据包,CRTP解压缩程序可以尝试使用称为“两次”的机制在本地修复上下文。每个CRTP数据包包含一个计数器,该计数器对于CRTP压缩器发送的每个数据包递增一。如果计数器增加一个以上,则至少有一个数据包在链路上丢失。然后,解压缩程序尝试通过猜测丢失的数据包将如何更新来修复上下文。然后,通过解压缩数据包并检查UDP校验和来验证猜测——如果成功,修复将被视为成功,数据包可以被转发或传递。tweeps的名称来源于这样一个观察:当压缩包流是规则的时,正确的猜测是在当前包中应用两次更新。[CRTPC]发现,即使有两次,CRTP丢失的数据包数量也增加了一倍。两次可显著提高CRTP性能。但是,使用两次有几个问题:

1) It becomes mandatory to use the UDP Checksum:

1) 必须使用UDP校验和:

- the minimal compressed header size increases by 100% to 4 octets.

- 最小压缩头大小增加100%至4个八位字节。

- most speech codecs developed for cellular links tolerate errors in the encoded data. Such codecs will not want to enable the UDP Checksum, since they do want damaged packets to be delivered.

- 大多数为蜂窝链路开发的语音编解码器容忍编码数据中的错误。此类编解码器不希望启用UDP校验和,因为它们确实希望传递损坏的数据包。

- errors in the payload will make the UDP Checksum fail when the guess is correct (and might make it succeed when the guess is wrong).

- 当猜测正确时,有效负载中的错误将使UDP校验和失败(当猜测错误时,可能使其成功)。

2) Loss in an RTP stream that occurs before the compression point will make updates in CRTP headers less regular. Simple-minded versions of TWICE will then perform badly. More sophisticated versions would need more repair attempts to succeed.

2) 在压缩点之前发生的RTP流中的丢失将使CRTP头中的更新不太规则。头脑简单的两次版本将表现糟糕。更复杂的版本需要更多的修复尝试才能成功。

3.3. Requirements on a new header compression scheme
3.3. 对一种新的报头压缩方案的要求

The major problem with CRTP is that it is not sufficiently robust against packets being damaged between compressor and decompressor. A viable header compression scheme must be less fragile. This increased robustness must be obtained without increasing the compressed header size; a larger header would make IP telephony over cellular links economically unattractive.

CRTP的主要问题是,它对在压缩器和解压缩器之间被破坏的数据包没有足够的鲁棒性。可行的报头压缩方案必须不那么脆弱。必须在不增加压缩头大小的情况下获得这种增强的鲁棒性;更大的报头将使蜂窝链路上的IP电话在经济上没有吸引力。

A major cause of the bad performance of CRTP over cellular links is the long link round-trip time, during which many packets are lost when the context is out of sync. This problem can be attacked directly by finding ways to reduce the link round-trip time. Future generations of cellular technologies may indeed achieve lower link round-trip times. However, these will probably always be fairly high. The benefits in terms of lower loss and smaller bandwidth demands if the context can be repaired locally will be present even if the link round-trip time is decreased. A reliable way to detect a successful context repair is then needed.

蜂窝链路上CRTP性能差的一个主要原因是链路往返时间长,在此期间,当上下文不同步时,许多数据包丢失。通过寻找减少链路往返时间的方法,可以直接解决这个问题。未来几代蜂窝技术确实可能实现较低的链路往返时间。然而,这些可能总是相当高的。即使链路往返时间减少,如果上下文可以在本地修复,那么在更低的损耗和更小的带宽需求方面的好处也将存在。因此,需要一种可靠的方法来检测成功的上下文修复。

One might argue that a better way to solve the problem is to improve the cellular link so that packet loss is less likely to occur. Such modifications do not appear to come for free, however. If links were made (almost) error free, the system might not be able to support a sufficiently large number of users per cell and might thus be economically infeasible.

有人可能会说,解决这个问题的更好方法是改善蜂窝链路,这样就不太可能发生数据包丢失。然而,这些修改似乎不是免费的。如果链接(几乎)没有错误,系统可能无法支持每个小区足够多的用户,因此在经济上不可行。

One might also argue that the speech codecs should be able to deal with the kind of packet loss induced by CRTP, in particular since the speech codecs probably must be able to deal with packet loss anyway if the RTP stream crosses the Internet. While the latter is true, the kind of loss induced by CRTP is difficult to deal with. It is usually not possible to completely hide a loss event where well over 100 ms worth of sound is completely lost. If such loss occurs frequently at both ends of the end-to-end path, the speech quality will suffer.

有人还可能认为,语音编解码器应该能够处理由CRTP引起的分组丢失,特别是因为语音编解码器可能无论如何都必须能够处理如果RTP流穿过因特网的分组丢失。虽然后者是正确的,但由CRTP引起的损失很难处理。通常不可能完全隐藏丢失事件,因为超过100毫秒的声音完全丢失。如果这种损失经常发生在端到端路径的两端,语音质量将受到影响。

A detailed description of the requirements specified for ROHC may be found in [REQ].

有关ROHC规定要求的详细说明,请参见[REQ]。

3.4. Classification of header fields
3.4. 标题字段的分类

As mentioned earlier, header compression is possible due to the fact that there is much redundancy between header field values within packets, but especially between consecutive packets. To utilize these properties for header compression, it is important to understand the change patterns of the various header fields.

As mentioned earlier, header compression is possible due to the fact that there is much redundancy between header field values within packets, but especially between consecutive packets. To utilize these properties for header compression, it is important to understand the change patterns of the various header fields.translate error, please retry

All header fields have been classified in detail in appendix A. The fields are first classified at a high level and then some of them are studied more in detail. Finally, the appendix concludes with recommendations on how the various fields should be handled by header compression algorithms. The main conclusion that can be drawn is that most of the header fields can easily be compressed away since they never or seldom change. Only 5 fields, with a combined size of about 10 octets, need more sophisticated mechanisms. These fields are:

附录A中对所有标题字段进行了详细分类。首先对字段进行了高级别分类,然后对其中一些字段进行了更详细的研究。最后,附录总结了关于如何通过报头压缩算法处理各个字段的建议。可以得出的主要结论是,大多数头字段很容易被压缩掉,因为它们从未或很少改变。只有5个字段需要更复杂的机制,它们的总大小约为10个八位组。这些字段是:

- IPv4 Identification (16 bits) - IP-ID - UDP Checksum (16 bits) - RTP Marker (1 bit) - M-bit - RTP Sequence Number (16 bits) - SN - RTP Timestamp (32 bits) - TS

- IPv4标识(16位)—IP-ID—UDP校验和(16位)—RTP标记(1位)—M位—RTP序列号(16位)—SN—RTP时间戳(32位)—TS

The analysis in Appendix A reveals that the values of the TS and IP-ID fields can usually be predicted from the RTP Sequence Number, which increments by one for each packet emitted by an RTP source. The M-bit is also usually the same, but needs to be communicated explicitly occasionally. The UDP Checksum should not be predicted and is sent as-is when enabled.

附录A中的分析表明,TS和IP-ID字段的值通常可以从RTP序列号预测,RTP序列号对于RTP源发出的每个数据包增加1。M位通常也是相同的,但偶尔需要显式通信。UDP校验和不应被预测,而是在启用时按原样发送。

The way ROHC RTP compression operates, then, is to first establish functions from SN to the other fields, and then reliably communicate the SN. Whenever a function from SN to another field changes, i.e., the existing function gives a result which is different from the field in the header to be compressed, additional information is sent to update the parameters of that function.

ROHC RTP压缩的工作方式是首先建立从SN到其他字段的功能,然后可靠地通信SN。每当函数从SN变为另一个字段时,即,现有函数给出的结果与要压缩的报头中的字段不同,就会发送附加信息以更新该函数的参数。

Headers specific to Mobile IP (for IPv4 or IPv6) do not receive any special treatment in this document. They are compressible, however, and it is expected that the compression efficiency for Mobile IP headers will be good enough due to the handling of extension header lists and tunneling headers. It would be relatively painless to introduce a new ROHC profile with special treatment for Mobile IPv6 specific headers should the completed work on the Mobile IPv6 protocols (work in progress in the IETF) make that necessary.

特定于移动IP(IPv4或IPv6)的标头在本文档中不接受任何特殊处理。然而,它们是可压缩的,并且由于扩展头列表和隧道头的处理,移动IP头的压缩效率将足够好。如果已经完成的移动IPv6协议工作(IETF中正在进行的工作)使得有必要引入新的ROHC配置文件,并对移动IPv6特定的报头进行特殊处理,这将是相对轻松的。

4. Header compression framework
4. 报头压缩框架
4.1. Operating assumptions
4.1. 经营假设

Cellular links, which are a primary target for ROHC, have a number of characteristics that are described briefly here. ROHC requires functionality from lower layers that is outlined here and more thoroughly described in the lower layer guidelines document [LLG].

蜂窝链路是ROHC的主要目标,这里简要介绍了其一些特性。ROHC需要底层的功能,这些功能在这里有概述,在底层指南文档[LLG]中有更详细的描述。

Channels

渠道

ROHC header-compressed packets flow on channels. Unlike many fixed links, some cellular radio links can have several channels connecting the same pair of nodes. Each channel can have different characteristics in terms of error rate, bandwidth, etc.

ROHC头压缩数据包在通道上流动。与许多固定链路不同,一些蜂窝无线链路可以有多个信道连接同一对节点。每个信道可以在错误率、带宽等方面具有不同的特性。

Context identifiers

上下文标识符

On some channels, the ability to transport multiple packet streams is required. It can also be feasible to have channels dedicated to individual packet streams. Therefore, ROHC uses a distinct context identifier space per channel and can eliminate context identifiers completely for one of the streams when few streams share a channel.

在某些信道上,需要传输多个分组流的能力。将信道专用于单个分组流也是可行的。因此,ROHC在每个通道中使用不同的上下文标识符空间,并且当少数流共享一个通道时,可以完全消除其中一个流的上下文标识符。

Packet type indication

包类型指示

Packet type indication is done in the header compression scheme itself. Unless the link already has a way of indicating packet types which can be used, such as PPP, this provides smaller compressed headers overall. It may also be less difficult to allocate a single packet type, rather than many, in order to run ROHC over links such as PPP.

数据包类型指示在报头压缩方案本身中完成。除非链路已经有了一种指示可使用的数据包类型的方法,例如PPP,否则总体而言,这将提供更小的压缩头。为了在PPP等链路上运行ROHC,分配单个数据包类型(而不是多个数据包类型)也可能不那么困难。

Reordering

重新排序

The channel between compressor and decompressor is required to maintain packet ordering, i.e., the decompressor must receive packets in the same order as the compressor sent them. (Reordering before the compression point, however, is dealt with, i.e., there is no assumption that the compressor will only receive packets in sequence.)

压缩机和解压缩器之间的通道需要维持数据包顺序,即解压缩器必须以与压缩机发送数据包相同的顺序接收数据包。(然而,处理压缩点之前的重新排序,即不假设压缩器将仅按顺序接收数据包。)

Duplication

复制品

The channel between compressor and decompressor is required to not duplicate packets. (Duplication before the compression point, however, is dealt with, i.e., there is no assumption that the compressor will receive only one copy of each packet.)

压缩机和解压缩器之间的通道要求不复制数据包。(但是,处理压缩点之前的复制,即不假设压缩器将只接收每个数据包的一个副本。)

Packet length

数据包长度

ROHC is designed under the assumption that lower layers indicate the length of a compressed packet. ROHC packets do not contain length information for the payload.

ROHC的设计假设较低的层表示压缩数据包的长度。ROHC数据包不包含有效负载的长度信息。

Framing

框架

The link layer must provide framing that makes it possible to distinguish frame boundaries and individual frames.

链接层必须提供能够区分帧边界和单个帧的帧。

Error detection/protection

错误检测/保护

The ROHC scheme has been designed to cope with residual errors in the headers delivered to the decompressor. CRCs and sanity checks are used to prevent or reduce damage propagation. However, it is RECOMMENDED that lower layers deploy error detection for ROHC headers and do not deliver ROHC headers with high residual error rates.

ROHC方案的设计目的是处理发送到解压器的报头中的残余错误。CRC和健全性检查用于防止或减少损害传播。但是,建议较低层为ROHC头部署错误检测,并且不要交付具有高剩余错误率的ROHC头。

Without giving a hard limit on the residual error rate acceptable to ROHC, it is noted that for a residual bit error rate of at most 1E-5, the ROHC scheme has been designed not to increase the number of damaged headers, i.e., the number of damaged headers due to damage propagation is designed to be less than the number of damaged headers caught by the ROHC error detection scheme.

在没有给出ROHC可接受的剩余误码率的硬限制的情况下,需要注意的是,对于最大1E-5的剩余误码率,ROHC方案的设计不会增加损坏报头的数量,即。,由于损坏传播造成的损坏报头的数量被设计为小于ROHC错误检测方案捕获的损坏报头的数量。

Negotiation

谈判

In addition to the packet handling mechanisms above, the link layer MUST provide a way to negotiate header compression parameters, see also section 5.1.1. (For unidirectional links, this negotiation may be performed out-of-band or even a priori.)

除了上述数据包处理机制外,链路层还必须提供协商报头压缩参数的方法,另见第5.1.1节。(对于单向链路,此协商可以在带外执行,甚至可以是先验的。)

4.2. Dynamicity
4.2. 动态性

The ROHC protocol achieves its compression gain by establishing state information at both ends of the link, i.e., at the compressor and at the decompressor. Different parts of the state are established at different times and with different frequency; hence, it can be said that some of the state information is more dynamic than the rest.

ROHC协议通过在链路两端(即压缩机和解压缩器处)建立状态信息来实现其压缩增益。国家的不同部分在不同的时间以不同的频率建立;因此,可以说,某些状态信息比其他状态信息更具动态性。

Some state information is established at the time a channel is established; ROHC assumes the existence of an out-of-band negotiation protocol (such as PPP), or predefined channel state (most useful for unidirectional links). In both cases, we speak of "negotiated channel state". ROHC does not assume that this state can change dynamically during the channel lifetime (and does not explicitly support such changes, although some changes may be innocuous from a protocol point of view). An example of negotiated channel state is the highest context ID number to be used by the compressor (MAX_CID).

在建立信道时建立一些状态信息;ROHC假设存在带外协商协议(如PPP)或预定义的信道状态(对单向链路最有用)。在这两种情况下,我们都提到“协商渠道状态”。ROHC不认为该状态可以在通道生命周期内动态更改(并且不明确支持此类更改,尽管从协议的角度来看,某些更改可能是无害的)。协商信道状态的一个示例是压缩器要使用的最高上下文ID号(MAX_CID)。

Other state information is associated with the individual packet streams in the channel; this state is said to be part of the context. Using context identifiers (CIDs), multiple packet streams with different contexts can share a channel. The negotiated channel state indicates the highest context identifier to be used, as well as the selection of one of two ways to indicate the CID in the compressed header.

其他状态信息与信道中的各个分组流相关联;这种状态被认为是上下文的一部分。使用上下文标识符(CID),具有不同上下文的多个数据包流可以共享一个通道。协商的信道状态指示要使用的最高上下文标识符,以及选择两种方式之一来指示压缩报头中的CID。

It is up to the compressor to decide which packets to associate with a context (or, equivalently, which packets constitute a single stream); however, ROHC is efficient only when all packets of a stream share certain properties, such as having the same values for fields that are described as "static" in this document (e.g., the IP addresses, port numbers, and RTP parameters such as the payload type). The efficiency of ROHC RTP also depends on the compressor seeing most RTP Sequence Numbers.

由压缩器决定哪些包与上下文关联(或者,等效地,哪些包构成单个流);然而,只有当流的所有数据包共享某些属性时,ROHC才有效,例如,在本文档中描述为“静态”的字段具有相同的值(例如,IP地址、端口号和RTP参数,如有效负载类型)。ROHC RTP的效率还取决于看到大多数RTP序列号的压缩机。

Streams need not share all characteristics important for compression. ROHC has a notion of compression profiles: a compression profile denotes a predefined set of such characteristics. To provide extensibility, the negotiated channel state includes the set of profiles acceptable to the decompressor. The context state includes the profile currently in use for the context.

流不需要共享对压缩很重要的所有特性。ROHC有一个压缩配置文件的概念:压缩配置文件表示一组预定义的此类特征。为了提供可扩展性,协商的通道状态包括解压缩程序可接受的配置文件集。上下文状态包括当前用于上下文的配置文件。

Other elements of the context state may include the current values of all header fields (from these one can deduce whether an IPv4 header is present in the header chain, and whether UDP Checksums are enabled), as well as additional compression context that is not part of an uncompressed header, e.g., TS_STRIDE, IP-ID characteristics (incrementing as a 16-bit value in network byte order? random?), a number of old reference headers, and the compressor/decompressor state machines (see next section).

上下文状态的其他元素可能包括所有报头字段的当前值(从这些值可以推断报头链中是否存在IPv4报头,以及是否启用UDP校验和),以及不属于未压缩报头一部分的其他压缩上下文,例如,TS_步长、IP-ID特征(以网络字节顺序递增为16位值?随机?),许多旧的引用头和压缩器/解压缩器状态机(见下一节)。

This document actually defines four ROHC profiles: One uncompressed profile, the main ROHC RTP compression profile, and two variants of this profile for compression of packets with header chains that end

本文档实际上定义了四个ROHC配置文件:一个未压缩配置文件、主ROHC RTP压缩配置文件,以及此配置文件的两个变体,用于压缩具有结束的头链的数据包

in UDP and ESP, respectively, but where RTP compression is not applicable. The descriptive text in the rest of this section is referring to the main ROHC RTP compression profile.

分别在UDP和ESP中,但RTP压缩不适用。本节其余部分中的说明性文字指的是主要的ROHC RTP压缩配置文件。

4.3. Compression and decompression states
4.3. 压缩和解压缩状态

Header compression with ROHC can be characterized as an interaction between two state machines, one compressor machine and one decompressor machine, each instantiated once per context. The compressor and the decompressor have three states each, which in many ways are related to each other even if the meaning of the states are slightly different for the two parties. Both machines start in the lowest compression state and transit gradually to higher states.

ROHC的头压缩可以描述为两个状态机之间的交互,一个压缩器机器和一个解压缩器机器,每个机器在每个上下文中实例化一次。压缩机和减压器各有三种状态,它们在许多方面相互关联,即使对双方而言,状态的含义略有不同。两台机器在最低压缩状态下启动,并逐渐过渡到较高的状态。

Transitions need not be synchronized between the two machines. In normal operation it is only the compressor that temporarily transits back to lower states. The decompressor will transit back only when context damage is detected.

两台机器之间的转换不需要同步。在正常操作中,只有压缩机临时过渡回较低的状态。只有在检测到上下文损坏时,解压缩程序才会返回。

Subsequent sections present an overview of the state machines and their corresponding states, respectively, starting with the compressor.

接下来的章节将分别从压缩机开始,概述状态机及其相应的状态。

4.3.1. Compressor states
4.3.1. 压缩机状态

For ROHC compression, the three compressor states are the Initialization and Refresh (IR), First Order (FO), and Second Order (SO) states. The compressor starts in the lowest compression state (IR) and transits gradually to higher compression states. The compressor will always operate in the highest possible compression state, under the constraint that the compressor is sufficiently confident that the decompressor has the information necessary to decompress a header compressed according to that state.

对于ROHC压缩,三种压缩机状态是初始化和刷新(IR)、一阶(FO)和二阶(SO)状态。压缩机在最低压缩状态(IR)下启动,并逐渐过渡到较高压缩状态。压缩机将始终在可能的最高压缩状态下运行,前提是压缩机充分确信解压器具有解压根据该状态压缩的收割台所需的信息。

   +----------+                +----------+                +----------+
   | IR State |   <-------->   | FO State |   <-------->   | SO State |
   +----------+                +----------+                +----------+
        
   +----------+                +----------+                +----------+
   | IR State |   <-------->   | FO State |   <-------->   | SO State |
   +----------+                +----------+                +----------+
        

Decisions about transitions between the various compression states are taken by the compressor on the basis of:

压缩机根据以下条件决定各种压缩状态之间的转换:

- variations in packet headers - positive feedback from decompressor (Acknowledgments -- ACKs) - negative feedback from decompressor (Negative ACKs -- NACKs) - periodic timeouts (when operating in unidirectional mode, i.e., over simplex channels or when feedback is not enabled)

- 数据包头的变化-来自解压器的正反馈(确认-确认)-来自解压器的负反馈(负确认-NACK)-周期性超时(在单向模式下运行时,即在单工信道上运行时,或在未启用反馈时)

How transitions are performed is explained in detail in chapter 5 for each mode of operation.

对于每种操作模式,第5章详细说明了如何执行转换。

4.3.1.1. Initialization and Refresh (IR) State
4.3.1.1. 初始化和刷新(IR)状态

The purpose of the IR state is to initialize the static parts of the context at the decompressor or to recover after failure. In this state, the compressor sends complete header information. This includes all static and nonstatic fields in uncompressed form plus some additional information.

IR状态的目的是在解压器处初始化上下文的静态部分,或在故障后恢复。在此状态下,压缩器发送完整的标题信息。这包括未压缩形式的所有静态和非静态字段以及一些附加信息。

The compressor stays in the IR state until it is fairly confident that the decompressor has received the static information correctly.

压缩机保持在IR状态,直到完全确信减压器正确接收到静态信息。

4.3.1.2. First Order (FO) State
4.3.1.2. 一阶(FO)态

The purpose of the FO state is to efficiently communicate irregularities in the packet stream. When operating in this state, the compressor rarely sends information about all dynamic fields, and the information sent is usually compressed at least partially. Only a few static fields can be updated. The difference between IR and FO should therefore be clear.

FO状态的目的是有效地通信分组流中的异常情况。在这种状态下运行时,压缩机很少发送有关所有动态场的信息,发送的信息通常至少部分压缩。只能更新几个静态字段。因此,IR和FO之间的区别应该是明确的。

The compressor enters this state from the IR state, and from the SO state whenever the headers of the packet stream do not conform to their previous pattern. It stays in the FO state until it is confident that the decompressor has acquired all the parameters of the new pattern. Changes in fields that are always irregular are communicated in all packets and are therefore part of what is a uniform pattern.

压缩器从IR状态进入该状态,并且每当分组流的报头不符合其先前的模式时,压缩器从SO状态进入该状态。它将保持FO状态,直到确信解压缩程序已获取新模式的所有参数。字段中总是不规则的更改在所有数据包中进行通信,因此是统一模式的一部分。

Some or all packets sent in the FO state carry context updating information. It is very important to detect corruption of such packets to avoid erroneous updates and context inconsistencies.

在FO状态下发送的某些或所有数据包携带上下文更新信息。检测此类数据包的损坏以避免错误更新和上下文不一致非常重要。

4.3.1.3. Second Order (SO) State
4.3.1.3. 二阶(SO)态

This is the state where compression is optimal. The compressor enters the SO state when the header to be compressed is completely predictable given the SN (RTP Sequence Number) and the compressor is sufficiently confident that the decompressor has acquired all parameters of the functions from SN to other fields. Correct decompression of packets sent in the SO state only hinges on correct decompression of the SN. However, successful decompression also requires that the information sent in the preceding FO state packets has been successfully received by the decompressor.

这是压缩最佳的状态。在给定SN(RTP序列号)的情况下,当要压缩的报头完全可预测时,压缩器进入SO状态,并且压缩器充分确信解压缩器已经获取了从SN到其他字段的函数的所有参数。在SO状态下发送的数据包的正确解压缩仅取决于SN的正确解压缩。然而,成功解压缩还要求解压缩程序已成功接收在前面的FO状态数据包中发送的信息。

The compressor leaves this state and goes back to the FO state when the header no longer conforms to the uniform pattern and cannot be independently compressed on the basis of previous context information.

当报头不再符合统一模式并且不能基于先前的上下文信息独立压缩时,压缩器离开此状态并返回到FO状态。

4.3.2. Decompressor states
4.3.2. 解压器状态

The decompressor starts in its lowest compression state, "No Context" and gradually transits to higher states. The decompressor state machine normally never leaves the "Full Context" state once it has entered this state.

解压器在其最低压缩状态“无上下文”下启动,然后逐渐过渡到更高的状态。解压缩程序状态机一旦进入“完整上下文”状态,通常不会离开该状态。

   +--------------+         +----------------+         +--------------+
   |  No Context  |  <--->  | Static Context |  <--->  | Full Context |
   +--------------+         +----------------+         +--------------+
        
   +--------------+         +----------------+         +--------------+
   |  No Context  |  <--->  | Static Context |  <--->  | Full Context |
   +--------------+         +----------------+         +--------------+
        

Initially, while working in the "No Context" state, the decompressor has not yet successfully decompressed a packet. Once a packet has been decompressed correctly (for example, upon reception of an initialization packet with static and dynamic information), the decompressor can transit all the way to the "Full Context" state, and only upon repeated failures will it transit back to lower states. However, when that happens it first transits back to the "Static Context" state. There, reception of any packet sent in the FO state is normally sufficient to enable transition to the "Full Context" state again. Only when decompression of several packets sent in the FO state fails in the "Static Context" state will the decompressor go all the way back to the "No Context" state.

最初,在“无上下文”状态下工作时,解压缩程序尚未成功解压缩数据包。一旦数据包被正确解压(例如,在接收到带有静态和动态信息的初始化数据包时),解压器可以一直传输到“完整上下文”状态,并且只有在反复失败时,它才会传输回较低的状态。然而,当这种情况发生时,它首先转换回“静态上下文”状态。在那里,在FO状态下发送的任何分组的接收通常足以再次允许转换到“完整上下文”状态。只有在FO状态下发送的多个数据包在“静态上下文”状态下解压失败时,解压器才会一直返回到“无上下文”状态。

When state transitions are performed is explained in detail in chapter 5.

第5章详细说明了执行状态转换的时间。

4.4. Modes of operation
4.4. 运作模式

The ROHC scheme has three modes of operation, called Unidirectional, Bidirectional Optimistic, and Bidirectional Reliable mode.

ROHC方案有三种操作模式,称为单向、双向乐观和双向可靠模式。

It is important to understand the difference between states, as described in the previous chapter, and modes. These abstractions are orthogonal to each other. The state abstraction is the same for all modes of operation, while the mode controls the logic of state transitions and what actions to perform in each state.

如前一章所述,了解状态与模式之间的差异非常重要。这些抽象是相互正交的。状态抽象对于所有操作模式都是相同的,而模式控制状态转换的逻辑以及在每个状态中执行的操作。

                         +----------------------+
                         |  Unidirectional Mode |
                         |   +--+  +--+  +--+   |
                         |   |IR|  |FO|  |SO|   |
                         |   +--+  +--+  +--+   |
                         +----------------------+
                           ^                  ^
                          /                    \
                         /                      \
                        v                        v
    +----------------------+                  +----------------------+
    |   Optimistic Mode    |                  |    Reliable Mode     |
    |   +--+  +--+  +--+   |                  |   +--+  +--+  +--+   |
    |   |IR|  |FO|  |SO|   | <--------------> |   |IR|  |FO|  |SO|   |
    |   +--+  +--+  +--+   |                  |   +--+  +--+  +--+   |
    +----------------------+                  +----------------------+
        
                         +----------------------+
                         |  Unidirectional Mode |
                         |   +--+  +--+  +--+   |
                         |   |IR|  |FO|  |SO|   |
                         |   +--+  +--+  +--+   |
                         +----------------------+
                           ^                  ^
                          /                    \
                         /                      \
                        v                        v
    +----------------------+                  +----------------------+
    |   Optimistic Mode    |                  |    Reliable Mode     |
    |   +--+  +--+  +--+   |                  |   +--+  +--+  +--+   |
    |   |IR|  |FO|  |SO|   | <--------------> |   |IR|  |FO|  |SO|   |
    |   +--+  +--+  +--+   |                  |   +--+  +--+  +--+   |
    +----------------------+                  +----------------------+
        

The optimal mode to operate in depends on the characteristics of the environment of the compression protocol, such as feedback abilities, error probabilities and distributions, effects of header size variation, etc. All ROHC implementations MUST implement and support all three modes of operation. The three modes are briefly described in the following subsections.

操作的最佳模式取决于压缩协议环境的特征,如反馈能力、错误概率和分布、报头大小变化的影响等。所有ROHC实现必须实现并支持所有三种操作模式。以下小节简要介绍了这三种模式。

Detailed descriptions of the three modes of operation regarding compression and decompression logic are given in chapter 5. The mode transition mechanisms, too, are described in chapter 5.

关于压缩和解压缩逻辑的三种操作模式的详细描述见第5章。模式转换机制也在第5章中描述。

4.4.1. Unidirectional mode -- U-mode
4.4.1. 单向模式——U型

When in the Unidirectional mode of operation, packets are sent in one direction only: from compressor to decompressor. This mode therefore makes ROHC usable over links where a return path from decompressor to compressor is unavailable or undesirable.

在单向操作模式下,数据包仅向一个方向发送:从压缩机到解压器。因此,这种模式使ROHC在从解压器到压缩器的返回路径不可用或不需要的链路上可用。

In U-mode, transitions between compressor states are performed only on account of periodic timeouts and irregularities in the header field change patterns in the compressed packet stream. Due to the periodic refreshes and the lack of feedback for initiation of error recovery, compression in the Unidirectional mode will be less efficient and have a slightly higher probability of loss propagation compared to any of the Bidirectional modes.

在U模式下,压缩机状态之间的转换仅在周期性超时和压缩包流中的报头字段变化模式不规则的情况下执行。由于周期性刷新和缺少用于启动错误恢复的反馈,单向模式下的压缩效率将较低,并且与任何双向模式相比,丢失传播的概率略高。

Compression with ROHC MUST start in the Unidirectional mode. Transition to any of the Bidirectional modes can be performed as soon as a packet has reached the decompressor and it has replied with a feedback packet indicating that a mode transition is desired (see chapter 5).

ROHC压缩必须以单向模式启动。只要数据包到达解压器,并且它已经用指示需要模式转换的反馈数据包作出响应,就可以执行到任何双向模式的转换(参见第5章)。

4.4.2. Bidirectional Optimistic mode -- O-mode
4.4.2. 双向乐观模式——O模式

The Bidirectional Optimistic mode is similar to the Unidirectional mode. The difference is that a feedback channel is used to send error recovery requests and (optionally) acknowledgments of significant context updates from decompressor to compressor (not, however, for pure sequence number updates). Periodic refreshes are not used in the Bidirectional Optimistic mode.

双向乐观模式类似于单向模式。不同之处在于,反馈通道用于将错误恢复请求和(可选)重要上下文更新的确认从解压器发送到压缩器(但不用于纯序列号更新)。在双向乐观模式下不使用定期刷新。

O-mode aims to maximize compression efficiency and sparse usage of the feedback channel. It reduces the number of damaged headers delivered to the upper layers due to residual errors or context invalidation. The frequency of context invalidation may be higher than for R-mode, in particular when long loss/error bursts occur. Refer to section 4.7 for more details.

O模式旨在最大限度地提高压缩效率和稀疏使用反馈通道。它减少了由于残留错误或上下文无效而交付到上层的损坏头的数量。上下文失效的频率可能高于R模式,尤其是在发生长时间丢失/错误突发时。有关更多详细信息,请参阅第4.7节。

4.4.3. Bidirectional Reliable mode -- R-mode
4.4.3. 双向可靠模式——R模式

The Bidirectional Reliable mode differs in many ways from the previous two. The most important differences are a more intensive usage of the feedback channel and a stricter logic at both the compressor and the decompressor that prevents loss of context synchronization between compressor and decompressor except for very high residual bit error rates. Feedback is sent to acknowledge all context updates, including updates of the sequence number field. However, not every packet updates the context in Reliable mode.

双向可靠模式在许多方面与前两种不同。最重要的区别在于,在压缩器和解压缩器上更密集地使用反馈通道和更严格的逻辑,以防止压缩器和解压缩器之间的上下文同步丢失,但非常高的残余误码率除外。发送反馈以确认所有上下文更新,包括序列号字段的更新。然而,并非每个数据包都以可靠模式更新上下文。

R-mode aims to maximize robustness against loss propagation and damage propagation, i.e., minimize the probability of context invalidation, even under header loss/error burst conditions. It may have a lower probability of context invalidation than O-mode, but a larger number of damaged headers may be delivered when the context actually is invalidated. Refer to section 4.7 for more details.

R-mode旨在最大限度地提高对丢失传播和损坏传播的鲁棒性,即最小化上下文失效的概率,即使在报头丢失/错误突发条件下也是如此。与O模式相比,它可能具有更低的上下文失效概率,但是当上下文实际失效时,可能会交付更多的受损头。有关更多详细信息,请参阅第4.7节。

4.5. Encoding methods
4.5. 编码方法

This chapter describes the encoding methods used for header fields. How the methods are applied to each field (e.g., values of associated parameters) is specified in section 5.7.

本章介绍用于标题字段的编码方法。第5.7节规定了如何将方法应用于每个字段(例如,相关参数的值)。

4.5.1. Least Significant Bits (LSB) encoding
4.5.1. 最低有效位(LSB)编码

Least Significant Bits (LSB) encoding is used for header fields whose values are usually subject to small changes. With LSB encoding, the k least significant bits of the field value are transmitted instead of the original field value, where k is a positive integer. After receiving k bits, the decompressor derives the original value using a previously received value as reference (v_ref).

最低有效位(LSB)编码用于报头字段,其值通常会发生微小变化。使用LSB编码,传输字段值的k个最低有效位,而不是原始字段值,其中k是正整数。在接收到k位之后,解压缩器使用先前接收的值作为参考(v_ref)导出原始值。

The scheme is guaranteed to be correct if the compressor and the decompressor each use interpretation intervals

如果压缩机和减压器均使用解释间隔,则保证方案正确

1) in which the original value resides, and

1) 原始值驻留在其中,以及

2) in which the original value is the only value that has the exact same k least significant bits as those transmitted.

2) 其中,原始值是唯一一个与传输的k个最低有效位完全相同的值。

The interpretation interval can be described as a function f(v_ref, k). Let

解释间隔可描述为函数f(v_ref,k)。允许

   f(v_ref, k) = [v_ref - p, v_ref + (2^k - 1) - p]
        
   f(v_ref, k) = [v_ref - p, v_ref + (2^k - 1) - p]
        

where p is an integer.

其中p是一个整数。

         <------- interpretation interval (size is 2^k) ------->
         |-------------+---------------------------------------|
      v_ref - p        v_ref                        v_ref + (2^k-1) - p
        
         <------- interpretation interval (size is 2^k) ------->
         |-------------+---------------------------------------|
      v_ref - p        v_ref                        v_ref + (2^k-1) - p
        

The function f has the following property: for any value k, the k least significant bits will uniquely identify a value in f(v_ref, k).

函数f具有以下属性:对于任何值k,k个最低有效位将唯一标识f(v_ref,k)中的值。

The parameter p is introduced so that the interpretation interval can be shifted with respect to v_ref. Choosing a good value for p will yield a more efficient encoding for fields with certain characteristics. Below are some examples:

引入参数p,以便解释间隔可以相对于v_ref移动。为p选择一个好的值将为具有某些特征的字段产生更有效的编码。以下是一些例子:

a) For field values that are expected always to increase, p can be set to -1. The interpretation interval becomes [v_ref + 1, v_ref + 2^k].

a) 对于预期总是增加的字段值,p可以设置为-1。解释间隔变为[v_ref+1,v_ref+2^k]。

b) For field values that stay the same or increase, p can be set to 0. The interpretation interval becomes [v_ref, v_ref + 2^k - 1].

b) 对于保持不变或增加的字段值,p可以设置为0。解释间隔变为[v_-ref,v_-ref+2^k-1]。

c) For field values that are expected to deviate only slightly from a constant value, p can be set to 2^(k-1) - 1. The interpretation interval becomes [v_ref - 2^(k-1) + 1, v_ref + 2^(k-1)].

c) 对于预期仅略微偏离恒定值的字段值,p可设置为2^(k-1)-1。解释间隔变为[v_ref-2^(k-1)+1,v_ref+2^(k-1)]。

d) For field values that are expected to undergo small negative changes and larger positive changes, such as the RTP TS for video, or RTP SN when there is misordering, p can be set to 2^(k-2) - 1. The interval becomes [v_ref - 2^(k-2) + 1, v_ref + 3 * 2^(k-2)], i.e., 3/4 of the interval is used for positive changes.

d) 对于预期经历小的负变化和大的正变化的字段值,例如视频的RTP TS,或者在出现错误排序时的RTP SN,p可以设置为2^(k-2)-1。间隔变为[v_ref-2^(k-2)+1,v_ref+3*2^(k-2)],即间隔的3/4用于积极变化。

The following is a simplified procedure for LSB compression and decompression; it is modified for robustness and damage propagation protection in the next subsection:

以下是LSB压缩和解压缩的简化过程;在下一小节中对其进行了修改,以实现鲁棒性和损伤传播保护:

1) The compressor (decompressor) always uses v_ref_c (v_ref_d), the last value that has been compressed (decompressed), as v_ref;

1) 压缩器(减压器)始终使用v_ref_c(v_ref_d)作为v_ref;

2) When compressing a value v, the compressor finds the minimum value of k such that v falls into the interval f(v_ref_c, k). Call this function k = g(v_ref_c, v). When only a few distinct values of k are possible, for example due to limitations imposed by packet formats (see section 5.7), the compressor will instead pick the smallest k that puts v in the interval f(v_ref_c, k).

2) 压缩值v时,压缩器会找到k的最小值,使v落入间隔f(v_ref_c,k)。调用这个函数k=g(v_ref_c,v)。当只有几个不同的k值是可能的时,例如由于数据包格式的限制(见第5.7节),压缩器将取而代之的是将v置于间隔f(v_ref_c,k)中的最小k。

3) When receiving m LSBs, the decompressor uses the interpretation interval f(v_ref_d, m), called interval_d. It picks as the decompressed value the one in interval_d whose LSBs match the received m bits.

3) 当接收到m个LSB时,解压器使用解释间隔f(v_ref_d,m),称为间隔d。它选择LSB与接收到的m位匹配的间隔_d中的值作为解压缩值。

Note that the values to be encoded have a finite range; for example, the RTP SN ranges from 0 to 0xFFFF. When the SN value is close to 0 or 0xFFFF, the interpretation interval can straddle the wraparound boundary between 0 and 0xFFFF.

注意,要编码的值具有有限的范围;例如,RTP序列号范围为0到0xFFFF。当SN值接近0或0xFFFF时,解释间隔可跨越0和0xFFFF之间的环绕边界。

The scheme is complicated by two factors: packet loss between the compressor and decompressor, and transmission errors undetected by the lower layer. In the former case, the compressor and decompressor will lose the synchronization of v_ref, and thus also of the interpretation interval. If v is still covered by the intersection(interval_c, interval_d), the decompression will be correct. Otherwise, incorrect decompression will result. The next section will address this issue further.

该方案由两个因素构成:压缩器和解压器之间的数据包丢失,以及下层未检测到的传输错误。在前一种情况下,压缩机和减压器将失去v_ref的同步,从而也失去解释间隔的同步。如果v仍然被交叉点覆盖(间隔c、间隔d),则解压缩将是正确的。否则,将导致不正确的解压缩。下一节将进一步讨论这个问题。

In the case of undetected transmission errors, the corrupted LSBs will give an incorrectly decompressed value that will later be used as v_ref_d, which in turn is likely to lead to damage propagation. This problem is addressed by using a secure reference, i.e., a reference value whose correctness is verified by a protecting CRC. Consequently, the procedure 1) above is modified as follows:

在未检测到传输错误的情况下,损坏的LSB将给出一个错误的解压缩值,该值稍后将用作v_ref_d,这反过来可能导致损坏传播。该问题通过使用安全引用(即,其正确性由保护CRC验证的引用值)来解决。因此,上述程序1)修改如下:

1) a) the compressor always uses as v_ref_c the last value that has been compressed and sent with a protecting CRC. b) the decompressor always uses as v_ref_d the last correct value, as verified by a successful CRC.

1) a) 压缩器始终使用最后一个已压缩并通过保护CRC发送的值作为v_ref_c。b) 解压器始终使用最后一个正确值作为v_ref_d,并通过成功的CRC进行验证。

Note that in U/O-mode, 1) b) is modified so that if decompression of the SN fails using the last verified SN reference, another decompression attempt is made using the last but one verified SN reference. This procedure mitigates damage propagation when a small CRC fails to detect a damaged value. See section 5.3.2.2.3 for further details.

注意,在U/O模式中,1)b)被修改,以便如果使用最后一个验证的SN参考对SN进行解压缩失败,则使用最后但只有一个验证的SN参考进行另一次解压缩尝试。当小CRC无法检测到损坏值时,此程序可减轻损坏传播。详见第5.3.2.2.3节。

4.5.2. Window-based LSB encoding (W-LSB encoding)
4.5.2. 基于窗口的LSB编码(W-LSB编码)

This section describes how to modify the simplified algorithm in 4.5.1 to achieve robustness.

本节介绍如何修改4.5.1中的简化算法以实现鲁棒性。

The compressor may not be able to determine the exact value of v_ref_d that will be used by the decompressor for a particular value v, since some candidates for v_ref_d may have been lost or damaged. However, by using feedback or by making reasonable assumptions, the compressor can limit the candidate set. The compressor then calculates k such that no matter which v_ref_d in the candidate set the decompressor uses, v is covered by the resulting interval_d.

压缩机可能无法确定减压器将用于特定值v的v_ref_d的准确值,因为v_ref_d的一些候选值可能已丢失或损坏。然而,通过使用反馈或作出合理假设,压缩器可以限制候选集。然后,压缩器计算k,使得无论解压器使用候选集中的哪个v_ref_d,v都被得到的间隔所覆盖。

Since the decompressor always uses as the reference the last received value where the CRC succeeded, the compressor maintains a sliding window containing the candidates for v_ref_d. The sliding window is initially empty. The following operations are performed on the sliding window by the compressor:

由于解压器始终使用上次接收到的CRC成功的值作为参考,因此压缩器保持一个滑动窗口,其中包含v_ref_d的候选值。滑动窗口最初是空的。压缩机对滑动窗口执行以下操作:

1) After sending a value v (compressed or uncompressed) protected by a CRC, the compressor adds v to the sliding window.

1) 发送受CRC保护的值v(压缩或未压缩)后,压缩器将v添加到滑动窗口。

2) For each value v being compressed, the compressor chooses k = max(g(v_min, v), g(v_max, v)), where v_min and v_max are the minimum and maximum values in the sliding window, and g is the function defined in the previous section.

2) 对于每个被压缩的值v,压缩器选择k=max(g(v_min,v),g(v_max,v)),其中v_min和v_max是滑动窗口中的最小值和最大值,g是上一节中定义的函数。

3) When the compressor is sufficiently confident that a certain value v and all values older than v will not be used as reference by the decompressor, the window is advanced by removing those values (including v). The confidence may be obtained by various means. In R-mode, an ACK from the decompressor implies that values older than the ACKed one can be removed from the sliding window. In U/O-mode there is always a CRC to verify correct decompression, and a sliding window with a limited maximum width is used. The window width is an implementation dependent optimization parameter.

3) 当压缩机充分确信某个值v和大于v的所有值不会被解压器用作参考时,通过删除这些值(包括v),窗口将提前。可通过各种方法获得置信度。在R模式下,来自解压器的ACK意味着可以从滑动窗口中删除比ACK旧的值。在U/O模式中,总是有一个CRC来验证正确的解压缩,并且使用了一个最大宽度有限的滑动窗口。窗口宽度是一个依赖于实现的优化参数。

Note that the decompressor follows the procedure described in the previous section, except that in R-mode it MUST ACK each header received with a succeeding CRC (see also section 5.5).

请注意,解压器遵循上一节中描述的过程,但在R模式下,它必须使用后续CRC对接收到的每个报头进行确认(另请参见第5.5节)。

4.5.3. Scaled RTP Timestamp encoding
4.5.3. 缩放RTP时间戳编码

The RTP Timestamp (TS) will usually not increase by an arbitrary number from packet to packet. Instead, the increase is normally an integral multiple of some unit (TS_STRIDE). For example, in the case of audio, the sample rate is normally 8 kHz and one voice frame may

RTP时间戳(TS)在数据包之间通常不会增加任意数量。相反,增加通常是某个单位的整数倍(t_)。例如,在音频的情况下,采样率通常为8 kHz,并且一个语音帧可能会丢失

cover 20 ms. Furthermore, each voice frame is often carried in one RTP packet. In this case, the RTP increment is always n * 160 (= 8000 * 0.02), for some integer n. Note that silence periods have no impact on this, as the sample clock at the source normally keeps running without changing either frame rate or frame boundaries.

覆盖20毫秒。此外,每个语音帧通常包含在一个RTP包中。在这种情况下,对于某些整数n,RTP增量始终为n*160(=8000*0.02)。请注意,静默周期对此没有影响,因为源处的采样时钟通常保持运行,而不改变帧速率或帧边界。

In the case of video, there is usually a TS_STRIDE as well when the video frame level is considered. The sample rate for most video codecs is 90 kHz. If the video frame rate is fixed, say, to 30 frames/second, the TS will increase by n * 3000 (= n * 90000 / 30) between video frames. Note that a video frame is often divided into several RTP packets to increase robustness against packet loss. In this case several RTP packets will carry the same TS.

在视频的情况下,当考虑视频帧级别时,通常也会出现Tsu步幅。大多数视频编解码器的采样率为90 kHz。如果视频帧速率是固定的,例如,为30帧/秒,则TS将在视频帧之间增加n×3000(=n×90000/30)。请注意,一个视频帧通常被划分为几个RTP数据包,以增强对数据包丢失的鲁棒性。在这种情况下,几个RTP数据包将携带相同的TS。

When using scaled RTP Timestamp encoding, the TS is downscaled by a factor of TS_STRIDE before compression. This saves

当使用缩放的RTP时间戳编码时,TS在压缩之前会缩小一个TS_步长的因子。这节省了

floor(log2(TS_STRIDE))

楼层(后勤2(大步))

bits for each compressed TS. TS and TS_SCALED satisfy the following equality:

每个压缩TS和TS_的比特满足以下等式:

      TS = TS_SCALED * TS_STRIDE + TS_OFFSET
        
      TS = TS_SCALED * TS_STRIDE + TS_OFFSET
        

TS_STRIDE is explicitly, and TS_OFFSET implicitly, communicated to the decompressor. The following algorithm is used:

TS_STRIDE显式地和TS_OFFSET隐式地与解压缩程序通信。使用以下算法:

1. Initialization: The compressor sends to the decompressor the value of TS_STRIDE and the absolute value of one or several TS fields. The latter are used by the decompressor to initialize TS_OFFSET to (absolute value) modulo TS_STRIDE. Note that TS_OFFSET is the same regardless of which absolute value is used, as long as the unscaled TS value does not wrap around; see 4) below.

1. 初始化:压缩器向解压缩器发送TS_步长值和一个或多个TS字段的绝对值。解压器使用后者将TS_偏移量初始化为(绝对值)模TS_步长。请注意,只要未标度的TS值不环绕,无论使用哪一个绝对值,TS_偏移量都是相同的;见下文4)。

2. Compression: After initialization, the compressor no longer compresses the original TS values. Instead, it compresses the downscaled values: TS_SCALED = TS / TS_STRIDE. The compression method could be either W-LSB encoding or the timer-based encoding described in the next section.

2. 压缩:初始化后,压缩器不再压缩原始TS值。相反,它压缩缩小的值:TS_SCALED=TS/TS_STRIDE。压缩方法可以是W-LSB编码,也可以是下一节描述的基于定时器的编码。

3. Decompression: When receiving the compressed value of TS_SCALED, the decompressor first derives the value of the original TS_SCALED. The original RTP TS is then calculated as TS = TS_SCALED * TS_STRIDE + TS_OFFSET.

3. 解压缩:当接收到TS_缩放的压缩值时,解压缩器首先导出原始TS_缩放的值。然后将原始RTP TS计算为TS=TS_缩放*TS_步幅+TS_偏移。

4. Offset at wraparound: Wraparound of the unscaled 32-bit TS will invalidate the current value of TS_OFFSET used in the equation above. For example, let us assume TS_STRIDE = 160 = 0xA0 and the

4. 环绕时的偏移量:未标度32位TS的环绕将使上述等式中使用的TS_偏移量的当前值无效。例如,假设TS_STRIDE=160=0xA0

current TS = 0xFFFFFFF0. TS_OFFSET is then 0x50 = 80. Then if the next RTP TS = 0x00000130 (i.e., the increment is 160 * 2 = 320), the new TS_OFFSET should be 0x00000130 modulo 0xA0 = 0x90 = 144. The compressor is not required to re-initialize TS_OFFSET at wraparound. Instead, the decompressor MUST detect wraparound of the unscaled TS (which is trivial) and update TS_OFFSET to

当前TS=0xFFFFF0。TS_偏移量为0x50=80。然后,如果下一个RTP TS=0x0000030(即,增量为160*2=320),则新的TS_偏移量应为0x0000030模0xA0=0x90=144。压缩机无需在环绕时重新初始化TS_偏移。相反,解压器必须检测未标度TS的环绕(这很简单),并将TS_偏移量更新为

         TS_OFFSET = (Wrapped around unscaled TS) modulo TS_STRIDE
        
         TS_OFFSET = (Wrapped around unscaled TS) modulo TS_STRIDE
        

5. Interpretation interval at wraparound: Special rules are needed for the interpretation interval of the scaled TS at wraparound, since the maximum scaled TS, TSS_MAX, (0xFFFFFFFF / TS_STRIDE) may not have the form 2^m - 1. For example, when TS_STRIDE is 160, the scaled TS is at most 26843545 which has LSBs 10011001. The wraparound boundary between the TSS_MAX may thus not correspond to a natural boundary between LSBs.

5. 环绕时的解释间隔:环绕时缩放TS的解释间隔需要特殊规则,因为最大缩放TS、TSS_MAX(0xFFFFFFFF/TS_步长)的形式可能不是2^m-1。例如,当TS_步幅为160时,缩放的TS最多为26843545,其LSB为10011001。因此,TSS_MAX之间的环绕边界可能不对应于LSB之间的自然边界。

               interpretation interval
          |<------------------------------>|
        
               interpretation interval
          |<------------------------------>|
        
                       unused                       scaled TS
      ------------|--------------|---------------------->
                          TSS_MAX         zero
        
                       unused                       scaled TS
      ------------|--------------|---------------------->
                          TSS_MAX         zero
        

When TSS_MAX is part of the interpretation interval, a number of unused values are inserted into it after TSS_MAX such that their LSBs follow naturally upon each other. For example, for TS_STRIDE = 160 and k = 4, values corresponding to the LSBs 1010 through 1111 are inserted. The number of inserted values depends on k and the LSBs of the maximum scaled TS. The number of valid values in the interpretation interval should be high enough to maintain robustness. This can be ensured by the following rule:

当TSS_MAX是解释间隔的一部分时,将在TSS_MAX之后插入许多未使用的值,以便它们的LSB自然地彼此跟随。例如,对于TS_步长=160和k=4,插入对应于lsb 1010到1111的值。插入值的数量取决于k和最大缩放TS的LSB。解释间隔中的有效值数量应足够高,以保持稳健性。这可以通过以下规则来确保:

Let a be the number of LSBs needed if there was no wraparound, and let b be the number of LSBs needed to disambiguate between TSS_MAX and zero where the a LSBs of TSS_MAX are set to zero. The number of LSB bits to send while TSS_MAX or zero is part of the interpretation interval is b.

设a为无环绕时所需的LSB数量,设b为TSS_MAX的a LSB设置为零时,在TSS_MAX和零之间消除歧义所需的LSB数量。当TSS_MAX或zero是解释间隔的一部分时,要发送的LSB位数为b。

This scaling method can be applied to many frame-based codecs. However, the value of TS_STRIDE might change during a session, for example as a result of adaptation strategies. If that happens, the unscaled TS is compressed until re-initialization of the new TS_STRIDE and TS_OFFSET is completed.

这种缩放方法可以应用于许多基于帧的编解码器。然而,在一次训练过程中,步幅的值可能会发生变化,例如,由于适应策略的影响。如果发生这种情况,则压缩未缩放的TS,直到完成新TS_步幅和TS_偏移的重新初始化。

4.5.4. Timer-based compression of RTP Timestamp
4.5.4. 基于定时器的RTP时间戳压缩

The RTP Timestamp [RFC 1889] is defined to identify the number of the first sample used to generate the payload. When 1) RTP packets carry payloads corresponding to a fixed sampling interval, 2) the sampling is done at a constant rate, and 3) packets are generated in lock-step with sampling, then the timestamp value will closely approximate a linear function of the time of day. This is the case for conversational media, such as interactive speech. The linear ratio is determined by the source sample rate. The linear pattern can be complicated by packetization (e.g., in the case of video where a video frame usually corresponds to several RTP packets) or frame rearrangement (e.g., B-frames are sent out-of-order by some video codecs).

RTP时间戳[RFC 1889]被定义为标识用于生成有效负载的第一个样本的编号。当1)RTP数据包携带与固定采样间隔相对应的有效载荷时,2)以恒定速率进行采样,3)数据包与采样同步生成,则时间戳值将近似于一天时间的线性函数。对话媒体就是这样,比如交互式演讲。线性比率由源采样率确定。线性模式可以通过分组(例如,在视频帧通常对应于多个RTP分组的情况下)或帧重排(例如,B帧由一些视频编解码器无序发送)而变得复杂。

With a fixed sample rate of 8 kHz, 20 ms in the time domain is equivalent to an increment of 160 in the unscaled TS domain, and to an increment of 1 in the scaled TS domain with TS_STRIDE = 160.

在固定采样率为8 kHz的情况下,时域中的20 ms相当于未标度TS域中的增量160,在标度TS域中的增量1,且TS_步长=160。

As a consequence, the (scaled) TS of headers arriving at the decompressor will be a linear function of time of day, with some deviation due to the delay jitter (and the clock inaccuracies) between the source and the decompressor. In normal operation, i.e., no crashes or failures, the delay jitter will be bounded to meet the requirements of conversational real-time traffic. Hence, by using a local clock the decompressor can obtain an approximation of the (scaled) TS in the header to be decompressed by considering its arrival time. The approximation can then be refined with the k LSBs of the (scaled) TS carried in the header. The value of k required to ensure correct decompression is a function of the jitter between the source and the decompressor.

因此,到达解压器的报头的(缩放的)TS将是一天中时间的线性函数,由于源和解压器之间的延迟抖动(和时钟不准确)而存在一些偏差。在正常操作中,即没有崩溃或故障,延迟抖动将被限制以满足会话实时流量的要求。因此,通过使用本地时钟,解压器可以通过考虑其到达时间来获得要解压的报头中的(缩放的)TS的近似值。然后可以使用报头中携带的(缩放的)TS的k lsb来细化近似值。确保正确解压缩所需的k值是源和解压缩器之间抖动的函数。

If the compressor knows the potential jitter introduced between compressor and decompressor, it can determine k by using a local clock to estimate jitter in packet arrival times, or alternatively it can use a fixed k and discard packets arriving too much out of time.

如果压缩器知道在压缩器和解压缩器之间引入的潜在抖动,那么它可以通过使用本地时钟来估计分组到达时间中的抖动来确定k,或者,它可以使用固定的k并丢弃到达过多超时的分组。

The advantages of this scheme include:

这项计划的优点包括:

a) The size of the compressed TS is constant and small. In particular, it does NOT depend on the length of silence intervals. This is in contrast to other TS compression techniques, which at the beginning of a talkspurt require sending a number of bits dependent on the duration of the preceding silence interval.

a) 压缩TS的大小恒定且较小。特别是,它不取决于静默间隔的长度。这与其他TS压缩技术形成对比,其他TS压缩技术在talkspurt开始时需要根据之前静默间隔的持续时间发送一定数量的比特。

b) No synchronization is required between the clock local to the compressor and the clock local to the decompressor.

b) 压缩机本地时钟和解压缩器本地时钟之间不需要同步。

Note that although this scheme can be made to work using both scaled and unscaled TS, in practice it is always combined with scaled TS encoding because of the less demanding requirement on the clock resolution, e.g., 20 ms instead of 1/8 ms. Therefore, the algorithm described below assumes that the clock-based encoding scheme operates on the scaled TS. The case of unscaled TS would be similar, with changes to scale factors.

注意,尽管可以使用缩放和非缩放TS使该方案工作,但在实践中,由于对时钟分辨率的要求较低,例如,20毫秒而不是1/8毫秒,因此它总是与缩放TS编码相结合,下面描述的算法假设基于时钟的编码方案在缩放的TS上运行。未缩放的TS的情况将类似,随着缩放因子的变化。

The major task of the compressor is to determine the value of k. Its sliding window now contains not only potential reference values for the TS but also their times of arrival at the compressor.

压缩机的主要任务是确定k值。其滑动窗口现在不仅包含TS的潜在参考值,还包含TS到达压缩机的时间。

1) The compressor maintains a sliding window

1) 压缩机保持一个滑动窗口

{(T_j, a_j), for each header j that can be used as a reference},

{(T_j,a_j),对于可以用作引用的每个头j},

where T_j is the scaled TS for header j, and a_j is the arrival time of header j. The sliding window serves the same purpose as the W-LSB sliding window of section 4.5.2.

其中T_j是报头j的缩放TS,a_j是报头j的到达时间。滑动窗的用途与第4.5.2节中的W-LSB滑动窗相同。

2) When a new header n arrives with T_n as the scaled TS, the compressor notes the arrival time a_n. It then calculates

2) 当一个新的报头n以T_n作为缩放的TS到达时,压缩器记录到达时间a_n。然后进行计算

Max_Jitter_BC =

最大抖动=

max {|(T_n - T_j) - ((a_n - a_j) / TIME_STRIDE)|, for all headers j in the sliding window},

最大{|(T|n-T|j)-((a|n-a|j)/时间|步长)|,用于滑动窗口中的所有标题j},

where TIME_STRIDE is the time interval equivalent to one TS_STRIDE, e.g., 20 ms. Max_Jitter_BC is the maximum observed jitter before the compressor, in units of TS_STRIDE, for the headers in the sliding window.

其中,TIME_STRIDE是相当于一个TS_STRIDE的时间间隔,例如,20 ms。Max_Jitter_BC是压缩机前观察到的最大抖动,以TS_STRIDE为单位,用于滑动窗口中的标题。

3) k is calculated as

3) k计算为:

k = ceiling(log2(2 * J + 1),

k=天花板(log2(2*J+1),

where J = Max_Jitter_BC + Max_Jitter_CD + 2.

其中,J=最大抖动\u BC+最大抖动\u CD+2。

Max_Jitter_CD is the upper bound of jitter expected on the communication channel between compressor and decompressor (CD-CC). It depends only on the characteristics of CD-CC.

Max_Jitter_CD是压缩器和解压缩器(CD-CC)之间通信信道上预期的抖动上限。这仅取决于CD-CC的特性。

The constant 2 accounts for the quantization error introduced by the clocks at the compressor and decompressor, which can be +/-1.

常数2说明了压缩机和减压器处时钟引入的量化误差,可以是+/-1。

Note that the calculation of k follows the compression algorithm described in section 4.5.1, with p = 2^(k-1) - 1.

注意,k的计算遵循第4.5.1节中描述的压缩算法,p=2^(k-1)-1。

4) The sliding window is subject to the same window operations as in section 4.5.2, 1) and 3), except that the values added and removed are paired with their arrival times.

4) 滑动窗口的窗口操作与第4.5.2、1)和3)节中的窗口操作相同,但添加和删除的值与其到达时间成对。

Decompressor:

减压器:

1) The decompressor uses as its reference header the last correctly (as verified by CRC) decompressed header. It maintains the pair (T_ref, a_ref), where T_ref is the scaled TS of the reference header, and a_ref is the arrival time of the reference header.

1) 解压器使用最后一个正确(经CRC验证)的解压头作为其参考头。它维护该对(T_ref,a_ref),其中T_ref是参考报头的缩放TS,a_ref是参考报头的到达时间。

2) When receiving a compressed header n at time a_n, the approximation of the original scaled TS is calculated as:

2) 当在时间a\n接收到压缩报头n时,原始缩放TS的近似值计算为:

T_approx = T_ref + (a_n - a_ref) / TIME_STRIDE.

T_近似值=T_参考+(a_n-a_参考)/时间步长。

3) The approximation is then refined by the k least significant bits carried in header n, following the decompression algorithm of section 4.5.1, with p = 2^(k-1) - 1.

3) 然后,按照第4.5.1节的解压缩算法,利用报头n中携带的k个最低有效位对近似值进行细化,p=2^(k-1)-1。

Note: The algorithm does not assume any particular pattern in the packets arriving at the compressor, i.e., it tolerates reordering before the compressor and nonincreasing RTP Timestamp behavior.

注意:该算法在到达压缩器的数据包中不假设任何特定模式,即它允许在压缩器之前重新排序和不增加RTP时间戳行为。

Note: Integer arithmetic is used in all equations above. If TIME_STRIDE is not equal to an integral number of clock ticks, time must be normalized such that TIME_STRIDE is an integral number of clock ticks. For example, if a clock tick is 20 ms and TIME_STRIDE is 30 ms, (a_n - a_ref) in 2) can be multiplied by 3 and TIME_STRIDE can have the value 2.

注:上述所有方程式均采用整数算法。如果时间步长不等于时钟节拍的整数,则必须对时间进行归一化,使时间步长为时钟节拍的整数。例如,如果时钟滴答声为20毫秒,时间步长为30毫秒,(2)中的a_n-a_ref)可以乘以3,时间步长的值可以为2。

Note: The clock resolution of the compressor or decompressor can be worse than TIME_STRIDE, in which case the difference, i.e., actual resolution - TIME_STRIDE, is treated as additional jitter in the calculation of k.

注:压缩器或解压缩器的时钟分辨率可能比时间步长差,在这种情况下,差异,即实际分辨率-时间步长,在k的计算中被视为附加抖动。

Note: The clock resolution of the decompressor may be communicated to the compressor using the CLOCK feedback option.

注:可使用时钟反馈选项将减压器的时钟分辨率传送至压缩机。

Note: The decompressor may observe the jitter and report this to the compressor using the JITTER feedback option. The compressor may use this information to refine its estimate of Max_Jitter_CD.

注意:减压器可能会观察到抖动,并使用抖动反馈选项向压缩机报告。压缩器可以使用此信息来优化其最大抖动CD的估计值。

4.5.5. Offset IP-ID encoding
4.5.5. 偏移IP-ID编码

As all IPv4 packets have an IP Identifier to allow for fragmentation, ROHC provides for transparent compression of this ID. There is no explicit support in ROHC for the IPv6 fragmentation header, so there is never a need to discuss IP IDs outside the context of IPv4.

由于所有IPv4数据包都有允许分段的IP标识符,ROHC提供了此ID的透明压缩。ROHC中没有明确支持IPv6分段标头,因此永远不需要在IPv4上下文之外讨论IP ID。

This section assumes (initially) that the IPv4 stack at the source host assigns IP-ID according to the value of a 2-byte counter which is increased by one after each assignment to an outgoing packet. Therefore, the IP-ID field of a particular IPv4 packet flow will increment by 1 from packet to packet except when the source has emitted intermediate packets not belonging to that flow.

本节假设(最初)源主机上的IPv4堆栈根据2字节计数器的值分配IP-ID,该值在每次分配到传出数据包后增加1。因此,特定IPv4分组流的IP-ID字段将在分组之间增加1,除非源已发出不属于该流的中间分组。

For such IPv4 stacks, the RTP SN will increase by 1 for each packet emitted and the IP-ID will increase by at least the same amount. Thus, it is more efficient to compress the offset, i.e., (IP-ID - RTP SN), instead of IP-ID itself.

对于这种IPv4协议栈,RTP SN将为每个发送的数据包增加1,IP-ID将至少增加相同的数量。因此,压缩偏移量(即(IP-ID-RTP-SN))比压缩IP-ID本身更有效。

The remainder of section 4.5.5 describes how to compress/decompress the sequence of offsets using W-LSB encoding/decoding, with p = 0 (see section 4.5.1). All IP-ID arithmetic is done using unsigned 16-bit quantities, i.e., modulo 2^16.

第4.5.5节的其余部分描述了如何使用W-LSB编码/解码(p=0)压缩/解压缩偏移序列(见第4.5.1节)。所有IP-ID算法都是使用无符号16位量完成的,即模2^16。

Compressor:

压缩机:

The compressor uses W-LSB encoding (section 4.5.2) to compress a sequence of offsets

压缩机使用W-LSB编码(第4.5.2节)压缩偏移序列

Offset_i = ID_i - SN_i,

偏移量i=ID\u i-SN\u i,

where ID_i and SN_i are the values of the IP-ID and RTP SN of header i. The sliding window contains such offsets and not the values of header fields, but the rules for adding and deleting offsets from the window otherwise follow section 4.5.2.

其中ID_i和SN_i是报头i的IP-ID和RTP SN的值。滑动窗口包含此类偏移量,而不是标题字段的值,但添加和删除窗口偏移量的规则遵循第4.5.2节。

Decompressor:

减压器:

The reference header is the last correctly (as verified by CRC) decompressed header.

引用标头是最后一个正确(通过CRC验证)解压缩的标头。

When receiving a compressed packet m, the decompressor calculates Offset_ref = ID_ref - SN_ref, where ID_ref and SN_ref are the values of IP-ID and RTP SN in the reference header, respectively.

当接收到压缩分组m时,解压缩器计算偏移量_ref=ID_ref-SN_ref,其中ID_ref和SN_ref分别是参考报头中的IP-ID和RTP SN的值。

Then W-LSB decoding is used to decompress Offset_m, using the received LSBs in packet m and Offset_ref. Note that m may contain zero LSBs for Offset_m, in which case Offset_m = Offset_ref.

然后,使用分组m和Offset_ref中接收到的LSB,使用W-LSB解码来解压缩Offset_m。注意,m可能包含用于Offset_m的零LSB,在这种情况下Offset_m=Offset_ref。

Finally, the IP-ID for packet m is regenerated as

最后,分组m的IP-ID被重新生成为

IP-ID for m = decompressed SN of packet m + Offset_m

m的IP-ID=数据包m的解压缩序列号+偏移量

Network byte order:

网络字节顺序:

Some IPv4 stacks do use a counter to generate IP ID values as described, but do not transmit the contents of this counter in network byte order, but instead send the two octets reversed. In this case, the compressor can compress the IP-ID field after swapping the bytes. Consequently, the decompressor also swaps the bytes of the IP-ID after decompression to regenerate the original IP-ID. This requires that the compressor and the decompressor synchronize on the byte order of the IP-ID field using the NBO or NBO2 flag (see section 5.7).

某些IPv4堆栈确实使用计数器生成所述的IP ID值,但不按网络字节顺序传输此计数器的内容,而是反向发送两个八位字节。在这种情况下,压缩器可以在交换字节后压缩IP-ID字段。因此,解压器还交换解压后IP-ID的字节以重新生成原始IP-ID。这要求压缩器和解压器使用NBO或NBO2标志在IP-ID字段的字节顺序上同步(见第5.7节)。

Random IP Identifier:

随机IP标识符:

Some IPv4 stacks generate the IP Identifier values using a pseudo-random number generator. While this may provide some security benefits, it makes it pointless to attempt compressing the field. Therefore, the compressor should detect such random behavior of the field. After detection and synchronization with the decompressor using the RND or RND2 flag, the field is sent as-is in its entirety as additional octets after the compressed header.

某些IPv4堆栈使用伪随机数生成器生成IP标识符值。虽然这可能会提供一些安全好处,但它使压缩字段变得毫无意义。因此,压缩机应检测现场的这种随机行为。在使用RND或RND2标志检测并与解压器同步后,字段作为压缩头后的附加八位字节整体发送。

4.5.6. Self-describing variable-length values
4.5.6. 自描述可变长度值

The values of TS_STRIDE and a few other compression parameters can vary widely. TS_STRIDE can be 160 for voice and 90 000 for 1 f/s video. To optimize the transfer of such values, a variable number of octets is used to encode them. The number of octets used is determined by the first few bits of the first octet:

TS_STRIDE和一些其他压缩参数的值可能变化很大。语音步幅为160,1f/s视频步幅为90000。为了优化这些值的传输,使用可变数量的八位字节对它们进行编码。使用的八位字节数由第一个八位字节的前几位决定:

First bit is 0: 1 octet. 7 bits transferred. Up to 127 decimal. Encoded octets in hexadecimal: 00 to 7F

第一位是0:1八位字节。传输7位。最多127位小数。十六进制编码的八位字节:00到7F

First bits are 10: 2 octets. 14 bits transferred. Up to 16 383 decimal. Encoded octets in hexadecimal: 80 00 to BF FF

第一位是10:2八位字节。传输14位。最多16 383位小数。十六进制编码的八位字节:80 00到BF FF

First bits are 110: 3 octets. 21 bits transferred. Up to 2 097 151 decimal. Encoded octets in hexadecimal: C0 00 00 to DF FF FF

第一位是110:3个八位字节。传输21位。最多2 097 151位小数。十六进制编码的八位字节:C000到DF FF

First bits are 111: 4 octets. 29 bits transferred. Up to 536 870 911 decimal. Encoded octets in hexadecimal: E0 00 00 00 to FF FF FF FF

第一位是111:4八位字节。传输29位。最多536 870 911十进制。十六进制编码的八位字节:E000到FF FF

4.5.7. Encoded values across several fields in compressed headers
4.5.7. 压缩头中跨多个字段的编码值

When a compressed header has an extension, pieces of an encoded value can be present in more than one field. When an encoded value is split over several fields in this manner, the more significant bits of the value are closer to the beginning of the header. If the number of bits available in compressed header fields exceeds the number of bits in the value, the most significant field is padded with zeroes in its most significant bits.

当压缩头具有扩展名时,编码值的片段可以出现在多个字段中。当一个编码值以这种方式分割到多个字段上时,该值的有效位越靠近报头的开头。如果压缩头字段中的可用位数超过值中的位数,则最高有效位字段的最高有效位将用零填充。

For example, an unscaled TS value can be transferred using an UOR-2 header (see section 5.7) with an extension of type 3. The Tsc bit of the extension is then unset (zero) and the variable length TS field of the extension is 4 octets, with 29 bits available for the TS (see section 4.5.6). The UOR-2 TS field will contain the three most significant bits of the unscaled TS, and the 4-octet TS field in the extension will contain the remaining 29 bits.

例如,未标度TS值可使用UOR-2表头(见第5.7节)和类型3扩展传输。然后,扩展的Tsc位被取消设置(零),扩展的可变长度TS字段为4个八位字节,有29位可用于TS(见第4.5.6节)。UOR-2 TS字段将包含未标度TS中的三个最高有效位,而扩展中的4个八位组TS字段将包含剩余的29位。

4.6. Errors caused by residual errors
4.6. 残余误差引起的误差

ROHC is designed under the assumption that packets can be damaged between the compressor and decompressor, and that such damaged packets can be delivered to the decompressor ("residual errors").

ROHC的设计假设数据包可能在压缩器和解压器之间损坏,并且此类损坏的数据包可能被传送到解压器(“残余错误”)。

Residual errors may damage the SN in compressed headers. Such damage will cause generation of a header which upper layers may not be able to distinguish from a correct header. When the compressed header contains a CRC, the CRC will catch the bad header with a probability dependent on the size of the CRC. When ROHC does not detect the bad header, it will be delivered to upper layers.

残余错误可能会损坏压缩头中的序列号。此类损坏将导致产生上层可能无法与正确收割台区分的收割台。当压缩报头包含CRC时,CRC将以依赖于CRC大小的概率捕获坏报头。当ROHC没有检测到坏头时,它将被传送到上层。

Damage is not confined to the SN:

损坏不限于SN:

a) Damage to packet type indication bits can cause a header to be interpreted as having a different packet type.

a) 分组类型指示位的损坏可导致报头被解释为具有不同的分组类型。

b) Damage to CID information may cause a packet to be interpreted according to another context and possibly also according to another profile. Damage to CIDs will be more harmful when a large part of the CID space is being used, so that it is likely that the damaged CID corresponds to an active context.

b) 对CID信息的破坏可能导致根据另一上下文以及可能也根据另一概要文件来解释分组。当使用大部分CID空间时,对CID的损坏将更加有害,因此损坏的CID很可能对应于活动上下文。

c) Feedback information can also be subject to residual errors, both when feedback is piggybacked and when it is sent in separate ROHC packets. ROHC uses sanity checks and adds CRCs to vital feedback information to allow detection of some damaged feedback.

c) 反馈信息也可能受到残余错误的影响,无论是在反馈被携带时,还是在单独的ROHC数据包中发送时。ROHC使用健全性检查,并将CRC添加到重要反馈信息中,以允许检测某些损坏的反馈。

Note that context damage can also result in generation of incorrect headers; section 4.7 elaborates further on this.

注意,上下文损坏也可能导致生成错误的标题;第4.7节对此作了进一步阐述。

4.7. Impairment considerations
4.7. 减值考虑

Impairments to headers can be classified into the following types:

标题的损害可分为以下类型:

(1) the lower layer was not able to decode the packet and did not deliver it to ROHC,

(1) 下层无法解码数据包,也没有将其发送给ROHC,

(2) the lower layer was able to decode the packet, but discarded it because of a detected error,

(2) 下层能够解码数据包,但由于检测到错误而丢弃了数据包,

(3) ROHC detected an error in the generated header and discarded the packet, or

(3) ROHC在生成的报头中检测到错误并丢弃该数据包,或

(4) ROHC did not detect that the regenerated header was damaged and delivered it to upper layers.

(4) ROHC未检测到再生集管损坏,并将其交付至上层。

Impairments cause loss or damage of individual headers. Some impairment scenarios also cause context invalidation, which in turn results in loss propagation and damage propagation. Damage propagation and undetected residual errors both contribute to the number of damaged headers delivered to upper layers. Loss propagation and impairments resulting in loss or discarding of single packets both contribute to the packet loss seen by upper layers.

损坏会导致单个收割台的丢失或损坏。某些减值场景还会导致上下文失效,进而导致损失传播和损害传播。损坏传播和未检测到的残余误差都会导致交付到上层的损坏标头数量增加。丢失传播和导致单个数据包丢失或丢弃的损伤都会导致上层看到的数据包丢失。

Examples of context invalidating scenarios are:

上下文失效场景的示例包括:

(a) Impairment of type (4) on the forward channel, causing the decompressor to update its context with incorrect information;

(a) 前向通道上类型(4)的损坏,导致解压缩器使用不正确的信息更新其上下文;

(b) Loss/error burst of pattern update headers: Impairments of types (1),(2) and (3) on consecutive pattern update headers; a pattern update header is a header carrying a new pattern information, e.g., at the beginning of a new talk spurt; this causes the decompressor to lose the pattern update information;

(b) 模式更新头丢失/错误突发:连续模式更新头上的(1)、(2)和(3)类损伤;模式更新报头是承载新模式信息的报头,例如,在新通话突发的开始处;这导致解压缩器丢失模式更新信息;

(c) Loss/error burst of headers: Impairments of types (1),(2) and (3) on a number of consecutive headers that is large enough to cause the decompressor to lose the SN synchronization;

(c) 报头丢失/错误突发:多个连续报头(1)、(2)和(3)类型的损坏,其大到足以导致解压缩器丢失SN同步;

(d) Impairment of type (4) on the feedback channel which mimics a valid ACK and makes the compressor update its context;

(d) 反馈信道上类型(4)的损伤,其模拟有效ACK并使压缩器更新其上下文;

(e) a burst of damaged headers (3) erroneously triggers the "k-out-of-n" rule for detecting context invalidation, which results in a NACK/update sequence during which headers are discarded.

(e) 突发损坏的报头(3)错误地触发用于检测上下文无效的“n中取k”规则,从而导致丢弃报头的NACK/更新序列。

Scenario (a) is mitigated by the CRC carried in all context updating headers. The larger the CRC, the lower the chance of context invalidation caused by (a). In R-mode, the CRC of context updating headers is always 7 bits or more. In U/O-mode, it is usually 3 bits and sometimes 7 or 8 bits.

场景(a)由所有上下文更新头中携带的CRC缓解。CRC越大,由(a)引起的上下文无效的可能性越低。在R模式下,上下文更新头的CRC总是7位或更多。在U/O模式下,通常为3位,有时为7或8位。

Scenario (b) is almost completely eliminated when the compressor ensures through ACKs that no context updating headers are lost, as in R-mode.

当压缩器通过ACK确保没有上下文更新头丢失时,场景(b)几乎完全消除,就像在R模式中一样。

Scenario (c) is almost completely eliminated when the compressor ensures through ACKs that the decompressor will always detect the SN wraparound, as in R-mode. It is also mitigated by the SN repair mechanisms in U/O-mode.

当压缩器通过ACK确保解压器始终检测到SN环绕时(如R模式),场景(c)几乎完全消除。U/O模式下的SN修复机制也缓解了这一问题。

Scenario (d) happens only when the compressor receives a damaged header that mimics an ACK of some header present in the W-LSB window, say ACK of header 2, while in reality header 2 was never received or accepted by the decompressor, i.e., header 2 was subject to impairment (1), (2) or (3). The damaged header must mimic the feedback packet type, the ACK feedback type, and the SN LSBs of some header in the W-LSB window.

场景(d)仅当压缩器接收到损坏的报头时发生,该报头模拟W-LSB窗口中存在的某个报头的ACK,例如报头2的ACK,而实际上报头2从未被解压缩器接收或接受,即报头2受到损坏(1)、(2)或(3)。损坏的报头必须模拟W-LSB窗口中某个报头的反馈包类型、ACK反馈类型和SN LSB。

Scenario (e) happens when a burst of residual errors causes the CRC check to fail in k out of the last n headers carrying CRCs. Large k and n reduces the probability of scenario (e), but also increases the number of headers lost or damaged as a consequence of any context invalidation.

场景(e)发生在剩余错误突发导致携带CRC的最后n个头中的k个头的CRC检查失败时。较大的k和n降低了场景(e)的概率,但也增加了由于任何上下文无效而丢失或损坏的头的数量。

ROHC detects damaged headers using CRCs over the original headers. The smallest headers in this document either include a 3-bit CRC (U/O-mode) or do not include a CRC (R-mode). For the smallest headers, damage is thus detected with a probability of roughly 7/8 for U/O-mode. For R-mode, damage to the smallest headers is not detected.

ROHC使用CRC检测损坏的报头,而不是原始报头。本文档中的最小标头包括3位CRC(U/O模式)或不包括CRC(R模式)。因此,对于最小的头部,U/O模式检测到损坏的概率约为7/8。对于R模式,未检测到最小收割台损坏。

All other things (coding scheme at lower layers, etc.) being equal, the rate of headers damaged by residual errors will be lower when headers are compressed compared when they are not, since fewer bits are transmitted. Consequently, for a given ROHC CRC setup the rate of incorrect headers delivered to applications will also be reduced.

在所有其他条件(较低层的编码方案等)相同的情况下,由于传输的比特数较少,因此当压缩报头时,被残余错误损坏的报头的速率将低于未压缩的报头。因此,对于给定的ROHC CRC设置,发送到应用程序的错误头的比率也将降低。

The above analysis suggests that U/O-mode may be more prone than R-mode to context invalidation. On the other hand, the CRC present in all U/O-mode headers continuously screens out residual errors coming from lower layers, reduces the number of damaged headers delivered to upper layers when context is invalidated, and permits quick detection of context invalidation.

上述分析表明,U/O模式可能比R模式更容易导致上下文失效。另一方面,存在于所有U/O模式报头中的CRC连续地屏蔽来自较低层的残余错误,减少在上下文无效时传递到上层的损坏报头的数量,并且允许快速检测上下文无效。

R-mode always uses a stronger CRC on context updating headers, but no CRC in other headers. A residual error on a header which carries no CRC will result in a damaged header being delivered to upper layers (4). The number of damaged headers delivered to the upper layers depends on the ratio of headers with CRC vs. headers without CRC, which is a compressor parameter.

R模式总是在上下文更新报头上使用更强的CRC,但在其他报头中不使用CRC。未携带CRC的报头上的残余错误将导致损坏的报头被传送到上层(4)。交付到上层的损坏集管数量取决于有CRC集管与无CRC集管的比率,这是一个压缩机参数。

5. The protocol
5. 协议
5.1. Data structures
5.1. 数据结构

The ROHC protocol is based on a number of parameters that form part of the negotiated channel state and the per-context state. This section describes some of this state information in an abstract way. Implementations can use a different structure for and representation of this state. In particular, negotiation protocols that set up the per-channel state need to establish the information that constitutes the negotiated channel state, but it is not necessary to exchange it in the form described here.

ROHC协议基于许多参数,这些参数构成协商通道状态和每上下文状态的一部分。本节以抽象的方式描述一些状态信息。实现可以为该状态使用不同的结构和表示形式。特别地,设置每信道状态的协商协议需要建立构成协商信道状态的信息,但是不必以这里描述的形式交换信息。

5.1.1. Per-channel parameters
5.1.1. 每通道参数

MAX_CID: Nonnegative integer; highest context ID number to be used by the compressor (note that this parameter is not coupled to, but in effect further constrained by, LARGE_CIDS).

MAX_CID:非负整数;压缩器要使用的最高上下文ID号(请注意,此参数未耦合到大的_CID,但实际上受其进一步约束)。

LARGE_CIDS: Boolean; if false, the short CID representation (0 bytes or 1 prefix byte, covering CID 0 to 15) is used; if true, the embedded CID representation (1 or 2 embedded CID bytes covering CID 0 to 16383) is used.

大型CIDS:布尔型;如果为false,则使用短CID表示(0字节或1前缀字节,涵盖CID 0到15);如果为true,则使用嵌入式CID表示(1或2个嵌入式CID字节,涵盖CID 0到16383)。

PROFILES: Set of nonnegative integers, each integer indicating a profile supported by the decompressor. The compressor MUST NOT compress using a profile not in PROFILES.

配置文件:一组非负整数,每个整数表示解压程序支持的配置文件。压缩机不得使用非外形中的外形进行压缩。

FEEDBACK_FOR: Optional reference to a channel in the reverse direction. If provided, this parameter indicates which channel any feedback sent on this channel refers to (see 5.7.6.1).

反馈:反向通道的可选参考。如果提供,该参数指示在该通道上发送的任何反馈所指的通道(见5.7.6.1)。

MRRU: Maximum reconstructed reception unit. This is the size of the largest reconstructed unit in octets that the decompressor is expected to reassemble from segments (see 5.2.5). Note that this size includes the CRC. If MRRU is negotiated to be 0, no segment headers are allowed on the channel.

MRRU:最大重建接收单元。这是解压器预期从段重新组装的最大重建单元(以八位字节为单位)的大小(见5.2.5)。请注意,此大小包括CRC。如果MRRU协商为0,则通道上不允许有段头。

5.1.2. Per-context parameters, profiles
5.1.2. 每个上下文参数、配置文件

Per-context parameters are established with IR headers (see section 5.2.3). An IR header contains a profile identifier, which determines how the rest of the header is to be interpreted. Note that the profile parameter determines the syntax and semantics of the packet type identifiers and packet types used in conjunction with a specific context. This document describes profiles 0x0000, 0x0001, 0x0002, and 0x0003; further profiles may be defined when ROHC is extended in the future.

每上下文参数由IR头建立(见第5.2.3节)。IR头包含一个配置文件标识符,该标识符确定如何解释头的其余部分。请注意,profile参数确定与特定上下文一起使用的包类型标识符和包类型的语法和语义。本文档描述了配置文件0x0000、0x0001、0x0002和0x0003;将来扩展ROHC时,可能会定义更多配置文件。

Profile 0x0000 is for sending uncompressed IP packets. See section 5.10.

配置文件0x0000用于发送未压缩的IP数据包。见第5.10节。

Profile 0x0001 is for RTP/UDP/IP compression, see sections 5.3 through 5.9.

配置文件0x0001用于RTP/UDP/IP压缩,请参见第5.3节至第5.9节。

Profile 0x0002 is for UDP/IP compression, i.e., compression of the first 12 octets of the UDP payload is not attempted. See section 5.11.

配置文件0x0002用于UDP/IP压缩,即不尝试压缩UDP有效负载的前12个八位字节。见第5.11节。

Profile 0x0003 is for ESP/IP compression, i.e., compression of the header chain up to and including the first ESP header, but not subsequent subheaders. See section 5.12.

配置文件0x0003用于ESP/IP压缩,即压缩到并包括第一个ESP标题的标题链,但不压缩后续子标题。见第5.12节。

Initially, all contexts are in no context state, i.e., all packets referencing this context except IR packets are discarded. If defined by a "ROHC over X" document, per-channel negotiation can be used to pre-establish state information for a context (e.g., negotiating

最初,所有上下文都处于无上下文状态,即,除IR数据包外,所有引用此上下文的数据包都被丢弃。如果由“ROHC over X”文件定义,则每通道协商可用于预先建立上下文的状态信息(例如,协商

profile 0x0000 for CID 15). Such state information can also be marked read-only in the negotiation, which would cause the decompressor to discard any IR packet attempting to modify it.

CID 15的配置文件0x0000)。这种状态信息也可以在协商中标记为只读,这将导致解压缩程序丢弃任何试图修改它的IR数据包。

5.1.3. Contexts and context identifiers
5.1.3. 上下文和上下文标识符

Associated with each compressed flow is a context, which is the state compressor and decompressor maintain in order to correctly compress or decompress the headers of the packet stream. Contexts are identified by a context identifier, CID, which is sent along with compressed headers and feedback information.

与每个压缩流相关联的是一个上下文,它是状态压缩器和解压缩器,用于正确压缩或解压缩数据包流的头。上下文由上下文标识符CID标识,CID与压缩头和反馈信息一起发送。

The CID space is distinct for each channel, i.e., CID 3 over channel A and CID 3 over channel B do not refer to the same context, even if the endpoints of A and B are the same nodes. In particular, CIDs for any pairs of forward and reverse channels are not related (forward and reverse channels need not even have CID spaces of the same size).

每个通道的CID空间是不同的,即通道A上的CID 3和通道B上的CID 3不引用相同的上下文,即使A和B的端点是相同的节点。特别是,任何一对正向和反向信道的CID都不相关(正向和反向信道甚至不需要具有相同大小的CID空间)。

Context information is conceptually kept in a table. The context table is indexed using the CID which is sent along with compressed headers and feedback information. The CID space can be negotiated to be either small, which means that CIDs can take the values 0 through 15, or large, which means that CIDs take values between 0 and 2^14 - 1 = 16383. Whether the CID space is large or small is negotiated no later than when a channel is established.

上下文信息在概念上保存在表中。使用CID对上下文表进行索引,CID与压缩头和反馈信息一起发送。CID空间可以协商为小,这意味着CID可以取0到15的值;也可以协商为大,这意味着CID可以取0到2^14-1=16383之间的值。CID空间的大小不迟于通道建立时协商。

A small CID with the value 0 is represented using zero bits. A small CID with a value from 1 to 15 is represented by a four-bit field in place of a packet type field (Add-CID) plus four more bits. A large CID is represented using the encoding scheme of section 4.5.6, limited to two octets.

值为0的小CID使用零位表示。值为1到15的小CID由一个四位字段(而不是数据包类型字段(Add CID))加上四位表示。大CID使用第4.5.6节的编码方案表示,限于两个八位字节。

5.2. ROHC packets and packet types
5.2. ROHC数据包和数据包类型

The packet type indication scheme for ROHC has been designed under the following constraints:

ROHC的包类型指示方案是在以下约束条件下设计的:

   a) it must be possible to use only a limited number of packet sizes;
   b) it must be possible to send feedback information in separate ROHC
      packets as well as piggybacked on forward packets;
   c) it is desirable to allow elimination of the CID for one packet
      stream when few packet streams share a channel;
   d) it is anticipated that some packets with large headers may be
      larger than the MTU of very constrained lower layers.
        
   a) it must be possible to use only a limited number of packet sizes;
   b) it must be possible to send feedback information in separate ROHC
      packets as well as piggybacked on forward packets;
   c) it is desirable to allow elimination of the CID for one packet
      stream when few packet streams share a channel;
   d) it is anticipated that some packets with large headers may be
      larger than the MTU of very constrained lower layers.
        

These constraints have led to a design which includes

这些约束导致了一种设计,其中包括

- optional padding, - a feedback packet type, - an optional Add-CID octet which provides 4 bits of CID, and - a simple segmentation and reassembly mechanism.

- 可选填充,-反馈数据包类型,-可选添加CID八位字节,提供4位CID,以及-一个简单的分段和重新组装机制。

A ROHC packet has the following general format (in the diagram, colons ":" indicate that the part is optional):

ROHC数据包具有以下通用格式(在图中,冒号为“:”表示该部件是可选的):

    --- --- --- --- --- --- --- ---
   :           Padding             :  variable length
    --- --- --- --- --- --- --- ---
   :           Feedback            :  0 or more feedback elements
    --- --- --- --- --- --- --- ---
   :            Header             :  variable, with CID information
    --- --- --- --- --- --- --- ---
   :           Payload             :
    --- --- --- --- --- --- --- ---
        
    --- --- --- --- --- --- --- ---
   :           Padding             :  variable length
    --- --- --- --- --- --- --- ---
   :           Feedback            :  0 or more feedback elements
    --- --- --- --- --- --- --- ---
   :            Header             :  variable, with CID information
    --- --- --- --- --- --- --- ---
   :           Payload             :
    --- --- --- --- --- --- --- ---
        

Padding is any number (zero or more) of padding octets. Either of Feedback or Header must be present.

填充是任意数量(零或更多)的填充八位字节。反馈或标题必须存在。

Feedback elements always start with a packet type indication. Feedback elements carry internal CID information. Feedback is described in section 5.2.2.

反馈元素总是以数据包类型指示开始。反馈元素携带内部CID信息。第5.2.2节描述了反馈。

Header is either a profile-specific header or an IR or IR-DYN header (see sections 5.2.3 and 5.2.4). Header either

标题是特定于配置文件的标题或IR或IR-DYN标题(见第5.2.3和5.2.4节)。标题或

1) does not carry any CID information (indicating CID zero), or 2) includes one Add-CID Octet (see below), or 3) contains embedded CID information of length one or two octets.

1) 不携带任何CID信息(指示CID零),或2)包含一个Add CID八位字节(见下文),或3)包含长度为一个或两个八位字节的嵌入式CID信息。

Alternatives 1) and 2) apply only to compressed headers in channels where the CID space is small. Alternative 3) applies only to compressed headers in channels where the CID space is large.

备选方案1)和2)仅适用于CID空间较小的信道中的压缩头。备选方案3)仅适用于CID空间较大的信道中的压缩头。

Padding Octet

填充八位组

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   0   0   0   0   0 |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   0   0   0   0   0 |
   +---+---+---+---+---+---+---+---+
        

Add-CID Octet

添加CID八位字节

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   0 |      CID      |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   0 |      CID      |
   +---+---+---+---+---+---+---+---+
        

CID: 0x1 through 0xF indicates CIDs 1 through 15.

CID:0x1到0xF表示CID 1到15。

Note: The Padding Octet looks like an Add-CID octet for CID 0.

注意:填充八位字节看起来像CID 0的Add CID八位字节。

Header either starts with a packet type indication or has a packet type indication immediately following an Add-CID Octet. All Header packet types have the following general format (in the diagram, slashes "/" indicate variable length):

报头要么以数据包类型指示开始,要么紧跟在Add CID八位字节之后有数据包类型指示。所有报头数据包类型具有以下通用格式(在图中,斜线“/”表示可变长度):

     0              x-1  x       7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         :  if (CID 1-15) and (small CIDs)
   +---+--- --- --- ---+--- --- ---+
   | type indication   |   body    |  1 octet (8-x bits of body)
   +---+--- ---+---+---+--- --- ---+
   :                               :
   /    0, 1, or 2 octets of CID   /  1 or 2 octets if (large CIDs)
   :                               :
   +---+---+---+---+---+---+---+---+
   /             body              /  variable length
   +---+---+---+---+---+---+---+---+
        
     0              x-1  x       7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         :  if (CID 1-15) and (small CIDs)
   +---+--- --- --- ---+--- --- ---+
   | type indication   |   body    |  1 octet (8-x bits of body)
   +---+--- ---+---+---+--- --- ---+
   :                               :
   /    0, 1, or 2 octets of CID   /  1 or 2 octets if (large CIDs)
   :                               :
   +---+---+---+---+---+---+---+---+
   /             body              /  variable length
   +---+---+---+---+---+---+---+---+
        

The large CID, if present, is encoded according to section 4.5.6.

大CID(如果存在)根据第4.5.6节进行编码。

5.2.1. ROHC feedback
5.2.1. ROHC反馈

Feedback carries information from decompressor to compressor. The following principal kinds of feedback are supported. In addition to the kind of feedback, other information may be included in profile-specific feedback information.

反馈将信息从减压器传送到压缩机。支持以下主要类型的反馈。除了反馈类型之外,其他信息也可以包含在特定于概要文件的反馈信息中。

ACK : Acknowledges successful decompression of a packet, which means that the context is up-to-date with a high probability.

ACK:确认成功解压缩数据包,这意味着上下文很可能是最新的。

NACK : Indicates that the dynamic context of the decompressor is out of sync. Generated when several successive packets have failed to be decompressed correctly.

NACK:表示解压缩程序的动态上下文不同步。当多个连续数据包未能正确解压缩时生成。

STATIC-NACK : Indicates that the static context of the decompressor is not valid or has not been established.

STATIC-NACK:表示解压缩程序的静态上下文无效或尚未建立。

It is anticipated that feedback to the compressor can be realized in many ways, depending on the properties of the particular lower layer. The exact details of how feedback is realized is to be specified in a "ROHC over X" document, for each lower layer X in question. For example, feedback might be realized using

根据特定下层的特性,可以通过多种方式实现对压缩机的反馈。如何实现反馈的具体细节将在“ROHC over X”文件中为每个较低层X指定。例如,反馈可以通过使用

1) lower-layer specific mechanisms

1) 低层特定机制

2) a dedicated feedback-only channel, realized for example by the lower layer providing a way to indicate that a packet is a feedback packet

2) 一种专用的仅反馈信道,例如由提供指示分组是反馈分组的方式的较低层实现

3) a dedicated feedback-only channel, where the timing of the feedback provides information about which compressed packet caused the feedback

3) 一种仅限反馈的专用信道,其中反馈的定时提供有关哪个压缩包导致反馈的信息

4) interspersing of feedback packets among normal compressed packets going in the same direction as the feedback (lower layers do not indicate feedback)

4) 在与反馈方向相同的正常压缩包之间穿插反馈包(较低层不表示反馈)

5) piggybacking of feedback information in compressed packets going in the same direction as the feedback (this technique may reduce the per-feedback overhead)

5) 在与反馈方向相同的压缩包中搭载反馈信息(这种技术可以减少每次反馈的开销)

6) interspersing and piggybacking on the same channel, i.e., both 4) and 5).

6) 在同一通道上穿插和搭载,即4)和5)。

Alternatives 1-3 do not place any particular requirements on the ROHC packet type scheme. Alternatives 4-6 do, however. The ROHC packet type scheme has been designed to allow alternatives 4-6 (these may be used for example over PPP):

备选方案1-3未对ROHC数据包类型方案提出任何特殊要求。然而,备选方案4-6确实如此。ROHC数据包类型方案的设计允许备选方案4-6(例如,可通过PPP使用):

a) The ROHC scheme provides a feedback packet type. The packet type is able to carry variable-length feedback information.

a) ROHC方案提供了一种反馈数据包类型。包类型能够携带可变长度的反馈信息。

b) The feedback information sent on a particular channel is passed to, and interpreted by, the compressor associated with feedback on that channel. Thus, the feedback information must contain CID information if the associated compressor can use more than one context. The ROHC feedback scheme requires that a channel carries feedback to at most one compressor. How a compressor is associated with feedback on a particular channel needs to be defined in a "ROHC over X" document.

b) 在特定通道上发送的反馈信息被传递给与该通道上的反馈相关联的压缩器,并由压缩器进行解释。因此,如果相关压缩器可以使用多个上下文,则反馈信息必须包含CID信息。ROHC反馈方案要求一个通道最多向一个压缩机传送反馈。压缩机如何与特定通道上的反馈相关联需要在“ROHC over X”文档中定义。

c) The ROHC feedback information format is octet-aligned, i.e., starts at an octet boundary, to allow using the format over a dedicated feedback channel, 2).

c) ROHC反馈信息格式是八位字节对齐的,即从八位字节边界开始,以允许在专用反馈通道上使用该格式,2)。

d) To allow piggybacking, 5), it is possible to deduce the length of feedback information by examining the first few octets of the feedback. This allows the decompressor to pass piggybacked feedback information to the associated same-side compressor without understanding its format. The length information decouples the decompressor from the compressor in the sense that the decompressor can process the compressed header immediately without waiting for the compressor to hand it back after parsing the feedback information.

d) 为了允许背负,5),可以通过检查反馈的前几个八位字节来推断反馈信息的长度。这允许解压器在不了解其格式的情况下将反馈信息传递给相关的同侧压缩机。长度信息将解压器与压缩器分离,因为解压器可以立即处理压缩的报头,而无需等待压缩器在解析反馈信息后将其交回。

5.2.2. ROHC feedback format
5.2.2. ROHC反馈格式

Feedback sent on a ROHC channel consists of one or more concatenated feedback elements, where each feedback element has the following format:

ROHC通道上发送的反馈由一个或多个串联反馈元素组成,其中每个反馈元素具有以下格式:

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   0 |   Code    |  feedback type octet
   +---+---+---+---+---+---+---+---+
   :             Size              :  if Code = 0
   +---+---+---+---+---+---+---+---+
   /         feedback data         /  variable length
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   0 |   Code    |  feedback type octet
   +---+---+---+---+---+---+---+---+
   :             Size              :  if Code = 0
   +---+---+---+---+---+---+---+---+
   /         feedback data         /  variable length
   +---+---+---+---+---+---+---+---+
        

Code: 0 indicates that a Size octet is present. 1-7 indicates the size of the feedback data field in octets.

代码:0表示存在大小八位字节。1-7表示反馈数据字段的大小(以八位字节为单位)。

Size: Optional octet indicating the size of the feedback data field in octets.

大小:可选八位字节,以八位字节表示反馈数据字段的大小。

feedback data: Profile-specific feedback information. Includes CID information.

反馈数据:配置文件特定的反馈信息。包括CID信息。

The total size of the feedback data field is determinable upon reception by the decompressor, by inspection of the Code field and possibly the Size field. This explicit length information allows piggybacking and also sending more than one feedback element in a packet.

反馈数据字段的总大小可在解压器接收时通过检查代码字段和可能的大小字段来确定。这种显式的长度信息允许在一个数据包中搭载和发送多个反馈元素。

When the decompressor has determined the size of the feedback data field, it removes the feedback type octet and the Size field (if present) and hands the rest to the same-side associated compressor

当解压缩器确定了反馈数据字段的大小时,它将删除反馈类型的八位字节和大小字段(如果存在),并将其余字段交给与压缩机相关的同一侧

together with an indication of the size. The feedback data received by the compressor has the following structure (feedback sent on a dedicated feedback channel MAY also use this format):

连同尺寸指示。压缩机接收的反馈数据具有以下结构(在专用反馈通道上发送的反馈也可以使用此格式):

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   :         Add-CID octet         : if for small CIDs and (CID != 0)
   +---+---+---+---+---+---+---+---+
   :                               :
   /  large CID (4.5.6 encoding)   / 1-2 octets if for large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   /           feedback            /
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   :         Add-CID octet         : if for small CIDs and (CID != 0)
   +---+---+---+---+---+---+---+---+
   :                               :
   /  large CID (4.5.6 encoding)   / 1-2 octets if for large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   /           feedback            /
   +---+---+---+---+---+---+---+---+
        

The large CID, if present, is encoded according to section 4.5.6. CID information in feedback data indicates the CID of the packet stream for which feedback is sent. Note that the LARGE_CIDS parameter that controls whether a large CID is present is taken from the channel state of the receiving compressor's channel, NOT from that of the channel carrying the feedback.

大CID(如果存在)根据第4.5.6节进行编码。反馈数据中的CID信息指示发送反馈的分组流的CID。请注意,控制是否存在大CID的LARGE_CIDS参数取自接收压缩器通道的通道状态,而不是来自承载反馈的通道的状态。

It is REQUIRED that the feedback field have either of the following two formats:

要求反馈字段具有以下两种格式之一:

FEEDBACK-1

反馈-1

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | profile specific information  |  1 octet
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | profile specific information  |  1 octet
   +---+---+---+---+---+---+---+---+
        

FEEDBACK-2

反馈-2

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   |Acktype|                       |
   +---+---+   profile specific    /  at least 2 octets
   /             information       |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   |Acktype|                       |
   +---+---+   profile specific    /  at least 2 octets
   /             information       |
   +---+---+---+---+---+---+---+---+
        

Acktype: 0 = ACK 1 = NACK 2 = STATIC-NACK 3 is reserved (MUST NOT be used. Otherwise unparseable.)

Acktype:0=ACK 1=NACK 2=STATIC-NACK 3被保留(不得使用。否则不可解析。)

The compressor can use the following logic to parse the feedback field.

压缩器可以使用以下逻辑来解析反馈字段。

1) If for large CIDs, the feedback will always start with a CID encoded according to section 4.5.6. If the first bit is 0, the CID uses one octet. If the first bit is 1, the CID uses two octets.

1) 如果是大型CID,反馈将始终以根据第4.5.6节编码的CID开始。如果第一位为0,CID使用一个八位字节。如果第一位为1,CID使用两个八位字节。

2) If for small CIDs, and the size is one octet, the feedback is a FEEDBACK-1.

2) 如果对于较小的CID,且大小为一个八位组,则反馈为反馈-1。

3) If for small CIDs, and the size is larger than one octet, and the feedback starts with the two bits 11, the feedback starts with an Add-CID octet. If the size is 2, it is followed by FEEDBACK-1. If the size is larger than 2, the Add-CID is followed by FEEDBACK-2.

3) 如果对于较小的CID,且大小大于一个八位字节,且反馈从两位11开始,则反馈从一个Add CID八位字节开始。如果大小为2,则后跟反馈-1。如果大小大于2,则Add CID后面跟着反馈-2。

4) Otherwise, there is no Add-CID octet, and the feedback starts with a FEEDBACK-2.

4) 否则,不存在Add CID八位字节,并且反馈从反馈-2开始。

5.2.3. ROHC IR packet type
5.2.3. ROHC-IR包类型

The IR header associates a CID with a profile, and typically also initializes the context. It can typically also refresh (parts of) the context. It has the following general format.

IR头将CID与配置文件相关联,并且通常还初始化上下文。它通常还可以刷新(部分)上下文。它具有以下通用格式。

     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         : if for small CIDs and (CID != 0)
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   1   1   0 | x | IR type octet
   +---+---+---+---+---+---+---+---+
   :                               :
   /      0-2 octets of CID        / 1-2 octets if for large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   |            Profile            | 1 octet
   +---+---+---+---+---+---+---+---+
   |              CRC              | 1 octet
   +---+---+---+---+---+---+---+---+
   |                               |
   / profile specific information  / variable length
   |                               |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         : if for small CIDs and (CID != 0)
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   1   1   0 | x | IR type octet
   +---+---+---+---+---+---+---+---+
   :                               :
   /      0-2 octets of CID        / 1-2 octets if for large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   |            Profile            | 1 octet
   +---+---+---+---+---+---+---+---+
   |              CRC              | 1 octet
   +---+---+---+---+---+---+---+---+
   |                               |
   / profile specific information  / variable length
   |                               |
   +---+---+---+---+---+---+---+---+
        

x: Profile specific information. Interpreted according to the profile indicated in the Profile field.

x:配置文件特定信息。根据配置文件字段中指示的配置文件进行解释。

Profile: The profile to be associated with the CID. In the IR packet, the profile identifier is abbreviated to the 8 least significant bits. It selects the highest-number profile in the channel state parameter PROFILES that matches the 8 LSBs given.

配置文件:要与CID关联的配置文件。在IR分组中,简档标识符缩写为8个最低有效位。它在信道状态参数配置文件中选择与给定的8个LSB匹配的最大数量配置文件。

CRC: 8-bit CRC computed using the polynomial of section 5.9.1. Its coverage is profile-dependent, but it MUST cover at least the initial part of the packet ending with the Profile field. Any information which initializes the context of the decompressor should be protected by the CRC.

CRC:使用第5.9.1节中的多项式计算的8位CRC。其覆盖范围取决于配置文件,但必须至少覆盖以配置文件字段结尾的数据包的初始部分。任何初始化解压器上下文的信息都应该受到CRC的保护。

Profile specific information: The contents of this part of the IR packet are defined by the individual profiles. Interpreted according to the profile indicated in the Profile field.

配置文件特定信息:IR数据包这部分的内容由各个配置文件定义。根据配置文件字段中指示的配置文件进行解释。

5.2.4. ROHC IR-DYN packet type
5.2.4. ROHC IR-DYN数据包类型

In contrast to the IR header, the IR-DYN header can never initialize an uninitialized context. However, it can redefine what profile is associated with a context, see for example 5.11 (ROHC UDP) and 5.12 (ROHC ESP). Thus the type needs to be reserved at the framework level. The IR-DYN header typically also initializes or refreshes parts of a context, typically the dynamic part. It has the following general format:

与IR头不同,IR-DYN头永远不能初始化未初始化的上下文。但是,它可以重新定义与上下文关联的配置文件,例如5.11(ROHC UDP)和5.12(ROHC ESP)。因此,需要在框架级别保留该类型。IR-DYN头通常还初始化或刷新上下文的部分,通常是动态部分。它具有以下通用格式:

     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         : if for small CIDs and (CID != 0)
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   1   0   0   0 | IR-DYN type octet
   +---+---+---+---+---+---+---+---+
   :                               :
   /      0-2 octets of CID        / 1-2 octets if for large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   |            Profile            | 1 octet
   +---+---+---+---+---+---+---+---+
   |              CRC              | 1 octet
   +---+---+---+---+---+---+---+---+
   |                               |
   / profile specific information  / variable length
   |                               |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         : if for small CIDs and (CID != 0)
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   1   0   0   0 | IR-DYN type octet
   +---+---+---+---+---+---+---+---+
   :                               :
   /      0-2 octets of CID        / 1-2 octets if for large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   |            Profile            | 1 octet
   +---+---+---+---+---+---+---+---+
   |              CRC              | 1 octet
   +---+---+---+---+---+---+---+---+
   |                               |
   / profile specific information  / variable length
   |                               |
   +---+---+---+---+---+---+---+---+
        

Profile: The profile to be associated with the CID. This is abbreviated in the same way as with IR packets.

配置文件:要与CID关联的配置文件。这与IR数据包的缩写方式相同。

CRC: 8-bit CRC computed using the polynomial of section 5.9.1. Its coverage is profile-dependent, but it MUST cover at least the initial part of the packet ending with the Profile field. Any information which initializes the context of the decompressor should be protected by the CRC.

CRC:使用第5.9.1节中的多项式计算的8位CRC。其覆盖范围取决于配置文件,但必须至少覆盖以配置文件字段结尾的数据包的初始部分。任何初始化解压器上下文的信息都应该受到CRC的保护。

Profile specific information: This part of the IR packet is defined by individual profiles. It is interpreted according to the profile indicated in the Profile field.

配置文件特定信息:IR数据包的这一部分由各个配置文件定义。它根据profile字段中指示的profile进行解释。

5.2.5. ROHC segmentation
5.2.5. ROHC分段

Some link layers may provide a much more efficient service if the set of different packet sizes to be transported is kept small. For such link layers, these sizes will normally be chosen to transport frequently occurring packets efficiently, with less frequently occurring packets possibly adapted to the next larger size by the addition of padding. The link layer may, however, be limited in the size of packets it can offer in this efficient mode, or it may be desirable to request only a limited largest size. To accommodate the occasional packet that is larger than that largest size negotiated, ROHC defines a simple segmentation protocol.

如果要传输的不同分组大小的集合保持较小,则一些链路层可以提供更有效的服务。对于这样的链路层,通常选择这些大小以有效地传输频繁发生的分组,通过添加填充,较不频繁发生的分组可能适合下一个较大的大小。然而,链路层可在其可在此有效模式中提供的分组的大小中受到限制,或者可能希望仅请求有限的最大大小。为了适应偶尔大于协商的最大大小的数据包,ROHC定义了一个简单的分段协议。

5.2.5.1. Segmentation usage considerations
5.2.5.1. 分段使用注意事项

The segmentation protocol defined in ROHC is not particularly efficient. It is not intended to replace link layer segmentation functions; these SHOULD be used whenever available and efficient for the task at hand.

ROHC中定义的分段协议不是特别有效。它不打算取代链路层分段功能;只要手头的任务可用且有效,就应使用这些工具。

ROHC segmentation should only be used for occasional packets with sizes larger than what is efficient to accommodate, e.g., due to exceptionally large ROHC headers. The segmentation scheme was designed to reduce packet size variations that may occur due to outliers in the header size distribution. In other cases, segmentation should be done at lower layers. The segmentation scheme should only be used for packet sizes that are larger than the maximum size in the allowed set of sizes from the lower layers.

ROHC分段仅适用于大小超过有效容纳范围的偶尔数据包,例如,由于ROHC头非常大。分段方案旨在减少由于报头大小分布中的异常值而可能出现的数据包大小变化。在其他情况下,分割应在较低层进行。分段方案应仅用于数据包大小大于下层允许大小集中的最大大小。

In summary, ROHC segmentation should be used with a relatively low frequency in the packet flow. If this cannot be ensured, segmentation should be performed at lower layers.

总之,ROHC分段应在数据包流中以相对较低的频率使用。如果无法确保这一点,则应在较低层执行分段。

5.2.5.2. Segmentation protocol
5.2.5.2. 分段协议

Segment Packet

段数据包

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   1   1   1 | F |
   +---+---+---+---+---+---+---+---+
   /           Segment             /  variable length
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   1   1   1 | F |
   +---+---+---+---+---+---+---+---+
   /           Segment             /  variable length
   +---+---+---+---+---+---+---+---+
        

F: Final bit. If set, it indicates that this is the last segment of a reconstructed unit.

F:最后一位。如果设置,则表示这是重建单元的最后一段。

The segment header may be preceded by padding octets and/or feedback. It never carries a CID.

段头前面可能有填充八位字节和/或反馈。它从不携带CID。

All segment header packets for one reconstructed unit have to be sent consecutively on a channel, i.e., any non-segment-header packet following a nonfinal segment header aborts the reassembly of the current reconstructed unit and causes the decompressor to discard the nonfinal segments received on this channel so far. When a final segment header is received, the decompressor reassembles the segment carried in this packet and any nonfinal segments that immediately preceded it into a single reconstructed unit, in the order they were received. The reconstructed unit has the format:

一个重构单元的所有段头数据包必须在一个通道上连续发送,即,非最终段头数据包之后的任何非段头数据包都会中止当前重构单元的重新组装,并导致解压缩器丢弃目前为止在此通道上接收到的非最终段。当接收到最终段头时,解压器按照接收顺序将该数据包中携带的段和紧接其之前的任何非最终段重新组装成单个重构单元。重建单元的格式为:

Reconstructed Unit

重建单元

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   |                               |
   /   Reconstructed ROHC packet   /  variable length
   |                               |
   +---+---+---+---+---+---+---+---+
   /              CRC              /  4 octets
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   |                               |
   /   Reconstructed ROHC packet   /  variable length
   |                               |
   +---+---+---+---+---+---+---+---+
   /              CRC              /  4 octets
   +---+---+---+---+---+---+---+---+
        

The CRC is used by the decompressor to validate the reconstructed unit. It uses the FCS-32 algorithm with the following generator polynomial: x^0 + x^1 + x^2 + x^4 + x^5 + x^7 + x^8 + x^10 + x^11 + x^12 + x^16 + x^22 + x^23 + x^26 + x^32 [HDLC]. If the reconstructed unit is 4 octets or less, or if the CRC fails, or if it is larger than the channel parameter MRRU (see 5.1.1), the reconstructed unit MUST be discarded by the decompressor.

解压器使用CRC验证重构单元。它将FCS-32算法与以下生成器多项式结合使用:x^0+x^1+x^2+x^4+x^5+x^7+x^8+x^10+x^11+x^12+x^16+x^22+x^23+x^26+x^32[HDLC]。如果重构单元为4个八位字节或更少,或者如果CRC失败,或者如果大于信道参数MRRU(见5.1.1),则解压器必须丢弃重构单元。

If the CRC succeeds, the reconstructed ROHC packet is interpreted as a ROHC Header, optionally followed by a payload. Note that this means that there can be no padding and no feedback in the reconstructed unit, and that the CID is derived from the initial octets of the reconstructed unit.

如果CRC成功,则重构的ROHC数据包被解释为ROHC报头,可选地后跟有效负载。注意,这意味着重构单元中可以没有填充和反馈,并且CID是从重构单元的初始八位字节派生的。

(It should be noted that the ROHC segmentation protocol was inspired by SEAL by Steve Deering et al., which later became ATM AAL5. The same arguments for not having sequence numbers in the segments but instead providing a strong CRC in the reconstructed unit apply here as well. Note that, as a result of this protocol, there is no way in ROHC to make any use of a segment that has residual bit errors.)

(应该注意的是,ROHC分段协议的灵感来自Steve Deering等人的SEAL,后来演变为ATM AAL5。相同的论点是在分段中没有序列号,而是在重构单元中提供强CRC。请注意,由于该协议的结果,ROHC中没有办法使用任何具有剩余位错误的段。)

5.2.6. ROHC initial decompressor processing
5.2.6. ROHC初始解压缩程序处理

The following packet types are reserved at the framework level in the ROHC scheme:

ROHC方案在框架级别保留了以下数据包类型:

1110: Padding or Add-CID octet 11110: Feedback 11111000: IR-DYN packet 1111110: IR packet 1111111: Segment

1110:填充或添加CID八位字节11110:反馈11111000:IR-DYN数据包1111110:IR数据包1111111:段

Other packet types can be used at will by individual profiles.

其他数据包类型可由单独的配置文件随意使用。

The following steps is an outline of initial decompressor processing which upon reception of a ROHC packet can determine its contents.

以下步骤是初始解压器处理的概要,在接收到ROHC数据包时,可以确定其内容。

1) If the first octet is a Padding Octet (11100000), strip away all initial Padding Octets and goto next step.

1) 如果第一个八位字节是填充八位字节(11100000),则去掉所有初始填充八位字节并转到下一步。

2) If the first remaining octet starts with 1110, it is an Add-CID octet:

2) 如果剩余的第一个八位字节以1110开头,则为Add CID八位字节:

remember the Add-CID octet; remove the octet.

记住Add-CID-octet;移除八位组。

3) If the first remaining octet starts with 11110, and an Add-CID octet was found in step 2),

3) 如果剩余的第一个八位字节以11110开始,并且在步骤2中找到了Add CID八位字节),

an error has occurred; the header MUST be discarded without further action.

发生错误;必须放弃标头,无需进一步操作。

4) If the first remaining octet starts with 11110, and an Add-CID octet was not found in step 2), this is feedback:

4) 如果剩余的第一个八位字节以11110开始,并且在步骤2中未找到Add CID八位字节),则这是反馈:

         find the size of the feedback data, call it s;
         remove the feedback type octet;
        
         find the size of the feedback data, call it s;
         remove the feedback type octet;
        
         remove the Size octet if Code is 0;
         send feedback data of length s to the same-side associated
         compressor;
         if packet exhausted, stop; otherwise goto 2).
        
         remove the Size octet if Code is 0;
         send feedback data of length s to the same-side associated
         compressor;
         if packet exhausted, stop; otherwise goto 2).
        

5) If the first remaining octet starts with 1111111, this is a segment:

5) 如果剩余的第一个八位字节以1111111开头,则这是一个段:

attempt reconstruction using the segmentation protocol (5.2.5). If a reconstructed packet is not produced, this finishes the processing of the original packet. If a reconstructed packet is produced, it is fed into step 1) above. Padding, segments, and feedback are not allowed in reconstructed packets, so when processing them, steps 1), 4), and 5) are modified so that the packet is discarded without further action when their conditions match.

尝试使用分段协议(5.2.5)进行重建。如果未生成重构包,则完成对原始包的处理。如果生成重构包,则将其馈送到上面的步骤1)。在重构的数据包中不允许填充、分段和反馈,因此在处理它们时,修改步骤1)、4)和5),以便在条件匹配时丢弃数据包而无需进一步操作。

6) Here, it is known that the rest is forward information (unless the header is damaged).

6) 在这里,已知其余部分是转发信息(除非报头损坏)。

7) If the forward traffic uses small CIDs, there is no large CID in the packet. If an Add-CID immediately preceded the packet type (step 2), it has the CID of the Add-CID; otherwise it has CID 0.

7) 如果转发流量使用小的CID,则数据包中没有大的CID。如果一个Add-CID紧跟在数据包类型之前(步骤2),则它具有Add-CID的CID;否则它的CID为0。

8) If the forward traffic uses large CIDs, the CID starts with the second remaining octet. If the first bit(s) of that octet are not 0 or 10, the packet MUST be discarded without further action. If an Add-CID octet immediately preceded the packet type (step 2), the packet MUST be discarded without further action.

8) 如果前向通信使用较大的CID,则CID从剩余的第二个八位字节开始。如果该八位组的第一位(s)不是0或10,则必须丢弃该数据包,而无需进一步操作。如果在数据包类型之前有Add CID八位字节(步骤2),则必须丢弃该数据包,而无需进一步操作。

9) Use the CID to find the context.

9) 使用CID查找上下文。

10) If the packet type is IR, the profile indicated in the IR packet determines how it is to be processed. If the CRC fails to verify the packet, it MUST be discarded. If a profile is indicated in the context, the logic of that profile determines what, if any, feedback is to be sent. If no profile is noted in the context, no further action is taken.

10) 如果包类型为IR,则IR包中指示的配置文件确定如何处理它。如果CRC无法验证数据包,则必须丢弃该数据包。如果上下文中指示了配置文件,则该配置文件的逻辑将确定要发送的反馈(如果有)。如果上下文中未注明概要,则不会采取进一步的行动。

11) If the packet type is IR-DYN, the profile indicated in the IR-DYN packet determines how it is to be processed.

11) 如果数据包类型为IR-DYN,则IR-DYN数据包中指示的配置文件确定如何处理该数据包。

a) If the CRC fails to verify the packet, it MUST be discarded. If a profile is indicated in the context, the logic of that profile determines what, if any, feedback is to be sent. If no profile is noted in the context, no further action is taken.

a) 如果CRC无法验证数据包,则必须丢弃该数据包。如果上下文中指示了配置文件,则该配置文件的逻辑将确定要发送的反馈(如果有)。如果上下文中未注明概要,则不会采取进一步的行动。

b) If the context has not been initialized by an IR packet, the packet MUST be discarded. The logic of the profile indicated in the IR-DYN header (if verified by the CRC), determines what, if any, feedback is to be sent.

b) 如果上下文尚未由IR数据包初始化,则必须丢弃该数据包。IR-DYN报头中指示的配置文件逻辑(如果由CRC验证)确定要发送的反馈(如果有)。

12) Otherwise, the profile noted in the context determines how the rest of the packet is to be processed. If the context has not been initialized by an IR packet, the packet MUST be discarded without further action.

12) 否则,上下文中记录的概要文件决定如何处理数据包的其余部分。如果上下文尚未由IR数据包初始化,则必须丢弃该数据包,而无需进一步操作。

The procedure for finding the size of the feedback data is as follows:

查找反馈数据大小的程序如下所示:

Examine the three bits which immediately follow the feedback packet type. When these bits are 1-7, the size of the feedback data is given by the bits; 0, a Size octet, which explicitly gives the size of the feedback data, is present after the feedback type octet.

检查紧跟在反馈数据包类型之后的三个位。当这些位为1-7时,反馈数据的大小由这些位给出;0,则在反馈类型八位字节之后存在一个大小八位字节,该八位字节明确给出了反馈数据的大小。

5.2.7. ROHC RTP packet formats from compressor to decompressor
5.2.7. 从压缩机到解压器的ROHC RTP数据包格式

ROHC RTP uses three packet types to identify compressed headers, and two for initialization/refresh. The format of a compressed packet can depend on the mode. Therefore a naming scheme of the form

ROHC RTP使用三种数据包类型来识别压缩头,两种用于初始化/刷新。压缩包的格式取决于模式。因此,需要一个表单的命名方案

      <modes format is used in>-<packet type number>-<some property>
        
      <modes format is used in>-<packet type number>-<some property>
        

is used to uniquely identify the format when necessary, e.g., UOR-2, R-1. For exact formats of the packet types, see section 5.7.

用于在必要时唯一标识格式,例如UOR-2、R-1。有关数据包类型的确切格式,请参见第5.7节。

Packet type zero: R-0, R-0-CRC, UO-0.

数据包类型0:R-0,R-0-CRC,UO-0。

This, the minimal, packet type is used when parameters of all SN-functions are known by the decompressor, and the header to be compressed adheres to these functions. Thus, only the W-LSB encoded RTP SN needs to be communicated.

当解压器知道所有SN函数的参数,并且要压缩的报头符合这些函数时,使用最小分组类型。因此,仅需要传送W-LSB编码的RTP SN。

R-mode: Only if a CRC is present (packet type R-0-CRC) may the header be used as a reference for subsequent decompression.

R模式:仅当存在CRC(数据包类型R-0-CRC)时,报头才可用作后续解压缩的参考。

U-mode and O-mode: A small CRC is present in the UO-0 packet.

U模式和O模式:UO-0数据包中存在一个小CRC。

Packet type 1: R-1, R-1-ID, R-1-TS, UO-1, UO-1-ID, UO-1-TS.

数据包类型1:R-1,R-1-ID,R-1-TS,UO-1,UO-1-ID,UO-1-TS。

This packet type is used when the number of bits needed for the SN exceeds those available in packet type zero, or when the parameters of the SN-functions for RTP TS or IP-ID change.

当SN所需的比特数超过分组类型0中可用的比特数时,或者当用于RTP TS或IP-ID的SN的参数改变时,使用该分组类型。

R-mode: R-1-* packets are not used as references for subsequent decompression. Values for other fields than the RTP TS or IP-ID can be communicated using an extension, but they do not update the context.

R模式:R-1-*数据包不用作后续解压缩的引用。RTP TS或IP-ID以外的其他字段的值可以使用扩展进行通信,但它们不会更新上下文。

U-mode and O-mode: Only the values of RTP SN, RTP TS and IP-ID can be used as references for future compression. Nonupdating values can be provided for other fields using an extension (UO-1-ID).

U-mode和O-mode:只有RTP SN、RTP TS和IP-ID的值可以用作将来压缩的参考。可以使用扩展名(UO-1-ID)为其他字段提供非更新值。

Packet type 2: UOR-2, UOR-2-ID, UOR-2-TS

数据包类型2:UOR-2、UOR-2-ID、UOR-2-TS

This packet type can be used to change the parameters of any SN-function, except those for most static fields. Headers of packets transferred using packet type 2 can be used as references for subsequent decompression.

此数据包类型可用于更改任何SN函数的参数,但大多数静态字段的参数除外。使用数据包类型2传输的数据包的报头可以用作后续解压缩的参考。

Packet type: IR

数据包类型:IR

This packet type communicates the static part of the context, i.e., the value of the constant SN-functions. It can optionally also communicate the dynamic part of the context, i.e., the parameters of the nonconstant SN-functions.

此数据包类型传递上下文的静态部分,即常量SN函数的值。它还可以选择性地传递上下文的动态部分,即非恒定SN函数的参数。

Packet type: IR-DYN

数据包类型:IR-DYN

This packet type communicates the dynamic part of the context, i.e., the parameters of nonconstant SN-functions.

此数据包类型传递上下文的动态部分,即非恒定SN函数的参数。

5.2.8. Parameters needed for mode transition in ROHC RTP
5.2.8. ROHC RTP中模式转换所需的参数

The packet types IR (with dynamic information), IR-DYN, and UOR-2 are common for all modes. They can carry a mode parameter which can take the values U = Unidirectional, O = Bidirectional Optimistic, and R = Bidirectional Reliable.

数据包类型IR(带有动态信息)、IR-DYN和UOR-2对于所有模式都是通用的。它们可以携带一个模式参数,该参数可以取值U=单向,O=双向乐观,R=双向可靠。

Feedback of types ACK, NACK, and STATIC-NACK carry sequence numbers, and feedback packets can also carry a mode parameter indicating the desired compression mode: U, O, or R.

ACK、NACK和STATIC-NACK类型的反馈携带序列号,并且反馈分组还可以携带指示所需压缩模式的模式参数:U、O或R。

As a shorthand, the notation PACKET(mode) is used to indicate which mode value a packet carries. For example, an ACK with mode parameter R is written ACK(R), and an UOR-2 with mode parameter O is written UOR-2(O).

简而言之,表示数据包(mode)的符号用于指示数据包携带的模式值。例如,具有模式参数R的ACK被写入ACK(R),而具有模式参数O的UOR-2被写入UOR-2(O)。

5.3. Operation in Unidirectional mode
5.3. 单向模式下的操作
5.3.1. Compressor states and logic (U-mode)
5.3.1. 压缩机状态和逻辑(U型)

Below is the state machine for the compressor in Unidirectional mode. Details of the transitions between states and compression logic are given subsequent to the figure.

下面是单向模式下压缩机的状态机。状态和压缩逻辑之间转换的详细信息在图的后面给出。

                         Optimistic approach
      +------>------>------>------>------>------>------>------>------+
      |                                                              |
      |        Optimistic approach         Optimistic approach       |
      |      +------>------>------+      +------>------>------+      |
      |      |                    |      |                    |      |
      |      |                    v      |                    v      v
    +----------+                +----------+                +----------+
    | IR State |                | FO State |                | SO State |
    +----------+                +----------+                +----------+
      ^      ^                    |      ^                    |      |
      |      |      Timeout       |      |  Timeout / Update  |      |
      |      +------<------<------+      +------<------<------+      |
      |                                                              |
      |                           Timeout                            |
      +------<------<------<------<------<------<------<------<------+
        
                         Optimistic approach
      +------>------>------>------>------>------>------>------>------+
      |                                                              |
      |        Optimistic approach         Optimistic approach       |
      |      +------>------>------+      +------>------>------+      |
      |      |                    |      |                    |      |
      |      |                    v      |                    v      v
    +----------+                +----------+                +----------+
    | IR State |                | FO State |                | SO State |
    +----------+                +----------+                +----------+
      ^      ^                    |      ^                    |      |
      |      |      Timeout       |      |  Timeout / Update  |      |
      |      +------<------<------+      +------<------<------+      |
      |                                                              |
      |                           Timeout                            |
      +------<------<------<------<------<------<------<------<------+
        
5.3.1.1. State transition logic (U-mode)
5.3.1.1. 状态转换逻辑(U型)

The transition logic for compression states in Unidirectional mode is based on three principles: the optimistic approach principle, timeouts, and the need for updates.

单向模式下压缩状态的转换逻辑基于三个原则:乐观方法原则、超时和更新需求。

5.3.1.1.1. Optimistic approach, upwards transition
5.3.1.1.1. 乐观的态度,向上的过渡

Transition to a higher compression state in Unidirectional mode is carried out according to the optimistic approach principle. This means that the compressor transits to a higher compression state when it is fairly confident that the decompressor has received enough information to correctly decompress packets sent according to the higher compression state.

根据乐观逼近原理,在单向模式下向更高压缩状态过渡。这意味着当相当确信解压缩器已经接收到足够的信息以正确解压缩根据更高压缩状态发送的分组时,压缩机转换到更高压缩状态。

When the compressor is in the IR state, it will stay there until it assumes that the decompressor has correctly received the static context information. For transition from the FO to the SO state, the compressor should be confident that the decompressor has all parameters needed to decompress according to a fixed pattern.

当压缩器处于IR状态时,它将保持在该状态,直到它假定解压缩器已正确接收到静态上下文信息。对于从FO状态过渡到SO状态,压缩机应确信减压器具有根据固定模式减压所需的所有参数。

The compressor normally obtains its confidence about decompressor status by sending several packets with the same information according to the lower compression state. If the decompressor receives any of these packets, it will be in sync with the compressor. The number of consecutive packets to send for confidence is not defined in this document.

压缩机通常通过根据较低的压缩状态发送具有相同信息的多个数据包来获得其关于解压缩器状态的信心。如果解压器接收到这些数据包中的任何一个,它将与压缩器同步。本文档中未定义为获得信任而发送的连续数据包数。

5.3.1.1.2. Timeouts, downward transition
5.3.1.1.2. 超时,向下过渡

When the optimistic approach is taken as described above, there will always be a possibility of failure since the decompressor may not have received sufficient information for correct decompression. Therefore, the compressor MUST periodically transit to lower compression states. Periodic transition to the IR state SHOULD be carried out less often than transition to the FO state. Two different timeouts SHOULD therefore be used for these transitions. For an example of how to implement periodic refreshes, see [IPHC] chapters 3.3.1-3.3.2.

当采用如上所述的乐观方法时,由于减压器可能没有收到足够的信息进行正确减压,因此始终存在失败的可能性。因此,压缩机必须定期过渡到较低的压缩状态。周期性过渡到IR状态的频率应低于过渡到FO状态的频率。因此,这些转换应使用两种不同的超时。有关如何实施定期刷新的示例,请参见[IPHC]第3.3.1-3.3.2章。

5.3.1.1.3. Need for updates, downward transition
5.3.1.1.3. 需要更新、向下过渡

In addition to the downward state transitions carried out due to periodic timeouts, the compressor must also immediately transit back to the FO state when the header to be compressed does not conform to the established pattern.

除了由于周期性超时而执行的向下状态转换外,当要压缩的收割台不符合既定模式时,压缩机还必须立即转换回FO状态。

5.3.1.2. Compression logic and packets used (U-mode)
5.3.1.2. 使用的压缩逻辑和数据包(U模式)

The compressor chooses the smallest possible packet format that can communicate the desired changes, and has the required number of bits for W-LSB encoded values.

压缩器选择能够传达所需更改的最小可能的分组格式,并具有W-LSB编码值所需的位数。

5.3.1.3. Feedback in Unidirectional mode
5.3.1.3. 单向模式下的反馈

The Unidirectional mode of operation is designed to operate over links where a feedback channel is not available. If a feedback channel is available, however, the decompressor MAY send an acknowledgment of successful decompression with the mode parameter set to U (send an ACK(U)). When the compressor receives such a message, it MAY disable (or increase the interval between) periodic IR refreshes.

单向运行模式设计用于在反馈通道不可用的链路上运行。然而,如果反馈信道可用,则解压缩器可以发送成功解压缩的确认,模式参数设置为U(发送确认(U))。当压缩机收到此类信息时,它可能会禁用(或增加)定期IR刷新。

5.3.2. Decompressor states and logic (U-mode)
5.3.2. 解压器状态和逻辑(U型)

Below is the state machine for the decompressor in Unidirectional mode. Details of the transitions between states and decompression logic are given subsequent to the figure.

下面是单向模式下解压器的状态机。状态和解压缩逻辑之间转换的详细信息在图的后面给出。

                                 Success
                +-->------>------>------>------>------>--+
                |                                        |
    No Static   |            No Dynamic        Success   |    Success
     +-->--+    |             +-->--+      +--->----->---+    +-->--+
     |     |    |             |     |      |             |    |     |
     |     v    |             |     v      |             v    |     v
   +--------------+         +----------------+         +--------------+
   |  No Context  |         | Static Context |         | Full Context |
   +--------------+         +----------------+         +--------------+
      ^                         |        ^                         |
      | k_2 out of n_2 failures |        | k_1 out of n_1 failures |
      +-----<------<------<-----+        +-----<------<------<-----+
        
                                 Success
                +-->------>------>------>------>------>--+
                |                                        |
    No Static   |            No Dynamic        Success   |    Success
     +-->--+    |             +-->--+      +--->----->---+    +-->--+
     |     |    |             |     |      |             |    |     |
     |     v    |             |     v      |             v    |     v
   +--------------+         +----------------+         +--------------+
   |  No Context  |         | Static Context |         | Full Context |
   +--------------+         +----------------+         +--------------+
      ^                         |        ^                         |
      | k_2 out of n_2 failures |        | k_1 out of n_1 failures |
      +-----<------<------<-----+        +-----<------<------<-----+
        
5.3.2.1. State transition logic (U-mode)
5.3.2.1. 状态转换逻辑(U型)

Successful decompression will always move the decompressor to the Full Context state. Repeated failed decompression will force the decompressor to transit downwards to a lower state. The decompressor does not attempt to decompress headers at all in the No Context and Static Context states unless sufficient information is included in the packet itself.

成功解压缩将始终将解压缩程序移动到完整上下文状态。反复失败的解压缩将迫使解压缩器向下过渡到较低的状态。解压器在无上下文和静态上下文状态下根本不会尝试解压头,除非数据包本身包含足够的信息。

5.3.2.2. Decompression logic (U-mode)
5.3.2.2. 解压逻辑(U型)

Decompression in Unidirectional mode is carried out following three steps which are described in subsequent sections.

单向模式下的减压按照以下三个步骤进行,这些步骤将在后续章节中介绍。

5.3.2.2.1. Decide whether decompression is allowed
5.3.2.2.1. 决定是否允许解压缩

In Full Context state, decompression may be attempted regardless of what kind of packet is received. However, for the other states decompression is not always allowed. In the No Context state only IR packets, which carry the static information fields, may be decompressed. Further, when in the Static Context state, only packets carrying a 7- or 8-bit CRC can be decompressed (i.e., IR, IR-DYN, or UOR-2 packets). If decompression may not be performed the packet is discarded, unless the optional delayed decompression mechanism is used, see section 6.1.

在全上下文状态下,无论接收到何种类型的数据包,都可以尝试解压缩。但是,对于其他状态,并不总是允许解压缩。在无上下文状态下,只能解压缩携带静态信息字段的IR分组。此外,当处于静态上下文状态时,只能解压缩携带7位或8位CRC的分组(即IR、IR-DYN或UOR-2分组)。如果无法执行解压缩,则丢弃数据包,除非使用可选的延迟解压缩机制,请参见第6.1节。

5.3.2.2.2. Reconstruct and verify the header
5.3.2.2.2. 重建并验证标题

When reconstructing the header, the decompressor takes the header information already stored in the context and updates it with the information received in the current header. (If the reconstructed header fails the CRC check, these updates MUST be undone.)

当重建报头时,解压缩程序获取已经存储在上下文中的报头信息,并使用当前报头中接收到的信息对其进行更新。(如果重建的标头未通过CRC检查,则必须撤消这些更新。)

The sequence number is reconstructed by replacing the sequence number LSBs in the context with those received in the header. The resulting value is then verified to be within the interpretation interval by comparison with a previously reconstructed reference value v_ref (see section 4.5.1). If it is not within this interval, an adjustment is applied by adding N x interval_size to the reconstructed value so that the result is brought within the interpretation interval. Note that N can be negative.

通过将上下文中的序列号lsb替换为在报头中接收到的序列号lsb来重构序列号。然后,通过与先前重构的参考值v_ref(见第4.5.1节)进行比较,验证结果值在解释间隔内。如果不在该区间内,则通过将nx区间_大小添加到重构值来应用调整,以使结果在解释区间内。注意,N可以是负数。

If RTP Timestamp and IP Identification fields are not included in the received header, they are supposed to be calculated from the sequence number. The IP Identifier usually increases by the same delta as the sequence number and the timestamp by the same delta times a fixed value. See chapters 4.5.3 and 4.5.5 for details about how these fields are encoded in compressed headers.

如果RTP时间戳和IP标识字段未包含在接收的报头中,则应根据序列号计算它们。IP标识符通常增加与序列号相同的增量,时间戳增加与固定值相同的增量。有关这些字段如何在压缩头中编码的详细信息,请参见第4.5.3和4.5.5章。

When working in Unidirectional mode, all compressed headers carry a CRC which MUST be used to verify decompression.

在单向模式下工作时,所有压缩头都带有CRC,必须使用CRC验证解压缩。

5.3.2.2.3. Actions upon CRC failure
5.3.2.2.3. CRC故障时的行动

This section is written so that it is applicable to all modes.

本节适用于所有模式。

A mismatch in the CRC can be caused by one or more of:

CRC中的不匹配可能由以下一个或多个原因引起:

1. residual bit errors in the current header

1. 当前标头中的剩余位错误

2. a damaged context due to residual bit errors in previous headers

2. 由于先前标头中的剩余位错误而导致的上下文损坏

3. many consecutive packets being lost between compressor and decompressor (this may cause the LSBs of the SN in compressed packets to be interpreted wrongly, because the decompressor has not moved the interpretation interval for lack of input -- in essence, a kind of context damage).

3. 在压缩器和解压缩器之间丢失了许多连续的数据包(这可能会导致压缩数据包中SN的LSB被错误地解释,因为解压缩器由于缺少输入而没有移动解释间隔——本质上是一种上下文破坏)。

(Cases 2 and 3 do not apply to IR packets; case 3 does not apply to IR-DYN packets.) The 3-bit CRC present in some header formats will eventually detect context damage reliably, since the probability of undetected context damage decreases exponentially with each new header processed. However, residual bit errors in the current header are only detected with good probability, not reliably.

(情况2和3不适用于IR数据包;情况3不适用于IR-DYN数据包。)某些报头格式中存在的3位CRC最终将可靠地检测上下文损坏,因为未检测到的上下文损坏的概率随着处理每个新报头而呈指数下降。然而,当前报头中的残余比特错误仅以良好的概率被检测到,而不可靠。

When a CRC mismatch is caused by residual bit errors in the current header (case 1 above), the decompressor should stay in its current state to avoid unnecessary loss of subsequent packets. On the other hand, when the mismatch is caused by a damaged context (case 2), the decompressor should attempt to repair the context locally. If the local repair attempt fails, it must move to a lower state to avoid

当CRC失配是由当前报头中的残余位错误引起时(上述情况1),解压缩器应保持其当前状态,以避免后续数据包的不必要丢失。另一方面,当不匹配是由损坏的上下文(情况2)引起时,解压缩程序应该尝试在本地修复上下文。如果本地修复尝试失败,它必须移动到较低的状态以避免

delivering incorrect headers. When the mismatch is caused by prolonged loss (case 3), the decompressor might attempt additional decompression attempts. Note that case 3 does not occur in R-mode.

传递不正确的标题。当不匹配是由长时间丢失(情况3)引起时,解压缩程序可能会尝试额外的解压缩尝试。请注意,情况3不会在R模式下发生。

The following actions MUST be taken when a CRC check fails:

当CRC检查失败时,必须采取以下措施:

First, attempt to determine whether SN LSB wraparound (case 3) is likely, and if so, attempt a correction. For this, the algorithm of section 5.3.2.2.4 MAY be used. If another algorithm is used, it MUST have at least as high a rate of correct repairs as the one in 5.3.2.2.4. (This step is not applicable to R-mode.)

首先,尝试确定SN LSB环绕(情况3)是否可能,如果可能,尝试更正。为此,可使用第5.3.2.2.4节的算法。如果使用其他算法,则其正确修复率必须至少与5.3.2.2.4中的算法一样高。(此步骤不适用于R模式。)

Second, if the previous step did not attempt a correction, a repair should be attempted under the assumption that the reference SN has been incorrectly updated. For this, the algorithm of section 5.3.2.2.5 MAY be used. If another algorithm is used, it MUST have at least as high a rate of correct repairs as the one in 5.3.2.2.5. (This step is not applicable to R-mode.)

其次,如果前一步骤未尝试进行修正,则应在假设参考序列号已被错误更新的情况下尝试进行修复。为此,可使用第5.3.2.2.5节的算法。如果使用其他算法,则其正确修复率必须至少与5.3.2.2.5中的算法一样高。(此步骤不适用于R模式。)

If both the above steps fail, additional decompression attempts SHOULD NOT be made. There are two possible reasons for the CRC failure: case 1 or unrecoverable context damage. It is impossible to know for certain which of these is the actual cause. The following rules are to be used:

如果上述两个步骤均失败,则不应进行其他解压缩尝试。CRC故障有两个可能的原因:案例1或无法恢复的上下文损坏。不可能确切地知道其中哪一个是真正的原因。应使用以下规则:

a. When CRC checks fail only occasionally, assume residual errors in the current header and simply discard the packet. NACKs SHOULD NOT be sent at this time.

a. 当CRC检查偶尔失败时,假设当前报头中存在剩余错误,并简单地丢弃数据包。此时不应发送NACK。

b. In the Full Context state: When the CRC check of k_1 out of the last n_1 decompressed packets have failed, context damage SHOULD be assumed and a NACK SHOULD be sent in O- and R-mode. The decompressor moves to the Static Context state and discards all packets until an update (IR, IR-DYN, UOR-2) which passes the CRC check is received.

b. 在全上下文状态下:当最后n_1解压缩数据包中k_1的CRC检查失败时,应假设上下文损坏,并应以O和R模式发送NACK。解压器移动到静态上下文状态并丢弃所有数据包,直到接收到通过CRC检查的更新(IR、IR-DYN、UOR-2)。

c. In the Static Context state: When the CRC check of k_2 out of the last n_2 updates (IR, IR-DYN, UOR-2) have failed, static context damage SHOULD be assumed and a STATIC-NACK is sent in O- and R-mode. The decompressor moves to the No Context state.

c. 在静态上下文状态下:当上次n_2更新(IR、IR-DYN、UOR-2)中k_2的CRC检查失败时,应假设静态上下文损坏,并以O和R模式发送静态NACK。解压器将移动到无上下文状态。

d. In the No Context state: The decompressor discards all packets until a static update (IR) which passes the CRC check is received. (In O-mode and R-mode, feedback is sent according to sections 5.4.2.2 and 5.5.2.2, respectively.)

d. 在无上下文状态下:解压器丢弃所有数据包,直到接收到通过CRC检查的静态更新(IR)。(在O模式和R模式下,分别根据第5.4.2.2节和第5.5.2.2节发送反馈。)

Note that appropriate values for k_1, n_1, k_2, and n_2, are related to the residual error rate of the link. When the residual error rate is close to zero, k_1 = n_1 = k_2 = n_2 = 1 may be appropriate.

请注意,k_1、n_1、k_2和n_2的适当值与链路的剩余错误率有关。当剩余错误率接近于零时,k_1=n_1=k_2=n_2=1可能是合适的。

5.3.2.2.4. Correction of SN LSB wraparound
5.3.2.2.4. SN-LSB环绕校正

When many consecutive packets are lost there will be a risk of sequence number LSB wraparound, i.e., the SN LSBs being interpreted wrongly because the interpretation interval has not moved for lack of input. The decompressor might be able to detect this situation and avoid context damage by using a local clock. The following algorithm MAY be used:

当许多连续分组丢失时,将存在序列号LSB环绕的风险,即,SN LSB被错误地解释,因为解释间隔由于缺少输入而没有移动。解压器可能能够检测到这种情况,并通过使用本地时钟避免上下文损坏。可以使用以下算法:

a. The decompressor notes the arrival time, a(i), of each incoming packet i. Arrival times of packets where decompression fails are discarded.

a. 解压器记录每个传入数据包i的到达时间a(i)。解压缩失败的数据包的到达时间将被丢弃。

b. When decompression fails, the decompressor computes INTERVAL = a(i) - a(i - 1), i.e., the time elapsed between the arrival of the previous, correctly decompressed packet and the current packet.

b. 当解压失败时,解压器计算INTERVAL=a(i)-a(i-1),即上一个正确解压的数据包到达和当前数据包之间经过的时间。

c. If wraparound has occurred, INTERVAL will correspond to at least 2^k inter-packet times, where k is the number of SN bits in the current header. On the basis of an estimate of the packet inter-arrival time, obtained for example using a moving average of arrival times, TS_STRIDE, or TS_TIME, the decompressor judges if INTERVAL can correspond to 2^k inter-packet times.

c. 如果发生了环绕,则间隔将对应于至少2^k个包间时间,其中k是当前报头中的SN比特数。基于例如使用到达时间、TS_步长或TS_时间的移动平均值获得的分组到达间时间的估计,解压缩器判断间隔是否可以对应于2^k个分组间时间。

d. If INTERVAL is judged to be at least 2^k packet inter-arrival times, the decompressor adds 2^k to the reference SN and attempts to decompress the packet using the new reference SN.

d. 如果间隔被判断为至少2^k个分组到达时间,则解压缩器将2^k添加到参考SN,并尝试使用新的参考SN来解压缩分组。

e. If this decompression succeeds, the decompressor updates the context but SHOULD NOT deliver the packet to upper layers. The following packet is also decompressed and updates the context if its CRC succeeds, but SHOULD be discarded. If decompression of the third packet using the new context also succeeds, the context repair is deemed successful and this and subsequent decompressed packets are delivered to the upper layers.

e. 如果解压成功,解压器将更新上下文,但不应将数据包传递到上层。如果CRC成功,下面的数据包也会被解压缩并更新上下文,但应该被丢弃。如果使用新上下文对第三个分组的解压缩也成功,则上下文修复被视为成功,并且该和随后的解压缩分组被传送到上层。

f. If any of the three decompression attempts in d. and e. fails, the decompressor discards the packets and acts according to rules a) through c) of section 5.3.2.2.3.

f. 如果d中的三次解压缩尝试中的任何一次。和e。如果出现故障,解压缩程序将丢弃数据包,并按照第5.3.2.2.3节的规则a)至c)进行操作。

Using this mechanism, the decompressor may be able to repair the context after excessive loss, at the expense of discarding two packets.

使用此机制,解压器可以在过度丢失后修复上下文,代价是丢弃两个数据包。

5.3.2.2.5. Repair of incorrect SN updates
5.3.2.2.5. 修复不正确的序列号更新

The CRC can fail to detect residual errors in the compressed header because of its limited length, i.e., the incorrectly decompressed packet can happen to have the same CRC as the original uncompressed packet. The incorrect decompressed header will then update the context. This can lead to an erroneous reference SN being used in W-LSB decoding, as the reference SN is updated for each successfully decompressed header of certain types.

由于其有限的长度,CRC可能无法检测压缩报头中的残余错误,即,错误解压缩的分组可能恰好具有与原始未压缩分组相同的CRC。然后,不正确的解压缩头将更新上下文。这可能导致在W-LSB解码中使用错误的参考SN,因为针对特定类型的每个成功解压缩的报头更新参考SN。

In this situation, the decompressor will detect the incorrect decompression of the following packet with high probability, but it does not know the reason for the failure. The following mechanism allows the decompressor to judge if the context was updated incorrectly by an earlier packet and, if so, to attempt a repair.

在这种情况下,解压器很有可能检测到以下数据包的错误解压,但它不知道失败的原因。以下机制允许解压器判断上下文是否被早期数据包错误更新,如果是,则尝试修复。

a. The decompressor maintains two decompressed sequence numbers: the last one (ref 0) and the one before that (ref -1).

a. 解压器维护两个解压序列号:最后一个(参考0)和之前的一个(参考1)。

b. When receiving a compressed header the SN (SN curr1) is decompressed using ref 0 as the reference. The other header fields are decompressed using this decompressed SN curr1. (This is part of the normal decompression procedure prior to any CRC test failures.)

b. 当接收到压缩的报头时,使用ref 0作为参考来解压缩SN(SN curr1)。其他标头字段使用此解压缩的SN curr1进行解压缩。(这是任何CRC测试失败之前正常解压缩程序的一部分。)

c. If the decompressed header generated in b. passes the CRC test, the references are shifted as follows:

c. 如果解压头在b中生成。通过CRC测试后,参考值移动如下:

ref -1 = ref 0 ref 0 = SN curr1.

参考-1=参考0参考0=序号1。

d. If the header generated in b. does not pass the CRC test, and the SN (SN curr2) generated when using ref -1 as the reference is different from SN curr1, an additional decompression attempt is performed based on SN curr2 as the decompressed SN.

d. 如果标题是在b中生成的。未通过CRC测试,并且当使用ref-1作为参考时生成的SN(SN curr2)与SN curr1不同,基于SN curr2作为解压缩的SN执行额外的解压缩尝试。

e. If the decompressed header generated in b. does not pass the CRC test and SN curr2 is the same as SN curr1, an additional decompression attempt is not useful and is not attempted.

e. 如果解压头在b中生成。未通过CRC测试,且SN curr2与SN curr1相同,额外的解压缩尝试无效且未尝试。

f. If the decompressed header generated in d. passes the CRC test, ref -1 is not changed while ref 0 is set to SN curr2.

f. 如果解压缩的头文件在d中生成。通过CRC测试,ref-1未更改,而ref 0设置为SN curr2。

g. If the decompressed header generated in d. does not pass the CRC test, the decompressor acts according to rules a) through c) of section 5.3.2.2.3.

g. 如果解压缩的头文件在d中生成。如果未通过CRC测试,则减压器根据第5.3.2.2.3节规则a)至c)进行操作。

The purpose of this algorithm is to repair the context. If the header generated in d. passes the CRC test, the references are updated according to f., but two more headers MUST also be successfully decompressed before the repair is deemed successful. Of the three successful headers, the first two SHOULD be discarded and only the third delivered to upper layers. If decompression of any of the three headers fails, the decompressor MUST discard that header and the previously generated headers, and act according to rules a) through c) of section 5.3.2.2.3.

该算法的目的是修复上下文。如果标题是在d中生成的。通过CRC测试,引用将根据f进行更新,但在认为修复成功之前,还必须成功解压缩另外两个标头。在三个成功的头文件中,前两个应该被丢弃,只有第三个被传递到上层。如果三个头中的任何一个解压失败,解压器必须丢弃该头和先前生成的头,并根据第5.3.2.2.3节的规则a)到c)采取行动。

5.3.2.3. Feedback in Unidirectional mode
5.3.2.3. 单向模式下的反馈

To improve performance for the Unidirectional mode over a link that does have a feedback channel, the decompressor MAY send an acknowledgment when decompression succeeds. Setting the mode parameter in the ACK packet to U indicates that the compressor is to stay in Unidirectional mode. When receiving an ACK(U), the compressor should reduce the frequency of IR packets since the static information has been correctly received, but it is not required to stop sending IR packets. If IR packets continue to arrive, the decompressor MAY repeat the ACK(U), but it SHOULD NOT repeat the ACK(U) continuously.

为了在具有反馈通道的链路上提高单向模式的性能,解压器可以在解压成功时发送确认。将ACK数据包中的mode参数设置为U表示压缩机将保持单向模式。当接收到ACK(U)时,压缩器应该降低IR分组的频率,因为已经正确地接收到静态信息,但是不需要停止发送IR分组。如果IR数据包继续到达,解压器可以重复ACK(U),但不应连续重复ACK(U)。

5.4. Operation in Bidirectional Optimistic mode
5.4. 双向乐观模式下的操作
5.4.1. Compressor states and logic (O-mode)
5.4.1. 压缩机状态和逻辑(O型)

Below is the state machine for the compressor in Bidirectional Optimistic mode. The details of each state, state transitions, and compression logic are given subsequent to the figure.

以下是双向乐观模式下压缩机的状态机。图后给出了每个状态、状态转换和压缩逻辑的详细信息。

                            Optimistic approach / ACK
     +------>------>------>------>------>------>------>------>------+
     |                                                              |
     |      Optimistic appr. / ACK      Optimistic appr. /ACK   ACK |
     |      +------>------>------+      +------>--- -->-----+  +->--+
     |      |                    |      |                   |  |    |
     |      |                    v      |                   v  |    v
   +----------+                +----------+                +----------+
   | IR State |                | FO State |                | SO State |
   +----------+                +----------+                +----------+
     ^      ^                    |      ^                    |      |
     |      |    STATIC-NACK     |      |    NACK / Update   |      |
     |      +------<------<------+      +------<------<------+      |
     |                                                              |
     |                         STATIC-NACK                          |
     +------<------<------<------<------<------<------<------<------+
        
                            Optimistic approach / ACK
     +------>------>------>------>------>------>------>------>------+
     |                                                              |
     |      Optimistic appr. / ACK      Optimistic appr. /ACK   ACK |
     |      +------>------>------+      +------>--- -->-----+  +->--+
     |      |                    |      |                   |  |    |
     |      |                    v      |                   v  |    v
   +----------+                +----------+                +----------+
   | IR State |                | FO State |                | SO State |
   +----------+                +----------+                +----------+
     ^      ^                    |      ^                    |      |
     |      |    STATIC-NACK     |      |    NACK / Update   |      |
     |      +------<------<------+      +------<------<------+      |
     |                                                              |
     |                         STATIC-NACK                          |
     +------<------<------<------<------<------<------<------<------+
        
5.4.1.1. State transition logic
5.4.1.1. 状态转换逻辑

The transition logic for compression states in Bidirectional Optimistic mode has much in common with the logic of the Unidirectional mode. The optimistic approach principle and transitions occasioned by the need for updates work in the same way as described in chapter 5.3.1. However, in Optimistic mode there are no timeouts. Instead, the Optimistic mode makes use of feedback from decompressor to compressor for transitions in the backward direction and for OPTIONAL improved forward transition.

双向乐观模式下压缩状态的转换逻辑与单向模式的逻辑有很多共同之处。乐观方法原则和更新需求引起的转换的工作方式与第5.3.1章所述相同。但是,在乐观模式下没有超时。相反,乐观模式利用从解压器到压缩器的反馈进行反向转换和可选的改进正向转换。

5.4.1.1.1. Negative acknowledgments (NACKs), downward transition
5.4.1.1.1. 否定应答(NACK),向下转换

Negative acknowledgments (NACKs), also called context requests, obviate the periodic updates needed in Unidirectional mode. Upon reception of a NACK the compressor transits back to the FO state and sends updates (IR-DYN, UOR-2, or possibly IR) to the decompressor. NACKs carry the SN of the latest packet successfully decompressed, and this information MAY be used by the compressor to determine what fields need to be updated.

否定确认(NACK),也称为上下文请求,避免了单向模式下需要的定期更新。收到NACK后,压缩机转换回FO状态,并向减压器发送更新(IR-DYN、UOR-2或可能的IR)。nack携带成功解压缩的最新分组的SN,并且压缩器可以使用该信息来确定需要更新哪些字段。

Similarly, reception of a STATIC-NACK packet makes the compressor transit back to the IR state.

类似地,接收静态NACK分组使得压缩器返回IR状态。

5.4.1.1.2. Optional acknowledgments, upwards transition
5.4.1.1.2. 可选确认,向上转换

In addition to NACKs, positive feedback (ACKs) MAY also be used for UOR-2 packets in the Bidirectional Optimistic mode. Upon reception of an ACK for an updating packet, the compressor knows that the decompressor has received the acknowledged packet and the transition to a higher compression state can be carried out immediately. This functionality is optional, so a compressor MUST NOT expect to get such ACKs initially.

除了nack之外,正反馈(ack)还可用于双向乐观模式下的UOR-2分组。在接收到用于更新分组的ACK时,压缩器知道解压缩器已经接收到确认的分组,并且可以立即执行到更高压缩状态的转换。此功能是可选的,因此压缩器最初不得期望获得此类ACK。

The compressor MAY use the following algorithm to determine when to expect ACKs for UOR-2 packets. Let an update event be when a sequence of UOR-2 headers are sent to communicate an irregularity in the packet stream. When ACKs have been received for k_3 out of the last n_3 update events, the compressor will expect ACKs. A compressor which expects ACKs will repeat updates (possibly not in every packet) until an ACK is received.

压缩器可以使用以下算法来确定UOR-2数据包何时需要ACK。当发送UOR-2报头序列以传达数据包流中的不规则性时,设为更新事件。当收到上次n_3更新事件中k_3的ACK时,压缩器将期望收到ACK。期望ACK的压缩器将重复更新(可能不是在每个数据包中),直到收到ACK。

5.4.1.2. Compression logic and packets used
5.4.1.2. 压缩逻辑和使用的数据包

The compression logic is the same for the Bidirectional Optimistic mode as for the Unidirectional mode (see section 5.3.1.2).

双向乐观模式的压缩逻辑与单向模式相同(见第5.3.1.2节)。

5.4.2. Decompressor states and logic (O-mode)
5.4.2. 解压器状态和逻辑(O模式)

The decompression states and the state transition logic are the same as for the Unidirectional case (see section 5.3.2). What differs is the decompression and feedback logic.

解压状态和状态转换逻辑与单向情况相同(见第5.3.2节)。不同之处在于解压和反馈逻辑。

5.4.2.1. Decompression logic, timer-based timestamp decompression
5.4.2.1. 解压逻辑,基于定时器的时间戳解压

In Bidirectional mode (or if there is some other way for the compressor to obtain the decompressor's clock resolution and the link's jitter), timer-based timestamp decompression may be used to improve compression efficiency when RTP Timestamp values are proportional to wall-clock time. The mechanisms used are those described in 4.5.4.

在双向模式下(或者如果压缩器有其他方式获得解压缩器的时钟分辨率和链路的抖动),当RTP时间戳值与墙时钟时间成比例时,可以使用基于定时器的时间戳解压缩来提高压缩效率。使用的机制如4.5.4所述。

5.4.2.2. Feedback logic (O-mode)
5.4.2.2. 反馈逻辑(O型)

The feedback logic defines what feedback to send due to different events when operating in the various states. As mentioned above, there are three principal kinds of feedback; ACK, NACK and STATIC-NACK. Further, the logic described below will refer to different kinds of packets that can be received by the decompressor; Initialization and Refresh (IR) packets, IR packets without static information (IR-DYN) and type 2 packets (UOR-2), or type 1 (UO-1) and type 0 packets (UO-0). A type 0 packet carries a packet header compressed according to a fixed pattern, while type 1, 2 and IR-DYN packets are used when this pattern is broken.

反馈逻辑定义了在不同状态下操作时,由于不同事件而发送的反馈。如上所述,有三种主要的反馈类型;ACK、NACK和静态NACK。此外,下面描述的逻辑将指代可由解压缩器接收的不同种类的分组;初始化和刷新(IR)数据包、无静态信息的IR数据包(IR-DYN)和类型2数据包(UOR-2)或类型1(UO-1)和类型0数据包(UO-0)。类型0分组携带根据固定模式压缩的分组报头,而当该模式被破坏时,使用类型1、2和IR-DYN分组。

Below, rules are defined stating which feedback to use when. If the optional feedback is used once, the decompressor is REQUIRED to continue to send optional feedback for the lifetime of the packet stream.

下面定义了规则,说明何时使用哪种反馈。如果可选反馈只使用一次,则解压器需要在数据包流的生命周期内继续发送可选反馈。

State Actions

国家行动

NC: - When an IR packet passes the CRC check, send an ACK(O). - When receiving a type 0, 1, 2 or IR-DYN packet, or an IR packet has failed the CRC check, send a STATIC-NACK(O), subject to the considerations at the beginning of section 5.7.6.

NC:-当IR数据包通过CRC检查时,发送ACK(O)。-当接收到类型0、1、2或IR-DYN数据包,或IR数据包未通过CRC检查时,根据第5.7.6节开头的注意事项发送静态NACK(O)。

SC: - When an IR packet is correctly decompressed, send an ACK(O). - When a type 2 or an IR-DYN packet is correctly decompressed, optionally send an ACK(O). - When a type 0 or 1 packet is received, treat it as a mismatching CRC and use the logic of section 5.3.2.2.3 to decide if a NACK(O) should be sent.

SC:-当IR数据包正确解压缩时,发送ACK(O)。-当类型2或IR-DYN数据包正确解压缩时,可选择发送ACK(O)。-当接收到类型0或1数据包时,将其视为不匹配的CRC,并使用第5.3.2.2.3节的逻辑来决定是否应发送NACK(O)。

- When decompression of a type 2 packet, an IR-DYN packet or an IR packet has failed, use the logic of section 5.3.2.2.3 to decide if a STATIC-NACK(O) should be sent.

- 当类型2数据包、IR-DYN数据包或IR数据包解压失败时,使用第5.3.2.2.3节的逻辑来决定是否应发送静态NACK(O)。

FC: - When an IR packet is correctly decompressed, send an ACK(O). - When a type 2 or an IR-DYN packet is correctly decompressed, optionally send an ACK(O). - When a type 0 or 1 packet is correctly decompressed, no feedback is sent. - When any packet fails the CRC check, use the logic of 5.3.2.2.3 to decide if a NACK(O) should be sent.

FC:-当IR数据包正确解压缩时,发送ACK(O)。-当类型2或IR-DYN数据包正确解压缩时,可选择发送ACK(O)。-当类型0或1数据包正确解压缩时,不会发送任何反馈。-当任何数据包未通过CRC检查时,使用5.3.2.2.3的逻辑来决定是否应发送NACK(O)。

5.5. Operation in Bidirectional Reliable mode
5.5. 在双向可靠模式下运行
5.5.1. Compressor states and logic (R-mode)
5.5.1. 压缩机状态和逻辑(R模式)

Below is the state machine for the compressor in Bidirectional Reliable mode. The details of each state, state transitions, and compression logic are given subsequent to the figure.

以下是双向可靠模式下压缩机的状态机。图后给出了每个状态、状态转换和压缩逻辑的详细信息。

                                       ACK
      +------>------>------>------>------>------>------>------+
      |                                                       |
      |               ACK                         ACK         |   ACK
      |      +------>------>------+      +------>------>------+  +->-+
      |      |                    |      |                    |  |   |
      |      |                    v      |                    v  |   v
    +----------+                +----------+                +----------+
    | IR State |                | FO State |                | SO State |
    +----------+                +----------+                +----------+
      ^      ^                    |      ^                    |      |
      |      |    STATIC-NACK     |      |    NACK / Update   |      |
      |      +------<------<------+      +------<------<------+      |
      |                                                              |
      |                         STATIC-NACK                          |
      +------<------<------<------<------<------<------<------<------+
        
                                       ACK
      +------>------>------>------>------>------>------>------+
      |                                                       |
      |               ACK                         ACK         |   ACK
      |      +------>------>------+      +------>------>------+  +->-+
      |      |                    |      |                    |  |   |
      |      |                    v      |                    v  |   v
    +----------+                +----------+                +----------+
    | IR State |                | FO State |                | SO State |
    +----------+                +----------+                +----------+
      ^      ^                    |      ^                    |      |
      |      |    STATIC-NACK     |      |    NACK / Update   |      |
      |      +------<------<------+      +------<------<------+      |
      |                                                              |
      |                         STATIC-NACK                          |
      +------<------<------<------<------<------<------<------<------+
        
5.5.1.1. State transition logic (R-mode)
5.5.1.1. 状态转换逻辑(R模式)

The transition logic for compression states in Reliable mode is based on three principles: the secure reference principle, the need for updates, and negative acknowledgments.

可靠模式下压缩状态的转换逻辑基于三个原则:安全引用原则、更新需要和否定确认。

5.5.1.1.1. Upwards transition
5.5.1.1.1. 向上过渡

The upwards transition is determined by the secure reference principle. The transition procedure is similar to the one described in section 5.3.1.1.1, with one important difference: the compressor

向上过渡由安全参考原则确定。过渡程序与第5.3.1.1.1节所述程序相似,但有一个重要区别:压缩机

bases its confidence only on acknowledgments received from the decompressor. This ensures that the synchronization between the compression context and decompression context will never be lost due to packet losses.

其可信度仅基于从解压缩程序收到的确认。这确保了压缩上下文和解压缩上下文之间的同步不会因为数据包丢失而丢失。

5.5.1.1.2. Downward transition
5.5.1.1.2. 向下过渡

Downward transitions are triggered by the need for updates or by negative acknowledgment (NACKs and STATIC_NACKs), as described in section 5.3.1.1.3 and 5.4.1.1.1, respectively. Note that NACKs should rarely occur in R-mode because of the secure reference used (see fourth paragraph of next section).

如第5.3.1.1.3节和第5.4.1.1.1节所述,向下转换由更新需求或负面确认(NACs和静态_-NACs)触发。注意,由于使用了安全参考,NACK在R模式下很少出现(见下一节第四段)。

5.5.1.2. Compression logic and packets used (R-mode)
5.5.1.2. 使用的压缩逻辑和数据包(R模式)

The compressor starts in the IR state by sending IR packets. It transits to the FO state once it receives a valid ACK for an IR packet sent (an ACK can only be valid if it refers to an SN sent earlier). In the FO state, it sends the smallest packets that can communicate the changes, according to W-LSB or other encoding rules. Those packets could be of type R-1*, UOR-2, or even IR-DYN.

压缩机通过发送IR数据包在IR状态下启动。一旦接收到发送的IR数据包的有效ACK(ACK仅在引用先前发送的SN时才有效),它将转换为FO状态。在FO状态下,它根据W-LSB或其他编码规则发送能够传达更改的最小数据包。这些数据包可以是R-1*、UOR-2甚至IR-DYN类型。

The compressor will transit to the SO state after it has determined the presence of a string (see section 2), while also being confident that the decompressor has the string parameters. The confidence can be based on ACKs. For example, in a typical case where the string pattern has the form of non-SN-field = SN * slope + offset, one ACK is enough if the slope has been previously established by the decompressor (i.e., only the new offset needs to be synchronized). Otherwise, two ACKs are required since the decompressor needs two headers to learn both the new slope and the new offset. In the SO state, R-0* packets will be sent.

压缩机在确定是否存在字符串(见第2节)后,将过渡到SO状态,同时确信解压缩器具有字符串参数。置信度可以基于ACK。例如,在字符串模式具有非SN字段=SN*slope+offset形式的典型情况下,如果斜率先前已由解压缩器建立(即,仅需要同步新的偏移量),则一次ACK就足够了。否则,需要两个ack,因为解压器需要两个报头来学习新斜率和新偏移量。在SO状态下,将发送R-0*数据包。

Note that a direct transition from the IR state to the SO state is possible.

注意,从IR状态到SO状态的直接转换是可能的。

The secure reference principle is enforced in both compression and decompression logic. The principle means that only a packet carrying a 7- or 8-bit CRC can update the decompression context and be used as a reference for subsequent decompression. Consequently, only field values of update packets need to be added to the encoding sliding windows (see 4.5) maintained by the compressor.

安全引用原则在压缩和解压缩逻辑中都得到了实施。该原理意味着只有携带7位或8位CRC的数据包才能更新解压缩上下文,并用作后续解压缩的参考。因此,只有更新包的字段值需要添加到压缩程序维护的编码滑动窗口(见4.5)。

Reasons for the compressor to send update packets include:

压缩器发送更新数据包的原因包括:

1) The update may lead to a transition to higher compression efficiency (meaning either a higher compression state or smaller packets in the same state).

1) 更新可能导致向更高压缩效率的转换(意味着更高的压缩状态或相同状态下更小的数据包)。

2) It is desirable to shrink sliding windows. Windows are only shrunk when an ACK is received.

2) 最好缩小滑动窗口。窗口仅在收到ACK时收缩。

The generation of a CRC is infrequent since it is only needed for an update packet.

CRC的生成很少,因为它仅用于更新数据包。

One algorithm for sending update packets could be:

发送更新数据包的一种算法可以是:

* Let pRTT be the number of packets that are sent during one round-trip time. In the SO state, when (64 - pRTT) headers have been sent since the last acked reference, the compressor will send m1 consecutive R-0-CRC headers, then send (pRTT - m1) R-0 headers. After these headers have been sent, if the compressor has not received an ACK to at least one of the previously sent R0-CRC, it sends R-0-CRC headers continuously until it receives a corresponding ACK. m1 is an implementation parameter, which can be as large as pRTT.

* 设pRTT为在一个往返时间内发送的数据包数。在SO状态下,当自上次确认引用以来已发送(64-pRTT)报头时,压缩器将发送m1个连续的R-0-CRC报头,然后发送(pRTT-m1)R-0报头。在发送这些报头之后,如果压缩器没有收到到至少一个先前发送的R0-CRC的ACK,它将连续发送R-0-CRC报头,直到收到相应的ACK为止。m1是一个实现参数,可以与pRTT一样大。

* In the FO state, m2 UOR-2 headers are sent when there is a pattern change, after which the compressor sends (pRTT - m2) R-1-* headers. m2 is an implementation parameter, which can be as large as pRTT. At that time, if the compressor has not received enough ACKs to the previously sent UOR-2 packets in order to transit to SO state, it can repeat the cycle with the same m2, or repeat the cycle with a larger m2, or send UOR-2 headers continuously (m2 = pRTT). The operation stops when the compressor has received enough ACKs to make the transition.

* 在FO状态下,模式改变时发送m2 UOR-2报头,之后压缩机发送(pRTT-m2)R-1-*报头。m2是一个实现参数,可以与pRTT一样大。此时,如果压缩器没有收到足够的针对先前发送的UOR-2数据包的确认,以便过渡到SO状态,则压缩器可以使用相同的m2重复该循环,或者使用较大的m2重复该循环,或者连续发送UOR-2报头(m2=pRTT)。当压缩机收到足够的确认以进行转换时,操作停止。

An algorithm for processing ACKs could be:

处理ACK的算法可以是:

* Upon reception of an ACK, the compressor first derives the complete SN (see section 5.7.6.1). Then it searches the sliding window for an update packet that has the same SN. If found, that packet is the one being ACKed. Otherwise, the ACK is invalid and MUST be discarded.

* 接收到ACK后,压缩机首先导出完整的SN(见第5.7.6.1节)。然后,它在滑动窗口中搜索具有相同SN的更新包。如果找到,该数据包就是正在确认的数据包。否则,ACK无效,必须丢弃。

* It is possible, although unlikely, that residual errors on the reverse channel could cause a packet to mimic a valid ACK feedback. The compressor may use a local clock to reduce the probability of processing such a mistaken ACK. After finding the update packet as described above, the compressor can check the time elapsed since the packet was sent. If the time is longer than RTT_U, or shorter than RTT_L, the compressor may choose to discard the ACK. RTT_U and RTT_L correspond to an upper bound and lower bound of the RTT, respectively. (These bounds should be chosen appropriately to allow some variation of RTT.) Note that the only side effect of discarding a good ACK is slightly reduced compression efficiency.

* 反向信道上的残余错误可能会导致数据包模拟有效的ACK反馈,尽管可能性不大。压缩器可以使用本地时钟来降低处理这种错误ACK的概率。在如上所述找到更新包之后,压缩器可以检查自发送包以来经过的时间。如果时间长于RTT_或短于RTT_L,则压缩器可选择丢弃ACK。RTT_和RTT_L分别对应于RTT的上界和下界。(应适当选择这些边界,以允许RTT的某些变化。)注意,丢弃良好ACK的唯一副作用是压缩效率略微降低。

5.5.2. Decompressor states and logic (R-mode)
5.5.2. 解压器状态和逻辑(R模式)

The decompression states and the state transition logic are the same as for the Unidirectional case (see section 5.3.2). What differs is the decompression and feedback logic.

解压状态和状态转换逻辑与单向情况相同(见第5.3.2节)。不同之处在于解压和反馈逻辑。

5.5.2.1. Decompression logic (R-mode)
5.5.2.1. 解压逻辑(R模式)

The rules for when decompression is allowed are the same as for U-mode. Although the acking scheme in R-mode guarantees that non-decompressible packets are never sent by the compressor, residual errors can cause delivery of unexpected packets for which decompression should not be attempted.

何时允许解压缩的规则与U模式相同。尽管R模式中的确认方案保证压缩器永远不会发送不可解压缩的数据包,但残余错误可能会导致传递不应尝试解压缩的意外数据包。

Decompression MUST follow the secure reference principle as described in 5.5.1.2.

解压缩必须遵循5.5.1.2中所述的安全参考原则。

CRC verification is infrequent since only update packets carry CRCs. A CRC mismatch can only occur due to 1) residual bit errors in the current header, and/or 2) a damaged context due to residual bit errors in previous headers or feedback. Although it is impossible to determine which is the actual cause, case 1 is more likely, as a previous header reconstructed according to a damaged packet is unlikely to pass the 7- or 8-bit CRC, and damaged packets are unlikely to result in feedback that damages the context. The decompressor SHOULD act according to section 5.3.2.2.3 when CRCs fail, except that no local repair is performed. Note that all the parameter numbers, k_1, n_1, k_2, and n_2, are applied to the update packets only (i.e., exclude R-0, R-1*).

CRC验证很少,因为只有更新数据包携带CRC。CRC不匹配只能由于1)当前报头中的残余位错误和/或2)由于先前报头或反馈中的残余位错误而导致上下文损坏而发生。虽然不可能确定哪一个是实际原因,但情况1更有可能,因为根据损坏的分组重建的先前报头不太可能通过7位或8位CRC,并且损坏的分组不太可能导致损害上下文的反馈。当CRC发生故障时,减压器应按照第5.3.2.2.3节的规定进行操作,除非未进行局部维修。注意,所有参数号k_1、n_1、k_2和n_2仅应用于更新包(即排除R-0、R-1*)。

5.5.2.2. Feedback logic (R-mode)
5.5.2.2. 反馈逻辑(R模式)

The feedback logic for the Bidirectional Reliable mode is as follows:

双向可靠模式的反馈逻辑如下:

- When an updating packet (i.e., a packet carrying a 7- or 8-bit CRC) is correctly decompressed, send an ACK(R), subject to the sparse ACK mechanism described below.

- 当更新分组(即,携带7位或8位CRC的分组)被正确解压缩时,根据下面描述的稀疏ACK机制发送ACK(R)。

- When context damage is detected, send a NACK(R) if in Full Context state, or a STATIC-NACK(R) if in Static Context state.

- 当检测到上下文损坏时,如果处于完整上下文状态,则发送NACK(R),如果处于静态上下文状态,则发送静态NACK(R)。

- In No Context state, send a STATIC-NACK(R) when receiving a non-IR packet, subject to the considerations at the beginning of section 5.7.6. The decompressor SHOULD NOT send STATIC-NACK(R) when receiving an IR packet that fails the CRC check, as the compressor will stay in IR state and thus continue sending IR packets until a valid ACK is received (see section 5.5.1.2).

- 在无上下文状态下,根据第5.7.6节开头的注意事项,在接收非IR数据包时发送静态NACK(R)。当接收到未通过CRC检查的IR数据包时,解压器不应发送STATIC-NACK(R),因为压缩器将保持IR状态,从而继续发送IR数据包,直到收到有效的ACK(见第5.5.1.2节)。

- Feedback is never sent for packets not updating the context (i.e., packets that do not carry a CRC)

- 对于不更新上下文的数据包(即不携带CRC的数据包),从不发送反馈

A mechanism called "Sparse ACK" can be applied to reduce the feedback overhead caused by a large RTT. For a sequence of ACK-triggering events, a minimal set of ACKs MUST be sent:

可以应用一种称为“稀疏ACK”的机制来减少由大型RTT引起的反馈开销。对于ACK触发事件序列,必须发送一组最小的ACK:

1) For a sequence of R-0-CRC packets, the first one MUST be ACKed.

1) 对于R-0-CRC数据包序列,必须确认第一个数据包。

2) For a sequence of UOR-2, IR, or IR-DYN packets, the first N of them MUST be ACKEd, where N is the number of ACKs needed to give the compressor confidence that the decompressor has acquired the new string parameters (see second paragraph of 5.5.1.2). In case the decompressor cannot determine the value of N, the default value 2 SHOULD be used. If the subsequently received packets continue the same change pattern of header fields, sparse ACK can be applied. Otherwise, each new pattern MUST be treated as a new sequence, i.e., the first N packets that exhibit a new pattern MUST be ACKed.

2) 对于UOR-2、IR或IR-DYN数据包序列,必须对其中的前N个数据包进行确认,其中N是压缩机确信减压器已获取新字符串参数所需的确认数(见5.5.1.2第二段)。如果解压器无法确定N的值,则应使用默认值2。如果随后接收的数据包继续使用相同的报头字段更改模式,则可以应用稀疏ACK。否则,必须将每个新模式视为一个新序列,即,必须确认显示新模式的前N个分组。

After sending these minimal ACKs, the decompressor MAY choose to ACK only k subsequent packets per RTT ("Sparse ACKs"), where k is an implementation parameter. To achieve robustness against loss of ACKs, k SHOULD be at least 1.

在发送这些最小ACK之后,解压缩器可以选择每个RTT仅ACK k个后续分组(“稀疏ACK”),其中k是实现参数。为了实现对ack丢失的鲁棒性,k应至少为1。

To avoid ambiguity at the compressor, the decompressor MUST use the feedback format whose SN field length is equal to or larger than the one in the compressed packet that triggered the feedback.

为避免压缩器出现歧义,解压缩器必须使用SN字段长度等于或大于触发反馈的压缩数据包中的SN字段长度的反馈格式。

Context damage is detected according to the principles in 5.3.2.2.3.

根据5.3.2.2.3中的原则检测环境损坏。

When the decompressor is capable of timer-based compression of the RTP Timestamp (e.g., it has access to a clock with sufficient resolution, and the jitter introduced internally in the receiving node is sufficiently small) it SHOULD signal that it is ready to do timer-based compression of the RTP Timestamp. The compressor will then make a decision based on its knowledge of the channel and the observed properties of the packet stream.

当解压缩器能够对RTP时间戳进行基于定时器的压缩时(例如,它可以访问具有足够分辨率的时钟,并且在接收节点内部引入的抖动足够小),它应该发出信号,表示它准备对RTP时间戳进行基于定时器的压缩。然后,压缩器将根据其对信道的知识和分组流的观察属性做出决策。

5.6. Mode transitions
5.6. 模式转换

The decision to move from one compression mode to another is taken by the decompressor and the possible mode transitions are shown in the figure below. Subsequent chapters describe how the transitions are performed together with exceptions for the compression and decompression functionality during transitions.

解压器决定从一种压缩模式切换到另一种压缩模式,可能的模式转换如下图所示。随后的章节将描述如何在转换期间执行转换以及压缩和解压缩功能的例外情况。

                      +-------------------------+
                      | Unidirectional (U) mode |
                      +-------------------------+
                        / ^                 \ ^
                       / / Feedback(U)       \ \ Feedback(U)
                      / /                     \ \
                     / /                       \ \
        Feedback(O) / /             Feedback(R) \ \
                   v /                           v \
   +---------------------+    Feedback(R)    +-------------------+
   | Optimistic (O) mode | ----------------> | Reliable (R) mode |
   |                     | <---------------- |                   |
   +---------------------+    Feedback(O)    +-------------------+
        
                      +-------------------------+
                      | Unidirectional (U) mode |
                      +-------------------------+
                        / ^                 \ ^
                       / / Feedback(U)       \ \ Feedback(U)
                      / /                     \ \
                     / /                       \ \
        Feedback(O) / /             Feedback(R) \ \
                   v /                           v \
   +---------------------+    Feedback(R)    +-------------------+
   | Optimistic (O) mode | ----------------> | Reliable (R) mode |
   |                     | <---------------- |                   |
   +---------------------+    Feedback(O)    +-------------------+
        
5.6.1. Compression and decompression during mode transitions
5.6.1. 模式转换期间的压缩和解压缩

The following sections assume that, for each context, the compressor and decompressor maintain a variable whose value is the current compression mode for that context. The value of the variable controls, for the context in question, which packet types to use, which actions to be taken, etc.

以下各节假定,对于每个上下文,压缩器和解压缩器都会维护一个变量,其值为该上下文的当前压缩模式。变量的值控制上下文、要使用的数据包类型、要采取的操作等。

As a safeguard against residual errors, all feedback sent during a mode transition MUST be protected by a CRC, i.e., the CRC option MUST be used. A mode transition MUST NOT be initiated by feedback which is not protected by a CRC.

为了防止残余错误,模式转换期间发送的所有反馈必须由CRC保护,即必须使用CRC选项。模式转换不得由不受CRC保护的反馈启动。

The subsequent subsections define exactly when to change the value of the MODE variable. When ROHC transits between compression modes, there are several cases where the behavior of compressor or decompressor must be restricted during the transition phase. These restrictions are defined by exception parameters that specify which restrictions to apply. The transition descriptions in subsequent chapters refer to these exception parameters and defines when they are set and to what values. All mode related parameters are listed below together with their possible values, with explanations and restrictions:

随后的小节精确定义了何时更改模式变量的值。当ROHC在压缩模式之间转换时,有几种情况下压缩机或减压器的行为必须在转换阶段受到限制。这些限制由指定应用哪些限制的异常参数定义。后续章节中的转换描述引用了这些异常参数,并定义了它们的设置时间和设置值。下面列出了所有与模式相关的参数及其可能值,并给出了解释和限制:

Parameters for the compressor side:

压缩机侧的参数:

- C_MODE: Possible values for the C_MODE parameter are (U)NIDIRECTIONAL, (O)PTIMISTIC and (R)ELIABLE. C_MODE MUST be initialized to U.

- C_模式:C_模式参数的可能值为(U)NIDIRECTIONAL、(O)optimistic和(R)ELIABLE。C_模式必须初始化为U。

- C_TRANS: Possible values for the C_TRANS parameter are (P)ENDING and (D)ONE. C_TRANS MUST be initialized to D. When C_TRANS is P, it is REQUIRED

- C_TRANS:C_TRANS参数的可能值为(P)end和(D)ONE。C_TRANS必须初始化为D。当C_TRANS为P时,它是必需的

1) that the compressor only use packet formats common to all modes,

1) 压缩机仅使用所有模式通用的数据包格式,

2) that mode information is included in packets sent, at least periodically,

2) 该模式信息包括在至少定期发送的数据包中,

3) that the compressor not transit to the SO state,

3) 压缩机不会过渡到SO状态,

4) that new mode transition requests be ignored.

4) 新的模式转换请求将被忽略。

Parameters for the decompressor side:

减压器侧的参数:

- D_MODE: Possible values for the D_MODE parameter are (U)NIDIRECTIONAL, (O)PTIMISTIC and (R)ELIABLE. D_MODE MUST be initialized to U.

- D_模式:D_模式参数的可能值为(U)NIDIRECTIONAL、(O)optimistic和(R)ELIABLE。D_模式必须初始化为U。

- D_TRANS: Possible values for the D_TRANS parameter are (I)NITIATED, (P)ENDING and (D)ONE. D_TRANS MUST be initialized to D. A mode transition can be initiated only when D_TRANS is D. While D_TRANS is I, the decompressor sends a NACK or ACK carrying a CRC option for each received packet.

- D_TRANS:D_TRANS参数的可能值为(I)initiated,(P)ENDING和(D)ONE。D_TRANS必须初始化为D。只有当D_TRANS为D时,才能启动模式转换。当D_TRANS为I时,解压器发送NACK或ACK,为每个接收到的数据包携带CRC选项。

5.6.2. Transition from Unidirectional to Optimistic mode
5.6.2. 从单向模式过渡到乐观模式

When there is a feedback channel available, the decompressor may at any moment decide to initiate transition from Unidirectional to Bidirectional Optimistic mode. Any feedback packet carrying a CRC can be used with the mode parameter set to O. The decompressor can then directly start working in Optimistic mode. The compressor transits from Unidirectional to Optimistic mode as soon as it receives any feedback packet that has the mode parameter set to O and that passes the CRC check. The transition procedure is described below:

当存在可用的反馈信道时,解压缩器可在任何时刻决定启动从单向乐观模式到双向乐观模式的转换。任何携带CRC的反馈数据包都可以在模式参数设置为O的情况下使用。然后,解压器可以直接在乐观模式下开始工作。一旦压缩机接收到模式参数设置为O且通过CRC检查的任何反馈数据包,压缩机就从单向模式转换为乐观模式。过渡程序如下所述:

              Compressor                     Decompressor
             ----------------------------------------------
                   |                               |
                   |        ACK(O)/NACK(O) +-<-<-<-|  D_MODE = O
                   |       +-<-<-<-<-<-<-<-+       |
   C_MODE = O      |-<-<-<-+                       |
                   |                               |
        
              Compressor                     Decompressor
             ----------------------------------------------
                   |                               |
                   |        ACK(O)/NACK(O) +-<-<-<-|  D_MODE = O
                   |       +-<-<-<-<-<-<-<-+       |
   C_MODE = O      |-<-<-<-+                       |
                   |                               |
        

If the feedback packet is lost, the compressor will continue to work in Unidirectional mode, but as soon as any feedback packet reaches the compressor it will transit to Optimistic mode.

如果反馈数据包丢失,压缩器将继续以单向模式工作,但一旦任何反馈数据包到达压缩器,它将转换为乐观模式。

5.6.3. From Optimistic to Reliable mode
5.6.3. 从乐观到可靠模式

Transition from Optimistic to Reliable mode is permitted only after at least one packet has been correctly decompressed, which means that at least the static part of the context is established. An ACK(R) or a NACK(R) feedback packet carrying a CRC is sent to initiate the mode transition. The compressor MUST NOT use packet types 0 or 1 during transition. The transition procedure is described below:

只有在至少一个数据包被正确解压缩后,才允许从乐观模式转换到可靠模式,这意味着至少建立了上下文的静态部分。发送携带CRC的ACK(R)或NACK(R)反馈分组以发起模式转换。在转换期间,压缩器不得使用数据包类型0或1。过渡程序如下所述:

              Compressor                     Decompressor
             ----------------------------------------------
                   |                               |
                   |        ACK(R)/NACK(R) +-<-<-<-|  D_TRANS = I
                   |       +-<-<-<-<-<-<-<-+       |
   C_TRANS = P     |-<-<-<-+                       |
   C_MODE = R      |                               |
                   |->->->-+ IR/IR-DYN/UOR-2(SN,R) |
                   |       +->->->->->->->-+       |
                   |->-..                  +->->->-|  D_TRANS = P
                   |->-..                          |  D_MODE = R
                   |           ACK(SN,R)   +-<-<-<-|
                   |       +-<-<-<-<-<-<-<-+       |
   C_TRANS = D     |-<-<-<-+                       |
                   |                               |
                   |->->->-+   R-0*, R-1*          |
                   |       +->->->->->->->-+       |
                   |                       +->->->-|  D_TRANS = D
                   |                               |
        
              Compressor                     Decompressor
             ----------------------------------------------
                   |                               |
                   |        ACK(R)/NACK(R) +-<-<-<-|  D_TRANS = I
                   |       +-<-<-<-<-<-<-<-+       |
   C_TRANS = P     |-<-<-<-+                       |
   C_MODE = R      |                               |
                   |->->->-+ IR/IR-DYN/UOR-2(SN,R) |
                   |       +->->->->->->->-+       |
                   |->-..                  +->->->-|  D_TRANS = P
                   |->-..                          |  D_MODE = R
                   |           ACK(SN,R)   +-<-<-<-|
                   |       +-<-<-<-<-<-<-<-+       |
   C_TRANS = D     |-<-<-<-+                       |
                   |                               |
                   |->->->-+   R-0*, R-1*          |
                   |       +->->->->->->->-+       |
                   |                       +->->->-|  D_TRANS = D
                   |                               |
        

As long as the decompressor has not received an UOR-2, IR-DYN, or IR packet with the mode transition parameter set to R, it must stay in Optimistic mode. The compressor must not send packet types 1 or 0 while C_TRANS is P, i.e., not until it has received an ACK for a UOR-2, IR-DYN, or IR packet sent with the mode transition parameter set to R. When the decompressor receives packet types 0 or 1, after having ACKed an UOR-2, IR-DYN, or IR packet, it sets D_TRANS to D.

只要解压器没有收到模式转换参数设置为R的UOR-2、IR-DYN或IR数据包,它就必须保持乐观模式。当C_-TRANS为P时,压缩器不得发送数据包类型1或0,即,直到收到UOR-2、IR-DYN或IR数据包的确认,且模式转换参数设置为R。当解压缩器收到数据包类型0或1时,在确认UOR-2、IR-DYN或IR数据包后,将D_-TRANS设置为D。

5.6.4. From Unidirectional to Reliable mode
5.6.4. 从单向模式到可靠模式

The transition from Unidirectional to Reliable mode follows the same transition procedure as defined in section 5.6.3 above.

从单向模式到可靠模式的转换遵循上述第5.6.3节中定义的相同转换程序。

5.6.5. From Reliable to Optimistic mode
5.6.5. 从可靠到乐观模式

Either the ACK(O) or the NACK(O) feedback packet is used to initiate the transition from Reliable to Optimistic mode and the compressor MUST always run in the FO state during transition. The transition procedure is described below:

ACK(O)或NACK(O)反馈数据包用于启动从可靠模式到乐观模式的转换,并且压缩机在转换期间必须始终在FO状态下运行。过渡程序如下所述:

              Compressor                     Decompressor
             ----------------------------------------------
                   |                               |
                   |        ACK(O)/NACK(O) +-<-<-<-|  D_TRANS = I
                   |       +-<-<-<-<-<-<-<-+       |
   C_TRANS = P     |-<-<-<-+                       |
   C_MODE = O      |                               |
                   |->->->-+ IR/IR-DYN/UOR-2(SN,O) |
                   |       +->->->->->->->-+       |
                   |->-..                  +->->->-|  D_MODE = O
                   |->-..                          |
                   |           ACK(SN,O)   +-<-<-<-|
                   |       +-<-<-<-<-<-<-<-+       |
   C_TRANS = D     |-<-<-<-+                       |
                   |                               |
                   |->->->-+  UO-0, UO-1*          |
                   |       +->->->->->->->-+       |
                   |                       +->->->-|  D_TRANS = D
                   |                               |
        
              Compressor                     Decompressor
             ----------------------------------------------
                   |                               |
                   |        ACK(O)/NACK(O) +-<-<-<-|  D_TRANS = I
                   |       +-<-<-<-<-<-<-<-+       |
   C_TRANS = P     |-<-<-<-+                       |
   C_MODE = O      |                               |
                   |->->->-+ IR/IR-DYN/UOR-2(SN,O) |
                   |       +->->->->->->->-+       |
                   |->-..                  +->->->-|  D_MODE = O
                   |->-..                          |
                   |           ACK(SN,O)   +-<-<-<-|
                   |       +-<-<-<-<-<-<-<-+       |
   C_TRANS = D     |-<-<-<-+                       |
                   |                               |
                   |->->->-+  UO-0, UO-1*          |
                   |       +->->->->->->->-+       |
                   |                       +->->->-|  D_TRANS = D
                   |                               |
        

As long as the decompressor has not received an UOR-2, IR-DYN, or IR packet with the mode transition parameter set to O, it must stay in Reliable mode. The compressor must not send packet types 0 or 1 while C_TRANS is P, i.e., not until it has received an ACK for an UOR-2, IR-DYN, or IR packet sent with the mode transition parameter set to O. When the decompressor receives packet types 0 or 1, after having ACKed the UOR-2, IR-DYN, or IR packet, it sets D_TRANS to D.

只要解压器没有收到模式转换参数设置为O的UOR-2、IR-DYN或IR数据包,它就必须保持在可靠模式。当C_-TRANS为P时,压缩器不得发送数据包类型0或1,即,在收到UOR-2、IR-DYN或IR数据包的ACK且模式转换参数设置为O时,压缩器方可发送。当解压缩器收到数据包类型0或1时,在确认UOR-2、IR-DYN或IR数据包后,将D_-TRANS设置为D。

5.6.6. Transition to Unidirectional mode
5.6.6. 向单向模式过渡

The decompressor can force a transition back to Unidirectional mode if it desires to do so. Regardless of which mode this transition starts from, a three-way handshake MUST be carried out to ensure correct transition on the compressor side. The transition procedure is described below:

如果需要,解压器可以强制转换回单向模式。无论该转换从哪种模式开始,都必须执行三向握手,以确保压缩机侧的正确转换。过渡程序如下所述:

              Compressor                     Decompressor
             ----------------------------------------------
               |                               |
               |        ACK(U)/NACK(U) +-<-<-<-| D_TRANS = I
               |       +-<-<-<-<-<-<-<-+       |
   C_TRANS = P |-<-<-<-+                       |
   C_MODE = U  |                               |
               |->->->-+ IR/IR-DYN/UOR-2(SN,U) |
               |       +->->->->->->->-+       |
               |->-..                  +->->->-|
               |->-..                          |
               |           ACK(SN,U)   +-<-<-<-|
               |       +-<-<-<-<-<-<-<-+       |
   C_TRANS = D |-<-<-<-+                       |
               |                               |
               |->->->-+  UO-0, UO-1*          |
               |       +->->->->->->->-+       |
               |                       +->->->-| D_TRANS = D, D_MODE= U
        
              Compressor                     Decompressor
             ----------------------------------------------
               |                               |
               |        ACK(U)/NACK(U) +-<-<-<-| D_TRANS = I
               |       +-<-<-<-<-<-<-<-+       |
   C_TRANS = P |-<-<-<-+                       |
   C_MODE = U  |                               |
               |->->->-+ IR/IR-DYN/UOR-2(SN,U) |
               |       +->->->->->->->-+       |
               |->-..                  +->->->-|
               |->-..                          |
               |           ACK(SN,U)   +-<-<-<-|
               |       +-<-<-<-<-<-<-<-+       |
   C_TRANS = D |-<-<-<-+                       |
               |                               |
               |->->->-+  UO-0, UO-1*          |
               |       +->->->->->->->-+       |
               |                       +->->->-| D_TRANS = D, D_MODE= U
        

After ACKing the first UOR-2(U), IR-DYN(U), or IR(U), the decompressor MUST continue to send feedback with the Mode parameter set to U until it receives packet types 0 or 1.

在确认第一个UOR-2(U)、IR-DYN(U)或IR(U)后,解压缩器必须继续发送模式参数设置为U的反馈,直到接收到数据包类型0或1。

5.7. Packet formats
5.7. 数据包格式

The following notation is used in this section:

本节使用以下符号:

bits(X) = the number of bits for field X present in the compressed header (including extension).

bits(X)=压缩标头(包括扩展名)中存在的字段X的位数。

field(X) = the value of field X in the compressed header.

字段(X)=压缩标题中字段X的值。

context(X) = the value of field X as established in the context.

上下文(X)=在上下文中建立的字段X的值。

value(X) = field(X) if X is present in the compressed header; = context(X) otherwise.

值(X)=字段(X),如果压缩头中存在X;=上下文(X)另有规定。

hdr(X) = the value of field X in the uncompressed or decompressed header.

hdr(X)=未压缩或解压缩标头中字段X的值。

Updating properties: Lists the fields in the context that are directly updated by processing the compressed header. Note that there may be dependent fields that are implicitly also updated (e.g., an update to context(SN) often updates context(TS) as well). See also section 5.2.7.

更新属性:列出上下文中通过处理压缩头直接更新的字段。注意,可能存在隐式更新的依赖字段(例如,上下文更新(SN)也经常更新上下文(TS)。另见第5.2.7节。

The following fields occur in several headers and extensions:

以下字段出现在多个标题和扩展中:

SN: The compressed RTP Sequence Number.

SN:压缩的RTP序列号。

Compressed with W-LSB. The interpretation intervals, see section 4.5.1, are defined as follows:

用W-LSB压缩。解释层段(见第4.5.1节)定义如下:

            p = 1                   if bits(SN) <= 4
            p = 2^(bits(SN)-5) - 1  if bits(SN) >  4
        
            p = 1                   if bits(SN) <= 4
            p = 2^(bits(SN)-5) - 1  if bits(SN) >  4
        

IP-ID: A compressed IP-ID field.

IP-ID:压缩的IP-ID字段。

IP-ID fields in compressed base headers carry the compressed IP-ID of the innermost IPv4 header whose corresponding RND flag is not 1. The rules below assume that the IP-ID is for the innermost IP header. If it is for an outer IP header, the RND2 and NBO2 flags are used instead of RND and NBO.

压缩基本报头中的IP-ID字段携带最内层IPv4报头的压缩IP-ID,其对应的RND标志不是1。下面的规则假设IP-ID是最里面的IP头。如果是外部IP报头,则使用RND2和NBO2标志代替RND和NBO。

If value(RND) = 0, hdr(IP-ID) is compressed using Offset IP-ID encoding (see section 4.5.5) using p = 0 and default-slope(IP-ID offset) = 0.

如果值(RND)=0,则使用偏移IP-ID编码(见第4.5.5节)压缩hdr(IP-ID),使用p=0和默认斜率(IP-ID偏移)=0。

If value(RND) = 1, IP-ID is the uncompressed hdr(IP-ID). IP-ID is then passed as additional octets at the end of the compressed header, after any extensions.

如果值(RND)=1,则IP-ID是未压缩的hdr(IP-ID)。然后,在任何扩展之后,IP-ID在压缩头的末尾作为额外的八位字节传递。

If value(NBO) = 0, the octets of hdr(IP-ID) are swapped before compression and after decompression. The value of NBO is ignored when value(RND) = 1.

如果值(NBO)=0,则在压缩之前和解压缩之后交换hdr(IP-ID)的八位字节。当值(RND)=1时,忽略NBO的值。

TS: The compressed RTP Timestamp value.

TS:压缩的RTP时间戳值。

If value(TIME_STRIDE) > 0, timer-based compression of the RTP Timestamp is used (see section 4.5.4).

如果值(时间步长)>0,则使用基于计时器的RTP时间戳压缩(见第4.5.4节)。

If value(Tsc) = 1, Scaled RTP Timestamp encoding is used before compression (see section 4.5.3), and default-slope(TS) = 1.

如果值(Tsc)=1,则压缩前使用缩放RTP时间戳编码(见第4.5.3节),默认斜率(TS)=1。

If value(Tsc) = 0, the Timestamp value is compressed as-is, and default-slope(TS) = value(TS_STRIDE).

如果值(Tsc)=0,则时间戳值按原样压缩,默认斜率(TS)=值(TS_步长)。

The interpretation intervals, see section 4.5.1, are defined as follows:

解释层段(见第4.5.1节)定义如下:

         p = 2^(bits(TS)-2) - 1
        
         p = 2^(bits(TS)-2) - 1
        

CRC: The CRC over the original, uncompressed, header.

CRC:原始未压缩标头上的CRC。

For 3-bit CRCs, the polynomial of section 5.9.2 is used. For 7-bit CRCs, the polynomial of section 5.9.2 is used. For 8-bit CRCs, the polynomial of section 5.9.1 is used.

对于3位CRC,使用第5.9.2节中的多项式。对于7位CRC,使用第5.9.2节中的多项式。对于8位CRC,使用第5.9.1节中的多项式。

M: RTP Marker bit.

M:RTP标记位。

Context(M) is initially zero and is never updated. value(M) = 1 only when field(M) = 1.

上下文(M)最初为零,并且从不更新。仅当字段(M)=1时,值(M)=1。

The general format for a compressed RTP header is as follows:

压缩RTP报头的一般格式如下:

     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         :  if for small CIDs and CID 1-15
   +---+---+---+---+---+---+---+---+
   |   first octet of base header  |  (with type indication)
   +---+---+---+---+---+---+---+---+
   :                               :
   /   0, 1, or 2 octets of CID    /  1-2 octets if large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   /   remainder of base header    /  variable number of bits
   +---+---+---+---+---+---+---+---+
   :                               :
   /     Extension (see 5.7.5)     /  extension, if X = 1 in base header
   :                               :
    --- --- --- --- --- --- --- ---
   :                               :
   +   IP-ID of outer IPv4 header  +  2 octets, if value(RND2) = 1
   :                               :
    --- --- --- --- --- --- --- ---
   /    AH data for outer list     /  variable (see 5.8.4.2)
    --- --- --- --- --- --- --- ---
   :                               :
   +   GRE checksum (see 5.8.4.4)  +  2 octets, if GRE flag C = 1
   :                               :
    --- --- --- --- --- --- --- ---
   :                               :
   +   IP-ID of inner IPv4 header  +  2 octets, if value(RND) = 1
   :                               :
    --- --- --- --- --- --- --- ---
   /    AH data for inner list     /  variable (see 5.8.4.2)
    --- --- --- --- --- --- --- ---
   :                               :
   +   GRE checksum (see 5.8.4.4)  +  2 octets, if GRE flag C = 1
   :                               :
    --- --- --- --- --- --- --- ---
   :                               :
   +         UDP Checksum          +  2 octets,
   :                               :  if context(UDP Checksum) != 0
    --- --- --- --- --- --- --- ---
        
     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         :  if for small CIDs and CID 1-15
   +---+---+---+---+---+---+---+---+
   |   first octet of base header  |  (with type indication)
   +---+---+---+---+---+---+---+---+
   :                               :
   /   0, 1, or 2 octets of CID    /  1-2 octets if large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   /   remainder of base header    /  variable number of bits
   +---+---+---+---+---+---+---+---+
   :                               :
   /     Extension (see 5.7.5)     /  extension, if X = 1 in base header
   :                               :
    --- --- --- --- --- --- --- ---
   :                               :
   +   IP-ID of outer IPv4 header  +  2 octets, if value(RND2) = 1
   :                               :
    --- --- --- --- --- --- --- ---
   /    AH data for outer list     /  variable (see 5.8.4.2)
    --- --- --- --- --- --- --- ---
   :                               :
   +   GRE checksum (see 5.8.4.4)  +  2 octets, if GRE flag C = 1
   :                               :
    --- --- --- --- --- --- --- ---
   :                               :
   +   IP-ID of inner IPv4 header  +  2 octets, if value(RND) = 1
   :                               :
    --- --- --- --- --- --- --- ---
   /    AH data for inner list     /  variable (see 5.8.4.2)
    --- --- --- --- --- --- --- ---
   :                               :
   +   GRE checksum (see 5.8.4.4)  +  2 octets, if GRE flag C = 1
   :                               :
    --- --- --- --- --- --- --- ---
   :                               :
   +         UDP Checksum          +  2 octets,
   :                               :  if context(UDP Checksum) != 0
    --- --- --- --- --- --- --- ---
        

Note that the order of the fields following the optional extension is the same as the order between the fields in an uncompressed header.

请注意,可选扩展名后面的字段顺序与未压缩标头中字段之间的顺序相同。

In subsequent sections, the position of the large CID in the diagrams is indicated using this notation:

在随后的章节中,图中大CID的位置使用以下符号表示:

   +===+===+===+===+===+===+===+===+
        
   +===+===+===+===+===+===+===+===+
        

Whether the UDP Checksum field is present or not is controlled by the value of the UDP Checksum in the context. If nonzero, the UDP Checksum is enabled and sent along with each packet. If zero, the UDP Checksum is disabled and not sent. Should hdr(UDP Checksum) be nonzero when context(UDP Checksum) is zero, the header cannot be compressed. It must be sent uncompressed or the context reinitialized using an IR packet. Context(UDP Checksum) is updated only by IR or IR-DYN headers, never by UDP checksums sent in headers of type 2, 1, or 0.

UDP校验和字段是否存在由上下文中UDP校验和的值控制。如果非零,则启用UDP校验和,并随每个数据包一起发送。如果为零,UDP校验和将被禁用且不发送。当上下文(UDP校验和)为零时,如果hdr(UDP校验和)为非零,则无法压缩标头。它必须以未压缩的方式发送,或者使用IR数据包重新初始化上下文。上下文(UDP校验和)仅由IR或IR-DYN头更新,从不由类型为2、1或0的头中发送的UDP校验和更新。

When an IPv4 header is present in the static context, for which the corresponding RND flag has not been established to be 1, the packet types R-1 and UO-1 MUST NOT be used.

当静态上下文中存在IPv4报头时(对应的RND标志尚未确定为1),不得使用数据包类型R-1和UO-1。

When no IPv4 header is present in the static context, or the RND flags for all IPv4 headers in the context have been established to be 1, the packet types R-1-ID, R-1-TS, UO-1-ID, and UO-1-TS MUST NOT be used.

当静态上下文中不存在IPv4标头,或上下文中所有IPv4标头的RND标志已确定为1时,不得使用数据包类型R-1-ID、R-1-TS、UO-1-ID和UO-1-TS。

While in the transient state in which an RND flag is being established, the packet types R-1-ID, R-1-TS, UO-1-ID, and UO-1-TS MUST NOT be used. This implies that the RND flag(s) of the Extension 3 may have to be inspected before the format of a base header carrying an Extension 3 can be determined.

在建立RND标志的瞬态中,不得使用数据包类型R-1-ID、R-1-TS、UO-1-ID和UO-1-TS。这意味着在确定携带扩展3的基本报头的格式之前,可能必须检查扩展3的RND标志。

5.7.1. Packet type 0: UO-0, R-0, R-0-CRC
5.7.1. 数据包类型0:UO-0、R-0、R-0-CRC

Packet type 0 is indicated by the first bit being 0:

数据包类型0由第一位0表示:

R-0

R-0

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 0   0 |          SN           |
   +===+===+===+===+===+===+===+===+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 0   0 |          SN           |
   +===+===+===+===+===+===+===+===+
        

Updating properties: R-0 packets do not update any part of the context.

更新属性:R-0数据包不更新上下文的任何部分。

R-0-CRC

R-0-CRC

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 0   1 |          SN           |
   +===+===+===+===+===+===+===+===+
   |SN |            CRC            |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 0   1 |          SN           |
   +===+===+===+===+===+===+===+===+
   |SN |            CRC            |
   +---+---+---+---+---+---+---+---+
        

Note: The SN field straddles the CID field.

注:SN字段跨接CID字段。

Updating properties: R-0-CRC packets update context(RTP Sequence Number).

更新属性:R-0-CRC数据包更新上下文(RTP序列号)。

UO-0

UO-0

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 0 |      SN       |    CRC    |
   +===+===+===+===+===+===+===+===+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 0 |      SN       |    CRC    |
   +===+===+===+===+===+===+===+===+
        

Updating properties: UO-0 packets update the current value of context(RTP Sequence Number).

更新属性:UO-0数据包更新上下文的当前值(RTP序列号)。

5.7.2. Packet type 1 (R-mode): R-1, R-1-TS, R-1-ID
5.7.2. 数据包类型1(R模式):R-1、R-1-TS、R-1-ID

Packet type 1 is indicated by the first bits being 10:

数据包类型1由第一位10表示:

R-1

R-1

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |          SN           |
   +===+===+===+===+===+===+===+===+
   | M | X |          TS           |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |          SN           |
   +===+===+===+===+===+===+===+===+
   | M | X |          TS           |
   +---+---+---+---+---+---+---+---+
        

Note: R-1 cannot be used if the context contains at least one IPv4 header with value(RND) = 0. This disambiguates it from R-1-ID and R-1-TS.

注意:如果上下文至少包含一个值(RND)=0的IPv4标头,则不能使用R-1。这消除了它与R-1-ID和R-1-TS之间的歧义。

R-1-ID

R-1-ID

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |          SN           |
   +===+===+===+===+===+===+===+===+
   | M | X |T=0|       IP-ID       |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |          SN           |
   +===+===+===+===+===+===+===+===+
   | M | X |T=0|       IP-ID       |
   +---+---+---+---+---+---+---+---+
        

Note: R-1-ID cannot be used if there is no IPv4 header in the context or if value(RND) and value(RND2) are both 1.

注意:如果上下文中没有IPv4标头,或者如果值(RND)和值(RND2)均为1,则不能使用R-1-ID。

R-1-TS

R-1-TS

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |          SN           |
   +===+===+===+===+===+===+===+===+
   | M | X |T=1|        TS         |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |          SN           |
   +===+===+===+===+===+===+===+===+
   | M | X |T=1|        TS         |
   +---+---+---+---+---+---+---+---+
        

Note: R-1-TS cannot be used if there is no IPv4 header in the context or if value(RND) and value(RND2) are both 1.

注意:如果上下文中没有IPv4标头,或者如果值(RND)和值(RND2)均为1,则不能使用R-1-TS。

X: X = 0 indicates that no extension is present; X = 1 indicates that an extension is present.

X:X=0表示不存在扩展名;X=1表示存在扩展名。

T: T = 0 indicates format R-1-ID; T = 1 indicates format R-1-TS.

T:T=0表示格式R-1-ID;T=1表示格式R-1-TS。

Updating properties: R-1* headers do not update any part of the context.

更新属性:R-1*标题不会更新上下文的任何部分。

5.7.3. Packet type 1 (U/O-mode): UO-1, UO-1-ID, UO-1-TS
5.7.3. 数据包类型1(U/O模式):UO-1、UO-1-ID、UO-1-TS

UO-1

UO-1

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |          TS           |
   +===+===+===+===+===+===+===+===+
   | M |      SN       |    CRC    |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |          TS           |
   +===+===+===+===+===+===+===+===+
   | M |      SN       |    CRC    |
   +---+---+---+---+---+---+---+---+
        

Note: UO-1 cannot be used if the context contains at least one IPv4 header with value(RND) = 0. This disambiguates it from UO-1-ID and UO-1-TS.

注意:如果上下文至少包含一个值(RND)=0的IPv4标头,则无法使用UO-1。这消除了它与UO-1-ID和UO-1-TS之间的歧义。

UO-1-ID

UO-1-ID

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |T=0|       IP-ID       |
   +===+===+===+===+===+===+===+===+
   | X |      SN       |    CRC    |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |T=0|       IP-ID       |
   +===+===+===+===+===+===+===+===+
   | X |      SN       |    CRC    |
   +---+---+---+---+---+---+---+---+
        

Note: UO-1-ID cannot be used if there is no IPv4 header in the context or if value(RND) and value(RND2) are both 1.

注意:如果上下文中没有IPv4标头,或者如果值(RND)和值(RND2)均为1,则不能使用UO-1-ID。

UO-1-TS

UO-1-TS

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |T=1|        TS         |
   +===+===+===+===+===+===+===+===+
   | M |      SN       |    CRC    |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |T=1|        TS         |
   +===+===+===+===+===+===+===+===+
   | M |      SN       |    CRC    |
   +---+---+---+---+---+---+---+---+
        

Note: UO-1-TS cannot be used if there is no IPv4 header in the context or if value(RND) and value(RND2) are both 1.

注意:如果上下文中没有IPv4标头,或者如果值(RND)和值(RND2)均为1,则不能使用UO-1-TS。

X: X = 0 indicates that no extension is present; X = 1 indicates that an extension is present.

X:X=0表示不存在扩展名;X=1表示存在扩展名。

T: T = 0 indicates format UO-1-ID; T = 1 indicates format UO-1-TS.

T:T=0表示格式UO-1-ID;T=1表示格式UO-1-TS。

Updating properties: UO-1* packets update context(RTP Sequence Number). UO-1 and UO-1-TS packets update context(RTP Timestamp). UO-1-ID packets update context(IP-ID). Values provided in extensions, except those in other SN, TS, or IP-ID fields, do not update the context.

更新属性:UO-1*数据包更新上下文(RTP序列号)。UO-1和UO-1-TS数据包更新上下文(RTP时间戳)。UO-1-ID数据包更新上下文(IP-ID)。扩展中提供的值(其他SN、TS或IP-ID字段中的值除外)不会更新上下文。

5.7.4. Packet type 2: UOR-2
5.7.4. 数据包类型2:UOR-2

Packet type 2 is indicated by the first bits being 110:

包类型2由第一位110表示:

UOR-2

UOR-2

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   0 |        TS         |
   +===+===+===+===+===+===+===+===+
   |TS | M |          SN           |
   +---+---+---+---+---+---+---+---+
   | X |            CRC            |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   0 |        TS         |
   +===+===+===+===+===+===+===+===+
   |TS | M |          SN           |
   +---+---+---+---+---+---+---+---+
   | X |            CRC            |
   +---+---+---+---+---+---+---+---+
        

Note: UOR-2 cannot be used if the context contains at least one IPv4 header with value(RND) = 0. This disambiguates it from UOR-2-ID and UOR-2-TS.

注意:如果上下文至少包含一个值(RND)=0的IPv4标头,则无法使用UOR-2。这消除了它与UOR-2-ID和UOR-2-TS之间的歧义。

Note: The TS field straddles the CID field.

注:TS字段跨接CID字段。

UOR-2-ID

UOR-2-ID

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   0 |       IP-ID       |
   +===+===+===+===+===+===+===+===+
   |T=0| M |          SN           |
   +---+---+---+---+---+---+---+---+
   | X |            CRC            |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   0 |       IP-ID       |
   +===+===+===+===+===+===+===+===+
   |T=0| M |          SN           |
   +---+---+---+---+---+---+---+---+
   | X |            CRC            |
   +---+---+---+---+---+---+---+---+
        

Note: UOR-2-ID cannot be used if there is no IPv4 header in the context or if value(RND) and value(RND2) are both 1.

注意:如果上下文中没有IPv4标头,或者如果值(RND)和值(RND2)均为1,则无法使用UOR-2-ID。

UOR-2-TS

UOR-2-TS

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   0 |        TS         |
   +===+===+===+===+===+===+===+===+
   |T=1| M |          SN           |
   +---+---+---+---+---+---+---+---+
   | X |            CRC            |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   0 |        TS         |
   +===+===+===+===+===+===+===+===+
   |T=1| M |          SN           |
   +---+---+---+---+---+---+---+---+
   | X |            CRC            |
   +---+---+---+---+---+---+---+---+
        

Note: UOR-2-TS cannot be used if there is no IPv4 header in the context or if value(RND) and value(RND2) are both 1.

注意:如果上下文中没有IPv4标头,或者如果值(RND)和值(RND2)均为1,则无法使用UOR-2-TS。

X: X = 0 indicates that no extension is present; X = 1 indicates that an extension is present.

X:X=0表示不存在扩展名;X=1表示存在扩展名。

T: T = 0 indicates format UOR-2-ID; T = 1 indicates format UOR-2-TS.

T:T=0表示格式UOR-2-ID;T=1表示格式UOR-2-TS。

Updating properties: All values provided in UOR-2* packets update the context, unless explicitly stated otherwise.

更新属性:除非另有明确说明,否则UOR-2*数据包中提供的所有值都会更新上下文。

5.7.5. Extension formats
5.7.5. 扩展格式

(Note: the term extension as used for additional information contained in the ROHC headers does not bear any relationship to the term extension header used in IP.)

(注:用于ROHC标题中包含的附加信息的术语扩展与IP中使用的术语扩展标题没有任何关系。)

Fields in extensions are concatenated with the corresponding field in the base compressed header, if there is one. Bits in an extension are less significant than bits in the base compressed header (see section 4.5.7).

扩展中的字段与基本压缩头中的相应字段(如果有)连接在一起。扩展中的位的有效性低于基本压缩头中的位(见第4.5.7节)。

The TS field is scaled in all extensions, as it is in the base header, except optionally when using Extension 3 where the Tsc flag can indicate that the TS field is not scaled. Value(TS_STRIDE) is used as the scale factor when scaling the TS field.

TS字段在所有扩展中都按比例缩放,就像在基本标头中一样,除非在使用扩展3时(可选),其中Tsc标志可以指示TS字段未按比例缩放。缩放TS字段时,值(TS_步长)用作比例因子。

In the following three extensions, the interpretation of the fields depends on whether there is a T-bit in the base compressed header, and if so, on the value of that field. When there is no T-bit, +T and -T both mean TS. This is the case when there are no IPv4 headers in the static context, and when all IPv4 headers in the static context have their corresponding RND flag set (i.e., RND = 1).

在以下三个扩展中,字段的解释取决于基本压缩头中是否有T位,如果有,则取决于该字段的值。当没有T位时,+T和-T都表示TS。当静态上下文中没有IPv4标头,并且静态上下文中的所有IPv4标头都设置了相应的RND标志(即RND=1)时,就是这种情况。

If there is a T-bit,

如果有一个T型钻头,

      T = 1 indicates that +T is TS, and
                           -T is IP-ID;
        
      T = 1 indicates that +T is TS, and
                           -T is IP-ID;
        

T = 0 indicates that +T is IP-ID, and -T is TS.

T=0表示+T是IP-ID,-T是TS。

Extension 0:

扩展0:

        0   1   2   3   4   5   6   7
      +---+---+---+---+---+---+---+---+
      | 0   0 |    SN     |    +T     |
      +---+---+---+---+---+---+---+---+
        
        0   1   2   3   4   5   6   7
      +---+---+---+---+---+---+---+---+
      | 0   0 |    SN     |    +T     |
      +---+---+---+---+---+---+---+---+
        

Extension 1:

扩展1:

      +---+---+---+---+---+---+---+---+
      | 0   1 |    SN     |    +T     |
      +---+---+---+---+---+---+---+---+
      |              -T               |
      +---+---+---+---+---+---+---+---+
        
      +---+---+---+---+---+---+---+---+
      | 0   1 |    SN     |    +T     |
      +---+---+---+---+---+---+---+---+
      |              -T               |
      +---+---+---+---+---+---+---+---+
        

Extension 2:

扩展2:

      +---+---+---+---+---+---+---+---+
      | 1   0 |    SN     |    +T     |
      +---+---+---+---+---+---+---+---+
      |              +T               |
      +---+---+---+---+---+---+---+---+
      |              -T               |
      +---+---+---+---+---+---+---+---+
        
      +---+---+---+---+---+---+---+---+
      | 1   0 |    SN     |    +T     |
      +---+---+---+---+---+---+---+---+
      |              +T               |
      +---+---+---+---+---+---+---+---+
      |              -T               |
      +---+---+---+---+---+---+---+---+
        

Extension 3 is a more elaborate extension which can give values for fields other than SN, TS, and IP-ID. Three optional flag octets indicate changes to IP header(s) and RTP header, respectively.

扩展3是一个更复杂的扩展,它可以为SN、TS和IP-ID以外的字段提供值。三个可选的标志八位字节分别表示对IP头和RTP头的更改。

Extension 3:

扩展3:

      0     1     2     3     4     5     6     7
   +-----+-----+-----+-----+-----+-----+-----+-----+
   |  1     1  |  S  |R-TS | Tsc |  I  | ip  | rtp |            (FLAGS)
   +-----+-----+-----+-----+-----+-----+-----+-----+
   |            Inner IP header flags        | ip2 |  if ip = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |            Outer IP header flags              |  if ip2 = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |                      SN                       |  if S = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   /       TS (encoded as in section 4.5.6)        /  1-4 octets,
    ..... ..... ..... ..... ..... ..... ..... .....   if R-TS = 1
   |                                               |
   /            Inner IP header fields             /  variable,
   |                                               |  if ip = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |                     IP-ID                     |  2 octets, if I = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |                                               |
   /            Outer IP header fields             /  variable,
   |                                               |  if ip2 = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |                                               |
   /          RTP header flags and fields          /  variable,
   |                                               |  if rtp = 1
    ..... ..... ..... ..... ..... ..... ..... .....
        
      0     1     2     3     4     5     6     7
   +-----+-----+-----+-----+-----+-----+-----+-----+
   |  1     1  |  S  |R-TS | Tsc |  I  | ip  | rtp |            (FLAGS)
   +-----+-----+-----+-----+-----+-----+-----+-----+
   |            Inner IP header flags        | ip2 |  if ip = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |            Outer IP header flags              |  if ip2 = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |                      SN                       |  if S = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   /       TS (encoded as in section 4.5.6)        /  1-4 octets,
    ..... ..... ..... ..... ..... ..... ..... .....   if R-TS = 1
   |                                               |
   /            Inner IP header fields             /  variable,
   |                                               |  if ip = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |                     IP-ID                     |  2 octets, if I = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |                                               |
   /            Outer IP header fields             /  variable,
   |                                               |  if ip2 = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |                                               |
   /          RTP header flags and fields          /  variable,
   |                                               |  if rtp = 1
    ..... ..... ..... ..... ..... ..... ..... .....
        

S, R-TS, I, ip, rtp, ip2: Indicate presence of fields as shown to the right of each field above.

S、 R-TS、I、ip、rtp、ip2:表示存在字段,如上面每个字段右侧所示。

Tsc: Tsc = 0 indicates that TS is not scaled; Tsc = 1 indicates that TS is scaled according to section 4.5.3, using value(TS_STRIDE). Context(Tsc) is always 1. If scaling is not desired, the compressor will establish TS_STRIDE = 1.

Tsc:Tsc=0表示TS未缩放;Tsc=1表示根据第4.5.3节,使用数值(TS_步长)缩放TS。上下文(Tsc)始终为1。如果不需要缩放,压缩机将建立TS_步长=1。

SN: See the beginning of section 5.7.

序号:见第5.7节开头部分。

TS: Variable number of bits of TS, encoded according to section 4.5.6. See the beginning of section 5.7.

TS:TS的可变位数,根据第4.5.6节进行编码。见第5.7节开头部分。

IP-ID: See the beginning of section 5.7.

IP-ID:见第5.7节开头部分。

Inner IP header flags

内部IP头标志

These correspond to the inner IP header if there are two, and the single IP header otherwise.

如果有两个,则对应于内部IP报头,否则对应于单个IP报头。

      0     1     2     3     4     5     6     7
    ..... ..... ..... ..... ..... ..... ..... .....
   | TOS | TTL | DF  | PR  | IPX | NBO | RND | ip2 |  if ip = 1
    ..... ..... ..... ..... ..... ..... ..... .....
        
      0     1     2     3     4     5     6     7
    ..... ..... ..... ..... ..... ..... ..... .....
   | TOS | TTL | DF  | PR  | IPX | NBO | RND | ip2 |  if ip = 1
    ..... ..... ..... ..... ..... ..... ..... .....
        

TOS, TTL, PR, IPX: Indicates presence of fields as shown to the right of the field in question below.

TOS、TTL、PR、IPX:表示存在如下所述字段右侧所示的字段。

DF: Don't Fragment bit of IP header.

DF:不要对IP头的位进行分段。

NBO: Indicates whether the octets of hdr(IP identifier) of this IP header are swapped before compression and after decompression.

NBO:指示此IP头的hdr(IP标识符)的八位字节在压缩之前和解压缩之后是否交换。

NBO = 1 indicates that the octets need not be swapped. NBO = 0 indicates that the octets are to be swapped. See section 4.5.5.

NBO=1表示不需要交换八位字节。NBO=0表示要交换八位字节。见第4.5.5节。

RND: Indicates whether hdr(IP identifier) is not to be compressed but instead sent as-is in compressed headers.

RND:指示是否不压缩hdr(IP标识符),而是按压缩头中的方式发送。

IP2: Indicates presence of Outer IP header fields. Unless the static context contains two IP headers, IP2 is always zero.

IP2:表示存在外部IP头字段。除非静态上下文包含两个IP头,否则IP2始终为零。

Inner IP header fields

内部IP头字段

    ..... ..... ..... ..... ..... ..... ..... .....
   |         Type of Service/Traffic Class         |  if TOS = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |         Time to Live/Hop Limit                |  if TTL = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |         Protocol/Next Header                  |  if PR = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   /         IP extension headers                  /  variable,
    ..... ..... ..... ..... ..... ..... ..... .....   if IPX = 1
        
    ..... ..... ..... ..... ..... ..... ..... .....
   |         Type of Service/Traffic Class         |  if TOS = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |         Time to Live/Hop Limit                |  if TTL = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   |         Protocol/Next Header                  |  if PR = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   /         IP extension headers                  /  variable,
    ..... ..... ..... ..... ..... ..... ..... .....   if IPX = 1
        

Type of Service/Traffic Class: That field in the uncompressed IP header (absolute value).

服务类型/流量类别:未压缩IP头中的字段(绝对值)。

Time to Live/Hop Limit: That field in the uncompressed IP header.

生存时间/跃点限制:未压缩IP标头中的该字段。

Protocol/Next Header: That field in the uncompressed IP header.

协议/下一个标头:未压缩IP标头中的该字段。

IP extension header(s): According to section 5.8.5.

IP扩展头:根据第5.8.5节。

Outer IP header flags

外部IP头标志

The fields in this part of the Extension 3 header refer to the outermost IP header:

Extension 3标头此部分中的字段指的是最外层的IP标头:

         0     1     2     3     4     5     6     7
       ..... ..... ..... ..... ..... ..... ..... .....  | TOS2| TTL2|
      DF2 | PR2 |IPX2 |NBO2 |RND2 |  I2 |  if ip2 = 1
       ..... ..... ..... ..... ..... ..... ..... .....
        
         0     1     2     3     4     5     6     7
       ..... ..... ..... ..... ..... ..... ..... .....  | TOS2| TTL2|
      DF2 | PR2 |IPX2 |NBO2 |RND2 |  I2 |  if ip2 = 1
       ..... ..... ..... ..... ..... ..... ..... .....
        

These flags are the same as the Inner IP header flags, but refer to the outer IP header instead of the inner IP header. The following flag, however, has no counterpart in the Inner IP header flags:

这些标志与内部IP头标志相同,但指的是外部IP头,而不是内部IP头。但是,以下标志在内部IP标头标志中没有对应项:

I2: Indicates presence of the IP-ID field.

I2:表示存在IP-ID字段。

Outer IP header fields

外部IP头字段

       ..... ..... ..... ..... ..... ..... ..... .....
      |      Type of Service/Traffic Class            |  if TOS2 = 1
       ..... ..... ..... ..... ..... ..... ..... .....
      |         Time to Live/Hop Limit                |  if TTL2 = 1
       ..... ..... ..... ..... ..... ..... ..... .....
      |         Protocol/Next Header                  |  if PR2 = 1
       ..... ..... ..... ..... ..... ..... ..... .....
      /         IP extension header(s)                /  variable,
       ..... ..... ..... ..... ..... ..... ..... .....    if IPX2 = 1
      |                  IP-ID                        |  2 octets,
       ..... ..... ..... ..... ..... ..... ..... .....    if I2 = 1
        
       ..... ..... ..... ..... ..... ..... ..... .....
      |      Type of Service/Traffic Class            |  if TOS2 = 1
       ..... ..... ..... ..... ..... ..... ..... .....
      |         Time to Live/Hop Limit                |  if TTL2 = 1
       ..... ..... ..... ..... ..... ..... ..... .....
      |         Protocol/Next Header                  |  if PR2 = 1
       ..... ..... ..... ..... ..... ..... ..... .....
      /         IP extension header(s)                /  variable,
       ..... ..... ..... ..... ..... ..... ..... .....    if IPX2 = 1
      |                  IP-ID                        |  2 octets,
       ..... ..... ..... ..... ..... ..... ..... .....    if I2 = 1
        

The fields in this part of Extension 3 are as for the Inner IP header fields, but they refer to the outer IP header instead of the inner IP header. The following field, however, has no counterpart among the Inner IP header fields:

扩展3这部分中的字段与内部IP头字段相同,但它们指的是外部IP头而不是内部IP头。但是,以下字段在内部IP标头字段中没有对应字段:

IP-ID: The IP Identifier field of the outer IP header, unless the inner header is an IPv6 header, in which case I2 is always zero.

IP-ID:外部IP报头的IP标识符字段,除非内部报头是IPv6报头,在这种情况下,I2始终为零。

RTP header flags and fields

RTP头标志和字段

      0     1     2     3     4     5     6     7
    ..... ..... ..... ..... ..... ..... ..... .....
   |   Mode    |R-PT |  M  | R-X |CSRC | TSS | TIS |  if rtp = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   | R-P |             RTP PT                      |  if R-PT = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   /           Compressed CSRC list                /  if CSRC = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   /                  TS_STRIDE                    /  1-4 oct if TSS = 1
    ..... ..... ..... ..... ..... ..... ..... ....
   /           TIME_STRIDE (milliseconds)          /  1-4 oct if TIS = 1
    ..... ..... ..... ..... ..... ..... ..... .....
        
      0     1     2     3     4     5     6     7
    ..... ..... ..... ..... ..... ..... ..... .....
   |   Mode    |R-PT |  M  | R-X |CSRC | TSS | TIS |  if rtp = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   | R-P |             RTP PT                      |  if R-PT = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   /           Compressed CSRC list                /  if CSRC = 1
    ..... ..... ..... ..... ..... ..... ..... .....
   /                  TS_STRIDE                    /  1-4 oct if TSS = 1
    ..... ..... ..... ..... ..... ..... ..... ....
   /           TIME_STRIDE (milliseconds)          /  1-4 oct if TIS = 1
    ..... ..... ..... ..... ..... ..... ..... .....
        

Mode: Compression mode. 0 = Reserved, 1 = Unidirectional, 2 = Bidirectional Optimistic, 3 = Bidirectional Reliable.

模式:压缩模式。0=保留,1=单向,2=双向乐观,3=双向可靠。

R-PT, CSRC, TSS, TIS: Indicate presence of fields as shown to the right of each field above.

R-PT、CSC、TSS、TIS:表示存在上述每个字段右侧所示的字段。

R-P: RTP Padding bit, absolute value (presumed zero if absent).

R-P:RTP填充位,绝对值(如果没有,则假定为零)。

R-X: RTP eXtension bit, absolute value.

R-X:RTP扩展位,绝对值。

M: See the beginning of section 5.7.

M:见第5.7节的开头。

RTP PT: Absolute value of RTP Payload type field.

RTP PT:RTP有效负载类型字段的绝对值。

Compressed CSRC list: See section 5.8.1.

压缩CSC列表:见第5.8.1节。

TS_STRIDE: Predicted increment/decrement of the RTP Timestamp field when it changes. Encoded as in section 4.5.6.

TS_STRIDE:RTP时间戳字段更改时的预计增量/减量。按照第4.5.6节进行编码。

TIME_STRIDE: Predicted time interval in milliseconds between changes in the RTP Timestamp. Also an indication that the compressor desires to perform timer-based compression of the RTP Timestamp field: see section 4.5.4. Encoded as in section 4.5.6.

时间步长:RTP时间戳更改之间的预测时间间隔(毫秒)。压缩机希望对RTP时间戳字段执行基于计时器的压缩的指示:参见第4.5.4节。按照第4.5.6节进行编码。

5.7.5.1. RND flags and packet types
5.7.5.1. RND标志和数据包类型

The values of the RND and RND2 flags are changed by sending UOR-2 headers with Extension 3, or IR-DYN headers, where the flag(s) have their new values. The establishment procedure of the flags is the normal one for the current mode, i.e., in U-mode and O-mode the values are repeated several times to ensure that the decompressor

通过发送扩展名为3的UOR-2标头或IR-DYN标头,更改RND和RND2标志的值,其中标志具有其新值。标志的建立过程是当前模式的正常过程,即在U模式和O模式下,重复多次值,以确保解压器

receives at least one. In R-mode, the flags are sent until an acknowledgment for a packet with the new RND flag values is received.

至少接收一个。在R模式下,发送标志,直到收到具有新RND标志值的数据包的确认。

The decompressor updates the values of its RND and RND2 flags whenever it receives an UOR-2 with Extension 3 carrying values for RND or RND2, and the UOR-2 CRC verifies successful decompression.

每当解压器接收到扩展名为3的UOR-2,其中包含RND或RND2的值时,解压器更新其RND和RND2标志的值,并且UOR-2 CRC验证解压成功。

When an IPv4 header for which the corresponding RND flag has not been established to be 1 is present in the static context, the packet types R-1 and UO-1 MUST NOT be used.

当在静态上下文中存在对应的RND标志未确定为1的IPv4报头时,不得使用数据包类型R-1和UO-1。

When no IPv4 header is present in the static context, or the RND flags for all IPv4 headers in the context have been established to be 1, the packet types R-1-ID, R-1-TS, UO-1-ID, and UO-1-TS MUST NOT be used.

当静态上下文中不存在IPv4标头,或上下文中所有IPv4标头的RND标志已确定为1时,不得使用数据包类型R-1-ID、R-1-TS、UO-1-ID和UO-1-TS。

While in the transient state in which an RND flag is being established, the packet types R-1-ID, R-1-TS, UO-1-ID, and UO-1-TS MUST NOT be used. This implies that the RND flag(s) of Extension 3 may have to be inspected before the exact format of a base header carrying an Extension 3 can be determined, i.e., whether a T-bit is present or not.

在建立RND标志的瞬态中,不得使用数据包类型R-1-ID、R-1-TS、UO-1-ID和UO-1-TS。这意味着在确定携带扩展3的基本报头的确切格式之前,可能必须检查扩展3的RND标志,即T位是否存在。

5.7.5.2. Flags/Fields in context
5.7.5.2. 上下文中的标志/字段

Some flags and fields in Extension 3 need to be maintained in the context of the decompressor. Their values are established using the mechanism appropriate to the compression mode, unless otherwise indicated in the table below and in referred sections.

扩展3中的一些标志和字段需要在解压器的上下文中维护。除非下表和参考章节中另有说明,否则使用适用于压缩模式的机制确定其值。

   Flag/Field      Initial value   Comment
   ---------------------------------------------------------------------
     Mode          Unidirectional  See section 5.6
        
   Flag/Field      Initial value   Comment
   ---------------------------------------------------------------------
     Mode          Unidirectional  See section 5.6
        

NBO 1 See section 4.5.5 RND 0 See sections 4.5.5, 5.7.5.1

NBO 1见第4.5.5节RND 0见第4.5.5、5.7.5.1节

NBO2 1 As NBO, but for outer header RND2 0 As RND, but for outer header

NBO2 1作为NBO,但对于外部收割台RND2 0作为RND,但对于外部收割台

TS_STRIDE 1 See section 4.5.3 TIME_STRIDE 0 See section 4.5.4 Tsc 1 Tsc is always 1 in context; can be 0 only when an Extension 3 is present. See the discussion of the TS field in the beginning of section 5.7.

Tsc步长1见第4.5.3节时间步长0见第4.5.4节Tsc 1 Tsc在上下文中始终为1;仅当存在扩展名3时,才能为0。参见第5.7节开头对TS字段的讨论。

5.7.6. Feedback packets and formats
5.7.6. 反馈数据包和格式

When the round-trip time between compressor and decompressor is large, several packets can be in flight concurrently. Therefore, several packets may be received by the decompressor after feedback has been sent and before the compressor has reacted to feedback. Moreover, decompression may fail due to residual errors in the compressed header.

当压缩机和减压器之间的往返时间较大时,多个数据包可以同时飞行。因此,在反馈发送之后和压缩机对反馈作出反应之前,解压缩器可以接收多个分组。此外,由于压缩报头中的残余错误,解压缩可能会失败。

Therefore,

因此

   a) in O-mode, the decompressor SHOULD limit the rate at which
      feedback on successful decompression is sent (if it is sent at
      all);
   b) when decompression fails, feedback SHOULD be sent only when
      decompression of several consecutive packets has failed, and when
      this occurs, the feedback rate SHOULD be limited;
   c) when packets are received which belong to a rejected packet
      stream, the feedback rate SHOULD be limited.
        
   a) in O-mode, the decompressor SHOULD limit the rate at which
      feedback on successful decompression is sent (if it is sent at
      all);
   b) when decompression fails, feedback SHOULD be sent only when
      decompression of several consecutive packets has failed, and when
      this occurs, the feedback rate SHOULD be limited;
   c) when packets are received which belong to a rejected packet
      stream, the feedback rate SHOULD be limited.
        

A decompressor MAY limit the feedback rate by sending feedback only for one out of every k packets provoking the same (kind of) feedback. The appropriate value of k is implementation dependent; k might be chosen such that feedback is sent 1-3 times per link round-trip time.

解压器可以通过仅为引起相同(种类)反馈的每k个分组中的一个发送反馈来限制反馈速率。k的适当值取决于实现;k的选择应确保每个链路往返时间发送1-3次反馈。

See section 5.2.2 for a discussion concerning ways to provide feedback information to the compressor.

有关向压缩机提供反馈信息的方法的讨论,请参见第5.2.2节。

5.7.6.1. Feedback formats for ROHC RTP
5.7.6.1. ROHC RTP的反馈格式

This section describes the format for feedback information in ROHC RTP. See also 5.2.2.

本节介绍ROHC RTP中反馈信息的格式。另见5.2.2。

Several feedback formats carry a field labeled SN. The SN field contains LSBs of an RTP Sequence Number. The sequence number to use is the sequence number of the header which caused the feedback information to be sent. If that sequence number cannot be determined, for example when decompression fails, the sequence number to use is that of the last successfully decompressed header. If no sequence number is available, the feedback MUST carry a SN-NOT-VALID option. Upon reception, the compressor matches valid SN LSBs with the most recent header sent with a SN with matching LSBs. The decompressor must ensure that it sends enough SN LSBs in its feedback that this correlation does not become ambiguous; e.g., if an 8-bit SN LSB field could wrap around within a round-trip time, the FEEDBACK-1 format cannot be used.

有几种反馈格式带有标记为SN的字段。SN字段包含RTP序列号的LSB。要使用的序列号是导致发送反馈信息的报头的序列号。如果无法确定该序列号,例如当解压缩失败时,则要使用的序列号是上次成功解压缩的头的序列号。如果没有序列号可用,则反馈必须带有SN-NOT-VALID选项。在接收时,压缩器将有效的SN lsb与使用SN和匹配的lsb发送的最新报头相匹配。解压器必须确保在其反馈中发送足够的SN LSB,以确保这种相关性不会变得模糊;e、 例如,如果8位SN LSB字段可以在往返时间内换行,则不能使用反馈-1格式。

FEEDBACK-1

反馈-1

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   |              SN               |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   |              SN               |
   +---+---+---+---+---+---+---+---+
        

A FEEDBACK-1 is an ACK. In order to send a NACK or a STATIC-NACK, FEEDBACK-2 must be used. FEEDBACK-1 does not contain any mode information; FEEDBACK-2 must be used when mode information is required.

反馈-1表示确认。为了发送NACK或静态NACK,必须使用反馈-2。反馈-1不包含任何模式信息;当需要模式信息时,必须使用反馈-2。

FEEDBACK-2

反馈-2

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   |Acktype| Mode  |      SN       |
   +---+---+---+---+---+---+---+---+
   |              SN               |
   +---+---+---+---+---+---+---+---+
   /       Feedback options        /
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   |Acktype| Mode  |      SN       |
   +---+---+---+---+---+---+---+---+
   |              SN               |
   +---+---+---+---+---+---+---+---+
   /       Feedback options        /
   +---+---+---+---+---+---+---+---+
        

Acktype: 0 = ACK 1 = NACK 2 = STATIC-NACK 3 is reserved (MUST NOT be used for parseability)

Acktype:0=ACK 1=NACK 2=STATIC-NACK 3被保留(不得用于可解析性)

Mode: 0 is reserved 1 = Unidirectional mode 2 = Bidirectional Optimistic mode 3 = Bidirectional Reliable mode

模式:0保留1=单向模式2=双向乐观模式3=双向可靠模式

Feedback options: A variable number of feedback options, see section 5.7.6.2. Options may appear in any order.

反馈选项:数量可变的反馈选项,见第5.7.6.2节。选项可以以任何顺序出现。

5.7.6.2. ROHC RTP Feedback options
5.7.6.2. ROHC RTP反馈选项

A ROHC RTP Feedback option has variable length and the following general format:

ROHC RTP反馈选项具有可变长度和以下通用格式:

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   |   Opt Type    |    Opt Len    |
   +---+---+---+---+---+---+---+---+
   /          option data          /  Opt Len octets
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   |   Opt Type    |    Opt Len    |
   +---+---+---+---+---+---+---+---+
   /          option data          /  Opt Len octets
   +---+---+---+---+---+---+---+---+
        

Sections 5.7.6.3-9 describe the currently defined ROHC RTP feedback options.

第5.7.6.3-9节描述了当前定义的ROHC RTP反馈选项。

5.7.6.3. The CRC option
5.7.6.3. CRC方案

The CRC option contains an 8-bit CRC computed over the entire feedback payload, without the packet type and code octet, but including any CID fields, using the polynomial of section 5.9.1. If the CID is given with an Add-CID octet, the Add-CID octet immediately precedes the FEEDBACK-1 or FEEDBACK-2 format. For purposes of computing the CRC, the CRC fields of all CRC options are zero.

CRC选项包含使用第5.9.1节的多项式在整个反馈有效载荷上计算的8位CRC,不包括数据包类型和代码八位字节,但包括任何CID字段。如果CID带有Add CID八位字节,则Add CID八位字节紧跟在反馈-1或反馈-2格式之前。为了计算CRC,所有CRC选项的CRC字段均为零。

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   |  Opt Type = 1 |  Opt Len = 1  |
   +---+---+---+---+---+---+---+---+
   |              CRC              |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   |  Opt Type = 1 |  Opt Len = 1  |
   +---+---+---+---+---+---+---+---+
   |              CRC              |
   +---+---+---+---+---+---+---+---+
        

When receiving feedback information with a CRC option, the compressor MUST verify the information by computing the CRC and comparing the result with the CRC carried in the CRC option. If the two are not identical, the feedback information MUST be ignored.

当使用CRC选项接收反馈信息时,压缩器必须通过计算CRC并将结果与CRC选项中携带的CRC进行比较来验证信息。如果两者不相同,则必须忽略反馈信息。

5.7.6.4. The REJECT option
5.7.6.4. 拒绝选项

The REJECT option informs the compressor that the decompressor does not have sufficient resources to handle the flow.

拒绝选项通知压缩机减压器没有足够的资源来处理流量。

   +---+---+---+---+---+---+---+---+
   |  Opt Type = 2 |  Opt Len = 0  |
   +---+---+---+---+---+---+---+---+
        
   +---+---+---+---+---+---+---+---+
   |  Opt Type = 2 |  Opt Len = 0  |
   +---+---+---+---+---+---+---+---+
        

When receiving a REJECT option, the compressor stops compressing the packet stream, and should refrain from attempting to increase the number of compressed packet streams for some time. Any FEEDBACK packet carrying a REJECT option MUST also carry a CRC option.

当接收到拒绝选项时,压缩器停止压缩分组流,并且应在一段时间内避免尝试增加压缩分组流的数量。任何带有拒绝选项的反馈数据包也必须带有CRC选项。

5.7.6.5. The SN-NOT-VALID option
5.7.6.5. SN-NOT-VALID选项

The SN-NOT-VALID option indicates that the SN of the feedback is not valid. A compressor MUST NOT use the SN of the feedback to find the corresponding sent header when this option is present.

SN-NOT-VALID选项表示反馈的SN无效。当存在此选项时,压缩器不得使用反馈的序列号来查找相应的发送头。

   +---+---+---+---+---+---+---+---+
   |  Opt Type = 3 |  Opt Len = 0  |
   +---+---+---+---+---+---+---+---+
        
   +---+---+---+---+---+---+---+---+
   |  Opt Type = 3 |  Opt Len = 0  |
   +---+---+---+---+---+---+---+---+
        
5.7.6.6. The SN option
5.7.6.6. SN选项

The SN option provides 8 additional bits of SN.

SN选项提供8个额外的SN位。

   +---+---+---+---+---+---+---+---+
   |  Opt Type = 4 |  Opt Len = 1  |
   +---+---+---+---+---+---+---+---+
   |              SN               |
   +---+---+---+---+---+---+---+---+
        
   +---+---+---+---+---+---+---+---+
   |  Opt Type = 4 |  Opt Len = 1  |
   +---+---+---+---+---+---+---+---+
   |              SN               |
   +---+---+---+---+---+---+---+---+
        
5.7.6.7. The CLOCK option
5.7.6.7. 时钟选项

The CLOCK option informs the compressor of the clock resolution of the decompressor. This is needed to allow the compressor to estimate the jitter introduced by the clock of the decompressor when doing timer-based compression of the RTP Timestamp.

时钟选项通知压缩器解压缩器的时钟分辨率。这需要允许压缩器在对RTP时间戳进行基于计时器的压缩时估计由解压缩器的时钟引入的抖动。

   +---+---+---+---+---+---+---+---+
   |  Opt Type = 5 |  Opt Len = 1  |
   +---+---+---+---+---+---+---+---+
   |     clock resolution (ms)     |
   +---+---+---+---+---+---+---+---+
        
   +---+---+---+---+---+---+---+---+
   |  Opt Type = 5 |  Opt Len = 1  |
   +---+---+---+---+---+---+---+---+
   |     clock resolution (ms)     |
   +---+---+---+---+---+---+---+---+
        

The smallest clock resolution which can be indicated is 1 millisecond. The value zero has a special meaning: it indicates that the decompressor cannot do timer-based compression of the RTP Timestamp. Any FEEDBACK packet carrying a CLOCK option SHOULD also carry a CRC option.

可指示的最小时钟分辨率为1毫秒。值0有一个特殊的含义:它表示解压缩程序无法对RTP时间戳进行基于计时器的压缩。任何带有时钟选项的反馈包也应带有CRC选项。

5.7.6.8. The JITTER option
5.7.6.8. 抖动选项

The JITTER option allows the decompressor to report the maximum jitter it has observed lately, using the following formula which is very similar to the formula for Max_Jitter_BC in section 4.5.4.

抖动选项允许解压器使用以下公式报告最近观察到的最大抖动,该公式与第4.5.4节中的Max_JITTER_BC公式非常相似。

Let observation window i contain the decompressor's best approximation of the sliding window of the compressor (see section 4.5.4) when header i is received.

当收到收割台i时,让观察窗口i包含减压器与压缩机滑动窗口(见第4.5.4节)的最佳近似值。

Max_Jitter_i =

最大抖动=

            max {|(T_i - T_j) - ((a_i - a_j) / TIME_STRIDE)|,
                for all headers j in observation window i}
        
            max {|(T_i - T_j) - ((a_i - a_j) / TIME_STRIDE)|,
                for all headers j in observation window i}
        

Max_Jitter =

最大抖动=

max { Max_Jitter_i, for a large number of recent headers i }

max{max_Jitter_i,对于大量最近的头i}

This information may be used by the compressor to refine the formula for determining k when doing timer-based compression of the RTP Timestamp.

该信息可由压缩器用于在进行基于定时器的RTP时间戳压缩时细化用于确定k的公式。

   +---+---+---+---+---+---+---+---+
   |  Opt Type = 6 |  Opt Len = 1  |
   +---+---+---+---+---+---+---+---+
   |          Max_Jitter           |
   +---+---+---+---+---+---+---+---+
        
   +---+---+---+---+---+---+---+---+
   |  Opt Type = 6 |  Opt Len = 1  |
   +---+---+---+---+---+---+---+---+
   |          Max_Jitter           |
   +---+---+---+---+---+---+---+---+
        

The decompressor MAY ignore the oldest observed values of Max_Jitter_i. Thus, the reported Max_Jitter may decrease. Robustness will be reduced if the compressor uses a jitter estimate which is too small. Therefore, a FEEDBACK packet carrying a JITTER option SHOULD also carry a CRC option. Moreover, the compressor MAY ignore decreasing Max_Jitter values.

解压器可能忽略最早观测到的最大抖动值。因此,报告的最大抖动可能会减少。如果压缩机使用的抖动估计值太小,稳健性将降低。因此,携带抖动选项的反馈数据包也应该携带CRC选项。此外,压缩器可以忽略减小的最大抖动值。

5.7.6.9. The LOSS option
5.7.6.9. 损失期权

The LOSS option allows the decompressor to report the largest observed number of packets lost in sequence. This information MAY be used by the compressor to adjust the size of the reference window used in U- and O-mode.

丢失选项允许解压缩程序报告按顺序丢失的最大观察数据包数。压缩机可使用该信息调整U和O模式中使用的参考窗口的大小。

   +---+---+---+---+---+---+---+---+
   |  Opt Type = 7 |  Opt Len = 1  |
   +---+---+---+---+---+---+---+---+
   | longest loss event (packets)  |
   +---+---+---+---+---+---+---+---+
        
   +---+---+---+---+---+---+---+---+
   |  Opt Type = 7 |  Opt Len = 1  |
   +---+---+---+---+---+---+---+---+
   | longest loss event (packets)  |
   +---+---+---+---+---+---+---+---+
        

The decompressor MAY choose to ignore the oldest loss events. Thus, the value reported may decrease. Since setting the reference window too small can reduce robustness, a FEEDBACK packet carrying a LOSS option SHOULD also carry a CRC option. The compressor MAY choose to ignore decreasing loss values.

解压缩程序可以选择忽略最早的丢失事件。因此,报告的值可能会降低。由于将参考窗口设置得太小会降低鲁棒性,因此携带丢失选项的反馈数据包也应该携带CRC选项。压缩机可选择忽略逐渐减小的损失值。

5.7.6.10. Unknown option types
5.7.6.10. 未知选项类型

If an option type unknown to the compressor is encountered, it must continue parsing the rest of the FEEDBACK packet, which is possible since the length of the option is explicit, but MUST otherwise ignore the unknown option.

如果遇到压缩器未知的选项类型,它必须继续解析反馈数据包的其余部分,这是可能的,因为选项的长度是显式的,但必须忽略未知选项。

5.7.6.11. RTP feedback example
5.7.6.11. RTP反馈示例

Feedback for CID 8 indicating an ACK for SN 17 and Bidirectional Reliable mode can have the following formats.

指示SN 17和双向可靠模式的ACK的CID 8反馈可以具有以下格式。

Assuming small CIDs:

假设CID较小:

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   0 | 0   1   1 |  feedback packet type, Code = 3
   +---+---+---+---+---+---+---+---+
   | 1   1   1   0 | 1   0   0   0 |  Add-CID octet with CID = 8
   +---+---+---+---+---+---+---+---+
   | 0   0 | 1   1 |  SN MSB = 0   |  AckType = ACK, Mode = Reliable
   +---+---+---+---+---+---+---+---+
   |          SN LSB = 17          |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   0 | 0   1   1 |  feedback packet type, Code = 3
   +---+---+---+---+---+---+---+---+
   | 1   1   1   0 | 1   0   0   0 |  Add-CID octet with CID = 8
   +---+---+---+---+---+---+---+---+
   | 0   0 | 1   1 |  SN MSB = 0   |  AckType = ACK, Mode = Reliable
   +---+---+---+---+---+---+---+---+
   |          SN LSB = 17          |
   +---+---+---+---+---+---+---+---+
        

The second, third, and fourth octet are handed to the compressor.

第二个、第三个和第四个八位组被交给压缩器。

The FEEDBACK-1 format may also be used. Assuming large CIDs:

也可以使用反馈-1格式。假设CID较大:

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   0 | 0   1   0 |  feedback packet type, Code = 2
   +---+---+---+---+---+---+---+---+
   | 0   0   0   0   1   0   0   0 |  large CID with value 8
   +---+---+---+---+---+---+---+---+
   |          SN LSB = 17          |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   0 | 0   1   0 |  feedback packet type, Code = 2
   +---+---+---+---+---+---+---+---+
   | 0   0   0   0   1   0   0   0 |  large CID with value 8
   +---+---+---+---+---+---+---+---+
   |          SN LSB = 17          |
   +---+---+---+---+---+---+---+---+
        

The second and third octet are handed to the compressor.

第二个和第三个八位组交给压缩机。

Assuming small CIDs:

假设CID较小:

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   0 | 0   1   0 |  feedback packet type, Code = 2
   +---+---+---+---+---+---+---+---+
   | 1   1   1   0 | 1   0   0   0 |  Add-CID octet with CID = 8
   +---+---+---+---+---+---+---+---+
   |          SN LSB = 17          |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   0 | 0   1   0 |  feedback packet type, Code = 2
   +---+---+---+---+---+---+---+---+
   | 1   1   1   0 | 1   0   0   0 |  Add-CID octet with CID = 8
   +---+---+---+---+---+---+---+---+
   |          SN LSB = 17          |
   +---+---+---+---+---+---+---+---+
        

The second and third octet are handed to the compressor.

第二个和第三个八位组交给压缩机。

Assuming small CIDs and CID 0 instead of CID 8:

假设小的CID和CID 0而不是CID 8:

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   0 | 0   0   1 |  feedback packet type, Code = 1
   +---+---+---+---+---+---+---+---+
   |          SN LSB = 17          |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   0 | 0   0   1 |  feedback packet type, Code = 1
   +---+---+---+---+---+---+---+---+
   |          SN LSB = 17          |
   +---+---+---+---+---+---+---+---+
        

The second octet is handed to the compressor.

第二个八位组交给压缩机。

5.7.7. RTP IR and IR-DYN packets
5.7.7. RTP IR和IR-DYN数据包

The subheaders which are compressible are split into a STATIC part and a DYNAMIC part. These parts are defined in sections 5.7.7.3 through 5.7.7.7.

可压缩的子标题分为静态部分和动态部分。这些零件在第5.7.7.3节至第5.7.7.7节中定义。

The structure of a chain of subheaders is determined by each header having a Next Header, or Protocol, field. This field identifies the type of the following header. Each Static part below that is followed by another Static part contains the Next Header/Protocol field and allows parsing of the Static chain; the Dynamic chain, if present, is structured analogously.

子标题链的结构由具有下一个标题或协议字段的每个标题确定。此字段标识以下标题的类型。下面的每个静态部分后面紧跟着另一个静态部分,其中包含下一个标头/协议字段,并允许解析静态链;动态链(如果存在)的结构类似。

IR and IR-DYN packets will cause a packet to be delivered to upper layers if and only if the payload is non-empty. This means that an IP/UDP/RTP packet where the UDP length indicates a UDP payload of size 12 octets cannot be represented by an IR or IR-DYN packet. Such packets can instead be represented using the UNCOMPRESSED profile (section 5.10).

当且仅当有效负载为非空时,IR和IR-DYN数据包将导致数据包被传送到上层。这意味着UDP长度表示大小为12个八位字节的UDP有效负载的IP/UDP/RTP数据包不能由IR或IR-DYN数据包表示。这些数据包可以使用未压缩的配置文件来表示(第5.10节)。

5.7.7.1. Basic structure of the IR packet
5.7.7.1. 红外数据包的基本结构

This packet type communicates the static part of the context, i.e., the values of the constant SN functions. It can optionally also communicate the dynamic part of the context, i.e., the parameters of nonconstant SN functions. It can also optionally communicate the payload of an original packet, if any.

此数据包类型传递上下文的静态部分,即常量SN函数的值。它还可以选择性地传递上下文的动态部分,即非恒定SN函数的参数。它还可以选择性地传送原始数据包的有效载荷(如果有的话)。

     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   |         Add-CID octet         |  if for small CIDs and CID != 0
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   1   1   0 | D |
   +---+---+---+---+---+---+---+---+
   |                               |
   /    0-2 octets of CID info     /  1-2 octets if for large CIDs
   |                               |
   +---+---+---+---+---+---+---+---+
   |            Profile            |  1 octet
   +---+---+---+---+---+---+---+---+
   |              CRC              |  1 octet
   +---+---+---+---+---+---+---+---+
   |                               |
   |         Static chain          |  variable length
   |                               |
   +---+---+---+---+---+---+---+---+
   |                               |
   |         Dynamic chain         |  present if D = 1, variable length
   |                               |
    - - - - - - - - - - - - - - - -
   |                               |
   |           Payload             |  variable length
   |                               |
    - - - - - - - - - - - - - - - -
        
     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   |         Add-CID octet         |  if for small CIDs and CID != 0
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   1   1   0 | D |
   +---+---+---+---+---+---+---+---+
   |                               |
   /    0-2 octets of CID info     /  1-2 octets if for large CIDs
   |                               |
   +---+---+---+---+---+---+---+---+
   |            Profile            |  1 octet
   +---+---+---+---+---+---+---+---+
   |              CRC              |  1 octet
   +---+---+---+---+---+---+---+---+
   |                               |
   |         Static chain          |  variable length
   |                               |
   +---+---+---+---+---+---+---+---+
   |                               |
   |         Dynamic chain         |  present if D = 1, variable length
   |                               |
    - - - - - - - - - - - - - - - -
   |                               |
   |           Payload             |  variable length
   |                               |
    - - - - - - - - - - - - - - - -
        

D: D = 1 indicates that the dynamic chain is present.

D:D=1表示存在动态链。

Profile: Profile identifier, abbreviated as defined in section 5.2.3.

外形:外形标识符,缩写如第5.2.3节所定义。

CRC: 8-bit CRC, computed according to section 5.9.1.

CRC:8位CRC,根据第5.9.1节计算。

Static chain: A chain of static subheader information.

静态链:静态子标题信息链。

Dynamic chain: A chain of dynamic subheader information. What dynamic information is present is inferred from the Static chain.

动态链:动态子标题信息链。存在的动态信息是从静态链推断出来的。

Payload: The payload of the corresponding original packet, if any. The presence of a payload is inferred from the packet length.

有效载荷:对应原始数据包的有效载荷(如果有)。根据数据包长度推断有效负载的存在。

5.7.7.2. Basic structure of the IR-DYN packet
5.7.7.2. IR-DYN包的基本结构

This packet type communicates the dynamic part of the context, i.e., the parameters of nonconstant SN functions.

此数据包类型传递上下文的动态部分,即非恒定SN函数的参数。

     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         : if for small CIDs and CID != 0
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   1   0   0   0 | IR-DYN packet type
   +---+---+---+---+---+---+---+---+
   :                               :
   /     0-2 octets of CID info    / 1-2 octets if for large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   |            Profile            | 1 octet
   +---+---+---+---+---+---+---+---+
   |              CRC              | 1 octet
   +---+---+---+---+---+---+---+---+
   |                               |
   /         Dynamic chain         / variable length
   |                               |
   +---+---+---+---+---+---+---+---+
   :                               :
   /           Payload             / variable length
   :                               :
    - - - - - - - - - - - - - - - -
        
     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         : if for small CIDs and CID != 0
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   1   0   0   0 | IR-DYN packet type
   +---+---+---+---+---+---+---+---+
   :                               :
   /     0-2 octets of CID info    / 1-2 octets if for large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   |            Profile            | 1 octet
   +---+---+---+---+---+---+---+---+
   |              CRC              | 1 octet
   +---+---+---+---+---+---+---+---+
   |                               |
   /         Dynamic chain         / variable length
   |                               |
   +---+---+---+---+---+---+---+---+
   :                               :
   /           Payload             / variable length
   :                               :
    - - - - - - - - - - - - - - - -
        

Profile: Profile identifier, abbreviated as defined in section 5.2.3.

外形:外形标识符,缩写如第5.2.3节所定义。

CRC: 8-bit CRC, computed according to section 5.9.1.

CRC:8位CRC,根据第5.9.1节计算。

NOTE: As the CRC checks only the integrity of the header itself, an acknowledgment of this header does not signify that previous changes to the static chain in the context are also acknowledged. In particular, care should be taken when IR packets that update an existing context are followed by IR-DYN packets.

注意:由于CRC只检查报头本身的完整性,因此对该报头的确认并不意味着对上下文中静态链的先前更改也得到确认。特别是,当更新现有上下文的IR数据包后面跟着IR-DYN数据包时,应特别小心。

Dynamic chain: A chain of dynamic subheader information. What dynamic information is present is inferred from the Static chain of the context.

动态链:动态子标题信息链。所呈现的动态信息是从上下文的静态链推断出来的。

Payload: The payload of the corresponding original packet, if any. The presence of a payload is inferred from the packet length.

有效载荷:对应原始数据包的有效载荷(如果有)。根据数据包长度推断有效负载的存在。

Note: The static and dynamic chains of IR or IR-DYN packets for profile 0x0001 (ROHC RTP) MUST end with the static and dynamic parts of an RTP header. If not, the packet MUST be discarded and the context MUST NOT be updated.

注意:配置文件0x0001(ROHC RTP)的IR或IR-DYN数据包的静态和动态链必须以RTP头的静态和动态部分结束。如果不是,则必须丢弃数据包,并且不得更新上下文。

Note: The static or dynamic chains of IR or IR-DYN packets for profile 0x0002 (ROHC UDP) MUST end with the static and dynamic parts of a UDP header. If not, the packet MUST be discarded and the context MUST NOT be updated.

注意:配置文件0x0002(ROHC UDP)的IR或IR-DYN数据包的静态或动态链必须以UDP报头的静态和动态部分结束。如果不是,则必须丢弃数据包,并且不得更新上下文。

Note: The static or dynamic chains of IR or IR-DYN packets for profile 0x0003 (ROHC ESP) MUST end with the static and dynamic parts of an ESP header. If not, the packet MUST be discarded and the context MUST NOT be updated.

注意:配置文件0x0003(ROHC ESP)的IR或IR-DYN数据包的静态或动态链必须以ESP头的静态和动态部分结束。如果不是,则必须丢弃数据包,并且不得更新上下文。

5.7.7.3. Initialization of IPv6 Header [IPv6]
5.7.7.3. IPv6头的初始化[IPv6]

Static part:

静态部分:

      +---+---+---+---+---+---+---+---+
      |  Version = 6  |Flow Label(msb)|   1 octet
      +---+---+---+---+---+---+---+---+
      /        Flow Label (lsb)       /   2 octets
      +---+---+---+---+---+---+---+---+
      |          Next Header          |   1 octet
      +---+---+---+---+---+---+---+---+
      /        Source Address         /   16 octets
      +---+---+---+---+---+---+---+---+
      /      Destination Address      /   16 octets
      +---+---+---+---+---+---+---+---+
        
      +---+---+---+---+---+---+---+---+
      |  Version = 6  |Flow Label(msb)|   1 octet
      +---+---+---+---+---+---+---+---+
      /        Flow Label (lsb)       /   2 octets
      +---+---+---+---+---+---+---+---+
      |          Next Header          |   1 octet
      +---+---+---+---+---+---+---+---+
      /        Source Address         /   16 octets
      +---+---+---+---+---+---+---+---+
      /      Destination Address      /   16 octets
      +---+---+---+---+---+---+---+---+
        

Dynamic part:

动态部分:

      +---+---+---+---+---+---+---+---+
      |         Traffic Class         |   1 octet
      +---+---+---+---+---+---+---+---+
      |           Hop Limit           |   1 octet
      +---+---+---+---+---+---+---+---+
      / Generic extension header list /   variable length
      +---+---+---+---+---+---+---+---+
        
      +---+---+---+---+---+---+---+---+
      |         Traffic Class         |   1 octet
      +---+---+---+---+---+---+---+---+
      |           Hop Limit           |   1 octet
      +---+---+---+---+---+---+---+---+
      / Generic extension header list /   variable length
      +---+---+---+---+---+---+---+---+
        

Eliminated:

消除:

Payload Length

净荷长度

Extras:

额外费用:

Generic extension header list: Encoded according to section 5.8.6.1, with all header items present in uncompressed form.

通用扩展标题列表:根据第5.8.6.1节进行编码,所有标题项以未压缩形式显示。

CRC-DYNAMIC: Payload Length field (octets 5-6).

CRC-DYNAMIC:有效负载长度字段(八位字节5-6)。

CRC-STATIC: All other fields (octets 1-4, 7-40).

CRC-STATIC:所有其他字段(八位字节1-4、7-40)。

CRC coverage for extension headers is defined in section 5.8.7.

第5.8.7节定义了扩展头的CRC覆盖范围。

Note: The Next Header field indicates the type of the following header in the static chain, rather than being a copy of the Next Header field of the original IPv6 header. See also section 5.7.7.8.

注意:下一个标头字段表示静态链中下一个标头的类型,而不是原始IPv6标头的下一个标头字段的副本。另见第5.7.7.8节。

5.7.7.4. Initialization of IPv4 Header [IPv4, section 3.1].

5.7.7.4. IPv4标头的初始化[IPv4,第3.1节]。

Static part:

静态部分:

Version, Protocol, Source Address, Destination Address.

版本、协议、源地址、目标地址。

   +---+---+---+---+---+---+---+---+
   |  Version = 4  |       0       |
   +---+---+---+---+---+---+---+---+
   |           Protocol            |
   +---+---+---+---+---+---+---+---+
   /        Source Address         /   4 octets
   +---+---+---+---+---+---+---+---+
   /      Destination Address      /   4 octets
   +---+---+---+---+---+---+---+---+
        
   +---+---+---+---+---+---+---+---+
   |  Version = 4  |       0       |
   +---+---+---+---+---+---+---+---+
   |           Protocol            |
   +---+---+---+---+---+---+---+---+
   /        Source Address         /   4 octets
   +---+---+---+---+---+---+---+---+
   /      Destination Address      /   4 octets
   +---+---+---+---+---+---+---+---+
        

Dynamic part:

动态部分:

Type of Service, Time to Live, Identification, DF, RND, NBO, extension header list.

服务类型、生存时间、标识、DF、RND、NBO、扩展标题列表。

   +---+---+---+---+---+---+---+---+
   |        Type of Service        |
   +---+---+---+---+---+---+---+---+
   |         Time to Live          |
   +---+---+---+---+---+---+---+---+
   /        Identification         /   2 octets
   +---+---+---+---+---+---+---+---+
   | DF|RND|NBO|         0         |
   +---+---+---+---+---+---+---+---+
   / Generic extension header list /  variable length
   +---+---+---+---+---+---+---+---+
        
   +---+---+---+---+---+---+---+---+
   |        Type of Service        |
   +---+---+---+---+---+---+---+---+
   |         Time to Live          |
   +---+---+---+---+---+---+---+---+
   /        Identification         /   2 octets
   +---+---+---+---+---+---+---+---+
   | DF|RND|NBO|         0         |
   +---+---+---+---+---+---+---+---+
   / Generic extension header list /  variable length
   +---+---+---+---+---+---+---+---+
        

Eliminated:

消除:

IHL (IP Header Length, must be 5) Total Length (inferred in decompressed packets) MF flag (More Fragments flag, must be 0) Fragment Offset (must be 0) Header Checksum (inferred in decompressed packets) Options, Padding (must not be present)

IHL(IP报头长度,必须为5)总长度(在解压缩数据包中推断)MF标志(更多片段标志,必须为0)片段偏移量(必须为0)报头校验和(在解压缩数据包中推断)选项,填充(不得存在)

Extras:

额外费用:

RND, NBO See section 5.7.

RND,NBO见第5.7节。

Generic extension header list: Encoded according to section 5.8.6.1, with all header items present in uncompressed form.

通用扩展标题列表:根据第5.8.6.1节进行编码,所有标题项以未压缩形式显示。

CRC-DYNAMIC: Total Length, Identification, Header Checksum (octets 3-4, 5-6, 11-12).

CRC-DYNAMIC:总长度、标识、报头校验和(八位字节3-4、5-6、11-12)。

CRC-STATIC: All other fields (octets 1-2, 7-10, 13-20)

CRC-STATIC:所有其他字段(八位字节1-2、7-10、13-20)

CRC coverage for extension headers is defined in section 5.8.7.

第5.8.7节定义了扩展头的CRC覆盖范围。

Note: The Protocol field indicates the type of the following header in the static chain, rather than being a copy of the Protocol field of the original IPv4 header. See also section 5.7.7.8.

注意:协议字段表示静态链中以下标头的类型,而不是原始IPv4标头的协议字段的副本。另见第5.7.7.8节。

5.7.7.5. Initialization of UDP Header [RFC-768].

5.7.7.5. UDP报头的初始化[RFC-768]。

Static part:

静态部分:

      +---+---+---+---+---+---+---+---+
      /          Source Port          /   2 octets
      +---+---+---+---+---+---+---+---+
      /       Destination Port        /   2 octets
      +---+---+---+---+---+---+---+---+
        
      +---+---+---+---+---+---+---+---+
      /          Source Port          /   2 octets
      +---+---+---+---+---+---+---+---+
      /       Destination Port        /   2 octets
      +---+---+---+---+---+---+---+---+
        

Dynamic part:

动态部分:

      +---+---+---+---+---+---+---+---+
      /           Checksum            /   2 octets
      +---+---+---+---+---+---+---+---+
        
      +---+---+---+---+---+---+---+---+
      /           Checksum            /   2 octets
      +---+---+---+---+---+---+---+---+
        

Eliminated:

消除:

Length

The Length field of the UDP header MUST match the Length field(s) of the preceding subheaders, i.e., there must not be any padding after the UDP payload that is covered by the IP Length.

UDP报头的长度字段必须与前面子标题的长度字段匹配,即IP长度覆盖的UDP有效负载后不得有任何填充。

CRC-DYNAMIC: Length field, Checksum (octets 5-8).

CRC-DYNAMIC:长度字段,校验和(八位字节5-8)。

CRC-STATIC: All other fields (octets 1-4).

CRC-STATIC:所有其他字段(八位字节1-4)。

5.7.7.6. Initialization of RTP Header [RTP].

5.7.7.6. RTP头的初始化[RTP]。

Static part:

静态部分:

SSRC.

SSRC。

        0   1   2   3   4   5   6   7
      +---+---+---+---+---+---+---+---+
      /             SSRC              /   4 octets
      +---+---+---+---+---+---+---+---+
        
        0   1   2   3   4   5   6   7
      +---+---+---+---+---+---+---+---+
      /             SSRC              /   4 octets
      +---+---+---+---+---+---+---+---+
        

Dynamic part:

动态部分:

P, X, CC, PT, M, sequence number, timestamp, timestamp stride, CSRC identifiers.

P、 X、CC、PT、M、序列号、时间戳、时间戳步长、CSC标识符。

        0   1   2   3   4   5   6   7
      +---+---+---+---+---+---+---+---+
      |  V=2  | P | RX|      CC       |  (RX is NOT the RTP X bit)
      +---+---+---+---+---+---+---+---+
      | M |            PT             |
      +---+---+---+---+---+---+---+---+
      /      RTP Sequence Number      /  2 octets
      +---+---+---+---+---+---+---+---+
      /   RTP Timestamp (absolute)    /  4 octets
      +---+---+---+---+---+---+---+---+
      /      Generic CSRC list        /  variable length
      +---+---+---+---+---+---+---+---+
      : Reserved  | X |  Mode |TIS|TSS:  if RX = 1
      +---+---+---+---+---+---+---+---+
      :         TS_Stride             :  1-4 octets, if TSS = 1
      +---+---+---+---+---+---+---+---+
      :         Time_Stride           :  1-4 octets, if TIS = 1
      +---+---+---+---+---+---+---+---+
        
        0   1   2   3   4   5   6   7
      +---+---+---+---+---+---+---+---+
      |  V=2  | P | RX|      CC       |  (RX is NOT the RTP X bit)
      +---+---+---+---+---+---+---+---+
      | M |            PT             |
      +---+---+---+---+---+---+---+---+
      /      RTP Sequence Number      /  2 octets
      +---+---+---+---+---+---+---+---+
      /   RTP Timestamp (absolute)    /  4 octets
      +---+---+---+---+---+---+---+---+
      /      Generic CSRC list        /  variable length
      +---+---+---+---+---+---+---+---+
      : Reserved  | X |  Mode |TIS|TSS:  if RX = 1
      +---+---+---+---+---+---+---+---+
      :         TS_Stride             :  1-4 octets, if TSS = 1
      +---+---+---+---+---+---+---+---+
      :         Time_Stride           :  1-4 octets, if TIS = 1
      +---+---+---+---+---+---+---+---+
        

Eliminated:

消除:

Nothing.

没有什么

Extras:

额外费用:

RX: Controls presence of extension.

RX:控制分机的存在。

Mode: Compression mode. 0 = Reserved, 1 = Unidirectional, 2 = Bidirectional Optimistic, 3 = Bidirectional Reliable.

模式:压缩模式。0=保留,1=单向,2=双向乐观,3=双向可靠。

X: Copy of X bit from RTP header (presumed 0 if RX = 0)

X:从RTP标头复制X位(如果RX=0,则假定为0)

Reserved: Set to zero when sending, ignored when received.

保留:发送时设置为零,接收时忽略。

Generic CSRC list: CSRC list encoded according to section 5.8.6.1, with all CSRC items present.

一般中国证监会名单:根据第5.8.6.1节编码的中国证监会名单,所有中国证监会项目均存在。

CRC-DYNAMIC: Octets containing M-bit, sequence number field, and timestamp (octets 2-8).

CRC-DYNAMIC:包含M位、序列号字段和时间戳的八位字节(八位字节2-8)。

CRC-STATIC: All other fields (octets 1, 9-12, original CSRC list).

CRC-STATIC:所有其他字段(八位字节1、9-12、原始CSC列表)。

5.7.7.7. Initialization of ESP Header [ESP, section 2]
5.7.7.7. ESP头的初始化[ESP,第2节]

This is for the case when the NULL encryption algorithm [NULL] is NOT being used with ESP, so that subheaders after the ESP header are encrypted (see 5.12). See 5.8.4.3 for compression of the ESP header when NULL encryption is being used.

这适用于ESP未使用NULL加密算法[NULL]的情况,以便对ESP标题后的子标题进行加密(见5.12)。使用空加密时ESP报头的压缩请参见5.8.4.3。

Static part:

静态部分:

     +---+---+---+---+---+---+---+---+
     /              SPI              /   4 octets
     +---+---+---+---+---+---+---+---+
        
     +---+---+---+---+---+---+---+---+
     /              SPI              /   4 octets
     +---+---+---+---+---+---+---+---+
        

Dynamic part:

动态部分:

     +---+---+---+---+---+---+---+---+
     /       Sequence Number         /   4 octets
     +---+---+---+---+---+---+---+---+
        
     +---+---+---+---+---+---+---+---+
     /       Sequence Number         /   4 octets
     +---+---+---+---+---+---+---+---+
        

Eliminated:

消除:

Other fields are encrypted, and can neither be located nor compressed.

其他字段是加密的,既不能定位也不能压缩。

CRC-DYNAMIC: Sequence number (octets 5-8)

CRC-DYNAMIC:序列号(八位字节5-8)

CRC-STATIC: All other octets.

CRC-STATIC:所有其他八位字节。

Note: No encrypted data is considered to be part of the header for purposes of computing the CRC, i.e., octets after the eight octet are not considered part of the header.

注:为了计算CRC,未将加密数据视为报头的一部分,即八个八位字节之后的八位字节不视为报头的一部分。

5.7.7.8. Initialization of Other Headers
5.7.7.8. 其他标头的初始化

Headers not explicitly listed in previous subsections can be compressed only by making them part of an extension header chain following an IPv4 or IPv6 header, see section 5.8.

前面小节中未明确列出的头只能通过使其成为IPv4或IPv6头之后的扩展头链的一部分来压缩,请参见第5.8节。

5.8. List compression
5.8. 列表压缩

Header information from the packet stream to be compressed can be structured as an ordered list, which is largely constant 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 |
            +--------+--------+--...--+--------+
        

This section describes the compression scheme for such information. The basic principles of list-based compression are the following:

本节介绍此类信息的压缩方案。基于列表的压缩的基本原理如下:

1) While the list is constant, no information about the list is sent in compressed headers.

1) 虽然列表是常量,但不会在压缩头中发送有关列表的任何信息。

2) Small changes in the list are represented as additions (Insertion scheme), or deletions (Removal scheme), or both (Remove Then Insert scheme).

2) 列表中的小更改表示为添加(插入方案)或删除(删除方案),或同时表示为删除(删除然后插入方案)。

3) The list can also be sent in its entirety (Generic scheme).

3) 也可以发送整个列表(通用方案)。

There are two kinds of lists: CSRC lists in RTP packets, and extension header chains in IP packets (both IPv4 and IPv6).

有两种列表:RTP数据包中的CSC列表和IP数据包(IPv4和IPv6)中的扩展头链。

IPv6 base headers and IPv4 headers cannot be part of an extension header chain. Headers which can be part of extension header chains include

IPv6基本标头和IPv4标头不能是扩展标头链的一部分。可以作为扩展标头链一部分的标头包括

a) the AH header b) the null ESP header c) the minimal encapsulation header [RFC2004, section 3.1] d) the GRE header [GRE1, GRE2] e) IPv6 extension headers.

a) AH头b)空ESP头c)最小封装头[RFC2004,第3.1节]d)GRE头[GRE1,GRE2]e)IPv6扩展头。

The table-based item compression scheme (5.8.1), which reduces the size of each item, is described first. Then it is defined which reference list to use in the insertion and removal schemes (5.8.2). List encoding schemes are described in section 5.8.3, and a few special cases in section 5.8.4. Finally, exact formats are described in sections 5.8.5-5.8.6.

首先描述了基于表格的项目压缩方案(5.8.1),该方案减少了每个项目的大小。然后定义插入和删除方案中使用的参考列表(5.8.2)。第5.8.3节描述了列表编码方案,第5.8.4节描述了一些特殊情况。最后,第5.8.5-5.8.6节描述了准确的格式。

5.8.1. Table-based item compression
5.8.1. 基于表的项目压缩

The Table-based item compression scheme is a way to compress individual items sent in compressed lists. The compressor assigns each item in a list a unique identifier Index. The compressor conceptually maintains a table with all items, indexed by Index. The (Index, item) pair is sent together in compressed lists until the compressor gains enough confidence that the decompressor has observed the mapping between the item and its Index. Such confidence is obtained by receiving an acknowledgment from the decompressor in R-mode, and in U/O-mode by sending L (Index, item) pairs (not necessarily consecutively). After that, the Index alone is sent in compressed lists to indicate the corresponding item. The compressor may reassign an existing Index to a new item, and then needs to re-establish the mapping in the same manner as above.

基于表的项目压缩方案是一种压缩压缩列表中发送的单个项目的方法。压缩器为列表中的每个项目分配一个唯一的标识符索引。压缩器在概念上维护一个包含所有项的表,并按索引进行索引。(索引,项)对在压缩列表中一起发送,直到压缩器获得足够的信心,即解压缩器已观察到项与其索引之间的映射。通过在R模式下接收来自解压器的确认,以及在U/O模式下通过发送L(索引,项)对(不一定连续)来获得这种置信度。之后,索引单独以压缩列表的形式发送,以指示相应的项。压缩器可能会将现有索引重新分配给新项,然后需要以与上面相同的方式重新建立映射。

The decompressor conceptually maintains a table that contains all (Index, item) pairs it knows about. The table is updated whenever an (Index, item) pair is received (and decompression is verified by a CRC). The decompressor retrieves the item from the table whenever an Index without an accompanying item is received.

解压器在概念上维护一个表,其中包含它所知道的所有(索引、项)对。每当接收到(索引、项)对时(并且通过CRC验证解压缩),表都会更新。每当收到没有伴随项的索引时,解压器就会从表中检索该项。

5.8.1.1. Translation table in R-mode
5.8.1.1. R模式下的转换表

At the compressor side, an entry in the Translation Table has the following structure.

在压缩机侧,转换表中的条目具有以下结构。

              +-------+------+---------------+
      Index i | Known | item | SN1, SN2, ... |
              +-------+------+---------------+
        
              +-------+------+---------------+
      Index i | Known | item | SN1, SN2, ... |
              +-------+------+---------------+
        

The Known flag indicates whether the mapping between Index i and item has been established, i.e., if Index i alone can be sent in compressed lists. Known is initially zero. It is also set to zero whenever Index i is assigned to a new item. Known is set to one when the corresponding (Index, item) pair is acknowledged. Acknowledgments are based on the RTP Sequence Number, so a list of RTP Sequence Numbers of all packets which contain the (Index, item) pair is included in the translation table. When a packet with a sequence number in the sequence number list is acknowledged, the Known flag is set, and the sequence number list can be discarded.

已知标志指示索引i和项之间的映射是否已建立,即,是否可以在压缩列表中单独发送索引i。已知值最初为零。每当索引i被分配给新项时,它也被设置为零。当相应的(索引、项)对被确认时,“已知”设置为1。确认基于RTP序列号,因此翻译表中包含包含(索引,项)对的所有数据包的RTP序列号列表。当序列号列表中具有序列号的分组被确认时,设置已知标志,并且序列号列表可以被丢弃。

Each entry in the Translation Table at the decompressor side has the following structure:

解压器端翻译表中的每个条目都具有以下结构:

              +-------+------+
      Index i | Known | item |
              +-------+------+
        
              +-------+------+
      Index i | Known | item |
              +-------+------+
        

All Known fields are initialized to zero. Whenever the decompressor receives an (Index, item) pair, it inserts item into the table at position Index and sets the Known flag in that entry to one. If an index without an accompanying item is received for which the Known flag is zero, the header MUST be discarded and a NACK SHOULD be sent.

所有已知字段都初始化为零。每当解压器接收到(索引,项)对时,它都会在索引位置将项插入表中,并将该项中的已知标志设置为1。如果接收到一个已知标志为零的没有伴随项的索引,则必须丢弃该头并发送NACK。

5.8.1.2. Translation table in U/O-modes
5.8.1.2. U/O模式下的转换表

At the compressor side, each entry in the Translation Table has the following structure:

在压缩机侧,翻译表中的每个条目具有以下结构:

            +-------+------+---------+
      Index | Known | item | Counter |
            +-------+------+---------+
        
            +-------+------+---------+
      Index | Known | item | Counter |
            +-------+------+---------+
        

The Index, Known, and item fields have the same meaning as in section 5.8.1.1.

索引、已知和项目字段的含义与第5.8.1.1节中的含义相同。

Known is set when the (Index, item) pair has been sent in L compressed lists (not necessarily consecutively). The Counter field keeps track of how many times the pair has been sent. Counter is set to 0 for each new entry added to the table, and whenever Index is assigned to a new item. Counter is incremented by 1 whenever an (Index, item) pair is sent. When the counter reaches L, the Known field is set and after that only the Index needs to be sent in compressed lists.

当(索引、项)对已在L个压缩列表中发送(不一定连续发送)时,将设置“已知”。计数器字段记录该对已发送的次数。对于添加到表中的每个新条目,以及每当索引分配给新项时,计数器都设置为0。每当发送(索引、项)对时,计数器将递增1。当计数器到达L时,设置已知字段,然后只需在压缩列表中发送索引。

At the decompressor side, the Translation Table is the same as the Translation Table defined in R-mode.

在解压器端,转换表与R模式中定义的转换表相同。

5.8.2. Reference list determination
5.8.2. 参考列表确定

In reference based compression schemes (i.e., addition or deletion based schemes), compression and decompression of a list (curr_list) are based on a reference list (ref_list) which is assumed to be present in the context of both compressor and decompressor. The compressed list is an encoding of the differences between curr_list and ref_list. Upon reception of a compressed list, the decompressor applies the differences to its reference list in order to obtain the original list.

在基于参考的压缩方案(即,基于添加或删除的方案)中,列表(curr_列表)的压缩和解压缩基于参考列表(ref_列表),该参考列表(ref_列表)假定存在于压缩器和解压缩器的上下文中。压缩列表是当前列表和参考列表之间差异的编码。在接收到压缩列表后,解压缩器将差异应用于其参考列表以获得原始列表。

To identify the reference list (to be) used, each compressed list carries an identifier (ref_id). The reference list is established by different methods in R-mode and U/O-mode.

为了识别要使用的参考列表,每个压缩列表都带有一个标识符(ref_id)。参考列表在R模式和U/O模式下通过不同的方法建立。

5.8.2.1. Reference list in R-mode and U/O-mode
5.8.2.1. R模式和U/O模式下的参考列表

In R-mode, the choice of reference list is based on acknowledgments, i.e., the compressor uses as ref_list the latest list which has been acknowledged by the decompressor. The ref_list is updated only upon receiving an acknowledgment. The least significant bits of the RTP Sequence Number of the acknowledged packet are used as the ref_id.

在R模式下,参考列表的选择基于确认,即压缩机使用已由解压缩器确认的最新列表作为参考列表。参考列表仅在收到确认后更新。确认的分组的RTP序列号的最低有效位被用作ref_id。

In U/O-mode, a sequence of identical lists are considered as belonging to the same generation and are all assigned the same generation identifier (gen_id). Gen_id increases by 1 each time the list changes and is carried in compressed and uncompressed lists that are candidates for being used as reference lists. Normally, Gen_id must have been repeated in at least L headers before the list can be used as a ref_list. However, some acknowledgments may be sent in O-mode (and also in U-mode), and whenever an acknowledgment for a header is received, the list of that header is considered known and need not be repeated further. The least significant bits of the Gen_id is used as the ref_id in U/O-mode.

在U/O模式下,一系列相同的列表被视为属于同一代,并且都被分配了同一代标识符(gen_id)。Gen_id在列表每次更改时增加1,并在压缩和未压缩列表中携带,这些列表是用作参考列表的候选列表。通常,Gen_id必须在至少L个标题中重复,然后列表才能用作参考列表。然而,一些确认可以在O模式(以及U模式)下发送,并且每当接收到报头的确认时,该报头的列表被认为是已知的,并且不需要进一步重复。Gen_id的最低有效位用作U/O模式中的ref_id。

The logic of the compressor and decompressor for reference based list compression is similar to that for SN and TS. The principal difference is that the decompressor maintains a sliding window with candidates for ref_list, and retrieves ref_list from the sliding window using the ref_id of the compressed list.

用于基于引用的列表压缩的压缩器和解压缩器的逻辑与SN和TS的类似。主要区别在于,解压缩器使用ref_列表的候选对象维护一个滑动窗口,并使用压缩列表的ref_id从滑动窗口检索ref_列表。

Logic of compressor:

压缩机的逻辑:

a) In the IR state, the compressor sends Generic lists (see 5.8.5) containing all items of the current list in order to establish or refresh the context of the decompressor.

a) 在IR状态下,压缩器发送包含当前列表所有项目的通用列表(见5.8.5),以建立或刷新解压器的上下文。

In R-mode, such Generic lists are sent until a header is acknowledged. The list of that header can be used as a reference list to compress subsequent lists.

在R模式下,发送此类通用列表,直到确认报头。该标题的列表可用作压缩后续列表的引用列表。

In U/O-mode, the compressor sends generation identifiers with the Generic lists until

在U/O模式下,压缩器发送带有通用列表的生成标识符,直到

1) a generation identifier has been repeated L times, or

1) 生成标识符已重复L次,或

2) an acknowledgment for a header carrying a generation identifier has been received.

2) 已收到对带有生成标识符的标头的确认。

The repeated (1) or acknowledged (2) list can be used as a reference list to compress subsequent lists and is kept together with its generation identifier.

重复(1)或确认(2)列表可用作参考列表,以压缩后续列表,并与其生成标识符一起保存。

b) When not in the IR state, the compressor moves to the FO state when it observes a difference between curr_list and the previous list. It sends compressed lists based on ref_list to update the context of the decompressor. (However, see d).)

b) 当不处于IR状态时,当压缩机观察到当前列表和上一个列表之间的差异时,压缩机将移到FO状态。它基于ref_list发送压缩列表以更新解压器的上下文。(但是,见d。)

In R-mode, the compressor keeps sending compressed lists using the same reference until it receives an acknowledgment for a packet containing the newest list. The compressor may then move to the SO state with regard to the list.

在R模式下,压缩器使用相同的引用不断发送压缩列表,直到收到包含最新列表的数据包的确认。然后,压缩机可移动至与列表相关的SO状态。

In U/O-mode, the compressor keeps sending compressed lists with generation identifiers until

在U/O模式下,压缩器一直发送带有生成标识符的压缩列表,直到

1) a generation identifier has been repeated L times, or

1) 生成标识符已重复L次,或

2) an acknowledgment for a header carrying the latest generation identifier has been received.

2) 已收到对带有最新一代标识符的标头的确认。

The repeated or acknowledged list is used as the future reference list. The compressor may move to the SO state with regard to the list.

重复或确认的列表用作未来参考列表。压缩机可能会移动到与列表相关的SO状态。

c) In R-mode, the compressor maintains a sliding window containing the lists which have been sent to update the context of the decompressor and have not yet been acknowledged. The sliding window shrinks when an acknowledgment arrives: all lists sent before the acknowledged list are removed. The compressor may use the Index to represent items of lists in the sliding window.

c) 在R模式下,压缩器维护一个滑动窗口,其中包含已发送用于更新解压器上下文且尚未确认的列表。当确认到达时,滑动窗口缩小:在确认列表之前发送的所有列表都将被删除。压缩器可以使用索引来表示滑动窗口中的列表项。

In U/O-mode, the compressor needs to store

在U/O模式下,压缩机需要存储

1) the reference list and its generation identifier, and

1) 参考列表及其生成标识符,以及

2) if the current generation identifier is different from the reference generation, the current list and the sequence numbers with which the current list has been sent.

2) 如果当前生成标识符与参考生成不同,则当前列表和发送当前列表时使用的序列号。

(2) is needed to determine if an acknowledgment concerns the latest generation. It is not needed in U-mode.

(2) 需要确定确认是否涉及最新一代。在U型模式下不需要它。

d) In U/O-mode, the compressor may choose to not send a generation identifier with a compressed list. Such lists without generation identifiers are not assigned a new generation identifier and must

d) 在U/O模式下,压缩器可以选择不发送带有压缩列表的生成标识符。没有生成标识符的此类列表不会被分配新的生成标识符,并且必须

not be used as future reference lists. They do not update the context. This feature is useful when a new list is repeated few times and the list then reverts back to its old value.

不得用作未来的参考列表。它们不会更新上下文。当一个新列表重复几次,然后列表恢复到原来的值时,此功能非常有用。

Logic of decompressor:

解压器的逻辑:

e) In R-mode, the decompressor acknowledges all received uncompressed or compressed lists which establish or update the context. (Such compressed headers contain a CRC.)

e) 在R模式下,解压器确认所有接收到的建立或更新上下文的未压缩或压缩列表。(此类压缩头包含CRC。)

In O-mode, the decompressor MAY acknowledge a list with a new generation identifier, see section 5.4.2.2.

在O模式下,解压器可使用新一代标识符确认列表,见第5.4.2.2节。

In U-mode, the decompressor MAY acknowledge a list sent in an IR packet, see section 5.3.2.3.

在U模式下,解压器可确认IR数据包中发送的列表,见第5.3.2.3节。

f) The decompressor maintains a sliding window which contains the lists that may be used as reference lists.

f) 解压器维护一个滑动窗口,其中包含可以用作参考列表的列表。

In R-mode, the sliding window contains lists which have been acknowledged but not yet used as reference lists.

在R模式下,滑动窗口包含已确认但尚未用作参考列表的列表。

In U/O-mode, the sliding window contains at most one list per generation. It contains all generations seen by the decompressor newer than the last generation used as a reference.

在U/O模式下,滑动窗口每一代最多包含一个列表。它包含解压器看到的比用作参考的上一代更新的所有代。

g) When the decompressor receives a compressed list, it retrieves the proper ref_list from the sliding window based on the ref_id, and decompresses the compressed list obtaining curr_list.

g) 当解压器接收到压缩列表时,它将根据ref_id从滑动窗口检索适当的ref_列表,并解压压缩列表以获得curr_列表。

In R-mode, curr_list is inserted into the sliding window if an acknowledgment is sent for it. The sliding window is shrunk by removing all lists received before ref_list.

在R模式下,如果向滑动窗口发送确认,则会将当前列表插入滑动窗口。通过删除ref_list之前接收到的所有列表,可以缩小滑动窗口。

In U/O-mode, curr_list is inserted into the sliding window together with its generation identifier if the compressed list had a generation identifier and the sliding window does not contain a list with that generation identifier. All lists with generations older than ref_id are removed from the sliding window.

在U/O模式下,如果压缩列表具有生成标识符,并且滑动窗口不包含具有该生成标识符的列表,则当前列表将与其生成标识符一起插入滑动窗口。所有具有早于ref_id的代的列表都将从滑动窗口中删除。

5.8.3. Encoding schemes for the compressed list
5.8.3. 压缩列表的编码方案

Four encoding schemes for the compressed list are described here. The exact formats of the compressed CSRC list and compressed IP extension header list using these encoding schemes are described in sections 5.8.5-5.8.6.

这里描述了压缩列表的四种编码方案。第5.8.5-5.8.6节描述了使用这些编码方案的压缩CSC列表和压缩IP扩展头列表的确切格式。

Generic scheme

通用方案

In contrast to subsequent schemes, this scheme does not rely on a reference list having been established. The entire list is sent, using table based compression for each individual item. The generic scheme is always used when establishing the context of the decompressor and may also be used at other times, as the compressor sees fit.

与后续方案相比,该方案不依赖已建立的参考列表。发送整个列表,对每个项目使用基于表的压缩。在建立解压器的上下文时,始终使用通用方案,也可以在其他时间使用,如压缩器认为合适。

Insertion Only scheme

仅插入方案

When the new list can be constructed from ref_list by adding items, a list of the added items is sent (using table based compression), along with the positions in ref_list where the new items will be inserted. An insertion bit mask indicates the insertion positions in ref_list.

当可以通过添加项目从ref_列表构建新列表时,将发送添加项目的列表(使用基于表格的压缩),以及ref_列表中插入新项目的位置。插入位掩码指示ref_列表中的插入位置。

Upon reception of a list compressed according to the Insertion Only scheme, curr_list is obtained by scanning the insertion bit mask from left to right. When a '0' is observed, an item is copied from the ref_list. When a '1' is observed, an item is copied from the list of added items. If a '1' is observed when the list of added items has been exhausted, an error has occurred and decompression fails: The header MUST NOT be delivered to upper layers; it should be discarded, and MUST NOT be acknowledged nor used as a reference.

在接收到根据仅插入方案压缩的列表时,通过从左到右扫描插入位掩码来获得curr_列表。观察到“0”时,将从参考列表复制一个项目。观察到“1”时,将从添加的项目列表中复制一个项目。如果在已添加项的列表已用尽时观察到“1”,则会发生错误且解压缩失败:标头不得传递到上层;它应该被丢弃,不能被承认或用作参考。

To construct the insertion bit mask and the list of added items, the compressor MAY use the following algorithm:

为了构造插入位掩码和添加项的列表,压缩器可以使用以下算法:

1) An empty bit list and an empty Inserted Item list are generated as the starting point.

1) 生成空位列表和空插入项列表作为起点。

2) Start by considering the first item of curr_list and ref_list.

2) 首先考虑当前列表和参考列表的第一项。

3) If curr_list has a different item than ref_list,

3) 如果当前列表的项目与参考列表的项目不同,

            a set bit (1) is appended to the bit list;
            the first item in curr_list (represented using table-based
            item compression) is appended to the Inserted Item list;
            advance to the next item of curr_list;
        
            a set bit (1) is appended to the bit list;
            the first item in curr_list (represented using table-based
            item compression) is appended to the Inserted Item list;
            advance to the next item of curr_list;
        

otherwise,

否则

a zero bit (0) is appended to the bit list;

零位(0)被追加到位列表;

advance to the next item of curr_list; advance to the next item of ref_list.

前进到当前列表的下一项;进入参考列表的下一项。

4) Repeat 3) until curr_list has been exhausted.

4) 重复3)直到用完电流表。

5) If the length of the bit list is less than the required bit mask length, append additional zeroes.

5) 如果位列表的长度小于所需的位掩码长度,请附加额外的零。

Removal Only scheme

只限搬迁计划

This scheme can be used when curr_list can be obtained by removing some items in ref_list. The positions of the items which are in ref_list, but not in curr_list, are sent as a removal bit mask.

当通过删除参考列表中的某些项目可以获得当前列表时,可以使用此方案。参考列表中但不在当前列表中的项目的位置作为删除位掩码发送。

Upon reception of the compressed list, the decompressor obtains curr_list by scanning the removal bit mask from left to right. When a '0' is observed, the next item of ref_list is copied into curr_list. When a '1' is observed, the next item of ref_list is skipped over without being copied. If a '0' is observed when ref_list has been exhausted, an error has occurred and decompression fails: The header MUST NOT be delivered to upper layers; it should be discarded, and MUST NOT be acknowledged nor used as a reference.

在接收到压缩列表后,解压缩器通过从左到右扫描移除位掩码来获得curr_列表。观察到“0”时,参考列表的下一项将复制到当前列表中。当观察到“1”时,将跳过ref_列表的下一项而不进行复制。如果在ref_列表已用尽时观察到“0”,则会发生错误且解压缩失败:标头不得传递到上层;它应该被丢弃,不能被承认或用作参考。

To construct the removal bit mask and the list of added items, the compressor MAY use the following algorithm:

为了构造删除位掩码和添加项的列表,压缩器可以使用以下算法:

1) An empty bit list is generated as the starting point.

1) 生成一个空位列表作为起点。

2) Start by considering the first item of curr_list and ref_list.

2) 首先考虑当前列表和参考列表的第一项。

3) If curr_list has a different item than ref_list,

3) 如果当前列表的项目与参考列表的项目不同,

         a set bit (1) is appended to the bit list;
         advance to the next item of ref_list;
        
         a set bit (1) is appended to the bit list;
         advance to the next item of ref_list;
        

otherwise,

否则

         a zero bit (0) is appended to the bit list;
         advance to the next item of curr_list;
         advance to the next item of ref_list.
        
         a zero bit (0) is appended to the bit list;
         advance to the next item of curr_list;
         advance to the next item of ref_list.
        

4) Repeat 3) until curr_list has been exhausted.

4) 重复3)直到用完电流表。

5) If the length of the bit list is less than the required bit mask length, append additional ones.

5) 如果位列表的长度小于所需的位掩码长度,请附加其他位掩码长度。

Remove Then Insert scheme

删除然后插入方案

In this scheme, curr_list is obtained by first removing items from ref_list, and then inserting items into the resulting list. A removal bit mask, an insertion bit mask, and a list of added items are sent.

在这个方案中,curr_列表是通过首先从ref_列表中删除项目,然后将项目插入到结果列表中来获得的。发送删除位掩码、插入位掩码和添加项列表。

Upon reception of the compressed list, the decompressor processes the removal bit mask as in the Removal Only scheme. The resulting list is then used as the reference list when the insertion bit mask and the list of added items are processed, as in the Insertion Only scheme.

在接收到压缩列表时,解压缩器按照仅移除方案处理移除位掩码。然后,在处理插入位掩码和添加项列表时,结果列表用作参考列表,如在仅插入方案中。

5.8.4. Special handling of IP extension headers
5.8.4. IP扩展头的特殊处理

In CSRC list compression, each CSRC is assigned an index. In contrast, in IP extension header list compression an index is usually associated with a type of extension header. When there is more than one IP header, there is more than one list of extension headers. An index per type per list is then used.

在CSRC列表压缩中,为每个CSC分配一个索引。相反,在IP扩展头列表压缩中,索引通常与一种类型的扩展头相关联。当有多个IP头时,会有多个扩展头列表。然后使用每个列表的每个类型的索引。

The association with a type means that a new index need not always be used each time a field in an IP extension header changes. However, when a field in an extension header changes, the mapping between the index and the new value of the extension header needs to be established, except in the special handling cases defined in the following subsections.

与类型的关联意味着每次IP扩展标头中的字段更改时,不必总是使用新索引。但是,当扩展标头中的字段发生更改时,需要建立索引与扩展标头的新值之间的映射,以下小节中定义的特殊处理情况除外。

5.8.4.1. Next Header field
5.8.4.1. 下一个标题字段

The next header field in an IP header or extension header changes whenever the type of the immediately following header changes, e.g., when a new extension header is inserted after it, when the immediate subsequent extension header is removed from the list, or when the order of extension headers is changed. Thus it may not be uncommon that, for a given header, the next header field changes while the remaining fields do not change.

IP头或扩展头中的下一个头字段在紧接其后的头的类型更改时更改,例如,在其后插入新的扩展头、从列表中删除紧接其后的扩展头或更改扩展头的顺序时更改。因此,对于给定的报头,下一个报头字段更改而其余字段不更改的情况可能并不少见。

Therefore, in the case that only the next header field changes, the extension header is considered to be unchanged and rules for special treatment of the change in the next header field are defined below.

因此,在只有下一个标题字段更改的情况下,扩展标题被视为未更改,下面定义了对下一个标题字段中的更改进行特殊处理的规则。

All communicated uncompressed extension header items indicate their own type in their Next Header field. Note that the rules below explain how to treat the Next Header fields while showing the conceptual reference list as an exact recreation of the original uncompressed extension header list.

所有通信的未压缩扩展标题项在其下一个标题字段中指示其自己的类型。请注意,下面的规则解释了如何在将概念引用列表显示为原始未压缩扩展标题列表的精确再现时,处理下一个标题字段。

a) When a subsequent extension header is removed from the list, the new value of the next header field is obtained from the reference extension header list. For example, assume that the reference header list (ref_list) consists of headers A, B and C (ref_ext_hdr A, B, C), and the current extension header list (curr_list) only consists of extension headers A and C (curr_ext_hdr A, C). The order and value of the next header fields of these extension headers are as follows.

a) 从列表中删除后续扩展标题时,将从引用扩展标题列表中获取下一标题字段的新值。例如,假设引用头列表(ref_list)包含头A、B和C(ref_ext_hdr A、B、C),而当前扩展头列表(curr_list)仅包含扩展头A和C(curr_ext_hdr A、C)。这些扩展标头的下一个标头字段的顺序和值如下所示。

   ref_list:
   +--------+-----+    +--------+-----+    +--------+-----+
   | type B |     |    | type C |     |    | type D |     |
   +--------+     |    +--------+     |    +--------+     |
   |              |    |              |    |              |
   +--------------+    +--------------+    +--------------+
   ref_ext_hdr A        ref_ext_hdr B       ref_ext_hdr C
        
   ref_list:
   +--------+-----+    +--------+-----+    +--------+-----+
   | type B |     |    | type C |     |    | type D |     |
   +--------+     |    +--------+     |    +--------+     |
   |              |    |              |    |              |
   +--------------+    +--------------+    +--------------+
   ref_ext_hdr A        ref_ext_hdr B       ref_ext_hdr C
        
    curr_list:
   +--------+-----+    +--------+-----+
   | type C |     |    | type D |     |
   +--------+     |    +--------+     |
   |              |    |              |
   +--------------+    +--------------+
    curr_ext_hdr A      curr_ext_hdr C
        
    curr_list:
   +--------+-----+    +--------+-----+
   | type C |     |    | type D |     |
   +--------+     |    +--------+     |
   |              |    |              |
   +--------------+    +--------------+
    curr_ext_hdr A      curr_ext_hdr C
        

Comparing the curr_ext_hdr A in curr_list and the ref_ext_hdr A in ref_list, the value of next header field is changed from "type B" to "type C" because of the removal of extension header B. The new value of the next header field in curr_ext_hdr A, i.e., "type C", does not need to be sent to the decompressor. Instead, it is retrieved from the next header field of the removed ref_ext_hdr B.

比较curr_列表中的curr_ext_hdr A和ref_列表中的ref_ext_hdr A,由于删除了扩展标题B,下一个标题字段的值从“类型B”更改为“类型C”。curr_ext_hdr A中下一个标题字段的新值,即“类型C”,无需发送到解压缩器。相反,它是从删除的ref_ext_hdr B的下一个标题字段中检索的。

b) When a new extension header is inserted after an existing extension header, the next header field in the communicated item will carry the type of itself, rather than the type of the header that follows. For example, assume that the reference header list (ref_list) consists of headers A and C (ref_ext_hdr A, C), and the current header list (curr_list) consists of headers A, B and C (curr_ext_hdr A, B, C). The order and the value of the next header fields of these extension headers are as follows.

b) 当在现有扩展标题之后插入新的扩展标题时,通信项中的下一个标题字段将携带其自身的类型,而不是后面的标题类型。例如,假设引用标题列表(ref_list)由标题A和C(ref_ext_hdr A、C)组成,而当前标题列表(curr_list)由标题A、B和C(curr_ext_hdr A、B、C)组成。这些扩展标头的下一个标头字段的顺序和值如下所示。

   ref_list:
   +--------+-----+    +--------+-----+
   | type C |     |    | type D |     |
   +--------+     |    +--------+     |
   |              |    |              |
   +--------------+    +--------------+
    ref_ext_hdr A        ref_ext_hdr C
        
   ref_list:
   +--------+-----+    +--------+-----+
   | type C |     |    | type D |     |
   +--------+     |    +--------+     |
   |              |    |              |
   +--------------+    +--------------+
    ref_ext_hdr A        ref_ext_hdr C
        
   curr_list:
   +--------+-----+    +--------+-----+    +--------+-----+
   | type B |     |    | type C |     |    | type D |     |
   +--------+     |    +--------+     |    +--------+     |
   |              |    |              |    |              |
   +--------------+    +--------------+    +--------------+
    curr_ext_hdr A      curr_ext_hdr B      curr_ext_hdr C
        
   curr_list:
   +--------+-----+    +--------+-----+    +--------+-----+
   | type B |     |    | type C |     |    | type D |     |
   +--------+     |    +--------+     |    +--------+     |
   |              |    |              |    |              |
   +--------------+    +--------------+    +--------------+
    curr_ext_hdr A      curr_ext_hdr B      curr_ext_hdr C
        

Comparing the curr_list and the ref_list, the value of the next header field in extension header A is changed from "type C" to "type B".

比较curr_列表和ref_列表,扩展头A中下一个头字段的值从“类型C”更改为“类型B”。

The uncompressed curr_ext_hdr B is carried in the compressed header list. However, it carries "type B" instead of "type C" in its next header field. When the decompressor inserts a new header after curr_ext_hdr A, the next header field of A is taken from the new header, and the next header field of the new header is taken from ref_ext_hdr A.

未压缩的curr_ext_hdr B在压缩标题列表中携带。但是,它在下一个标题字段中携带“类型B”而不是“类型C”。当解压器在curr_ext_hdr a之后插入新标题时,a的下一个标题字段取自新标题,而新标题的下一个标题字段取自ref_ext_hdr a。

c) Some headers whose compression is defined in this document do not contain Next Header fields or do not have their Next Header field in the standard position (first octet of the header). The GRE and ESP headers are such headers. When sent as uncompressed items in lists, these headers are modified so that they do have a Next Header field as their first octet (see 5.8.4.3 and 5.8.4.4). This is necessary to enable the decompressor to decode the item.

c) 本文档中定义了压缩的某些标题不包含下一个标题字段,或者其下一个标题字段不在标准位置(标题的第一个八位字节)。GRE和ESP标题就是这样的标题。当在列表中作为未压缩项发送时,这些标题会被修改,以便它们有一个下一个标题字段作为第一个八位字节(见5.8.4.3和5.8.4.4)。这是启用解压缩程序对项目进行解码所必需的。

5.8.4.2. Authentication Header (AH)
5.8.4.2. 身份验证头(AH)

The sequence number field in the AH [AH] contains a monotonically increasing counter value for a security association. Therefore, when comparing curr_list with ref_list, if the sequence number in AH changes and SPI field does not change, the AH is not considered as changed.

AH[AH]中的序列号字段包含安全关联的单调递增计数器值。因此,在比较curr_list和ref_list时,如果AH中的序列号发生变化,且SPI字段没有变化,则AH不被视为发生了变化。

If the sequence number in the AH linearly increases as the RTP Sequence Number increases, and the compressor is confident that the decompressor has obtained the pattern, the sequence number in AH need not be sent. The decompressor applies linear extrapolation to reconstruct the sequence number in the AH.

如果AH中的序列号随着RTP序列号的增加而线性增加,并且压缩机确信减压器已获得该模式,则无需发送AH中的序列号。解压器应用线性外推来重构AH中的序列号。

Otherwise, a compressed sequence number is included in the IPX compression field in an Extension 3 of an UOR-2 header.

否则,UOR-2标头的扩展名3中的IPX压缩字段中将包含压缩序列号。

The authentication data field in AH changes from packet to packet and is sent as-is. If the uncompressed AH is sent, the authentication data field is sent inside the uncompressed AH; otherwise, it is sent after the compressed IP/UDP/RTP and IPv6 extension headers and before the payload. See beginning of section 5.7.

AH中的身份验证数据字段随数据包的变化而变化,并按原样发送。如果发送未压缩的AH,则在未压缩的AH内发送认证数据字段;否则,它将在压缩的IP/UDP/RTP和IPv6扩展头之后和有效负载之前发送。见第5.7节开头部分。

Note: The payload length field of the AH uses a different notion of length than other IPv6 extension headers.

注意:AH的有效负载长度字段使用的长度概念与其他IPv6扩展头不同。

5.8.4.3. Encapsulating Security Payload Header (ESP)
5.8.4.3. 封装安全有效负载头(ESP)

When the Encapsulating Security Payload Header (ESP) [ESP] is present and an encryption algorithm other than NULL is being used, the UDP and RTP headers are both encrypted and cannot be compressed. The ESP header thus ends the compressible header chain. The ROHC ESP profile defined in section 5.12 MAY be used for the stream in this case.

当存在封装安全有效负载头(ESP)[ESP]且使用的加密算法不是NULL时,UDP和RTP头都是加密的,无法压缩。ESP割台因此结束可压缩割台链。在这种情况下,第5.12节中定义的ROHC ESP配置文件可用于流。

A special case is when the NULL encryption algorithm is used. This is the case when the ESP header is used for authentication only, and not for encryption. The payload is not encrypted by the NULL encryption algorithm, so compression of the rest of the header chain is possible. The rest of this section describes compression of the ESP header when the NULL encryption algorithm is used with ESP.

一种特殊情况是使用空加密算法。当ESP头仅用于身份验证而不用于加密时,就是这种情况。有效负载不是由空加密算法加密的,因此可以压缩报头链的其余部分。本节的其余部分描述了在ESP中使用空加密算法时ESP头的压缩。

It is not possible to determine whether NULL encryption is used by inspecting a header in the stream, this information is present only at the encryption endpoints. However, a compressor may attempt compression under the assumption that the NULL encryption algorithm is being used, and later abort compression when the assumption proves to be false.

无法通过检查流中的头来确定是否使用空加密,此信息仅存在于加密端点。但是,压缩器可能会在使用空加密算法的假设下尝试压缩,然后在假设被证明为错误时中止压缩。

The compressor may, for example, inspect the Next Header fields and the header fields supposed to be static in subsequent headers in order to determine if NULL encryption is being used. If these change unpredictably, an encryption algorithm other than NULL is probably being used and compression of subsequent headers SHOULD be aborted. Compression of the stream is then either discontinued, or a profile that compresses only up to the ESP header may be used (see 5.12). While attempting to compress the header, the compressor should use the SPI of the ESP header together with the destination IP address as the defining fields for determining which packets belong to the stream.

例如,压缩器可以检查下一报头字段和后续报头中假定为静态的报头字段,以确定是否正在使用空加密。如果这些更改不可预测,则可能正在使用NULL以外的加密算法,并且应该中止对后续标头的压缩。然后停止压缩流,或者可以使用仅压缩至ESP头的配置文件(见5.12)。在尝试压缩报头时,压缩器应使用ESP报头的SPI和目标IP地址作为确定哪些数据包属于流的定义字段。

In the ESP header [ESP, section 2], the fields that can be compressed are the SPI, the sequence number, the Next Header, and the padding bytes if they are in the standard format defined in [ESP]. (As always, the decompressor reinserts these fields based on the information in the context. Care must be taken to correctly reinsert all the information as the Authentication Data must be verified over the exact same information it was computed over.)

在ESP头[ESP,第2节]中,可以压缩的字段是SPI、序列号、下一个头和填充字节(如果它们是[ESP]中定义的标准格式)。(与往常一样,解压缩程序会根据上下文中的信息重新插入这些字段。必须注意正确地重新插入所有信息,因为身份验证数据必须通过与计算数据完全相同的信息进行验证。)

ESP header [ESP, section 2]:

ESP标题[ESP,第2节]:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              Security Parameters Index (SPI)                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Sequence Number                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Payload Data (variable)                    |
   ~                                                               ~
   |                                                               |
   +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               |     Padding (0-255 octets)                    |
   +-+-+-+-+-+-+-+-+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                               |  Pad Length   | Next Header   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Authentication Data                       |
   +        (variable length, but assumed to be 12 octets)         +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              Security Parameters Index (SPI)                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Sequence Number                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Payload Data (variable)                    |
   ~                                                               ~
   |                                                               |
   +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               |     Padding (0-255 octets)                    |
   +-+-+-+-+-+-+-+-+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                               |  Pad Length   | Next Header   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Authentication Data                       |
   +        (variable length, but assumed to be 12 octets)         +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

SPI: Static. If it changes, it needs to be reestablished.

SPI:静态。如果它改变了,就需要重新建立。

Sequence Number: Not sent when the offset from the sequence number of the compressed header is constant. When the offset is not constant, the sequence number may be compressed by sending LSBs. See 5.8.4.

序列号:当与压缩头序列号的偏移量恒定时,不发送。当偏移量不是常数时,可以通过发送lsb来压缩序列号。见5.8.4。

Payload Data: This is where subsequent headers are to be found. Parsed according to the Next Header field.

有效负载数据:在这里可以找到后续的头。根据下一个标题字段进行分析。

Padding: The padding octets are assumed to be as defined in [ESP], i.e., to take the values 1, 2, ..., k, where k = Pad Length. If the padding in the static context has this pattern, padding in compressed headers is assumed to have this pattern as well and is removed. If padding in the static context does not have this pattern, the padding is not removed.

填充:假设填充八位字节如[ESP]中所定义,即取值1、2、…、k,其中k=填充长度。如果静态上下文中的填充具有此模式,则假定压缩头中的填充也具有此模式,并将其删除。如果静态上下文中的填充没有此模式,则不会删除填充。

Pad Length: Dynamic. Always sent. 14th octet from end of packet.

焊盘长度:动态。总是派来的。从数据包末尾算起的第14个八位字节。

Next Header: Static. 13th octet from end of packet.

下一个标题:静态。从数据包末尾算起的第13个八位字节。

Authentication Data: Can have variable length, but when compression of NULL-encryption ESP header is attempted, it is assumed to have length 12 octets.

身份验证数据:可以具有可变长度,但当尝试压缩空加密ESP头时,假定其长度为12个八位字节。

The sequence number in ESP has the same behavior as the sequence number field in AH. When it increases linearly, it can be compressed to zero bits. When it does not increase linearly, a compressed sequence number is included in the IPX compression field in an Extension 3 of an UOR-2 header.

ESP中的序列号与AH中的序列号字段具有相同的行为。当它线性增加时,可以压缩到零位。当它不是线性增加时,UOR-2标头的扩展名3中的IPX压缩字段中包含压缩序列号。

The information which is part of an uncompressed item of a compressed list is the Next Header field, followed by the SPI and the Sequence Number. Padding, Pad Length, Next Header, and Authentication Data are sent as-is at the end of the packet. This means that the Next Header occurs in two places.

作为压缩列表未压缩项一部分的信息是下一个标题字段,后跟SPI和序列号。填充、填充长度、下一个报头和身份验证数据在数据包末尾按原样发送。这意味着下一个标题出现在两个位置。

Uncompressed ESP list item:

未压缩的ESP列表项:

       +---+---+---+---+---+---+---+---+
      |          Next Header          !  1 octet (see section 5.8.4.1)
      +---+---+---+---+---+---+---+---+
      /              SPI              /  4 octets
      +---+---+---+---+---+---+---+---+
      /        Sequence Number        /  4 octets
      +---+---+---+---+---+---+---+---+
        
       +---+---+---+---+---+---+---+---+
      |          Next Header          !  1 octet (see section 5.8.4.1)
      +---+---+---+---+---+---+---+---+
      /              SPI              /  4 octets
      +---+---+---+---+---+---+---+---+
      /        Sequence Number        /  4 octets
      +---+---+---+---+---+---+---+---+
        

When sending Uncompressed ESP list items, all ESP fields near the the end of the packet are left untouched (Padding, Pad Length, Next Header, Authentication Data).

发送未压缩的ESP列表项时,数据包末尾附近的所有ESP字段保持不变(填充、填充长度、下一个标头、身份验证数据)。

A compressed item consists of a compressed sequence number. When an item is compressed, Padding (if it follows the 1, 2, ..., k pattern) and Next Header are removed near the end of the packet. Authentication Data and Pad Length remain as-is near the end of the packet.

压缩项由压缩序列号组成。当一个项目被压缩时,填充(如果它遵循1,2,…,k模式)和下一个报头在数据包末尾附近被移除。验证数据和焊盘长度保持在接近数据包末尾的位置。

5.8.4.4. GRE Header [RFC 2784, RFC 2890]
5.8.4.4. GRE标题[RFC 2784,RFC 2890]

The GRE header is a set of flags, followed by a mandatory Protocol Type and optional parts as indicated by the flags.

GRE头是一组标志,后面是一个强制协议类型和由标志指示的可选部分。

The sequence number field in the GRE header contains a counter value for a GRE tunnel. Therefore, when comparing curr_list with ref_list, if the sequence number in GRE changes, the GRE is not considered as changed.

GRE头中的序列号字段包含GRE通道的计数器值。因此,当比较curr_list和ref_list时,如果GRE中的序列号发生变化,则GRE不被视为发生了变化。

If the sequence number in the GRE header linearly increases as the RTP Sequence Number increases and the compressor is confident that the decompressor has received the pattern, the sequence number in GRE need not be sent. The decompressor applies linear extrapolation to reconstruct the sequence number in the GRE header.

如果GRE报头中的序列号随着RTP序列号的增加而线性增加,并且压缩器确信解压缩器已接收到该模式,则无需发送GRE中的序列号。解压器应用线性外推来重构GRE报头中的序列号。

Otherwise, a compressed sequence number is included in the IPX compression field in an Extension 3 of an UOR-2 header.

否则,UOR-2标头的扩展名3中的IPX压缩字段中将包含压缩序列号。

The checksum data field in GRE, if present, changes from packet to packet and is sent as-is. If the uncompressed GRE header is sent, the checksum data field is sent inside the uncompressed GRE header; otherwise, if present, it is sent after the compressed IP/UDP/RTP and IPv6 extension headers and before the payload. See beginning of section 5.7.

GRE中的校验和数据字段(如果存在)会随着数据包的变化而变化,并按原样发送。如果发送未压缩GRE报头,则校验和数据字段在未压缩GRE报头内发送;否则,如果存在,它将在压缩的IP/UDP/RTP和IPv6扩展头之后和有效负载之前发送。见第5.7节开头部分。

In order to allow simple parsing of lists of items, an uncompressed GRE header sent as an item in a list is modified from the original GRE header in the following manner: 1) the 16-bit Protocol Type field that encodes the type of the subsequent header using Ether types (see Ether types section in [ASSIGNED]) is removed. 2) A one-octet Next Header field is inserted as the first octet of the header. The value of the Next Header field corresponds to GRE (this value is 47 according to the Assigned Internet Protocol Number section of [ASSIGNED]) when the uncompressed item is to be inserted in a list, and to the type of the subsequent header when the uncompressed item is in a Generic list. Note that this implies that only GRE headers with Ether types that correspond to an IP protocol number can be compressed.

为了允许对项目列表进行简单解析,以以下方式从原始GRE头修改作为列表中项目发送的未压缩GRE头:1)删除使用乙醚类型对后续头的类型进行编码的16位协议类型字段(参见[ASSIGNED]中的乙醚类型部分)。2) 插入一个“一个八位字节下一个标头”字段作为标头的第一个八位字节。当未压缩项要插入到列表中时,下一个标题字段的值对应于GRE(根据[Assigned]中的已分配Internet协议编号部分,该值为47),当未压缩项位于通用列表中时,下一个标题字段的值对应于后续标题的类型。注意,这意味着只能压缩具有对应于IP协议编号的以太类型的GRE头。

Uncompressed GRE list item:

未压缩GRE列表项:

      +---+---+---+---+---+---+---+---+
      |          Next Header          !  1 octet (see section 5.8.4.1)
      +---+---+---+---+---+---+---+---+
      / C |   | K | S |   |    Ver    |  1 octet
      +---+---+---+---+---+---+---+---+
      /           Checksum            /  2 octets, if C=1
      +---+---+---+---+---+---+---+---+
      /              Key              /  4 octets, if K=1
      +---+---+---+---+---+---+---+---+
      /        Sequence Number        /  4 octets, if S=1
      +---+---+---+---+---+---+---+---+
        
      +---+---+---+---+---+---+---+---+
      |          Next Header          !  1 octet (see section 5.8.4.1)
      +---+---+---+---+---+---+---+---+
      / C |   | K | S |   |    Ver    |  1 octet
      +---+---+---+---+---+---+---+---+
      /           Checksum            /  2 octets, if C=1
      +---+---+---+---+---+---+---+---+
      /              Key              /  4 octets, if K=1
      +---+---+---+---+---+---+---+---+
      /        Sequence Number        /  4 octets, if S=1
      +---+---+---+---+---+---+---+---+
        

The bits left blank in the second octet are set to zero when sending and ignored when received.

第二个八位字节中留空的位在发送时设置为零,在接收时忽略。

The fields Reserved0 and Reserved1 of the GRE header [GRE2] must be all zeroes; otherwise, the packet cannot be compressed by this profile.

GRE头[GRE2]的Reserved0和Reserved1字段必须全部为零;否则,此配置文件无法压缩数据包。

5.8.5. Format of compressed lists in Extension 3
5.8.5. 扩展3中压缩列表的格式
5.8.5.1. Format of IP Extension Header(s) field
5.8.5.1. IP扩展标头字段的格式

In Extension 3 (section 5.7.5), there is a field called IP extension header(s). This section describes the format of that field.

在扩展3(第5.7.5节)中,有一个称为IP扩展头的字段。本节介绍该字段的格式。

         0     1     2     3     4     5     6     7
      +-----+-----+-----+-----+-----+-----+-----+-----+
      | CL  | ASeq| ESeq| Gseq|          res          |  1 octet
      +-----+-----+-----+-----+-----+-----+-----+-----+
      :    compressed AH Seq Number,  1 or 4 octets   :  if ASeq = 1
       ----- ----- ----- ----- ----- ----- ----- -----
      :    compressed ESP Seq Number, 1 or 4 octets   :  if Eseq = 1
       ----- ----- ----- ----- ----- ----- ----- -----
      :    compressed GRE Seq Number, 1 or 4 octets   :  if Gseq = 1
       ----- ----- ----- ----- ----- ----- ----- -----
      :    compressed header list, variable length    :  if CL = 1
       ----- ----- ----- ----- ----- ----- ----- -----
        
         0     1     2     3     4     5     6     7
      +-----+-----+-----+-----+-----+-----+-----+-----+
      | CL  | ASeq| ESeq| Gseq|          res          |  1 octet
      +-----+-----+-----+-----+-----+-----+-----+-----+
      :    compressed AH Seq Number,  1 or 4 octets   :  if ASeq = 1
       ----- ----- ----- ----- ----- ----- ----- -----
      :    compressed ESP Seq Number, 1 or 4 octets   :  if Eseq = 1
       ----- ----- ----- ----- ----- ----- ----- -----
      :    compressed GRE Seq Number, 1 or 4 octets   :  if Gseq = 1
       ----- ----- ----- ----- ----- ----- ----- -----
      :    compressed header list, variable length    :  if CL = 1
       ----- ----- ----- ----- ----- ----- ----- -----
        

ASeq: indicates presence of compressed AH Seq Number ESeq: indicates presence of compressed ESP Seq Number GSeq: indicates presence of compressed GRE Seq Number CL: indicates presence of compressed header list res: reserved; set to zero when sending, ignored when received

ASeq:表示存在压缩的AH序列号ESeq:表示存在压缩的ESP序列号GSeq:表示存在压缩的GRE序列号CL:表示存在压缩的标题列表res:保留;发送时设置为零,接收时忽略

When Aseq, Eseq, or Gseq is set, the corresponding header item (AH, ESP, or GRE header) is compressed. When not set, the corresponding header item is sent uncompressed or is not present.

设置Aseq、Eseq或Gseq时,会压缩相应的标题项(AH、ESP或GRE标题)。未设置时,相应的标题项未压缩发送或不存在。

The format of compressed AH, ESP and GRE Sequence Numbers can each be either of the following:

压缩AH、ESP和GRE序列号的格式可以是以下任一种:

     0   1   2   3   4   5   6   7       0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+   +---+---+---+---+---+---+---+---+
   | 0 |   LSB of sequence number  |   | 1 |                           |
   +---+---+---+---+---+---+---+---+   +---+                           +
                                       |                               |
                                       +     LSB of sequence number    +
                                       |                               |
                                       +                               +
                                       |                               |
                                       +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7       0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+   +---+---+---+---+---+---+---+---+
   | 0 |   LSB of sequence number  |   | 1 |                           |
   +---+---+---+---+---+---+---+---+   +---+                           +
                                       |                               |
                                       +     LSB of sequence number    +
                                       |                               |
                                       +                               +
                                       |                               |
                                       +---+---+---+---+---+---+---+---+
        

The format of the compressed header list field is described in section 5.8.6.

压缩标题列表字段的格式见第5.8.6节。

5.8.5.2. Format of Compressed CSRC List
5.8.5.2. 中国证监会压缩清单格式

The Compressed CSRC List field in the RTP header part of an Extension 3 (section 5.7.5) is as in section 5.8.6.

扩展3(第5.7.5节)RTP标题部分的压缩CSC列表字段如第5.8.6节所示。

5.8.6. Compressed list formats
5.8.6. 压缩列表格式

This section describes the format of compressed lists. The format is the same for CSRC lists and header lists. In CSRC lists, the items are CSRC identifiers; in header lists, they are uncompressed or compressed headers, as described in 5.8.4.2-4.

本节介绍压缩列表的格式。中国证监会名单和页眉名单的格式相同。在中国证监会名单中,项目为中国证监会标识;在标题列表中,它们是未压缩或压缩的标题,如5.8.4.2-4所述。

5.8.6.1. Encoding Type 0 (generic scheme)
5.8.6.1. 编码类型0(通用方案)
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | ET=0  |GP |PS |    CC = m     |
   +---+---+---+---+---+---+---+---+
   :            gen_id             :  1 octet, if GP = 1
   +---+---+---+---+---+---+---+---+
   |        XI 1, ..., XI m        |  m octets, or m * 4 bits
   /                --- --- --- ---/
   |               :    Padding    :  if PS = 0 and m is odd
   +---+---+---+---+---+---+---+---+
   |                               |
   /       item 1, ..., item n     /  variable
   |                               |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | ET=0  |GP |PS |    CC = m     |
   +---+---+---+---+---+---+---+---+
   :            gen_id             :  1 octet, if GP = 1
   +---+---+---+---+---+---+---+---+
   |        XI 1, ..., XI m        |  m octets, or m * 4 bits
   /                --- --- --- ---/
   |               :    Padding    :  if PS = 0 and m is odd
   +---+---+---+---+---+---+---+---+
   |                               |
   /       item 1, ..., item n     /  variable
   |                               |
   +---+---+---+---+---+---+---+---+
        

ET: Encoding type is zero.

ET:编码类型为零。

PS: Indicates size of XI fields: PS = 0 indicates 4-bit XI fields; PS = 1 indicates 8-bit XI fields.

PS:表示XI字段的大小:PS=0表示4位席席字段;PS=1表示8位席场。

GP: Indicates presence of gen_id field.

GP:表示存在gen_id字段。

CC: CSRC counter from original RTP header.

抄送:原始RTP标题中的CSC计数器。

gen_id: Identifier for a sequence of identical lists. It is present in U/O-mode when the compressor decides that it may use this list as a future reference list.

gen_id:相同列表序列的标识符。当压缩机决定将此列表用作未来的参考列表时,它以U/O模式出现。

XI 1, ..., XI m: m XI items. The format of an XI item is as follows:

席1,…,席米:米席项目。一席项目的格式如下:

                  +---+---+---+---+
         PS = 0:  | X |   Index   |
                  +---+---+---+---+
        
                  +---+---+---+---+
         PS = 0:  | X |   Index   |
                  +---+---+---+---+
        
                    0   1   2   3   4   5   6   7
                  +---+---+---+---+---+---+---+---+
         PS = 1:  | X |           Index           |
                  +---+---+---+---+---+---+---+---+
        
                    0   1   2   3   4   5   6   7
                  +---+---+---+---+---+---+---+---+
         PS = 1:  | X |           Index           |
                  +---+---+---+---+---+---+---+---+
        

X = 1 indicates that the item corresponding to the Index is sent in the item 0, ..., item n list. X = 0 indicates that the item corresponding to the Index is not sent.

X=1表示与索引对应的项目在项目0、…、项目n列表中发送。X=0表示未发送与索引对应的项。

When 4-bit XI items are used and m > 1, the XI items are placed in octets in the following manner:

当使用4位席项目和M>1时,席项目以八种方式放置在八位位组中:

              0   1   2   3   4   5   6   7
            +---+---+---+---+---+---+---+---+
            |     XI k      |    XI k + 1   |
            +---+---+---+---+---+---+---+---+
        
              0   1   2   3   4   5   6   7
            +---+---+---+---+---+---+---+---+
            |     XI k      |    XI k + 1   |
            +---+---+---+---+---+---+---+---+
        

Padding: A 4-bit padding field is present when PS = 0 and m is odd. The Padding field is set to zero when sending and ignored when receiving.

填充:当PS=0且m为奇数时,存在一个4位填充字段。发送时填充字段设置为零,接收时忽略。

Item 1, ..., item n:

第1项,…,第n项:

Each item corresponds to an XI with X = 1 in XI 1, ..., XI m.

每个项目对应于Xi=1的席席1,…,席西。

5.8.6.2. Encoding Type 1 (insertion only scheme)
5.8.6.2. 编码类型1(仅插入方案)
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | ET=1  |GP |PS |     XI 1      |
   +---+---+---+---+---+---+---+---+
   :            gen_id             :  1 octet, if GP = 1
   +---+---+---+---+---+---+---+---+
   |            ref_id             |
   +---+---+---+---+---+---+---+---+
   /      insertion bit mask       /  1-2 octets
   +---+---+---+---+---+---+---+---+
   |            XI list            |  k octets, or (k - 1) * 4 bits
   /                --- --- --- ---/
   |               :    Padding    :  if PS = 0 and k is even
   +---+---+---+---+---+---+---+---+
   |                               |
   /       item 1, ..., item n     /  variable
   |                               |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | ET=1  |GP |PS |     XI 1      |
   +---+---+---+---+---+---+---+---+
   :            gen_id             :  1 octet, if GP = 1
   +---+---+---+---+---+---+---+---+
   |            ref_id             |
   +---+---+---+---+---+---+---+---+
   /      insertion bit mask       /  1-2 octets
   +---+---+---+---+---+---+---+---+
   |            XI list            |  k octets, or (k - 1) * 4 bits
   /                --- --- --- ---/
   |               :    Padding    :  if PS = 0 and k is even
   +---+---+---+---+---+---+---+---+
   |                               |
   /       item 1, ..., item n     /  variable
   |                               |
   +---+---+---+---+---+---+---+---+
        

Unless explicitly stated otherwise, fields have the same meaning and values as for encoding type 0.

除非另有明确说明,否则字段的含义和值与编码类型0相同。

ET: Encoding type is one (1).

ET:编码类型为一(1)。

XI 1: When PS = 0, the first 4-bit XI item is placed here. When PS = 1, the field is set to zero when sending, and ignored when receiving.

席1:当PS=0时,第一个4位席项目被放置在这里。当PS=1时,该字段在发送时设置为零,在接收时忽略。

ref_id: The identifier of the reference CSRC list used when the list was compressed. It is the 8 least significant bits of the RTP Sequence Number in R-mode and gen_id (see section 5.8.2) in U/O-mode.

ref_id:压缩列表时使用的参考列表的标识符。它是R模式下RTP序列号和U/O模式下gen_id(见第5.8.2节)的8个最低有效位。

insertion bit mask: Bit mask indicating the positions where new items are to be inserted. See Insertion Only scheme in section 5.8.3. The bit mask can have either of the following two formats:

插入位掩码:指示插入新项目位置的位掩码。参见第5.8.3节中的仅插入方案。位掩码可以具有以下两种格式之一:

           0   1   2   3   4   5   6   7
         +---+---+---+---+---+---+---+---+
         | 0 |        7-bit mask         |  bit 1 is the first bit
         +---+---+---+---+---+---+---+---+
        
           0   1   2   3   4   5   6   7
         +---+---+---+---+---+---+---+---+
         | 0 |        7-bit mask         |  bit 1 is the first bit
         +---+---+---+---+---+---+---+---+
        
         +---+---+---+---+---+---+---+---+
         | 1 |                           |  bit 1 is the first bit
         +---+      15-bit mask          +
         |                               |  bit 7 is the last bit
         +---+---+---+---+---+---+---+---+
        
         +---+---+---+---+---+---+---+---+
         | 1 |                           |  bit 1 is the first bit
         +---+      15-bit mask          +
         |                               |  bit 7 is the last bit
         +---+---+---+---+---+---+---+---+
        

XI list: XI fields for items to be inserted. When the insertion bit mask has k ones, the total number of XI fields is k. When PS = 1, all XI fields are in the XI list. When PS = 0, the first XI field is in the XI 1 field, and the remaining k - 1 XI fields are in the XI list.

席列表:要插入的项目的席字段。当插入位掩码为k个时,席的字段总数为k。当PS=1时,所有XI字段都在席席列表中。当PS=0时,第一席场在XI 1场中,其余K—1席场在席席列表中。

Padding: Present when PS = 0 and k is even.

填充:当PS=0且k为偶数时出现。

item 1, ..., item n: One item for each XI field with the X bit set.

项目1,…,项目n:每个席字段与X位集的一个项目。

5.8.6.3. Encoding Type 2 (removal only scheme)
5.8.6.3. 编码类型2(仅删除方案)
        0   1   2   3   4   5   6   7
      +---+---+---+---+---+---+---+---+
      | ET=2  |GP |res|     Count     |
      +---+---+---+---+---+---+---+---+
      :            gen_id             :  1 octet, if GP = 1
      +---+---+---+---+---+---+---+---+
      |            ref_id             |
      +---+---+---+---+---+---+---+---+
      /       removal bit mask        /  1-2 octets
      +---+---+---+---+---+---+---+---+
        
        0   1   2   3   4   5   6   7
      +---+---+---+---+---+---+---+---+
      | ET=2  |GP |res|     Count     |
      +---+---+---+---+---+---+---+---+
      :            gen_id             :  1 octet, if GP = 1
      +---+---+---+---+---+---+---+---+
      |            ref_id             |
      +---+---+---+---+---+---+---+---+
      /       removal bit mask        /  1-2 octets
      +---+---+---+---+---+---+---+---+
        

Unless explicitly stated otherwise, fields have the same meaning and values as in section 5.8.5.2.

除非另有明确说明,否则字段的含义和值与第5.8.5.2节中的含义和值相同。

ET: Encoding type is 2.

ET:编码类型为2。

res: Reserved. Set to zero when sending, ignored when received.

res:保留。发送时设置为零,接收时忽略。

Count: Number of elements in ref_list.

计数:参考列表中的元素数。

removal bit mask: Indicates the elements in ref_list to be removed in order to obtain the current list. See section 5.8.3. The removal bit mask has the same format as the insertion bit mask of section 5.8.6.3.

删除位掩码:表示要删除ref_列表中的元素以获取当前列表。见第5.8.3节。移除位掩码的格式与第5.8.6.3节的插入位掩码的格式相同。

5.8.6.4. Encoding Type 3 (remove then insert scheme)
5.8.6.4. 编码类型3(删除然后插入方案)

See section 5.8.3 for a description of the Remove then insert scheme.

有关先删除后插入方案的说明,请参见第5.8.3节。

        0   1   2   3   4   5   6   7
      +---+---+---+---+---+---+---+---+
      | ET=3  |GP |PS |     XI 1      |
      +---+---+---+---+---+---+---+---+
      :            gen_id             :  1 octet, if GP = 1
      +---+---+---+---+---+---+---+---+
      |            ref_id             |
      +---+---+---+---+---+---+---+---+
      /       removal bit mask        /  1-2 octets
      +---+---+---+---+---+---+---+---+
      /      insertion bit mask       /  1-2 octets
      +---+---+---+---+---+---+---+---+
      |            XI list            |  k octets, or (k - 1) * 4 bits
      /                --- --- --- ---/
      |               :    Padding    :  if PS = 0 and k is even
      +---+---+---+---+---+---+---+---+
      |                               |
      /       item 1, ..., item n     /  variable
      |                               |
      +---+---+---+---+---+---+---+---+
        
        0   1   2   3   4   5   6   7
      +---+---+---+---+---+---+---+---+
      | ET=3  |GP |PS |     XI 1      |
      +---+---+---+---+---+---+---+---+
      :            gen_id             :  1 octet, if GP = 1
      +---+---+---+---+---+---+---+---+
      |            ref_id             |
      +---+---+---+---+---+---+---+---+
      /       removal bit mask        /  1-2 octets
      +---+---+---+---+---+---+---+---+
      /      insertion bit mask       /  1-2 octets
      +---+---+---+---+---+---+---+---+
      |            XI list            |  k octets, or (k - 1) * 4 bits
      /                --- --- --- ---/
      |               :    Padding    :  if PS = 0 and k is even
      +---+---+---+---+---+---+---+---+
      |                               |
      /       item 1, ..., item n     /  variable
      |                               |
      +---+---+---+---+---+---+---+---+
        

The fields in this header have the same meaning and formats as in section 5.8.5.2, except when explicitly stated otherwise below.

除非下文另有明确规定,否则本标题中的字段与第5.8.5.2节中的字段具有相同的含义和格式。

ET: Encoding type is 3.

ET:编码类型为3。

removal bit mask: See section 5.8.6.3.

移除位掩码:见第5.8.6.3节。

5.8.7. CRC coverage for extension headers
5.8.7. 扩展头的CRC覆盖率

All fields of extension headers are CRC-STATIC, with the following exceptions which are CRC-DYNAMIC.

扩展头的所有字段都是CRC-STATIC,以下例外情况是CRC-DYNAMIC。

1) Entire AH header. 2) Entire ESP header. 3) Sequence number in GRE, Checksum in GRE

1) 整个AH标题。2) 整个ESP标题。3) GRE中的序列号,GRE中的校验和

5.9. Header compression CRCs, coverage and polynomials
5.9. 标题压缩CRC、覆盖率和多项式

This chapter describes how to calculate the CRCs used in packet headers defined in this document. (Note that another type of CRC is defined for reconstructed units in section 5.2.5.)

本章介绍如何计算本文档中定义的数据包头中使用的CRC。(请注意,第5.2.5节为重建单元定义了另一种CRC。)

5.9.1. IR and IR-DYN packet CRCs
5.9.1. IR和IR-DYN分组CRC

The CRC in the IR and IR-DYN packet is calculated over the entire IR or IR-DYN packet, excluding Payload and including CID or any Add-CID octet. For purposes of computing the CRC, the CRC field in the header is set to zero.

IR和IR-DYN数据包中的CRC是在整个IR或IR-DYN数据包上计算的,不包括有效载荷,包括CID或任何Add CID八位字节。为了计算CRC,报头中的CRC字段设置为零。

The initial content of the CRC register is to be preset to all 1's.

CRC寄存器的初始内容将预设为所有1。

The CRC polynomial to be used for the 8-bit CRC is:

用于8位CRC的CRC多项式为:

      C(x) = 1 + x + x^2 + x^8
        
      C(x) = 1 + x + x^2 + x^8
        
5.9.2. CRCs in compressed headers
5.9.2. 压缩头中的CRC

The CRC in compressed headers is calculated over all octets of the entire original header, before compression, in the following manner.

压缩头中的CRC在压缩之前,通过以下方式计算整个原始头的所有八位字节。

The octets of the header are classified as either CRC-STATIC or CRC-DYNAMIC, and the CRC is calculated over:

报头的八位字节分为CRC-静态或CRC-动态,CRC通过以下方式计算:

1) the concatenated CRC-STATIC octets of the original header, placed in the same order as they appear in the original header, followed by

1) 原始标头的串联CRC-STATIC八位字节,按其在原始标头中出现的顺序排列,后跟

2) the concatenated CRC-DYNAMIC octets of the original header, placed in the same order as they appear in the original header.

2) 原始标头的串联CRC动态八位字节,其排列顺序与它们在原始标头中的显示顺序相同。

The intention is that the state of the CRC computation after 1) will be saved. As long as the CRC-STATIC octets do not change, the CRC calculation will then only need to process the CRC-DYNAMIC octets.

其目的是保存1)之后的CRC计算状态。只要CRC静态八位字节不变,CRC计算就只需要处理CRC动态八位字节。

In a typical RTP/UDP/IPv4 header, 25 octets are CRC-STATIC and 15 are CRC-DYNAMIC. In a typical RTP/UDP/IPv6 header, 49 octets are CRC-STATIC and 11 are CRC-DYNAMIC. This technique will thus reduce the computational complexity of the CRC calculation by roughly 60% for RTP/UDP/IPv4 and by roughly 80% for RTP/UDP/IPv6.

在典型的RTP/UDP/IPv4报头中,25个八位字节是CRC-STATIC,15个是CRC-DYNAMIC。在典型的RTP/UDP/IPv6报头中,49个八位字节是CRC-STATIC,11个是CRC-DYNAMIC。因此,对于RTP/UDP/IPv4,该技术将使CRC计算的计算复杂度降低约60%,对于RTP/UDP/IPv6,将使CRC计算的计算复杂度降低约80%。

Note: Whenever the CRC-STATIC fields change, the new saved CRC state after 1) is compared with the old state. If the states are identical, the CRC cannot catch the error consisting in the decompressor not having updated the static context. In U/O-mode the

注意:每当CRC-STATIC字段发生更改时,1)之后新保存的CRC状态将与旧状态进行比较。如果状态相同,CRC无法捕获未更新静态上下文的解压缩程序中的错误。在U/O模式下

compressor SHOULD then for a while use packet types with another CRC length, for which there is a difference in CRC state, to ensure error detection.

然后,压缩器应暂时使用具有另一个CRC长度的数据包类型(CRC状态存在差异),以确保错误检测。

The initial content of the CRC register is preset to all 1's.

CRC寄存器的初始内容预设为所有1。

The polynomial to be used for the 3 bit CRC is:

用于3位CRC的多项式为:

      C(x) = 1 + x + x^3
        
      C(x) = 1 + x + x^3
        

The polynomial to be used for the 7 bit CRC is:

用于7位CRC的多项式为:

      C(x) = 1 + x + x^2 + x^3 + x^6 + x^7
        
      C(x) = 1 + x + x^2 + x^3 + x^6 + x^7
        

The CRC in compressed headers is calculated over the entire original header, before compression.

压缩头中的CRC在压缩之前计算整个原始头。

5.10. ROHC UNCOMPRESSED -- no compression (Profile 0x0000)
5.10. ROHC未压缩--无压缩(配置文件0x0000)

In ROHC, compression has not been defined for all kinds of IP headers. Profile 0x0000 provides a way to send IP packets without compressing them. This can be used for IP fragments, RTCP packets, and in general for any packet for which compression of the header has not been defined, is not possible due to resource constraints, or is not desirable for some other reason.

在ROHC中,没有为所有类型的IP头定义压缩。配置文件0x0000提供了一种在不压缩IP数据包的情况下发送IP数据包的方法。这可用于IP片段、RTCP数据包,并且通常用于未定义报头压缩的任何数据包,由于资源限制而不可能,或者由于某些其他原因而不可取。

After initialization, the only overhead for sending packets using Profile 0x0000 is the size of the CID. When uncompressed packets are frequent, Profile 0x0000 should be associated with a CID with size zero or one octet. There is no need to associate Profile 0x0000 with more than one CID.

初始化后,使用配置文件0x0000发送数据包的唯一开销是CID的大小。当未压缩数据包频繁出现时,配置文件0x0000应与大小为零或一个八位字节的CID相关联。无需将配置文件0x0000与多个CID关联。

5.10.1. IR packet
5.10.1. 红外数据包

The initialization packet (IR packet) for Profile 0x0000 has the following format:

配置文件0x0000的初始化数据包(IR数据包)具有以下格式:

     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         : if for small CIDs and (CID != 0)
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   1   1   0 |res|
   +---+---+---+---+---+---+---+---+
   :                               :
   /    0-2 octets of CID info     / 1-2 octets if for large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   |          Profile = 0          | 1 octet
   +---+---+---+---+---+---+---+---+
   |              CRC              | 1 octet
   +---+---+---+---+---+---+---+---+
   :                               : (optional)
   /           IP packet           / variable length
   :                               :
    --- --- --- --- --- --- --- ---
        
     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         : if for small CIDs and (CID != 0)
   +---+---+---+---+---+---+---+---+
   | 1   1   1   1   1   1   0 |res|
   +---+---+---+---+---+---+---+---+
   :                               :
   /    0-2 octets of CID info     / 1-2 octets if for large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   |          Profile = 0          | 1 octet
   +---+---+---+---+---+---+---+---+
   |              CRC              | 1 octet
   +---+---+---+---+---+---+---+---+
   :                               : (optional)
   /           IP packet           / variable length
   :                               :
    --- --- --- --- --- --- --- ---
        

res: Always zero.

res:总是零。

Profile: 0.

个人资料:0。

CRC: 8-bit CRC, computed using the polynomial of section 5.9.1. The CRC covers the first octet of the IR packet through the Profile octet of the IR packet, i.e., it does not cover the CRC itself or the IP packet.

CRC:8位CRC,使用第5.9.1节中的多项式计算。CRC通过IR分组的简档八位组覆盖IR分组的第一八位组,即,它不覆盖CRC本身或IP分组。

IP packet: An uncompressed IP packet may be included in the IR packet. The decompressor determines if the IP packet is present by considering the length of the IR packet.

IP包:未压缩的IP包可能包含在IR包中。解压缩器通过考虑IR分组的长度来确定IP分组是否存在。

5.10.2. Normal packet
5.10.2. 正常数据包

A Normal packet is a normal IP packet plus CID information. When the channel uses small CIDs, and profile 0x0000 is associated with a CID > 0, an Add-CID octet is prepended to the IP packet. When the channel uses large CIDs, the CID is placed so that it starts at the second octet of the Normal packet.

正常数据包是一个正常的IP数据包加上CID信息。当通道使用小CID,并且配置文件0x0000与CID>0关联时,IP数据包中会预先添加一个添加CID八位字节。当通道使用较大的CID时,放置CID,使其从正常数据包的第二个八位字节开始。

     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         : if for small CIDs and (CID != 0)
   +---+---+---+---+---+---+---+---+
   |   first octet of IP packet    |
   +---+---+---+---+---+---+---+---+
   :                               :
   /    0-2 octets of CID info     / 1-2 octets if for large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   |                               |
   /      rest of IP packet        / variable length
   |                               |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
   :         Add-CID octet         : if for small CIDs and (CID != 0)
   +---+---+---+---+---+---+---+---+
   |   first octet of IP packet    |
   +---+---+---+---+---+---+---+---+
   :                               :
   /    0-2 octets of CID info     / 1-2 octets if for large CIDs
   :                               :
   +---+---+---+---+---+---+---+---+
   |                               |
   /      rest of IP packet        / variable length
   |                               |
   +---+---+---+---+---+---+---+---+
        

Note that the first octet of the IP packet starts with the bit pattern 0100 (IPv4) or 0110 (IPv6). This does not conflict with any reserved packet types. Hence, no bits in addition to the CID are needed. The profile is reasonably future-proof since problems do not occur until IP version 14.

请注意,IP数据包的第一个八位字节以位模式0100(IPv4)或0110(IPv6)开始。这与任何保留的数据包类型都不冲突。因此,除了CID之外,不需要其他位。由于问题在IP版本14之前不会发生,因此该配置文件是合理的未来证明。

5.10.3. States and modes
5.10.3. 状态和模式

There are two modes in Profile 0x0000: Unidirectional mode and Bidirectional mode. In Unidirectional mode, the compressor repeats the IR packet periodically. In Bidirectional mode, the compressor never repeats the IR packet. The compressor and decompressor always start in Unidirectional mode. Whenever feedback is received, the compressor switches to Bidirectional mode.

配置文件0x0000中有两种模式:单向模式和双向模式。在单向模式下,压缩器周期性地重复IR数据包。在双向模式下,压缩器从不重复IR数据包。压缩机和减压器始终以单向模式启动。每当收到反馈时,压缩机将切换到双向模式。

The compressor can be in either of two states: the IR state or the Normal state. It starts in the IR state.

压缩机可以处于两种状态之一:IR状态或正常状态。它开始于IR状态。

a) IR state: Only IR packets can be sent. After sending a small number of IR packets (only one when refreshing), the compressor switches to the Normal state.

a) IR状态:只能发送IR数据包。发送少量IR数据包(刷新时仅发送一个)后,压缩机切换到正常状态。

b) Normal state: Only Normal packets can be sent. When in Unidirectional mode, the compressor periodically transits back to the IR state. The length of the period is implementation dependent, but should be fairly long. Exponential backoff may be used.

b) 正常状态:只能发送正常数据包。当处于单向模式时,压缩机周期性地转换回IR状态。周期的长度取决于实施情况,但应该相当长。可以使用指数退避。

c) When feedback is received in any state, the compressor switches to Bidirectional mode.

c) 当在任何状态下收到反馈时,压缩机切换到双向模式。

The decompressor can be in either of two states: NO_CONTEXT or FULL_CONTEXT. It starts in NO_CONTEXT.

解压器可以处于两种状态之一:无上下文或完整上下文。它从没有上下文开始。

d) When an IR packet is received in the NO_CONTEXT state, the decompressor first verifies the packet using the CRC. If the packet is OK, the decompressor 1) moves to the FULL_CONTEXT state, 2) delivers the IP packet to upper layers if present, 3) MAY send an ACK. If the packet is not OK, it is discarded without further action.

d) 当在NO_上下文状态下接收到IR分组时,解压缩器首先使用CRC验证该分组。如果数据包正常,解压器1)移动到完整上下文状态,2)将IP数据包发送到上层(如果存在),3)可以发送ACK。如果数据包不正常,则丢弃该数据包,无需进一步操作。

e) When any other packet is received in the NO_CONTEXT state, it is discarded without further action.

e) 当在NO_上下文状态下接收到任何其他数据包时,它将被丢弃,无需进一步操作。

f) When an IR packet is received in the FULL_CONTEXT state, the packet is first verified using the CRC. If OK, the decompressor 1) delivers the IP packet to upper layers if present, 2) MAY send an ACK. If the packet is not OK, no action is taken.

f) 当在全上下文状态下接收到IR数据包时,首先使用CRC验证该数据包。如果确定,则解压缩器1)将IP分组传送到上层(如果存在),2)可以发送ACK。如果数据包不正常,则不采取任何操作。

g) When a Normal packet is received in the FULL_CONTEXT state, the CID information is removed and the IP packet is delivered to upper layers.

g) 当在完整上下文状态下接收到正常数据包时,CID信息被删除,IP数据包被传送到上层。

5.10.4. Feedback
5.10.4. 反馈

The only kind of feedback in Profile 0x0000 is ACKs. Profile 0x0000 MUST NOT be rejected. Profile 0x0000 SHOULD be associated with at most one CID. ACKs use the FEEDBACK-1 format of section 5.2. The value of the profile-specific octet in the FEEDBACK-1 ACK is 0 (zero).

配置文件0x0000中唯一的反馈类型是ACKs。不得拒绝配置文件0x0000。配置文件0x0000最多应与一个CID关联。ACK使用第5.2节的反馈-1格式。反馈-1 ACK中特定于配置文件的八位字节的值为0(零)。

5.11. ROHC UDP -- non-RTP UDP/IP compression (Profile 0x0002)
5.11. ROHC UDP——非RTP UDP/IP压缩(配置文件0x0002)

UDP/IP headers do not have a sequence number which is as well-behaved as the RTP Sequence Number. For UDP/IPv4, there is an IP-ID field which may be echoed in feedback information, but when no IPv4 header is present such feedback identification becomes problematic.

UDP/IP标头的序列号不如RTP序列号表现良好。对于UDP/IPv4,有一个IP-ID字段,可以在反馈信息中回显,但当不存在IPv4报头时,这样的反馈标识就会出现问题。

Therefore, in the ROHC UDP profile, the compressor generates a 16-bit sequence number SN which increases by one for each packet received in the packet stream. This sequence number is thus relatively well-behaved and can serve as the basis for most mechanisms described for ROHC RTP. It is called SN or UDP SN below. Unless stated otherwise, the mechanisms of ROHC RTP are used also for ROHC UDP, with the UDP SN taking the role of the RTP Sequence Number.

因此,在ROHC UDP概要文件中,压缩器生成16位序列号SN,该序列号SN对于在分组流中接收的每个分组增加1。因此,该序列号的性能相对较好,可以作为为ROHC RTP描述的大多数机制的基础。下面称为SN或UDP SN。除非另有说明,否则ROHC RTP的机制也用于ROHC UDP,UDP SN充当RTP序列号的角色。

The ROHC UDP profile always uses p = -1 when interpreting the SN, since there will be no repetitions or reordering of the compressor-generated SN. The interpretation interval thus always starts with (ref_SN + 1).

ROHC UDP配置文件在解释序列号时始终使用p=-1,因为压缩器生成的序列号不会重复或重新排序。因此,解释间隔始终以(ref_SN+1)开始。

5.11.1. Initialization
5.11.1. 初始化

The static context for ROHC UDP streams can be initialized in either of two ways:

ROHC UDP流的静态上下文可以通过以下两种方式之一进行初始化:

1) By using an IR packet as in section 5.7.7.1, where the profile is two (2) and the static chain ends with the static part of an UDP packet. At the compressor, UDP SN is initialized to a random value when the IR packet is sent.

1) 通过使用第5.7.7.1节中的IR数据包,其中配置文件为两(2),静态链以UDP数据包的静态部分结束。在压缩器处,当IR分组被发送时,UDP SN被初始化为随机值。

2) By reusing an existing context where the existing static chain contains the static part of a UDP packet, e.g., the context of a stream compressed using ROHC RTP (profile 0x0001). This is done with an IR-DYN packet (section 5.7.7.2) identifying profile 0x0002, where the dynamic chain corresponds to the prefix of the existing static chain that ends with the UDP header. UDP SN is initialized to the RTP Sequence Number if the earlier profile was profile 0x0001, and to a random number otherwise.

2) 通过重用现有上下文,其中现有静态链包含UDP数据包的静态部分,例如,使用ROHC RTP(概要文件0x0001)压缩的流的上下文。这是通过识别配置文件0x0002的IR-DYN数据包(第5.7.7.2节)完成的,其中动态链对应于以UDP报头结尾的现有静态链的前缀。如果较早的配置文件为配置文件0x0001,则UDP SN初始化为RTP序列号,否则初始化为随机数。

For ROHC UDP, the dynamic part of a UDP packet is different from section 5.7.7.5: a two-octet field containing the UDP SN is added after the Checksum field. This affects the format of dynamic chains in IR and IR-DYN packets.

对于ROHC UDP,UDP数据包的动态部分不同于第5.7.7.5节:在校验和字段之后添加包含UDP SN的两个八位组字段。这会影响IR和IR-DYN数据包中动态链的格式。

Note: 2) can be used for packet streams which were initially assumed to be RTP streams, so that compression started with profile 0x0001, but were later found evidently not to be RTP streams.

注:2)可用于最初假定为RTP流的数据包流,因此压缩从配置文件0x0001开始,但后来发现显然不是RTP流。

5.11.2. States and modes
5.11.2. 状态和模式

ROHC UDP uses the same states and modes as ROHC RTP. Mode transitions and state logic are the same except when explicitly stated otherwise. Mechanisms dealing with fields in the RTP header (except the RTP SN) are not used. The decompressed UDP SN is never included in any header delivered to upper layers. The UDP SN is used in place of the RTP SN in feedback.

ROHC UDP使用与ROHC RTP相同的状态和模式。除非另有明确说明,否则模式转换和状态逻辑是相同的。不使用处理RTP标头(RTP SN除外)中字段的机制。解压后的UDP SN从未包含在交付给上层的任何标头中。在反馈中使用UDP序列号代替RTP序列号。

5.11.3. Packet types
5.11.3. 数据包类型

The general format of a ROHC UDP packet is the same as for ROHC RTP (see beginning of section 5.7). Padding and CIDs are the same, as is the feedback packet type (5.7.6.1) and the feedback. IR and IR-DYN packets (5.7.7) are changed as described in 5.11.1.

ROHC UDP数据包的一般格式与ROHC RTP相同(见第5.7节开头)。填充和CID是相同的,反馈包类型(5.7.6.1)和反馈也是相同的。IR和IR-DYN数据包(5.7.7)如5.11.1所述进行更改。

The general format of compressed packets is also the same, but there are differences in specific formats and extensions as detailed below. The differences are caused by removal of all RTP specific information except the RTP SN, which is replaced by the UDP SN.

压缩数据包的一般格式也相同,但在具体格式和扩展方面存在差异,详情如下。这些差异是由于删除了除RTP序列号以外的所有RTP特定信息造成的,RTP序列号由UDP序列号替换。

Unless explicitly stated below, the packet formats are as in sections 5.7.1-6.

除非下文明确说明,否则数据包格式如第5.7.1-6节所示。

R-1

R-1

The TS field is replaced by an IP-ID field. The M flag has become part of IP-ID. The X bit has moved. The formats R-1-ID and R-1- TS are not used.

TS字段替换为IP-ID字段。M标志已成为IP-ID的一部分。X位已移动。不使用格式R-1-ID和R-1-TS。

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |          SN           |
   +===+===+===+===+===+===+===+===+
   | X |           IP-ID           |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |          SN           |
   +===+===+===+===+===+===+===+===+
   | X |           IP-ID           |
   +---+---+---+---+---+---+---+---+
        

UO-1

UO-1

The TS field is replaced by an IP-ID field. The M flag has become part of SN. Formats UO-1-ID and UO-1-TS are not used.

TS字段替换为IP-ID字段。M标志已成为SN的一部分。未使用UO-1-ID和UO-1-TS格式。

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |         IP-ID         |
   +===+===+===+===+===+===+===+===+
   |        SN         |    CRC    |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   0 |         IP-ID         |
   +===+===+===+===+===+===+===+===+
   |        SN         |    CRC    |
   +---+---+---+---+---+---+---+---+
        

UOR-2

UOR-2

New format:

新格式:

     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   0 |        SN         |
   +===+===+===+===+===+===+===+===+
   | X |            CRC            |
   +---+---+---+---+---+---+---+---+
        
     0   1   2   3   4   5   6   7
   +---+---+---+---+---+---+---+---+
   | 1   1   0 |        SN         |
   +===+===+===+===+===+===+===+===+
   | X |            CRC            |
   +---+---+---+---+---+---+---+---+
        
5.11.4. Extensions
5.11.4. 扩展

Extensions are as in 5.7.5, with the following exceptions:

扩展如5.7.5所示,但以下情况除外:

Extension 0:

扩展0:

      +---+---+---+---+---+---+---+---+
      | 0   0 |    SN     |   IP-ID   |
      +---+---+---+---+---+---+---+---+
        
      +---+---+---+---+---+---+---+---+
      | 0   0 |    SN     |   IP-ID   |
      +---+---+---+---+---+---+---+---+
        

Extension 1:

扩展1:

      +---+---+---+---+---+---+---+---+
      | 0   1 |    SN     |   IP-ID   |
      +---+---+---+---+---+---+---+---+
      |             IP-ID             |
      +---+---+---+---+---+---+---+---+
        
      +---+---+---+---+---+---+---+---+
      | 0   1 |    SN     |   IP-ID   |
      +---+---+---+---+---+---+---+---+
      |             IP-ID             |
      +---+---+---+---+---+---+---+---+
        

Extension 2:

扩展2:

      +---+---+---+---+---+---+---+---+
      | 1   0 |    SN     |   IP-ID2  |
      +---+---+---+---+---+---+---+---+
      |            IP-ID2             |
      +---+---+---+---+---+---+---+---+
      |             IP-ID             |
      +---+---+---+---+---+---+---+---+
        
      +---+---+---+---+---+---+---+---+
      | 1   0 |    SN     |   IP-ID2  |
      +---+---+---+---+---+---+---+---+
      |            IP-ID2             |
      +---+---+---+---+---+---+---+---+
      |             IP-ID             |
      +---+---+---+---+---+---+---+---+
        

IP-ID2: For outer IP-ID field.

IP-ID2:用于外部IP-ID字段。

Extension 3 is the same as Extension 3 in section 5.7.5, with the following exceptions.

扩展3与第5.7.5节中的扩展3相同,但以下情况除外。

1) The initial flag octet has the following format:

1) 初始标志八位字节的格式如下:

         0     1     2     3     4     5     6     7
      +-----+-----+-----+-----+-----+-----+-----+-----+
      |  1     1  |  S  |   Mode    |  I  | ip  | ip2 |
      +-----+-----+-----+-----+-----+-----+-----+-----+
        
         0     1     2     3     4     5     6     7
      +-----+-----+-----+-----+-----+-----+-----+-----+
      |  1     1  |  S  |   Mode    |  I  | ip  | ip2 |
      +-----+-----+-----+-----+-----+-----+-----+-----+
        

Mode: Replaces R-TS and Tsc of 5.7.5. Provides mode information as was earlier done in RTP header flags and fields.

模式:取代5.7.5中的R-TS和Tsc。与前面在RTP头标志和字段中所做的一样,提供模式信息。

ip2: Replaces rtp bit of 5.7.5. Moved here from the Inner IP header flags octet.

ip2:替换5.7.5的rtp位。从内部IP头标志八位字节移到这里。

2) The bit which was the ip2 flag in the Inner IP header flags in 5.7.5 is reserved. It is set to zero when sending and ignored when receiving.

2) 保留5.7.5中内部IP头标志中的ip2标志位。发送时设置为零,接收时忽略。

5.11.5. IP-ID
5.11.5. IP-ID

Treated as in ROHC RTP, but the offset is from UDP SN.

在ROHC RTP中处理,但偏移量来自UDP SN。

5.11.6. Feedback
5.11.6. 反馈

Feedback is as for ROHC RTP with the following exceptions:

反馈与ROHC RTP相同,但以下情况除外:

1) UDP SN replaces RTP SN in feedback. 2) The CLOCK option (5.7.6.6) is not used. 3) The JITTER option (5.7.6.7) is not used.

1) UDP序列号替换反馈中的RTP序列号。2) 未使用时钟选项(5.7.6.6)。3) 未使用抖动选项(5.7.6.7)。

5.12. ROHC ESP -- ESP/IP compression (Profile 0x0003)
5.12. ROHC ESP——ESP/IP压缩(配置文件0x0003)

When the ESP header is being used with an encryption algorithm other than NULL, subheaders after the ESP header are encrypted and cannot be compressed. Profile 0x0003 is for compression of the chain of headers up to and including the ESP header in this case. When the NULL encryption algorithm is being used, other profiles can be used and could give higher compression rates. See section 5.8.4.3.

当ESP标头与非NULL的加密算法一起使用时,ESP标头后的子标头将被加密且无法压缩。在这种情况下,配置文件0x0003用于压缩标题链,包括ESP标题。当使用空加密算法时,可以使用其他配置文件并提供更高的压缩率。见第5.8.4.3节。

This profile is very similar to the ROHC UDP profile. It uses the ESP sequence number as the basis for compression instead of a generated number, but is otherwise very similar to ROHC UDP. The interpretation interval (value of p) for the ESP-based SN is as with ROHC RTP (profile 0x0001). Apart from this, unless stated explicitly below, mechanisms and formats are as for ROHC UDP.

此配置文件与ROHC UDP配置文件非常相似。它使用ESP序列号作为压缩的基础,而不是生成的数字,但在其他方面与ROHC UDP非常相似。基于ESP的序列号的解释间隔(p值)与ROHC RTP(剖面0x0001)相同。除此之外,除非下面明确说明,否则机制和格式与ROHC UDP相同。

5.12.1. Initialization
5.12.1. 初始化

The static context for ROHC ESP streams can be initialized in either of two ways:

ROHC ESP流的静态上下文可以通过以下两种方式之一进行初始化:

1) by using an IR packet as in section 5.7.7.1, where the profile is three (3) and the static chain ends with the static part of an ESP header.

1) 通过使用第5.7.7.1节中的IR数据包,其中配置文件为三(3),静态链以ESP报头的静态部分结束。

2) by reusing an existing context, where the existing static chain contains the static part of an ESP header. This is done with an IR-DYN packet (section 5.7.7.2) identifying profile 0x0003, where the dynamic chain corresponds to the prefix of the existing static chain that ends with the ESP header.

2) 通过重用现有上下文,其中现有静态链包含ESP头的静态部分。这是通过识别配置文件0x0003的IR-DYN数据包(第5.7.7.2节)完成的,其中动态链对应于以ESP报头结尾的现有静态链的前缀。

In contrast to ROHC UDP, no extra sequence number is added to the dynamic part of the ESP header: the ESP sequence number is the only element.

与ROHC UDP不同,ESP头的动态部分没有添加额外的序列号:ESP序列号是唯一的元素。

Note: 2) can be used for streams where compression has been initiated under the assumption that NULL encryption was being used with ESP. When it becomes obvious that an encryption algorithm other than NULL is being used, the compressor may send an IR-DYN according to 2) to switch to profile 0x0003 without having to send an IR packet.

注:2)可用于在假设ESP使用空加密的情况下启动压缩的流。当明显使用非空加密算法时,压缩器可根据2)发送IR-DYN以切换到配置文件0x0003,而无需发送IR数据包。

5.12.2. Packet types
5.12.2. 数据包类型

The packet types for ROHC ESP are the same as for ROHC UDP, except that the ESP sequence number is used instead of the generated sequence number of ROHC UDP. The ESP header is not part of any compressed list in ROHC ESP.

ROHC ESP的数据包类型与ROHC UDP的数据包类型相同,只是使用ESP序列号而不是生成的ROHC UDP序列号。ESP标题不是ROHC ESP中任何压缩列表的一部分。

6. Implementation issues
6. 执行问题

This document specifies mechanisms for the protocol and leaves many details on the use of these mechanisms to the implementers. This chapter is aimed to give guidelines, ideas and suggestions for implementing the scheme.

本文档指定了协议的机制,并将这些机制的使用细节留给实现者。本章旨在为实施该计划提供指导方针、想法和建议。

6.1. Reverse decompression
6.1. 反向减压

This section describes an OPTIONAL decompressor operation to reduce the number of packets discarded due to an invalid context.

本节描述一个可选的解压缩操作,以减少由于无效上下文而丢弃的数据包数量。

Once a context becomes invalid (e.g., when more consecutive packet losses than expected have occurred), subsequent compressed packets cannot immediately be decompressed correctly. Reverse decompression aims at decompressing such packets later instead of discarding them, by storing them until the context has been updated and validated and then attempting decompression.

一旦上下文变得无效(例如,当连续的数据包丢失超过预期时),随后的压缩数据包就不能立即正确解压缩。反向解压缩的目的是稍后解压缩这些数据包,而不是丢弃它们,方法是将它们存储到上下文更新和验证之后,然后尝试解压缩。

Let the sequence of stored packets be i, i + 1, ..., i + k, where i is the first packet and i + k is the last packet before the context was updated. The decompressor will attempt to recover the stored packets in reverse order, i.e., starting with i + k, and working back toward i. When a stored packet has been reconstructed, its correctness is verified using its CRC. Packets not carrying a CRC

假设存储的数据包序列是i,i+1,…,i+k,其中i是第一个数据包,i+k是更新上下文之前的最后一个数据包。解压器将尝试以相反的顺序恢复存储的数据包,即从i+k开始,然后向i返回。当一个存储的数据包被重建后,它的正确性将通过CRC进行验证。不携带CRC的数据包

must not be delivered to upper layers. Packets where the CRC succeeds are delivered to upper layers in their original order, i.e., i, i + 1, ..., i + k.

不得交付至上层。CRC成功的数据包按其原始顺序(即,i,i+1,…,i+k)传送到上层。

Note that this reverse decompression introduces buffering while waiting for the context to be validated and thereby introduces additional delay. Thus, it should be used only when some amount of delay is acceptable. For example, for video packets belonging to the same video frame, the delay in packet arrivals does not cause presentation time delay. Delay-insensitive streaming applications can also be tolerant of such delay. If the decompressor cannot determine whether the application can tolerate delay, it should not perform reverse decompression.

请注意,这种反向解压缩在等待验证上下文时引入缓冲,从而引入额外的延迟。因此,只有在一定程度的延迟是可接受的情况下才应使用它。例如,对于属于相同视频帧的视频分组,分组到达中的延迟不会导致呈现时间延迟。对延迟不敏感的流应用程序也可以容忍这种延迟。如果解压缩程序无法确定应用程序是否可以容忍延迟,则不应执行反向解压缩。

The following illustrates the decompression procedure in some detail:

以下详细说明了解压缩过程:

1. The decompressor stores compressed packets that cannot be decompressed correctly due to an invalid context.

1. 解压缩程序存储由于无效上下文而无法正确解压缩的压缩数据包。

2. When the decompressor has received a context updating packet and the context has been validated, it proceeds to recover the last packet stored. After decompression, the decompressor checks the correctness of the reconstructed header using the CRC.

2. 当解压器接收到上下文更新数据包并且上下文已被验证时,它继续恢复存储的最后一个数据包。解压后,解压器使用CRC检查重构报头的正确性。

3. If the CRC indicates successful decompression, the decompressor stores the complete packet and attempts to decompress the preceding packet. In this way, the stored packets are recovered in reverse order until no compressed packets are left. For each packet, the decompressor checks the correctness of the decompressed headers using the header compression CRC.

3. 如果CRC指示解压缩成功,则解压缩器存储完整的数据包并尝试解压缩前面的数据包。通过这种方式,存储的数据包以相反的顺序恢复,直到没有压缩数据包留下。对于每个数据包,解压缩器使用报头压缩CRC检查解压缩报头的正确性。

4. If the CRC indicates an incorrectly decompressed packet, the reverse decompression attempt MUST be terminated and all remaining uncompressed packets MUST be discarded.

4. 如果CRC指示未正确解压缩的数据包,则必须终止反向解压缩尝试,并且必须丢弃所有剩余的未压缩数据包。

5. Finally, the decompressor forwards all the correctly decompressed packets to upper layers in their original order.

5. 最后,解压器将所有正确解压的数据包按原始顺序转发给上层。

6.2. RTCP
6.2. RTCP

RTCP is the RTP Control Protocol [RTP]. RTCP is based on periodic transmission of control packets to all participants in a session, using the same distribution mechanism as for data packets. Its primary function is to provide feedback from the data receivers on the quality of the data distribution. The feedback information may be used for issues related to congestion control functions, and directly useful for control of adaptive encodings.

RTCP是RTP控制协议[RTP]。RTCP基于定期向会话中的所有参与者传输控制数据包,使用与数据包相同的分发机制。其主要功能是提供数据接收器对数据分发质量的反馈。反馈信息可用于与拥塞控制功能相关的问题,并可直接用于自适应编码的控制。

In an RTP session there will be two types of packet streams: one with the RTP header and application data, and one with the RTCP control information. The difference between the streams at the transport level is in the UDP port numbers: the RTP port number is always even, the RTCP port number is that number plus one and therefore always odd [RTP, section 10]. The ROHC header compressor implementation has several ways at hand to handle the RTCP stream:

在RTP会话中,将有两种类型的数据包流:一种具有RTP头和应用程序数据,另一种具有RTCP控制信息。传输级别的流之间的差异在于UDP端口号:RTP端口号始终为偶数,RTCP端口号为该数字加1,因此始终为奇数[RTP,第10节]。ROHC报头压缩器实现有几种处理RTCP流的方法:

1. One compressor/decompressor entity carrying both types of streams on the same channel, using CIDs to distinguish between them. For sending a single RTP stream together with its RTCP packets on one channel, it is most efficient to set LARGE_CIDS to false, send the RTP packets with the implied CID 0 and use the Add-CID mechanism to send the RTCP packets.

1. 一个压缩机/解压缩器实体,在同一通道上承载两种类型的流,使用CID区分它们。对于在一个通道上发送单个RTP流及其RTCP数据包,最有效的方法是将大型_CID设置为false,使用隐含的CID 0发送RTP数据包,并使用添加CID机制发送RTCP数据包。

2. Two compressor/decompressor entities, one for RTP and another one for RTCP, carrying the two types of streams on separate channels. This means that they will not share the same CID number space.

2. 两个压缩/解压缩器实体,一个用于RTP,另一个用于RTCP,在单独的通道上承载两种类型的流。这意味着它们将不共享相同的CID编号空间。

RTCP headers may simply be sent uncompressed using profile 0x0000. More efficiently, ROHC UDP compression (profile 0x0002) can be used.

RTCP头可以使用配置文件0x0000以未压缩的方式发送。更有效地,可以使用ROHC UDP压缩(配置文件0x0002)。

6.3. Implementation parameters and signals
6.3. 实现参数和信号

A ROHC implementation may have two kinds of parameters: configuration parameters that are mandatory and must be negotiated between compressor and decompressor peers, and implementation parameters that are optional and, when used, stipulate how a ROHC implementation is to operate.

ROHC实现可能有两种类型的参数:配置参数是强制性的,必须在压缩器和解压缩器对等方之间协商;实现参数是可选的,在使用时规定ROHC实现的操作方式。

Configuration parameters are mandatory and must be negotiated between compressor and decompressor, so that they have the same values at both compressor and decompressor, see section 5.1.1.

配置参数是强制性的,必须在压缩机和减压器之间协商,以便它们在压缩机和减压器上具有相同的值,见第5.1.1节。

Implementation parameters make it possible for an external entity to stipulate how an implementation of a ROHC compressor or decompressor should operate. Implementation parameters have local significance, are optional to use and are thus not necessary to negotiate between compressor and decompressor. Note that this does not preclude signaling or negotiating implementation parameters using lower layer functionality in order to set the way a ROHC implementation should operate. Some implementation parameters are valid only at either of compressor or decompressor. Implementation parameters may further be divided into parameters that allow an external entity to describe the way the implementation should operate and parameters that allow an external entity to trigger a specific event, i.e., signals.

实现参数使外部实体能够规定ROHC压缩机或解压缩器的实现应如何运行。实现参数具有局部意义,可选择使用,因此无需在压缩机和解压缩器之间协商。请注意,这并不排除使用较低层功能发送信号或协商实现参数,以便设置ROHC实现的操作方式。某些实现参数仅在压缩器或解压缩器中的任何一个上有效。实现参数还可分为允许外部实体描述实现应操作方式的参数和允许外部实体触发特定事件(即信号)的参数。

6.3.1. ROHC implementation parameters at compressor
6.3.1. 压缩机的ROHC实施参数

CONTEXT_REINITIALIZATION -- signal This parameter triggers a reinitialization of the entire context at the decompressor, both the static and the dynamic part. The compressor MUST, when CONTEXT_REINITIALIZATION is triggered, back off to the IR state and fully reinitialize the context by sending IR packets with both the static and dynamic chains covering the entire uncompressed headers until it is reasonably confident that the decompressor contexts are reinitialized. The context reinitialization MUST be done for all contexts at the compressor. This parameter may for instance be used to do context relocation at, e.g., a cellular handover that results in a change of compression point in the radio access network.

CONTEXT_REINITIALIZATION——表示此参数在解压器处触发整个上下文的重新初始化,包括静态和动态部分。当触发CONTEXT_重新初始化时,压缩器必须返回到IR状态,并通过发送IR数据包(静态和动态链覆盖整个未压缩的头)完全重新初始化上下文,直到它合理地确信解压器上下文已重新初始化。必须对压缩器上的所有上下文进行上下文重新初始化。例如,该参数可用于在导致无线接入网络中的压缩点的改变的蜂窝切换处进行上下文重定位。

NO_OF_PACKET_SIZES_ALLOWED -- value: positive integer This parameter may be set by an external entity to specify the number of packet sizes a ROHC implementation may use. However, the parameter may be used only if PACKET_SIZES is not used by an external entity. With this parameter set, the ROHC implementation at the compressor MUST NOT use more different packet sizes than the value this parameter stipulates. The ROHC implementation must itself be able to determine which packet sizes will be used and describe these to an external entity using PACKET_SIZES_USED. It should be noted that one packet size might be used for several header formats, and that the number of packet sizes can be reduced by employing padding and segmentation.

不允许\u数据包\u大小\u——值:正整数此参数可由外部实体设置,以指定ROHC实现可能使用的数据包大小数。但是,仅当外部实体未使用数据包大小时,才可以使用该参数。设置此参数后,压缩机上的ROHC实施不得使用超过此参数规定值的不同数据包大小。ROHC实现本身必须能够确定将使用哪些数据包大小,并使用数据包大小向外部实体描述这些数据包大小。应该注意的是,一个数据包大小可以用于多种报头格式,并且可以通过使用填充和分段来减少数据包大小的数量。

NO_OF_PACKET_SIZES_USED _- value: positive integer This parameter is set by the ROHC implementation to indicate how many packet sizes it will actually use. It can be set to a large value to indicate that no particular attempt is made to minimize that number.

NO_OF_PACKET_size_USED u值:正整数此参数由ROHC实现设置,以指示实际使用的数据包大小。可以将其设置为一个较大的值,以指示未进行任何特定尝试来最小化该数字。

PACKET_SIZES_ALLOWED -- value: list of positive integers (bytes) This parameter, if set, governs which packet sizes in bytes may be used by the ROHC implementation. Thus, packet sizes not in the set of values for this parameter MUST NOT be used. Hence, an external entity can mandate a ROHC implementation to produce packet sizes that fit pre-configured lower layers better. If this parameter is used to stipulate which packet sizes a ROHC implementation can use, the following rules apply:

PACKET_size_ALLOWED--value:正整数(字节)列表此参数(如果设置)控制ROHC实现可以使用哪些字节大小的数据包。因此,不能使用不在此参数值集中的数据包大小。因此,外部实体可以强制ROHC实现生成更适合预先配置的较低层的数据包大小。如果此参数用于规定ROHC实现可以使用的数据包大小,则以下规则适用:

- A packet large enough to hold the entire IR header (both static and dynamic chain) MUST be part of the set of sizes, unless MRRU is set to a large enough value to allow segmentation. - The packet size likely to be used most frequently in the SO state SHOULD be part of the set.

- 一个足以容纳整个IR报头(静态和动态链)的数据包必须是大小集的一部分,除非MRRU设置为足够大的值以允许分段。-在SO状态下最常使用的数据包大小应该是集合的一部分。

- The packet size likely to be used most frequently in the FO state SHOULD be part of the set.

- 在FO状态下最经常使用的数据包大小应该是集合的一部分。

PACKET_SIZES_USED -- values: set of positive integers (bytes) This parameter describes which packet sizes a ROHC implementation uses if NO_OF_PACKET_SIZES_ALLOWED or PACKET_SIZES_ALLOWED is used by an external entity to stipulate how many packet sizes a ROHC implementation should use. The information about used packet sizes (bytes) in this parameter, may then be used to configure lower layers.

PACKET_SIZES_USED——值:正整数(字节)集此参数描述了如果外部实体未使用允许的或允许的数据包大小来规定ROHC实现应使用的数据包大小,ROHC实现将使用哪些数据包大小。该参数中有关已用数据包大小(字节)的信息可用于配置较低层。

PAYLOAD_SIZES -_ values: set of positive integer values (bytes) This parameter is set by an external entity that wants to make use of the PACKET_SIZES_USED parameter to indicate which payload sizes can be expected.

PAYLOAD_SIZES-_values:正整数值集(字节)此参数由希望使用数据包_SIZES_USED参数来指示预期有效负载大小的外部实体设置。

When a ROHC implementation has a limited set of allowed packet sizes, and the most preferable header format has a size that is not part of the set, it has the following options:

当ROHC实现具有一组有限的允许数据包大小,并且最优选的报头格式具有不属于该组的大小时,它具有以下选项:

- Choose the next larger header format from the allowed set. This is probably the most efficient choice. - Use the most preferable header format as if there were no restrictions on size, and then add padding octets to complete a packet of the next larger size in the allowed set. - Use segmentation to fragment the packet into pieces that would make up packets of sizes that are permissible (possibly after the addition of padding to the last segment).

- 从允许的集合中选择下一个较大的标题格式。这可能是最有效的选择使用最好的头格式,就好像大小没有限制一样,然后添加填充八位字节,以完成允许集中下一个较大的数据包。-使用分段将数据包分割成若干段,这些段将构成允许大小的数据包(可能在最后一段添加填充后)。

It should be noted that even if the two last parameters introduce the possibility of restricting the number of packet sizes used, such restrictions will have a negative impact on compression performance.

应该注意的是,即使最后两个参数引入了限制所使用的数据包大小数量的可能性,这种限制也会对压缩性能产生负面影响。

6.3.2. ROHC implementation parameters at decompressor
6.3.2. 解压器上的ROHC实现参数

MODE -- values: [U-mode, O-mode, R-mode] This parameter triggers a mode transition using the mechanism described in chapter 5 when the parameter changes value, i.e., to U-mode (Unidirectional mode), O-mode (Bidirectional Optimistic mode) or R-mode (Bidirectional Reliable mode). The mode transition is made from the current mode to the new mode as signaled by the implementation parameter. For example, if the current mode is Bidirectional Optimistic mode, MODE should have the value O-mode. If the MODE is changed to R-mode, a mode transition MUST be made from Bidirectional Optimistic mode to Bidirectional Reliable mode. MODE should not only serve as a trigger for mode transitions, but also make it visible which mode ROHC operates in.

MODE--值:[U-MODE,O-MODE,R-MODE]当参数改变值时,该参数使用第5章中描述的机制触发模式转换,即U-MODE(单向模式)、O-MODE(双向乐观模式)或R-MODE(双向可靠模式)。根据执行参数的信号,从当前模式转换到新模式。例如,如果当前模式为双向乐观模式,则模式应具有值O-mode。如果模式更改为R模式,则必须从双向乐观模式转换为双向可靠模式。模式不仅应作为模式转换的触发器,还应使ROHC在哪种模式下运行可见。

CLOCK_RESOLUTION -- value: nonnegative integer This parameter indicates the system clock resolution in units of milliseconds. A zero (0) value means that there is no clock available. If nonzero, this parameter allows the decompressor to use timer-based TS compression (section 4.5.4) and SN wraparound detection (section 5.3.2.2.4). In this case, its specific value is also significant for correctness of the algorithms.

CLOCK_RESOLUTION——值:非负整数此参数以毫秒为单位指示系统时钟分辨率。零(0)值表示没有可用的时钟。如果非零,此参数允许解压器使用基于定时器的TS压缩(第4.5.4节)和SN环绕检测(第5.3.2.2.4节)。在这种情况下,其特定值对算法的正确性也很重要。

REVERSE_DECOMPRESSION_DEPTH -- value: nonnegative integer This parameter determines whether reverse decompression as described in section 6.1 should be used or not, and if used, to what extent. The value indicates the maximum number of packets that can be buffered, and thus possibly be reverse decompressed by the decompressor. A zero (0) value means that reverse decompression MUST NOT be used.

反向解压深度——值:非负整数此参数确定是否应使用第6.1节中所述的反向解压,以及如果使用,应达到何种程度。该值表示可以缓冲的最大数据包数,因此可能由解压器反向解压。零(0)值表示不得使用反向解压缩。

6.4. Handling of resource limitations at the decompressor
6.4. 在解压器上处理资源限制

In a point-to-point link, the two nodes can agree on the number of compressed sessions they are prepared to support for this link. It may, however, not be possible for the decompressor to accurately predict when it will run out of resources. ROHC allows the negotiated number of contexts to be larger than could be accommodated in the worst case. Then, as context resources are consumed, an attempt to set up a new context may be rejected by the decompressor, using the REJECT option of the feedback payload.

在点到点链路中,两个节点可以就准备支持该链路的压缩会话数量达成一致。但是,解压器可能无法准确预测何时会耗尽资源。ROHC允许协商的上下文数量大于最坏情况下所能容纳的数量。然后,随着上下文资源的消耗,使用反馈有效负载的拒绝选项,解压器可以拒绝建立新上下文的尝试。

Upon reception of a REJECT option, the compressor SHOULD wait for a while before attempting to compress additional streams destined for the rejecting node.

接收到拒绝选项后,压缩器应等待一段时间,然后再尝试压缩发送给拒绝节点的附加流。

6.5. Implementation structures
6.5. 实施结构

This section provides some explanatory material on data structures that a ROHC implementation will have to maintain in one form or another. It is not intended to constrain the implementations.

本节提供了一些关于ROHC实现必须以某种形式维护的数据结构的说明材料。它不是为了约束实现。

6.5.1. Compressor context
6.5.1. 压缩器上下文

The compressor context consists of a static part and a dynamic part. The content of the static part is the same as the static chain defined in section 5.7.7. The dynamic part consists of multiple elements which can be categorized into four types.

压缩程序上下文由静态部分和动态部分组成。静态部分的内容与第5.7.7节中定义的静态链相同。动态部分由多个元素组成,可分为四种类型。

a) Sliding Window (SW) b) Translation Table (TT) c) Flag d) Field

a) 滑动窗口(SW)b)翻译表(TT)c)标志d)字段

These elements may be common to all modes or mode specific. The following table summarizes all these elements.

这些元素可能是所有模式或特定模式的共同元素。下表总结了所有这些要素。

   +--------+---------------------------+-------------+----------------+
   |        |         Common to         | Specific to |  Specific to   |
   |        |         all modes         |   R-mode    |    U/O-mode    |
   +--------+---------------------------+-------------+----------------+
   | SWs    | GSW                       | R_CSW       | UO_CSW         |
   |        |                           | R_IESW      | UO_IESW        |
   +--------+---------------------------+-------------+----------------+
   | TTs    |                           | R_CTT       | UO_CTT         |
   |        |                           | R_IETT      | UO_IETT        |
   +--------+---------------------------+-------------+----------------+
   | Flags  | UDP Chksum                |             | ACKED          |
   |        | TSS, TIS                  |             |                |
   |        | RND, RND2                 |             |                |
   |        | NBO, NBO2                 |             |                |
   +--------+---------------------------+-------------+----------------+
   | Fields | Profile                   |             | CSRC_REF_ID    |
   |        | C_MODE                    |             | CSRC_GEN_ID    |
   |        | C_STATE                   |             | CSRC_GEN_COUNT |
   |        | C_TRANS                   |             | IPEH_REF_ID    |
   |        | TS_STRIDE (if TSS = 1)    |             | IPEH_GEN_ID    |
   |        | TS_OFFSET (if TSS = 1)    |             | IPEH_GEN_COUNT |
   |        | TIME_STRIDE (if TIS = 1)  |             |                |
   |        | CURR_TIME (if TIS = 1)    |             |                |
   |        | MAX_JITTER_CD (if TIS = 1)|             |                |
   |        | LONGEST_LOSS_EVENT(O)     |             |                |
   |        | CLOCK_RESOLUTION(O)       |             |                |
   |        | MAX_JITTER(O)             |             |                |
   +--------+---------------------------+-------------+----------------+
        
   +--------+---------------------------+-------------+----------------+
   |        |         Common to         | Specific to |  Specific to   |
   |        |         all modes         |   R-mode    |    U/O-mode    |
   +--------+---------------------------+-------------+----------------+
   | SWs    | GSW                       | R_CSW       | UO_CSW         |
   |        |                           | R_IESW      | UO_IESW        |
   +--------+---------------------------+-------------+----------------+
   | TTs    |                           | R_CTT       | UO_CTT         |
   |        |                           | R_IETT      | UO_IETT        |
   +--------+---------------------------+-------------+----------------+
   | Flags  | UDP Chksum                |             | ACKED          |
   |        | TSS, TIS                  |             |                |
   |        | RND, RND2                 |             |                |
   |        | NBO, NBO2                 |             |                |
   +--------+---------------------------+-------------+----------------+
   | Fields | Profile                   |             | CSRC_REF_ID    |
   |        | C_MODE                    |             | CSRC_GEN_ID    |
   |        | C_STATE                   |             | CSRC_GEN_COUNT |
   |        | C_TRANS                   |             | IPEH_REF_ID    |
   |        | TS_STRIDE (if TSS = 1)    |             | IPEH_GEN_ID    |
   |        | TS_OFFSET (if TSS = 1)    |             | IPEH_GEN_COUNT |
   |        | TIME_STRIDE (if TIS = 1)  |             |                |
   |        | CURR_TIME (if TIS = 1)    |             |                |
   |        | MAX_JITTER_CD (if TIS = 1)|             |                |
   |        | LONGEST_LOSS_EVENT(O)     |             |                |
   |        | CLOCK_RESOLUTION(O)       |             |                |
   |        | MAX_JITTER(O)             |             |                |
   +--------+---------------------------+-------------+----------------+
        

1) GSW: Generic W_LSB Sliding Window

1) GSW:通用W_LSB滑动窗口

Each element in GSW consists of all the dynamic fields in the dynamic chain (defined in section 5.7.7) plus the fields specified in a) but excluding the fields specified in b).

GSW中的每个元素包括动态链中的所有动态字段(定义见第5.7.7节)加上a)中规定的字段,但不包括b)中规定的字段。

a) Packet Arrival Time (if TIS = 1) Scaled RTP Time Stamp (if TSS = 1) (optional) Offset_i (if RND = 0) (optional)

a) 数据包到达时间(如果TIS=1)缩放RTP时间戳(如果TSS=1)(可选)偏移量_i(如果RND=0)(可选)

b) UDP Checksum, TS Stride, CSRC list, IPv6 Extension Headers

b) UDP校验和、TS跨步、CSC列表、IPv6扩展头

2) R_CSW: CSRC Sliding Window in R-mode

2) R_CSW:R模式下的CSRC滑动窗口

R_IESW: IPv6 Extension Header Sliding Window in R-mode

R_IESW:R模式下的IPv6扩展头滑动窗口

UO_CSW: CSRC Sliding Window in U/O-mode

UO_CSW:U/O模式下的CSC滑动窗口

UO_IESW: IPv6 Extension Header Sliding Window in U/O-mode

UO_IESW:U/O模式下的IPv6扩展标头滑动窗口

Each element in R_CSW, R_IESW, UO_CSW and UO_IESW is defined in section 6.5.3.

第6.5.3节对R_CSW、R_IESW、UO_CSW和UO_IESW中的每个元素进行了定义。

3) R_CTT: CSRC Translation Table in R-mode

3) R_CTT:R模式下的中国证监会翻译表

R_IETT: IPv6 Extension Header Translation Table in U/O-mode

R_IETT:U/O模式下的IPv6扩展头转换表

UO_CTT: CSRC Translation Table in U/O-mode

UO_CTT:U/O模式下的中国证监会翻译表

UO_IETT: IPv6 Extension Header Translation Table in U/O-mode

UO_IETT:U/O模式下的IPv6扩展头转换表

Each element in R_CTT and R_IETT is defined in section 5.8.1.1. Each element in UO_CTT and UO_IETT is defined in section 5.8.1.2.

R_CTT和R_IETT中的每个元素在第5.8.1.1节中定义。UO_CTT和UO_IETT中的每个元素在第5.8.1.2节中定义。

4) ACKED: Indicates whether or not the decompressor has ever acked

4) 已确认:指示解压缩程序是否已确认

5) CURR_TIME: The current time value (used for context relocation when timer-based timestamp compression is used)

5) CURR_TIME:当前时间值(使用基于计时器的时间戳压缩时用于上下文重新定位)

6) All the other flags and fields are defined elsewhere in the ROHC document.

6) 所有其他标志和字段在ROHC文档的其他地方定义。

6.5.2. Decompressor context
6.5.2. 解压上下文

The decompressor context consists of a static part and a dynamic part. The content of the static part is the same as the static chain defined in section 5.7.7. The dynamic part consists of multiple elements, one of which is the nonstatic reference header that includes all the nonstatic fields. These nonstatic fields are the fields in the dynamic chain defined in section 5.7.7, excluding UDP Checksum and TS_Stride. All the remaining elements can be categorized into four types:

解压器上下文由静态部分和动态部分组成。静态部分的内容与第5.7.7节中定义的静态链相同。动态部分由多个元素组成,其中一个元素是包含所有非静态字段的非静态引用标头。这些非静态字段是第5.7.7节中定义的动态链中的字段,不包括UDP校验和和TS_步长。所有剩余元素可分为四种类型:

a) Sliding Window (SW) b) Translation Table (TT) d) Flag e) Field

a) 滑动窗口(SW)b)翻译表(TT)d)标志e)字段

These elements may be mode specific or common to all modes. The following table summarizes all these elements.

这些元件可能是特定于模式的,也可能是所有模式共有的。下表总结了所有这些要素。

   +--------+---------------------------+-------------+----------------+
   |        |       Common to           | Specific to |   Specific to  |
   |        |       all modes           |    R-mode   |     U/O-mode   |
   +--------+---------------------------+-------------+----------------+
   | SWs    |                           | R_CSW       | UO_CSW         |
   |        |                           | R_IESW      | UO_IESW        |
   +--------+---------------------------+-------------+----------------+
   | TTs    |                           | R_CTT       | UO_CTT         |
   |        |                           | R_IETT      | UO_IETT        |
   +--------+---------------------------+-------------+----------------+
   | Flags  | UDP Checksum              |             | ACKED          |
   |        | TSS, TIS                  |             |                |
   |        | RND, RND2                 |             |                |
   |        | NBO, NBO2                 |             |                |
   +--------+---------------------------+-------------+----------------+
   | Fields | Profile                   |             | CSRC_GEN_ID    |
   |        | D_MODE                    |             | IPEH_GEN_ID    |
   |        | D_STATE                   |             | PRE_SN_V_REF   |
   |        | D_TRANS                   |             |                |
   |        | TS_STRIDE (if TSS = 1)    |             |                |
   |        | TS_OFFSET (if TSS = 1)    |             |                |
   |        | TIME_STRIDE (if TIS = 1)  |             |                |
   |        | PKT_ARR_TIME (if TIS = 1) |             |                |
   |        | LONGEST_LOSS_EVENT(O)     |             |                |
   |        | CLOCK_RESOLUTION(O)       |             |                |
   |        | MAX_JITTER(O)             |             |                |
   +--------+---------------------------+-------------+----------------+
        
   +--------+---------------------------+-------------+----------------+
   |        |       Common to           | Specific to |   Specific to  |
   |        |       all modes           |    R-mode   |     U/O-mode   |
   +--------+---------------------------+-------------+----------------+
   | SWs    |                           | R_CSW       | UO_CSW         |
   |        |                           | R_IESW      | UO_IESW        |
   +--------+---------------------------+-------------+----------------+
   | TTs    |                           | R_CTT       | UO_CTT         |
   |        |                           | R_IETT      | UO_IETT        |
   +--------+---------------------------+-------------+----------------+
   | Flags  | UDP Checksum              |             | ACKED          |
   |        | TSS, TIS                  |             |                |
   |        | RND, RND2                 |             |                |
   |        | NBO, NBO2                 |             |                |
   +--------+---------------------------+-------------+----------------+
   | Fields | Profile                   |             | CSRC_GEN_ID    |
   |        | D_MODE                    |             | IPEH_GEN_ID    |
   |        | D_STATE                   |             | PRE_SN_V_REF   |
   |        | D_TRANS                   |             |                |
   |        | TS_STRIDE (if TSS = 1)    |             |                |
   |        | TS_OFFSET (if TSS = 1)    |             |                |
   |        | TIME_STRIDE (if TIS = 1)  |             |                |
   |        | PKT_ARR_TIME (if TIS = 1) |             |                |
   |        | LONGEST_LOSS_EVENT(O)     |             |                |
   |        | CLOCK_RESOLUTION(O)       |             |                |
   |        | MAX_JITTER(O)             |             |                |
   +--------+---------------------------+-------------+----------------+
        

1) ACKED: Indicates whether or not ACK has ever been sent.

1) 确认:表示是否发送过确认。

2) PKT_ARR_TIME: The arrival time of the packet that most recently decompressed and verified using CRC.

2) PKT_ARR_TIME:最近使用CRC解压缩和验证的数据包的到达时间。

PRE_SN_V_REF: The sequence number of the packet verified before the most recently verified packet.

PRE_SN_V_REF:在最近验证的数据包之前验证的数据包的序列号。

CSRC_GEN_ID: The CSRC gen_id of the most recently received packet.

CSRC_GEN_ID:最近接收的数据包的CSRC GEN_ID。

IPEH_GEN_ID: The IPv6 Extension Header gen_id of the most recently received packet.

IPEH_GEN_ID:最近接收的数据包的IPv6扩展头GEN_ID。

3) The remaining elements are as defined in the compressor context.

3) 其余元素如压缩器上下文中所定义。

6.5.3. List compression: Sliding windows in R-mode and U/O-mode
6.5.3. 列表压缩:R模式和U/O模式下的滑动窗口

In R-mode list compression (see section 5.8.2.1), each entry in the sliding window, both at the compressor side and at the decompressor side, has the following structure:

在R模式列表压缩(见第5.8.2.1节)中,滑动窗口中的每个条目(压缩机侧和减压器侧)具有以下结构:

   +---------------------+--------+------------+
   | RTP Sequence Number | icount | index list |
   +---------------------+--------+------------+
        
   +---------------------+--------+------------+
   | RTP Sequence Number | icount | index list |
   +---------------------+--------+------------+
        

The table index list contains a list of index. Each of these index corresponds to the item in the original list carried in the packet identified by the RTP Sequence Number. The mapping between the index and the item is identified in the translation table. The icount field carries the number of index in the following index list.

表索引列表包含一个索引列表。这些索引中的每一个都对应于由RTP序列号标识的数据包中携带的原始列表中的项目。索引和项之间的映射在翻译表中标识。icount字段包含以下索引列表中的索引编号。

In U/O-mode list compression, each entry in the sliding window at both the compressor side and decompressor side has the following structure.

在U/O模式列表压缩中,压缩机侧和解压缩器侧的滑动窗口中的每个条目都具有以下结构。

   +--------+--------+------------+
   | Gen_id | icount | index list |
   +--------+--------+------------+
        
   +--------+--------+------------+
   | Gen_id | icount | index list |
   +--------+--------+------------+
        

The icount and index list fields are the same as defined in R-mode. Instead of using the RTP Sequence Number to identify each entry, the Gen_id is included in the sliding window in U/O-mode.

icount和index list字段与R模式中定义的相同。在U/O模式下,滑动窗口中包含Gen_id,而不是使用RTP序列号来标识每个条目。

7. Security Considerations
7. 安全考虑

Because encryption eliminates the redundancy that header compression schemes try to exploit, there is some inducement to forego encryption of headers in order to enable operation over low-bandwidth links. However, for those cases where encryption of data (and not headers) is sufficient, RTP does specify an alternative encryption method in which only the RTP payload is encrypted and the headers are left in the clear. That would still allow header compression to be applied.

由于加密消除了报头压缩方案试图利用的冗余,因此有一些诱因导致放弃报头加密,以便能够在低带宽链路上进行操作。然而,对于那些数据加密(而不是报头)足够的情况,RTP确实指定了一种替代的加密方法,在这种方法中,只有RTP有效负载被加密,而报头被清除。这仍然允许应用头压缩。

ROHC compression is transparent with regard to the RTP Sequence Number and RTP Timestamp fields, so the values of those fields can be used as the basis of payload encryption schemes (e.g., for computation of an initialization vector).

ROHC压缩对于RTP序列号和RTP时间戳字段是透明的,因此这些字段的值可以用作有效载荷加密方案的基础(例如,用于计算初始化向量)。

A malfunctioning or malicious header compressor could cause the header decompressor to reconstitute packets that do not match the original packets but still have valid IP, UDP and RTP headers and possibly also valid UDP checksums. Such corruption may be detected with end-to-end authentication and integrity mechanisms which will not be affected by the compression. Moreover, this header compression scheme uses an internal checksum for verification of reconstructed headers. This reduces the probability of producing decompressed headers not matching the original ones without this being noticed.

出现故障或恶意的报头压缩程序可能会导致报头解压缩程序重新生成与原始数据包不匹配但仍具有有效IP、UDP和RTP报头以及可能的有效UDP校验和的数据包。这种损坏可以通过端到端身份验证和完整性机制进行检测,而不会受到压缩的影响。此外,此报头压缩方案使用内部校验和来验证重建的报头。这降低了在没有注意到这一点的情况下生成与原始头不匹配的解压缩头的可能性。

Denial-of-service attacks are possible if an intruder can introduce (for example) bogus STATIC, DYNAMIC or FEEDBACK packets onto the link and thereby cause compression efficiency to be reduced. However, an intruder having the ability to inject arbitrary packets at the link layer in this manner raises additional security issues that dwarf those related to the use of header compression.

如果入侵者能够在链路上引入(例如)虚假的静态、动态或反馈数据包,从而导致压缩效率降低,则可能发生拒绝服务攻击。然而,能够以这种方式在链路层注入任意数据包的入侵者会引发额外的安全问题,使与使用报头压缩相关的安全问题相形见绌。

8. IANA Considerations
8. IANA考虑

The ROHC profile identifier is a non-negative integer. In many negotiation protocols, it will be represented as a 16-bit value. Due to the way the profile identifier is abbreviated in ROHC packets, the 8 least significant bits of the profile identifier have a special significance: Two profile identifiers with identical 8 LSBs should be assigned only if the higher-numbered one is intended to supersede the lower-numbered one. To highlight this relationship, profile identifiers should be given in hexadecimal (as in 0x1234, which would for example supersede 0x0A34).

ROHC配置文件标识符为非负整数。在许多协商协议中,它将表示为16位值。由于ROHC数据包中配置文件标识符的缩写方式,配置文件标识符的8个最低有效位具有特殊意义:只有当较高编号的配置文件标识符要取代较低编号的配置文件标识符时,才应分配具有相同8个LSB的两个配置文件标识符。为了突出显示这种关系,配置文件标识符应该以十六进制形式给出(例如,0x1234将取代0x0A34)。

Following the policies outlined in [IANA-CONSIDERATIONS], the IANA policy for assigning new values for the profile identifier shall be Specification Required: values and their meanings must be documented in an RFC or in some other permanent and readily available reference, in sufficient detail that interoperability between independent implementations is possible. In the 8 LSBs, the range 0 to 127 is reserved for IETF standard-track specifications; the range 128 to 254 is available for other specifications that meet this requirement (such as Informational RFCs). The LSB value 255 is reserved for future extensibility of the present specification.

按照[IANA-注意事项]中概述的政策,应要求为配置文件标识符分配新值的IANA政策:值及其含义必须记录在RFC或其他永久性且随时可用的参考文件中,足够详细地说明独立实现之间的互操作性是可能的。在8个LSB中,0到127的范围为IETF标准轨道规范保留;128到254的范围可用于满足此要求的其他规范(如信息RFC)。LSB值255保留用于本规范的未来扩展。

The following profile identifiers are already allocated:

已分配以下配置文件标识符:

Profile Document Usage identifier

配置文件文档使用标识符

0x0000 RFCthis ROHC uncompressed 0x0001 RFCthis ROHC RTP 0x0002 RFCthis ROHC UDP 0x0003 RFCthis ROHC ESP

0x0000 RFC此ROHC未压缩0x0001 RFC此ROHC RTP 0x0002 RFC此ROHC UDP 0x0003 RFC此ROHC ESP

9. Acknowledgments
9. 致谢

Earlier header compression schemes described in [CJHC], [IPHC], and [CRTP] have been important sources of ideas and knowledge.

[CJHC]、[IPHC]和[CRTP]中描述的早期报头压缩方案是重要的思想和知识来源。

The editor would like to extend his warmest thanks to Mikael Degermark, who actually did a lot of the editing work, and Peter Eriksson, who made a copy editing pass through the document, significantly increasing its editorial consistency. Of course, all remaining editorial problems have then been inserted by the editor.

编辑谨向米凯尔·德格马克(Mikael Degermark)和彼得·埃里克森(Peter Eriksson)致以最热烈的谢意。德格马克(Mikael Degermark)实际上做了大量的编辑工作,彼得·埃里克森(Peter Eriksson)对该文件进行了副本编辑,大大提高了编辑的一致性。当然,所有剩下的编辑问题都由编辑插入。

Thanks to Andreas Jonsson (Lulea University), who supported this work by his study of header field change patterns.

感谢安德烈亚斯·琼森(卢利亚大学),他通过对头球场变化模式的研究支持了这项工作。

Finally, this work would not have succeeded without the continual advice in navigating the IETF standards track, garnished with both editorial and technical comments, from the IETF transport area directors, Allison Mankin and Scott Bradner.

最后,如果没有IETF运输区域主管Allison Mankin和Scott Bradner在IETF标准轨道上不断提供建议,并辅以编辑和技术评论,这项工作就不会成功。

10. Intellectual Property Right Claim Considerations
10. 知识产权索赔的考虑因素

The IETF has been notified of intellectual property rights claimed in regard to some or all of the specification contained in this document. For more information consult the online list of claimed rights.

IETF已收到关于本文件所含部分或全部规范的知识产权声明。有关更多信息,请查阅在线权利主张列表。

The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on the IETF's procedures with respect to rights in standards-track and standards-related documentation can be found in BCP-11. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification can be obtained from the IETF Secretariat.

IETF对可能声称与本文件所述技术的实施或使用有关的任何知识产权或其他权利的有效性或范围,或此类权利下的任何许可可能或可能不可用的程度,不采取任何立场;它也不表示它已作出任何努力来确定任何此类权利。有关IETF在标准跟踪和标准相关文件中权利的程序信息,请参见BCP-11。可从IETF秘书处获得可供发布的权利声明副本和任何许可证保证,或本规范实施者或用户试图获得使用此类专有权利的一般许可证或许可的结果。

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to practice this standard. Please address the information to the IETF Executive Director.

IETF邀请任何相关方提请其注意任何版权、专利或专利申请,或其他可能涉及实施本标准所需技术的专有权利。请将信息发送给IETF执行董事。

11. References
11. 工具书类
11.1. Normative References
11.1. 规范性引用文件

[UDP] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August 1980.

[UDP]Postel,J.,“用户数据报协议”,STD 6,RFC 768,1980年8月。

[IPv4] Postel, J., "Internet Protocol", STD 5, RFC 791, September 1981.

[IPv4]Postel,J.,“互联网协议”,STD 5,RFC 7911981年9月。

[IPv6] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998.

[IPv6]Deering,S.和R.Hinden,“互联网协议,第6版(IPv6)规范”,RFC 2460,1998年12月。

[RTP] Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", RFC 1889, January 1996.

[RTP]Schulzrinne,H.,Casner,S.,Frederick,R.和V.Jacobson,“RTP:实时应用的传输协议”,RFC 1889,1996年1月。

[HDLC] Simpson, W., "PPP in HDLC-like framing", STD 51, RFC 1662, July 1994.

[HDLC]辛普森,W.,“HDLC类框架中的PPP”,STD 51,RFC 1662,1994年7月。

[ESP] Kent, S. and R. Atkinson, "IP Encapsulating Security Payload", RFC 2406, November 1998.

[ESP]Kent,S.和R.Atkinson,“IP封装安全有效载荷”,RFC 2406,1998年11月。

[NULL] Glenn, R. and S. Kent, "The NULL Encryption Algorithm and Its Use With Ipsec", RFC 2410, November 1998.

[NULL]Glenn,R.和S.Kent,“NULL加密算法及其在Ipsec中的使用”,RFC 2410,1998年11月。

[AH] Kent, S. and R. Atkinson, "IP Authentication Header", RFC 2402, November 1998.

[AH]Kent,S.和R.Atkinson,“IP认证头”,RFC 2402,1998年11月。

[MINE] Perkins, C., "Minimal Encapsulation within IP", RFC 2004, October 1996.

[MINE]Perkins,C.,“IP内的最小封装”,RFC 2004,1996年10月。

[GRE1] Farinacci, D., Li, T., Hanks, S., Meyer, D. and P. Traina, "Generic Routing Encapsulation (GRE)", RFC 2784, March 2000.

[GRE1]Farinaci,D.,Li,T.,Hanks,S.,Meyer,D.和P.Traina,“通用路由封装(GRE)”,RFC 27842000年3月。

[GRE2] Dommety, G., "Key and Sequence Number Extensions to GRE", RFC 2890, August 2000.

[GRE2]Dommety,G.“GRE的密钥和序列号扩展”,RFC 28902000年8月。

[ASSIGNED] Reynolds, J. and J. Postel, "Assigned Numbers", STD 2, RFC 1700, October 1994.

[指定]Reynolds,J.和J.Postel,“指定编号”,标准2,RFC 1700,1994年10月。

11.2. Informative References
11.2. 资料性引用

[VJHC] Jacobson, V., "Compressing TCP/IP Headers for Low-Speed Serial Links", RFC 1144, February 1990.

[VJHC]Jacobson,V.,“压缩低速串行链路的TCP/IP头”,RFC 1144,1990年2月。

[IPHC] Degermark, M., Nordgren, B. and S. Pink, "IP Header Compression", RFC 2507, February 1999.

[IPHC]Degermark,M.,Nordgren,B.和S.Pink,“IP头压缩”,RFC 2507,1999年2月。

[CRTP] Casner, S. and V. Jacobson, "Compressing IP/UDP/RTP Headers for Low-Speed Serial Links", RFC 2508, February 1999.

[CRTP]Casner,S.和V.Jacobson,“压缩低速串行链路的IP/UDP/RTP报头”,RFC 2508,1999年2月。

[CRTPC] Degermark, M., Hannu, H., Jonsson, L.E., Svanbro, K., "Evaluation of CRTP Performance over Cellular Radio Networks", IEEE Personal Communication Magazine, Volume 7, number 4, pp. 20-25, August 2000.

[CRTPC]Degermark,M.,Hannu,H.,Jonsson,L.E.,Svanbro,K.,“蜂窝无线网络上CRTP性能的评估”,IEEE个人通信杂志,第7卷,第4期,第20-25页,2000年8月。

[REQ] Degermark, M., "Requirements for robust IP/UDP/RTP header compression", RFC 3096, June 2001.

[REQ]Degermark,M.“鲁棒IP/UDP/RTP报头压缩的要求”,RFC 3096,2001年6月。

[LLG] Svanbro, K., "Lower Layer Guidelines for Robust RTP/UDP/IP Header Compression", Work in Progress.

[LLG]Svanbro,K.,“鲁棒RTP/UDP/IP报头压缩的低层指南”,正在进行中。

[IANA-CONSIDERATIONS] Alvestrand, H. and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.

[IANA注意事项]Alvestrand,H.和T.Narten,“在RFCs中编写IANA注意事项部分的指南”,BCP 26,RFC 2434,1998年10月。

12. Authors' Addresses
12. 作者地址

Carsten Bormann, Editor Universitaet Bremen TZI Postfach 330440 D-28334 Bremen, Germany

Carsten Bormann,不来梅大学编辑TZI Postfach 330440 D-28334,德国不来梅

   Phone: +49 421 218 7024
   Fax:   +49 421 218 7000
   EMail: cabo@tzi.org
        
   Phone: +49 421 218 7024
   Fax:   +49 421 218 7000
   EMail: cabo@tzi.org
        

Carsten Burmeister Panasonic European Laboratories GmbH Monzastr. 4c 63225 Langen, Germany

Carsten Burmeister松下欧洲实验室有限公司Monzastr。4c 63225兰根,德国

   Phone: +49-6103-766-263
   Fax:   +49-6103-766-166
   EMail: burmeister@panasonic.de
        
   Phone: +49-6103-766-263
   Fax:   +49-6103-766-166
   EMail: burmeister@panasonic.de
        

Mikael Degermark The University of Arizona Dept of Computer Science P.O. Box 210077 Tucson, AZ 85721-0077, USA

亚利桑那大学计算机科学系,Tucson,AZ8521-10077,美国,210077

   Phone: +1 520 621-3498
   Fax:   +1 520 621-4642
   EMail: micke@cs.arizona.edu
        
   Phone: +1 520 621-3498
   Fax:   +1 520 621-4642
   EMail: micke@cs.arizona.edu
        

Hideaki Fukushima Matsushita Electric Industrial Co., Ltd006, Kadoma, Kadoma City, Osaka, Japan

日本大阪市嘉道理市嘉道理福岛松下电器工业有限公司Ltd006

   Phone: +81-6-6900-9192
   Fax:   +81-6-6900-9193
   EMail: fukusima@isl.mei.co.jp
        
   Phone: +81-6-6900-9192
   Fax:   +81-6-6900-9193
   EMail: fukusima@isl.mei.co.jp
        

Hans Hannu Box 920 Ericsson Erisoft AB SE-971 28 Lulea, Sweden

Hans Hannu信箱920爱立信爱立信爱立信AB SE-971 28 Lulea,瑞典

   Phone: +46 920 20 21 84
   Fax:   +46 920 20 20 99
   EMail: hans.hannu@ericsson.com
        
   Phone: +46 920 20 21 84
   Fax:   +46 920 20 20 99
   EMail: hans.hannu@ericsson.com
        

Lars-Erik Jonsson Box 920 Ericsson Erisoft AB SE-971 28 Lulea, Sweden

Lars Erik Jonsson信箱920爱立信爱立信爱立信AB SE-971 28 Lulea,瑞典

   Phone: +46 920 20 21 07
   Fax:   +46 920 20 20 99
   EMail: lars-erik.jonsson@ericsson.com
        
   Phone: +46 920 20 21 07
   Fax:   +46 920 20 20 99
   EMail: lars-erik.jonsson@ericsson.com
        

Rolf Hakenberg Panasonic European Laboratories GmbH Monzastr. 4c 63225 Langen, Germany

Rolf Hakenberg松下欧洲实验室有限公司Monzastr。4c 63225兰根,德国

   Phone: +49-6103-766-162
   Fax:   +49-6103-766-166
   EMail: hakenberg@panasonic.de
        
   Phone: +49-6103-766-162
   Fax:   +49-6103-766-166
   EMail: hakenberg@panasonic.de
        

Tmima Koren Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134, USA

美国加利福尼亚州圣何塞西塔斯曼大道170号,邮编95134

   Phone: +1 408-527-6169
   EMail: tmima@cisco.com
        
   Phone: +1 408-527-6169
   EMail: tmima@cisco.com
        

Khiem Le 2-700 Mobile Networks Laboratory Nokia Research Center 6000 Connection Drive Irving, TX 75039, USA

美国德克萨斯州欧文连接大道6000号诺基亚研究中心Khiem Le 2-700移动网络实验室,邮编75039

   Phone: +1-972-894-4882
   Fax:   +1 972 894-4589
   EMail: khiem.le@nokia.com
        
   Phone: +1-972-894-4882
   Fax:   +1 972 894-4589
   EMail: khiem.le@nokia.com
        

Zhigang Liu 2-700 Mobile Networks Laboratory Nokia Research Center 6000 Connection Drive Irving, TX 75039, USA

刘志刚2-700移动网络实验室诺基亚研究中心6000连接大道欧文,德克萨斯州75039

   Phone: +1 972 894-5935
   Fax:   +1 972 894-4589
   EMail: zhigang.liu@nokia.com
        
   Phone: +1 972 894-5935
   Fax:   +1 972 894-4589
   EMail: zhigang.liu@nokia.com
        

Anton Martensson Ericsson Radio Systems AB Torshamnsgatan 23 SE-164 80 Stockholm, Sweden

Anton Martenson Ericsson无线电系统AB Torshamnsgatan 23 SE-164 80瑞典斯德哥尔摩

   Phone: +46 8 404 3881
   Fax:   +46 8 757 5550
   EMail: anton.martensson@era.ericsson.se
        
   Phone: +46 8 404 3881
   Fax:   +46 8 757 5550
   EMail: anton.martensson@era.ericsson.se
        

Akihiro Miyazaki Matsushita Electric Industrial Co., Ltd 1006, Kadoma, Kadoma City, Osaka, Japan

日本大阪市嘉道理市嘉道理宫崎松下电器工业有限公司1006

   Phone: +81-6-6900-9192
   Fax:   +81-6-6900-9193
   EMail: akihiro@isl.mei.co.jp
        
   Phone: +81-6-6900-9192
   Fax:   +81-6-6900-9193
   EMail: akihiro@isl.mei.co.jp
        

Krister Svanbro Box 920 Ericsson Erisoft AB SE-971 28 Lulea, Sweden

Krister Svanbro信箱920爱立信爱立信爱立信AB SE-971 28 Lulea,瑞典

   Phone: +46 920 20 20 77
   Fax:   +46 920 20 20 99
   EMail: krister.svanbro@ericsson.com
        
   Phone: +46 920 20 20 77
   Fax:   +46 920 20 20 99
   EMail: krister.svanbro@ericsson.com
        

Thomas Wiebke Panasonic European Laboratories GmbH Monzastr. 4c 63225 Langen, Germany

Thomas Wiebke Panasonic欧洲实验室有限公司Monzastr。4c 63225兰根,德国

   Phone: +49-6103-766-161
   Fax:   +49-6103-766-166
   EMail: wiebke@panasonic.de
        
   Phone: +49-6103-766-161
   Fax:   +49-6103-766-166
   EMail: wiebke@panasonic.de
        

Takeshi Yoshimura NTT DoCoMo, Inc. 3-5, Hikarinooka Yokosuka, Kanagawa, 239-8536, Japan

Takeshi Yoshimura NTT DoCoMo,Inc.3-5,神奈川Hikarinooka横须贺,239-8536,日本

   Phone: +81-468-40-3515
   Fax:   +81-468-40-3788
   EMail: yoshi@spg.yrp.nttdocomo.co.jp
        
   Phone: +81-468-40-3515
   Fax:   +81-468-40-3788
   EMail: yoshi@spg.yrp.nttdocomo.co.jp
        

Haihong Zheng 2-700 Mobile Networks Laboratory Nokia Research Center 6000 Connection Drive Irving, TX 75039, USA

郑海虹2-700移动网络实验室诺基亚研究中心6000连接路美国德克萨斯州欧文75039

   Phone: +1 972 894-4232
   Fax:   +1 972 894-4589
   EMail: haihong.zheng@nokia.com
        
   Phone: +1 972 894-4232
   Fax:   +1 972 894-4589
   EMail: haihong.zheng@nokia.com
        
Appendix A. Detailed classification of header fields
附录A.标题字段的详细分类

Header compression is possible thanks to the fact that most header fields do not vary randomly from packet to packet. Many of the fields exhibit static behavior or change in a more or less predictable way. When designing a header compression scheme, it is of fundamental importance to understand the behavior of the fields in detail.

由于大多数报头字段不会随数据包随机变化,因此可以进行报头压缩。许多字段以或多或少可预测的方式显示静态行为或更改。在设计报头压缩方案时,详细了解字段的行为非常重要。

In this appendix, all IP, UDP and RTP header fields are classified and analyzed in two steps. First, we have a general classification in A.1 where the fields are classified on the basis of stable knowledge and assumptions. The general classification does not take into account the change characteristics of changing fields because those will vary more or less depending on the implementation and on the application used. A less stable but more detailed analysis of the change characteristics is then done in A.2. Finally, A.3 summarizes this appendix with conclusions about how the various header fields should be handled by the header compression scheme to optimize compression and functionality.

在本附录中,所有IP、UDP和RTP报头字段分两步进行分类和分析。首先,我们在a.1中有一个一般分类,其中字段根据稳定的知识和假设进行分类。一般分类没有考虑变化字段的变化特征,因为这些变化或多或少取决于实现和所使用的应用程序。在A.2中对变化特征进行了不太稳定但更详细的分析。最后,A.3总结了本附录,并给出了关于如何通过报头压缩方案处理各种报头字段以优化压缩和功能的结论。

A.1. General classification
A.1. 一般分类

At a general level, the header fields are separated into 5 classes:

在一般级别,标题字段分为5类:

INFERRED These fields contain values that can be inferred from other values, for example the size of the frame carrying the packet, and thus do not have to be handled at all by the compression scheme.

推断这些字段包含可以从其他值(例如,承载分组的帧的大小)推断的值,因此根本不必由压缩方案处理。

STATIC These fields are expected to be constant throughout the lifetime of the packet stream. Static information must in some way be communicated once.

静态的,这些字段在包流的整个生命周期中都是恒定的。静态信息必须以某种方式通信一次。

STATIC-DEF STATIC fields whose values define a packet stream. They are in general handled as STATIC.

STATIC-DEF静态字段,其值定义数据包流。它们通常被视为静态的。

STATIC-KNOWN These STATIC fields are expected to have well-known values and therefore do not need to be communicated at all.

静态已知这些静态字段预期具有已知值,因此根本不需要进行通信。

CHANGING These fields are expected to vary in some way: randomly, within a limited value set or range, or in some other manner.

更改这些字段可能会以某种方式发生变化:随机、在有限的值集或范围内,或以其他方式。

In this section, each of the IP, UDP and RTP header fields is assigned to one of these classes. For all fields except those classified as CHANGING, the motives for the classification are also stated. In section A.2, CHANGING fields are further examined and classified on the basis of their expected change behavior.

在本节中,每个IP、UDP和RTP头字段都分配给这些类中的一个。对于除被归类为变化的领域外的所有领域,也说明了分类的动机。在第A.2节中,根据预期的变化行为,对变化字段进行进一步检查和分类。

A.1.1. IPv6 header fields
A.1.1. IPv6头字段
      +---------------------+-------------+----------------+
      | Field               | Size (bits) |    Class       |
      +---------------------+-------------+----------------+
      | Version             |      4      |     STATIC     |
      | Traffic Class       |      8      |    CHANGING    |
      | Flow Label          |     20      |   STATIC-DEF   |
      | Payload Length      |     16      |    INFERRED    |
      | Next Header         |      8      |     STATIC     |
      | Hop Limit           |      8      |    CHANGING    |
      | Source Address      |    128      |   STATIC-DEF   |
      | Destination Address |    128      |   STATIC-DEF   |
      +---------------------+-------------+----------------+
        
      +---------------------+-------------+----------------+
      | Field               | Size (bits) |    Class       |
      +---------------------+-------------+----------------+
      | Version             |      4      |     STATIC     |
      | Traffic Class       |      8      |    CHANGING    |
      | Flow Label          |     20      |   STATIC-DEF   |
      | Payload Length      |     16      |    INFERRED    |
      | Next Header         |      8      |     STATIC     |
      | Hop Limit           |      8      |    CHANGING    |
      | Source Address      |    128      |   STATIC-DEF   |
      | Destination Address |    128      |   STATIC-DEF   |
      +---------------------+-------------+----------------+
        

Version

版本

The version field states which IP version is used. Packets with different values in this field must be handled by different IP stacks. All packets of a packet stream must therefore be of the same IP version. Accordingly, the field is classified as STATIC.

版本字段说明使用哪个IP版本。此字段中具有不同值的数据包必须由不同的IP堆栈处理。因此,数据包流的所有数据包必须具有相同的IP版本。因此,该字段被分类为静态字段。

Flow Label

流标签

This field may be used to identify packets belonging to a specific packet stream. If not used, the value should be set to zero. Otherwise, all packets belonging to the same stream must have the same value in this field, it being one of the fields that define the stream. The field is therefore classified as STATIC-DEF.

该字段可用于识别属于特定分组流的分组。如果未使用,则应将该值设置为零。否则,属于同一流的所有数据包在此字段中必须具有相同的值,它是定义流的字段之一。因此,该字段被分类为STATIC-DEF。

Payload Length

净荷长度

Information about packet length (and, consequently, payload length) is expected to be provided by the link layer. The field is therefore classified as INFERRED.

关于分组长度(以及因此有效负载长度)的信息预期由链路层提供。因此,该字段被归类为推断字段。

Next Header

下一包头

This field will usually have the same value in all packets of a packet stream. It encodes the type of the subsequent header. Only when extension headers are sometimes present and sometimes not, will the field change its value during the lifetime of the stream. The field is therefore classified as STATIC.

该字段通常在数据包流的所有数据包中具有相同的值。它对后续标头的类型进行编码。只有当扩展头有时存在,有时不存在时,字段才会在流的生存期内更改其值。因此,该字段被归类为静态字段。

Source and Destination addresses

源地址和目标地址

These fields are part of the definition of a stream and must thus be constant for all packets in the stream. The fields are therefore classified as STATIC-DEF.

这些字段是流定义的一部分,因此对于流中的所有数据包都必须是常量。因此,这些字段被分类为STATIC-DEF。

Total size of the fields in each class:

每个类中字段的总大小:

      +--------------+--------------+
      | Class        | Size (octets)|
      +--------------+--------------+
      | INFERRED     |      2       |
      | STATIC       |      1.5     |
      | STATIC-DEF   |     34.5     |
      | CHANGING     |      2       |
      +--------------+--------------+
        
      +--------------+--------------+
      | Class        | Size (octets)|
      +--------------+--------------+
      | INFERRED     |      2       |
      | STATIC       |      1.5     |
      | STATIC-DEF   |     34.5     |
      | CHANGING     |      2       |
      +--------------+--------------+
        
A.1.2. IPv4 header fields
A.1.2. IPv4标头字段
      +---------------------+-------------+----------------+
      | Field               | Size (bits) |     Class      |
      +---------------------+-------------+----------------+
      | Version             |      4      |     STATIC     |
      | Header Length       |      4      |  STATIC-KNOWN  |
      | Type Of Service     |      8      |    CHANGING    |
      | Packet Length       |     16      |    INFERRED    |
      | Identification      |     16      |    CHANGING    |
      | Reserved flag       |      1      |  STATIC-KNOWN  |
      | Don't Fragment flag |      1      |     STATIC     |
      | More Fragments flag |      1      |  STATIC-KNOWN  |
      | Fragment Offset     |     13      |  STATIC-KNOWN  |
      | Time To Live        |      8      |    CHANGING    |
      | Protocol            |      8      |     STATIC     |
      | Header Checksum     |     16      |    INFERRED    |
      | Source Address      |     32      |   STATIC-DEF   |
      | Destination Address |     32      |   STATIC-DEF   |
      +---------------------+-------------+----------------+
        
      +---------------------+-------------+----------------+
      | Field               | Size (bits) |     Class      |
      +---------------------+-------------+----------------+
      | Version             |      4      |     STATIC     |
      | Header Length       |      4      |  STATIC-KNOWN  |
      | Type Of Service     |      8      |    CHANGING    |
      | Packet Length       |     16      |    INFERRED    |
      | Identification      |     16      |    CHANGING    |
      | Reserved flag       |      1      |  STATIC-KNOWN  |
      | Don't Fragment flag |      1      |     STATIC     |
      | More Fragments flag |      1      |  STATIC-KNOWN  |
      | Fragment Offset     |     13      |  STATIC-KNOWN  |
      | Time To Live        |      8      |    CHANGING    |
      | Protocol            |      8      |     STATIC     |
      | Header Checksum     |     16      |    INFERRED    |
      | Source Address      |     32      |   STATIC-DEF   |
      | Destination Address |     32      |   STATIC-DEF   |
      +---------------------+-------------+----------------+
        

Version

版本

The version field states which IP version is used. Packets with different values in this field must be handled by different IP stacks. All packets of a packet stream must therefore be of the same IP version. Accordingly, the field is classified as STATIC.

版本字段说明使用哪个IP版本。此字段中具有不同值的数据包必须由不同的IP堆栈处理。因此,数据包流的所有数据包必须具有相同的IP版本。因此,该字段被分类为静态字段。

Header Length

包头长度

As long no options are present in the IP header, the header length is constant and well known. If there are options, the fields would be STATIC, but it is assumed here that there are no options. The field is therefore classified as STATIC-KNOWN.

只要IP报头中不存在任何选项,报头长度是恒定的,并且是众所周知的。如果有选项,字段将是静态的,但此处假定没有选项。因此,该字段被归类为静态-已知字段。

Packet Length

数据包长度

Information about packet length is expected to be provided by the link layer. The field is therefore classified as INFERRED.

有关数据包长度的信息预计将由链路层提供。因此,该字段被归类为推断字段。

Flags

旗帜

The Reserved flag must be set to zero and is therefore classified as STATIC-KNOWN. The Don't Fragment (DF) flag will be constant for all packets in a stream and is therefore classified as STATIC.

保留标志必须设置为零,因此分类为静态-已知。对于流中的所有数据包,Don't Fragment(DF)标志都是常量,因此被分类为静态的。

Finally, the More Fragments (MF) flag is expected to be zero because fragmentation is NOT expected, due to the small packet size expected. The More Fragments flag is therefore classified as STATIC-KNOWN.

最后,更多碎片(MF)标志预计为零,因为由于预期的数据包大小较小,因此预计不会出现碎片。因此,More Fragments标志被分类为STATIC-KNOWN。

Fragment Offset

碎片偏移量

Under the assumption that no fragmentation occurs, the fragment offset is always zero. The field is therefore classified as STATIC-KNOWN.

假设不发生碎片,碎片偏移量始终为零。因此,该字段被归类为静态-已知字段。

Protocol

协议

This field will usually have the same value in all packets of a packet stream. It encodes the type of the subsequent header. Only when extension headers are sometimes present and sometimes not, will the field change its value during the lifetime of a stream. The field is therefore classified as STATIC.

该字段通常在数据包流的所有数据包中具有相同的值。它对后续标头的类型进行编码。只有当扩展头有时存在,有时不存在时,字段才会在流的生存期内更改其值。因此,该字段被归类为静态字段。

Header Checksum

报头校验和

The header checksum protects individual hops from processing a corrupted header. When almost all IP header information is compressed away, there is no point in having this additional checksum; instead it can be regenerated at the decompressor side. The field is therefore classified as INFERRED.

标头校验和保护单个跃点不处理损坏的标头。当几乎所有的IP报头信息都被压缩掉时,没有必要再增加这个校验和;相反,它可以在减压器侧重新生成。因此,该字段被归类为推断字段。

Source and Destination addresses

源地址和目标地址

These fields are part of the definition of a stream and must thus be constant for all packets in the stream. The fields are therefore classified as STATIC-DEF.

这些字段是流定义的一部分,因此对于流中的所有数据包都必须是常量。因此,这些字段被分类为STATIC-DEF。

Total size of the fields in each class:

每个类中字段的总大小:

      +--------------+----------------+
      | Class        | Size (octets)  |
      +--------------+----------------+
      | INFERRED     |       4        |
      | STATIC       | 1 oct + 5 bits |
      | STATIC-DEF   |       8        |
      | STATIC-KNOWN | 2 oct + 3 bits |
      | CHANGING     |       4        |
      +--------------+----------------+
        
      +--------------+----------------+
      | Class        | Size (octets)  |
      +--------------+----------------+
      | INFERRED     |       4        |
      | STATIC       | 1 oct + 5 bits |
      | STATIC-DEF   |       8        |
      | STATIC-KNOWN | 2 oct + 3 bits |
      | CHANGING     |       4        |
      +--------------+----------------+
        
A.1.3. UDP header fields
A.1.3. UDP头字段
      +------------------+-------------+-------------+
      | Field            | Size (bits) |    Class    |
      +------------------+-------------+-------------+
      | Source Port      |     16      | STATIC-DEF  |
      | Destination Port |     16      | STATIC-DEF  |
      | Length           |     16      |  INFERRED   |
      | Checksum         |     16      |  CHANGING   |
      +------------------+-------------+-------------+
        
      +------------------+-------------+-------------+
      | Field            | Size (bits) |    Class    |
      +------------------+-------------+-------------+
      | Source Port      |     16      | STATIC-DEF  |
      | Destination Port |     16      | STATIC-DEF  |
      | Length           |     16      |  INFERRED   |
      | Checksum         |     16      |  CHANGING   |
      +------------------+-------------+-------------+
        

Source and Destination ports

源端口和目标端口

These fields are part of the definition of a stream and must thus be constant for all packets in the stream. The fields are therefore classified as STATIC-DEF.

这些字段是流定义的一部分,因此对于流中的所有数据包都必须是常量。因此,这些字段被分类为STATIC-DEF。

Length

This field is redundant and is therefore classified as INFERRED.

该字段是多余的,因此被归类为推断字段。

Total size of the fields in each class:

每个类中字段的总大小:

      +------------+---------------+
      | Class      | Size (octets) |
      +------------+---------------+
      | INFERRED   |       2       |
      | STATIC-DEF |       4       |
      | CHANGING   |       2       |
      +------------+---------------+
        
      +------------+---------------+
      | Class      | Size (octets) |
      +------------+---------------+
      | INFERRED   |       2       |
      | STATIC-DEF |       4       |
      | CHANGING   |       2       |
      +------------+---------------+
        
A.1.4. RTP header fields
A.1.4. RTP头字段
      +-----------------+-------------+----------------+
      | Field           | Size (bits) |     Class      |
      +-----------------+-------------+----------------+
      | Version         |      2      |  STATIC-KNOWN  |
      | Padding         |      1      |     STATIC     |
      | Extension       |      1      |     STATIC     |
      | CSRC Counter    |      4      |    CHANGING    |
      | Marker          |      1      |    CHANGING    |
      | Payload Type    |      7      |    CHANGING    |
      | Sequence Number |     16      |    CHANGING    |
      | Timestamp       |     32      |    CHANGING    |
      | SSRC            |     32      |   STATIC-DEF   |
      | CSRC            |   0(-480)   |    CHANGING    |
      +-----------------+-------------+----------------+
        
      +-----------------+-------------+----------------+
      | Field           | Size (bits) |     Class      |
      +-----------------+-------------+----------------+
      | Version         |      2      |  STATIC-KNOWN  |
      | Padding         |      1      |     STATIC     |
      | Extension       |      1      |     STATIC     |
      | CSRC Counter    |      4      |    CHANGING    |
      | Marker          |      1      |    CHANGING    |
      | Payload Type    |      7      |    CHANGING    |
      | Sequence Number |     16      |    CHANGING    |
      | Timestamp       |     32      |    CHANGING    |
      | SSRC            |     32      |   STATIC-DEF   |
      | CSRC            |   0(-480)   |    CHANGING    |
      +-----------------+-------------+----------------+
        

Version

版本

Only one working RTP version exists, namely version 2. The field is therefore classified as STATIC-KNOWN.

只有一个工作RTP版本存在,即版本2。因此,该字段被归类为静态-已知字段。

Padding

衬料

The use of this field is application-dependent, but when payload padding is used it is likely to be present in all packets. The field is therefore classified as STATIC.

此字段的使用取决于应用程序,但当使用有效负载填充时,它可能出现在所有数据包中。因此,该字段被归类为静态字段。

Extension

扩大

If RTP extensions are used by the application, these extensions are likely to be present in all packets (but the use of extensions is very uncommon). However, for safety's sake this field is classified as STATIC and not STATIC-KNOWN.

如果应用程序使用RTP扩展,那么这些扩展很可能出现在所有数据包中(但使用扩展非常少见)。但是,为了安全起见,该字段被归类为静态字段,而非静态字段。

SSRC

SSRC

This field is part of the definition of a stream and must thus be constant for all packets in the stream. The field is therefore classified as STATIC-DEF.

此字段是流定义的一部分,因此对于流中的所有数据包必须是常量。因此,该字段被分类为STATIC-DEF。

Total size of the fields in each class:

每个类中字段的总大小:

      +--------------+---------------+
      | Class        | Size (octets) |
      +--------------+---------------+
      | STATIC       |    2 bits     |
      | STATIC-DEF   |      4        |
      | STATIC-KNOWN |    2 bits     |
      | CHANGING     |  7.5(-67.5)   |
      +--------------+---------------+
        
      +--------------+---------------+
      | Class        | Size (octets) |
      +--------------+---------------+
      | STATIC       |    2 bits     |
      | STATIC-DEF   |      4        |
      | STATIC-KNOWN |    2 bits     |
      | CHANGING     |  7.5(-67.5)   |
      +--------------+---------------+
        
A.1.5. Summary for IP/UDP/RTP
A.1.5. IP/UDP/RTP的摘要

Summarizing this for IP/UDP/RTP one obtains

总结一下IP/UDP/RTP的这一点

      +----------------+----------------+----------------+
      | Class \ IP ver | IPv6 (octets)  | IPv4 (octets)  |
      +----------------+----------------+----------------+
      | INFERRED       |        4       |        6       |
      | STATIC         | 1 oct + 6 bits | 1 oct + 7 bits |
      | STATIC-DEF     |       42.5     |       16       |
      | STATIC-KNOWN   |     2 bits     | 2 oct + 5 bits |
      | CHANGING       |   11.5(-71.5)  |   13.5(-73.5)  |
      +----------------+----------------+----------------+
      | Total          |    60(-120)    |    40(-100)    |
      +----------------+----------------+----------------+
        
      +----------------+----------------+----------------+
      | Class \ IP ver | IPv6 (octets)  | IPv4 (octets)  |
      +----------------+----------------+----------------+
      | INFERRED       |        4       |        6       |
      | STATIC         | 1 oct + 6 bits | 1 oct + 7 bits |
      | STATIC-DEF     |       42.5     |       16       |
      | STATIC-KNOWN   |     2 bits     | 2 oct + 5 bits |
      | CHANGING       |   11.5(-71.5)  |   13.5(-73.5)  |
      +----------------+----------------+----------------+
      | Total          |    60(-120)    |    40(-100)    |
      +----------------+----------------+----------------+
        
A.2. Analysis of change patterns of header fields
A.2. 标题字段的变化模式分析

To design suitable mechanisms for efficient compression of all header fields, their change patterns must be analyzed. For this reason, an extended classification is done based on the general classification in A.1, considering the fields which were labeled CHANGING in that classification. Different applications will use the fields in different ways, which may affect their behavior. For the fields whose behavior is variable, typical behavior for conversational audio and video will be discussed.

为了设计适当的机制来有效压缩所有头字段,必须分析它们的变化模式。因此,在A.1中的一般分类的基础上进行扩展分类,考虑到在该分类中标记为变化的字段。不同的应用程序将以不同的方式使用字段,这可能会影响它们的行为。对于行为可变的领域,将讨论对话音频和视频的典型行为。

The CHANGING fields are separated into five different subclasses:

更改字段分为五个不同的子类:

STATIC These are fields that were classified as CHANGING on a general basis, but are classified as STATIC here due to certain additional assumptions.

静态这些字段通常被分类为变化字段,但由于某些附加假设,此处被分类为静态字段。

SEMISTATIC These fields are STATIC most of the time. However, occasionally the value changes but reverts to its original value after a known number of packets.

半静态这些字段大部分时间是静态的。但是,该值偶尔会更改,但在已知数量的数据包之后会恢复为其原始值。

RARELY-CHANGING (RC) These are fields that change their values occasionally and then keep their new values.

很少更改(RC)这些字段偶尔更改其值,然后保留其新值。

ALTERNATING These fields alternate between a small number of different values.

交替这些字段在少量不同值之间交替。

IRREGULAR These, finally, are the fields for which no useful change pattern can be identified.

最后,这些是无法识别出有用变化模式的领域。

To further expand the classification possibilities without increasing complexity, the classification can be done either according to the values of the field and/or according to the values of the deltas for the field.

为了在不增加复杂性的情况下进一步扩展分类可能性,可以根据字段的值和/或根据字段的增量值来进行分类。

When the classification is done, other details are also stated regarding possible additional knowledge about the field values and/or field deltas, according to the classification. For fields classified as STATIC or SEMISTATIC, the case could be that the value of the field is not only STATIC but also well KNOWN a priori (two states for SEMISTATIC fields). For fields with non-irregular change behavior, it could be known that changes usually are within a LIMITED range compared to the maximal change for the field. For other fields, the values are completely UNKNOWN.

分类完成后,还将根据分类说明关于字段值和/或字段增量的可能附加知识的其他详细信息。对于分类为静态或半静态的字段,情况可能是字段的值不仅是静态的,而且是众所周知的先验值(半静态字段有两种状态)。对于具有非不规则变化行为的场,可以知道,与场的最大变化相比,变化通常在有限的范围内。对于其他字段,值是完全未知的。

Table A.1 classifies all the CHANGING fields on the basis of their expected change patterns, especially for conversational audio and video.

表A.1根据预期的变化模式对所有变化字段进行了分类,特别是对于会话音频和视频。

   +------------------------+-------------+-------------+-------------+
   |         Field          | Value/Delta |    Class    |  Knowledge  |
   +========================+=============+=============+=============+
   |             Sequential |    Delta    |    STATIC   |    KNOWN    |
   |             -----------+-------------+-------------+-------------+
   | IPv4 Id:    Seq. jump  |    Delta    |      RC     |   LIMITED   |
   |             -----------+-------------+-------------+-------------+
   |             Random     |    Value    |  IRREGULAR  |   UNKNOWN   |
   +------------------------+-------------+-------------+-------------+
   | IP TOS / Tr. Class     |    Value    |      RC     |   UNKNOWN   |
   +------------------------+-------------+-------------+-------------+
   | IP TTL / Hop Limit     |    Value    | ALTERNATING |   LIMITED   |
   +------------------------+-------------+-------------+-------------+
   |               Disabled |    Value    |    STATIC   |    KNOWN    |
   | UDP Checksum: ---------+-------------+-------------+-------------+
   |               Enabled  |    Value    |  IRREGULAR  |   UNKNOWN   |
   +------------------------+-------------+-------------+-------------+
   |                 No mix |    Value    |    STATIC   |    KNOWN    |
   | RTP CSRC Count: -------+-------------+-------------+-------------+
   |                 Mixed  |    Value    |      RC     |   LIMITED   |
   +------------------------+-------------+-------------+-------------+
   | RTP Marker             |    Value    |  SEMISTATIC | KNOWN/KNOWN |
   +------------------------+-------------+-------------+-------------+
   | RTP Payload Type       |    Value    |      RC     |   UNKNOWN   |
   +------------------------+-------------+-------------+-------------+
   | RTP Sequence Number    |    Delta    |    STATIC   |    KNOWN    |
   +------------------------+-------------+-------------+-------------+
   | RTP Timestamp          |    Delta    |      RC     |   LIMITED   |
   +------------------------+-------------+-------------+-------------+
   |                 No mix |      -      |      -      |      -      |
   | RTP CSRC List:  -------+-------------+-------------+-------------+
   |                 Mixed  |    Value    |      RC     |   UNKNOWN   |
   +------------------------+-------------+-------------+-------------+
        
   +------------------------+-------------+-------------+-------------+
   |         Field          | Value/Delta |    Class    |  Knowledge  |
   +========================+=============+=============+=============+
   |             Sequential |    Delta    |    STATIC   |    KNOWN    |
   |             -----------+-------------+-------------+-------------+
   | IPv4 Id:    Seq. jump  |    Delta    |      RC     |   LIMITED   |
   |             -----------+-------------+-------------+-------------+
   |             Random     |    Value    |  IRREGULAR  |   UNKNOWN   |
   +------------------------+-------------+-------------+-------------+
   | IP TOS / Tr. Class     |    Value    |      RC     |   UNKNOWN   |
   +------------------------+-------------+-------------+-------------+
   | IP TTL / Hop Limit     |    Value    | ALTERNATING |   LIMITED   |
   +------------------------+-------------+-------------+-------------+
   |               Disabled |    Value    |    STATIC   |    KNOWN    |
   | UDP Checksum: ---------+-------------+-------------+-------------+
   |               Enabled  |    Value    |  IRREGULAR  |   UNKNOWN   |
   +------------------------+-------------+-------------+-------------+
   |                 No mix |    Value    |    STATIC   |    KNOWN    |
   | RTP CSRC Count: -------+-------------+-------------+-------------+
   |                 Mixed  |    Value    |      RC     |   LIMITED   |
   +------------------------+-------------+-------------+-------------+
   | RTP Marker             |    Value    |  SEMISTATIC | KNOWN/KNOWN |
   +------------------------+-------------+-------------+-------------+
   | RTP Payload Type       |    Value    |      RC     |   UNKNOWN   |
   +------------------------+-------------+-------------+-------------+
   | RTP Sequence Number    |    Delta    |    STATIC   |    KNOWN    |
   +------------------------+-------------+-------------+-------------+
   | RTP Timestamp          |    Delta    |      RC     |   LIMITED   |
   +------------------------+-------------+-------------+-------------+
   |                 No mix |      -      |      -      |      -      |
   | RTP CSRC List:  -------+-------------+-------------+-------------+
   |                 Mixed  |    Value    |      RC     |   UNKNOWN   |
   +------------------------+-------------+-------------+-------------+
        

Table A.1 : Classification of CHANGING header fields

表A.1:更改标题字段的分类

The following subsections discuss the various header fields in detail. Note that table A.1 and the discussions below do not consider changes caused by loss or reordering before the compression point.

以下小节将详细讨论各种标题字段。注意,表A.1和下面的讨论不考虑在压缩点之前由丢失或重新排序引起的变化。

A.2.1. IPv4 Identification
A.2.1. IPv4标识

The Identification field (IP ID) of the IPv4 header is there to identify which fragments constitute a datagram when reassembling fragmented datagrams. The IPv4 specification does not specify exactly how this field is to be assigned values, only that each packet should get an IP ID that is unique for the source-destination pair and protocol for the time the datagram (or any of its fragments) could be alive in the network. This means that assignment of IP ID values can be done in various ways, which we have separated into three classes.

IPv4报头的标识字段(IP ID)用于在重新组装碎片数据报时标识哪些碎片构成数据报。IPv4规范没有明确指定如何分配此字段的值,只是每个数据包都应该获得一个IP ID,该ID对于源-目的地对和协议来说是唯一的,在数据报(或其任何片段)可能在网络中处于活动状态时。这意味着可以通过各种方式分配IP ID值,我们将其分为三类。

Sequential jump

顺序跳转

This is the most common assignment policy in today's IP stacks. A single IP ID counter is used for all packet streams. When the sender is running more than one packet stream simultaneously, the IP ID can increase by more than one between packets in a stream. The IP ID values will be much more predictable and require less bits to transfer than random values, and the packet-to-packet increment (determined by the number of active outgoing packet streams and sending frequencies) will usually be limited.

这是当今IP堆栈中最常见的分配策略。单个IP ID计数器用于所有数据包流。当发送方同时运行多个分组流时,IP ID可以在一个流中的分组之间增加一个以上。IP ID值比随机值更可预测,需要传输的比特数更少,包到包的增量(由活动传出包流的数量和发送频率决定)通常会受到限制。

Random

随机的

Some IP stacks assign IP ID values using a pseudo-random number generator. There is thus no correlation between the ID values of subsequent datagrams. Therefore there is no way to predict the IP ID value for the next datagram. For header compression purposes, this means that the IP ID field needs to be sent uncompressed with each datagram, resulting in two extra octets of header. IP stacks in cellular terminals SHOULD NOT use this IP ID assignment policy.

某些IP堆栈使用伪随机数生成器分配IP ID值。因此,后续数据报的ID值之间没有相关性。因此,无法预测下一个数据报的IP ID值。出于报头压缩的目的,这意味着IP ID字段需要与每个数据报一起未压缩发送,从而导致报头的两个额外八位字节。蜂窝终端中的IP堆栈不应使用此IP ID分配策略。

Sequential

顺序的

This assignment policy keeps a separate counter for each outgoing packet stream and thus the IP ID value will increment by one for each packet in the stream, except at wrap around. Therefore, the delta value of the field is constant and well known a priori. When RTP is used on top of UDP and IP, the IP ID value follows the RTP Sequence Number. This assignment policy is the most desirable for header compression purposes. However, its usage is not as common as it perhaps should be. The reason may be that it can be realized only when UDP and IP are implemented together so that UDP, which separates packet streams by the Port identification fields, can make IP use separate ID counters for each packet stream.

此分配策略为每个传出数据包流保留一个单独的计数器,因此流中的每个数据包的IP ID值将增加一个,环绕时除外。因此,场的增量值是恒定的,并且是众所周知的。在UDP和IP之上使用RTP时,IP ID值跟随RTP序列号。此分配策略最适合用于头压缩目的。然而,它的使用并不像它应该的那样普遍。原因可能是,只有当UDP和IP一起实现时才能实现,因此UDP(通过端口标识字段分隔数据包流)可以使IP为每个数据包流使用单独的ID计数器。

In order to avoid violating [IPv4], packets sharing the same IP address pair and IP protocol number cannot use the same IP ID values. Therefore, implementations of sequential policies must make the ID number spaces disjoint for packet streams of the same IP protocol going between the same pair of nodes. This can be done in a number of ways, all of which introduce occasional jumps, and thus makes the policy less than perfectly sequential. For header compression purposes less frequent jumps are preferred.

为了避免违反[IPv4],共享相同IP地址对和IP协议号的数据包不能使用相同的IP ID值。因此,顺序策略的实现必须使相同IP协议的数据包流在同一对节点之间的ID号空间不相交。这可以通过多种方式实现,所有这些方式都会引入偶尔的跳跃,从而使策略不那么完美有序。出于报头压缩目的,首选较不频繁的跳转。

It should be noted that the ID is an IPv4 mechanism and is therefore not a problem for IPv6. For IPv4 the ID could be handled in three different ways. First, we have the inefficient but reliable solution where the ID field is sent as-is in all packets, increasing the compressed headers by two octets. This is the best way to handle the ID field if the sender uses random assignment of the ID field. Second, there can be solutions with more flexible mechanisms requiring less bits for the ID handling as long as sequential jump assignment is used. Such solutions will probably require even more bits if random assignment is used by the sender. Knowledge about the sender's assignment policy could therefore be useful when choosing between the two solutions above. Finally, even for IPv4, header compression could be designed without any additional information for the ID field included in compressed headers. To use such schemes, it must be known which assignment policy for the ID field is being used by the sender. That might not be possible to know, which implies that the applicability of such solutions is very uncertain. However, designers of IPv4 stacks for cellular terminals SHOULD use an assignment policy close to sequential.

应该注意,ID是IPv4机制,因此对于IPv6来说不是问题。对于IPv4,可以用三种不同的方式处理ID。首先,我们有一个低效但可靠的解决方案,其中ID字段按所有数据包中的原样发送,将压缩头增加两个八位组。如果发送方使用ID字段的随机分配,这是处理ID字段的最佳方法。第二,只要使用顺序跳转分配,就可以有具有更灵活机制的解决方案,需要更少的ID处理位。如果发送方使用随机分配,这种解决方案可能需要更多的位。因此,在选择上述两种解决方案时,了解发送者的分配策略可能非常有用。最后,即使对于IPv4,也可以设计标头压缩,而无需为压缩标头中包含的ID字段提供任何附加信息。要使用此类方案,必须知道发送方正在使用ID字段的哪个分配策略。这可能不可能知道,这意味着此类解决方案的适用性非常不确定。然而,蜂窝终端IPv4协议栈的设计者应该使用接近顺序的分配策略。

A.2.2. IP Traffic-Class / Type-Of-Service
A.2.2. IP流量类别/服务类型

The Traffic-Class (IPv6) or Type-Of-Service (IPv4) field is expected to be constant during the lifetime of a packet stream or to change relatively seldom.

流量类别(IPv6)或服务类型(IPv4)字段预计在数据包流的生命周期内保持不变,或变化相对较少。

A.2.3. IP Hop-Limit / Time-To-Live
A.2.3. IP跃点限制/生存时间

The Hop-Limit (IPv6) or Time-To-Live (IPv4) field is expected to be constant during the lifetime of a packet stream or to alternate between a limited number of values due to route changes.

跃点限制(IPv6)或生存时间(IPv4)字段预计在数据包流的生存期内保持不变,或由于路由更改而在有限数量的值之间交替。

A.2.4. UDP Checksum
A.2.4. UDP校验和

The UDP checksum is optional. If disabled, its value is constantly zero and could be compressed away. If enabled, its value depends on the payload, which for compression purposes is equivalent to it changing randomly with every packet.

UDP校验和是可选的。如果禁用,其值将始终为零,并可能被压缩掉。如果启用,其值取决于有效负载,出于压缩目的,有效负载相当于它随每个数据包随机变化。

A.2.5. RTP CSRC Counter
A.2.5. RTP中国证监会计数器

This is a counter indicating the number of CSRC items present in the CSRC list. This number is expected to be almost constant on a packet- to-packet basis and change by small amounts. As long as no RTP mixer is used, the value of this field is zero.

这是一个计数器,指示中国证监会名单中存在的中国证监会项目的数量。这个数字在包到包的基础上几乎是恒定的,并且会有少量的变化。只要不使用RTP混频器,此字段的值为零。

A.2.6. RTP Marker
A.2.6. RTP标记

For audio the marker bit should be set only in the first packet of a talkspurt, while for video it should be set in the last packet of every picture. This means that in both cases the RTP marker is classified as SEMISTATIC with well-known values for both states.

对于音频,标记位应仅在TalkSport的第一个数据包中设置,而对于视频,标记位应在每个图片的最后一个数据包中设置。这意味着在这两种情况下,RTP标记都被分类为半静态,并且两种状态的值都是众所周知的。

A.2.7. RTP Payload Type
A.2.7. RTP有效负载类型

Changes of the RTP payload type within a packet stream are expected to be rare. Applications could adapt to congestion by changing payload type and/or frame sizes, but that is not expected to happen frequently.

分组流中RTP有效负载类型的变化预计很少。应用程序可以通过改变有效负载类型和/或帧大小来适应拥塞,但这种情况预计不会经常发生。

A.2.8. RTP Sequence Number
A.2.8. RTP序列号

The RTP Sequence Number will be incremented by one for each packet sent.

对于发送的每个数据包,RTP序列号将增加1。

A.2.9. RTP Timestamp
A.2.9. RTP时间戳

In the audio case:

在音频情况下:

As long as there are no pauses in the audio stream, the RTP Timestamp will be incremented by a constant delta, corresponding to the number of samples in the speech frame. It will thus mostly follow the RTP Sequence Number. When there has been a silent period and a new talkspurt begins, the timestamp will jump in proportion to the length of the silent period. However, the increment will probably be within a relatively limited range.

只要音频流中没有暂停,RTP时间戳就会增加一个常数增量,对应于语音帧中的样本数。因此,它将主要遵循RTP序列号。当有一个静默期并且新的talkspurt开始时,时间戳将与静默期的长度成比例跳跃。然而,增量可能在相对有限的范围内。

In the video case:

在视频案例中:

Between two consecutive packets, the timestamp will either be unchanged or increase by a multiple of a fixed value corresponding to the picture clock frequency. The timestamp can also decrease by a multiple of the fixed value if B-pictures are used. The delta interval, expressed as a multiple of the picture clock frequency, is in most cases very limited.

在两个连续分组之间,时间戳将保持不变或增加与图片时钟频率相对应的固定值的倍数。如果使用B图片,时间戳也可以减少固定值的倍数。增量间隔表示为图片时钟频率的倍数,在大多数情况下非常有限。

A.2.10. RTP Contributing Sources (CSRC)
A.2.10. RTP贡献来源(中国证监会)

The participants in a session, which are identified by the CSRC fields, are expected to be almost the same on a packet-to-packet basis with relatively few additions and removals. As long as RTP mixers are not used, no CSRC fields are present at all.

由中国证监会字段确定的会议参与者在分组对分组的基础上几乎相同,添加和删除相对较少。只要不使用RTP混频器,就根本不存在CSC字段。

A.3. Header compression strategies
A.3. 报头压缩策略

This section elaborates on what has been done in previous sections. On the basis of the classifications, recommendations are given on how to handle the various fields in the header compression process. Seven different actions are possible; these are listed together with the fields to which each action applies.

本节详细介绍了前面几节中所做的工作。在分类的基础上,给出了如何处理报头压缩过程中各个字段的建议。七种不同的行动是可能的;这些字段与应用每个操作的字段一起列出。

A.3.1. Do not send at all
A.3.1. 一点也不要送

The fields that have well known values a priori do not have to be sent at all. These are:

事先具有已知值的字段根本不需要发送。这些是:

- IPv6 Payload Length - IPv4 Header Length - IPv4 Reserved Flag - IPv4 Last Fragment Flag - IPv4 Fragment Offset

- IPv6有效负载长度-IPv4标头长度-IPv4保留标志-IPv4最后一个片段标志-IPv4片段偏移量

- UDP Checksum (if disabled) - RTP Version

- UDP校验和(如果禁用)-RTP版本

A.3.2. Transmit only initially
A.3.2. 仅最初传输

The fields that are constant throughout the lifetime of the packet stream have to be transmitted and correctly delivered to the decompressor only once. These are:

在数据包流的整个生命周期中保持不变的字段必须被传输,并且只能正确地传递给解压缩器一次。这些是:

- IP Version - IP Source Address - IP Destination Address - IPv6 Flow Label - IPv4 May Fragment Flag - UDP Source Port - UDP Destination Port - RTP Padding Flag - RTP Extension Flag - RTP SSRC

- IP版本-IP源地址-IP目标地址-IPv6流标签-IPv4可能片段标志-UDP源端口-UDP目标端口-RTP填充标志-RTP扩展标志-RTP SSRC

A.3.3. Transmit initially, but be prepared to update
A.3.3. 最初传输,但准备更新

The fields that are changing only occasionally must be transmitted initially but there must also be a way to update these fields with new values if they change. These fields are:

仅偶尔更改的字段最初必须传输,但如果这些字段更改,还必须有一种方法使用新值更新这些字段。这些字段是:

- IPv6 Next Header - IPv6 Traffic Class - IPv6 Hop Limit - IPv4 Protocol - IPv4 Type Of Service (TOS) - IPv4 Time To Live (TTL) - RTP CSRC Counter - RTP Payload Type - RTP CSRC List

- IPv6下一个标头-IPv6流量类别-IPv6跃点限制-IPv4协议-IPv4服务类型(TOS)-IPv4生存时间(TTL)-RTP CSC计数器-RTP有效负载类型-RTP CSC列表

Since the values of the IPv4 Protocol and the IPv6 Next Header fields are in effect linked to the type of the subsequent header, they deserve special treatment when subheaders are inserted or removed.

由于IPv4协议和IPv6下一个报头字段的值实际上链接到后续报头的类型,因此在插入或删除子标题时,应特别处理它们。

A.3.4. Be prepared to update or send as-is frequently
A.3.4. 准备好经常更新或发送

For fields that normally either are constant or have values deducible from some other field, but that frequently diverge from that behavior, there must be an efficient way to update the field value or send it as-is in some packets. These fields are:

对于通常为常量或具有可从其他字段推断的值,但经常偏离该行为的字段,必须有一种有效的方法来更新字段值或按某些数据包中的原样发送。这些字段是:

- IPv4 Identification (if not sequentially assigned) - RTP Marker - RTP Timestamp

- IPv4标识(如果未按顺序分配)-RTP标记-RTP时间戳

A.3.5. Guarantee continuous robustness
A.3.5. 保证连续的鲁棒性

For fields that behave like a counter with a fixed delta for ALL packets, the only requirement on the transmission encoding is that packet losses between compressor and decompressor must be tolerable. If several such fields exist, all these can be communicated together. Such fields can also be used to interpret the values for fields listed in the previous section. Fields that have this counter behavior are:

对于行为类似于所有数据包具有固定增量的计数器的字段,传输编码的唯一要求是压缩器和解压缩器之间的数据包丢失必须是可容忍的。如果存在多个这样的字段,则所有这些字段都可以一起通信。此类字段还可用于解释上一节中列出的字段的值。具有此计数器行为的字段包括:

- IPv4 Identification (if sequentially assigned) - RTP Sequence Number

- IPv4标识(如果按顺序分配)-RTP序列号

A.3.6. Transmit as-is in all packets
A.3.6. 在所有数据包中按原样传输

Fields that have completely random values for each packet must be included as-is in all compressed headers. Those fields are:

对于每个数据包,具有完全随机值的字段必须按原样包含在所有压缩头中。这些领域是:

- IPv4 Identification (if randomly assigned) - UDP Checksum (if enabled)

- IPv4标识(如果随机分配)-UDP校验和(如果启用)

A.3.7. Establish and be prepared to update delta
A.3.7. 建立并准备更新delta

Finally, there is a field that is usually increasing by a fixed delta and is correlated to another field. For this field it would make sense to make that delta part of the context state. The delta must then be initiated and updated in the same way as the fields listed in A.3.3. The field to which this applies is:

最后,有一个字段通常以固定增量增加,并与另一个字段相关。对于这个字段,将delta作为上下文状态的一部分是有意义的。然后,必须以与A.3.3中所列字段相同的方式启动和更新增量。适用的字段为:

- RTP Timestamp

- RTP时间戳

Full Copyright Statement

完整版权声明

Copyright (C) The Internet Society (2001). All Rights Reserved.

版权所有(C)互联网协会(2001年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。