ROHC compression/decompression library
|
Generic framework for RFC3095-based decompression profiles such as IP-only, UDP, UDP-Lite, ESP, and RTP profiles. More...
#include "rohc_decomp_rfc3095.h"
#include "rohc_traces_internal.h"
#include "rohc_time_internal.h"
#include "rohc_debug.h"
#include "rohc_packets.h"
#include "rohc_utils.h"
#include "rohc_bit_ops.h"
#include "rohc_decomp_internals.h"
#include "rohc_decomp_detect_packet.h"
#include "schemes/decomp_wlsb.h"
#include "schemes/decomp_list_ipv6.h"
#include "sdvl.h"
#include "crc.h"
#include "config.h"
#include <string.h>
#include <assert.h>
Functions | |
static int | parse_static_part_ip (const struct rohc_decomp_ctxt *const context, const uint8_t *const packet, const size_t length, struct rohc_extr_ip_bits *const bits) |
Parse the IP static part of a ROHC packet. More... | |
static int | parse_static_part_ipv4 (const struct rohc_decomp_ctxt *const context, const uint8_t *packet, const size_t length, struct rohc_extr_ip_bits *const bits) |
Parse the IPv4 static part of a ROHC packet. More... | |
static int | parse_static_part_ipv6 (const struct rohc_decomp_ctxt *const context, const uint8_t *packet, const size_t length, struct rohc_extr_ip_bits *const bits) |
Parse the IPv6 static part of a ROHC packet. More... | |
static int | parse_dynamic_part_ip (const struct rohc_decomp_ctxt *const context, const uint8_t *const packet, const size_t length, struct rohc_extr_ip_bits *const bits, struct list_decomp *const list_decomp) |
Parse the IP dynamic part of a ROHC packet. More... | |
static int | parse_dynamic_part_ipv4 (const struct rohc_decomp_ctxt *const context, const uint8_t *packet, const size_t length, struct rohc_extr_ip_bits *const bits) |
Decode the IPv4 dynamic part of a ROHC packet. More... | |
static int | parse_dynamic_part_ipv6 (const struct rohc_decomp_ctxt *const context, const uint8_t *packet, const size_t length, struct rohc_extr_ip_bits *const bits, struct list_decomp *const list_decomp) |
Decode the IPv6 dynamic part of a ROHC packet. More... | |
static bool | parse_ir (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, rohc_packet_t *const packet_type, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) |
Parse one IR packet. More... | |
static bool | parse_irdyn (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, rohc_packet_t *const packet_type, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) |
Parse one IR-DYN packet. More... | |
static bool | parse_uo0 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, rohc_packet_t *const packet_type, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) |
Parse one UO-0 header. More... | |
static bool | parse_uo1 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, rohc_packet_t *const packet_type, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) |
Parse one UO-1 header for non-RTP profiles. More... | |
static bool | parse_uo1rtp (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, rohc_packet_t *const packet_type, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) |
Parse one UO-1 header for RTP profile. More... | |
static bool | parse_uo1id (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, rohc_packet_t *const packet_type, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) |
Parse one UO-1-ID header for RTP profiles. More... | |
static bool | parse_uo1ts (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, rohc_packet_t *const packet_type, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) |
Parse one UO-1-TS header for RTP profiles. More... | |
static bool | parse_uor2 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, rohc_packet_t *const packet_type, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) |
Parse one UOR-2 header for non-RTP profiles. More... | |
static bool | parse_uor2rtp (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, rohc_packet_t *const packet_type, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) |
Parse one UOR-2 header for RTP profile (in 2 passes if needed) More... | |
static bool | parse_uor2rtp_once (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, const rohc_packet_t packet_type, uint8_t outer_rnd, uint8_t inner_rnd, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const need_reparse) |
Parse one UOR-2-RTP header for RTP profile. More... | |
static bool | parse_uor2id (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, rohc_packet_t *const packet_type, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) |
Parse one UOR-2-ID header for RTP profile (in 2 passes if needed) More... | |
static bool | parse_uor2id_once (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, const rohc_packet_t packet_type, uint8_t outer_rnd, uint8_t inner_rnd, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const need_reparse) |
Parse one UOR-2-ID header for RTP profile. More... | |
static bool | parse_uor2ts (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, rohc_packet_t *const packet_type, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) |
Parse one UOR-2-TS header for RTP profile (in 2 passes if needed) More... | |
static bool | parse_uor2ts_once (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len, const rohc_packet_t packet_type, uint8_t outer_rnd, uint8_t inner_rnd, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const need_reparse) |
Parse one UOR-2-TS header for RTP profile. More... | |
static bool | parse_uo_remainder (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) |
Parse the remainder of the UO* header. More... | |
static uint8_t | parse_extension_type (const uint8_t *const rohc_ext) |
Find out which extension is carried by the UOR-2 packet. More... | |
static int | parse_extension0 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_data, const size_t rohc_data_len, const rohc_packet_t packet_type, const ip_header_pos_t innermost_ip_hdr, struct rohc_extr_bits *const bits) |
Parse the extension 0 of the UO-1-ID or UOR-2* packet. More... | |
static int | parse_extension1 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_data, const size_t rohc_data_len, const rohc_packet_t packet_type, const ip_header_pos_t innermost_ip_hdr, struct rohc_extr_bits *const bits) |
Parse the extension 1 of the UO-1-ID or UOR-2* packet. More... | |
static int | parse_extension2 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_data, const size_t rohc_data_len, const rohc_packet_t packet_type, const ip_header_pos_t innermost_ip_hdr, struct rohc_extr_bits *const bits) |
Parse the extension 2 of the UO-1-ID or UOR-2* packet. More... | |
static bool | build_uncomp_ip (const struct rohc_decomp_ctxt *const context, const struct rohc_decoded_ip_values decoded, uint8_t *const dest, const size_t uncomp_hdrs_max_len, size_t *const uncomp_hdrs_len, const size_t payload_size, const struct list_decomp *const list_decomp) |
Build an uncompressed IP header. More... | |
static bool | build_uncomp_ipv4 (const struct rohc_decomp_ctxt *const context, const struct rohc_decoded_ip_values decoded, uint8_t *const dest, const size_t uncomp_hdrs_max_len, size_t *const uncomp_hdrs_len, const size_t payload_size) |
Build an uncompressed IPv4 header. More... | |
static bool | build_uncomp_ipv6 (const struct rohc_decomp_ctxt *const context, const struct rohc_decoded_ip_values decoded, uint8_t *const dest, const size_t uncomp_hdrs_max_len, size_t *const uncomp_hdrs_len, const size_t payload_size, const struct list_decomp *const list_decomp) |
Build an uncompressed IPv6 header. More... | |
static bool | decode_ip_values_from_bits (const struct rohc_decomp_ctxt *const context, const struct rohc_decomp_rfc3095_changes *const ctxt, const struct ip_id_offset_decode *const ip_id_decode, const uint32_t decoded_sn, const rohc_lsb_ref_t lsb_ref_type, const struct rohc_extr_ip_bits *const bits, const char *const descr, const size_t ip_hdr_pos, struct rohc_decoded_ip_values *const decoded) |
Decode IP values from extracted bits. More... | |
static bool | check_uncomp_crc (const struct rohc_decomp *const decomp, const struct rohc_decomp_ctxt *const context, const uint8_t *const outer_ip_hdr, const uint8_t *const inner_ip_hdr, const uint8_t *const next_header, const rohc_crc_type_t crc_type, const uint8_t crc_packet) |
Check whether the CRC on uncompressed header is correct or not. More... | |
static bool | is_sn_wraparound (const struct rohc_ts cur_arrival_time, const struct rohc_ts arrival_times[ROHC_MAX_ARRIVAL_TIMES], const size_t arrival_times_nr, const size_t arrival_times_index, const size_t k, const rohc_lsb_shift_t p) |
Is SN wraparound possible? More... | |
static void | reset_extr_bits (const struct rohc_decomp_rfc3095_ctxt *const rfc3095_ctxt, struct rohc_extr_bits *const bits) |
Reset the extracted bits for next parsing. More... | |
bool | rohc_decomp_rfc3095_create (const struct rohc_decomp_ctxt *const context, struct rohc_decomp_rfc3095_ctxt **const persist_ctxt, struct rohc_decomp_volat_ctxt *const volat_ctxt, rohc_trace_callback2_t trace_cb, void *const trace_cb_priv, const int profile_id) |
Create the RFC3095 volatile and persistent parts of the context. More... | |
void | rohc_decomp_rfc3095_destroy (struct rohc_decomp_rfc3095_ctxt *const rfc3095_ctxt, const struct rohc_decomp_volat_ctxt *const volat_ctxt) |
Destroy the context. More... | |
bool | rfc3095_decomp_parse_pkt (const struct rohc_decomp_ctxt *const context, const struct rohc_buf rohc_packet, const size_t large_cid_len, rohc_packet_t *const packet_type, struct rohc_decomp_crc *const extr_crc, struct rohc_extr_bits *const bits, size_t *const rohc_hdr_len) |
Parse one IR, IR-DYN, UO-0, UO-1*, or UOR-2* packet. More... | |
uint32_t | rohc_decomp_rfc3095_get_sn (const struct rohc_decomp_ctxt *const context) |
Get the reference SN value of the context. More... | |
rohc_status_t | rfc3095_decomp_build_hdrs (const struct rohc_decomp *const decomp, const struct rohc_decomp_ctxt *const context, const rohc_packet_t packet_type, const struct rohc_decomp_crc *const extr_crc, const struct rohc_decoded_values *const decoded, const size_t payload_len, struct rohc_buf *const uncomp_hdrs, size_t *const uncomp_hdrs_len) |
Build the uncompressed headers. More... | |
bool | rfc3095_decomp_attempt_repair (const struct rohc_decomp *const decomp, const struct rohc_decomp_ctxt *const context, const struct rohc_ts pkt_arrival_time, struct rohc_decomp_crc_corr_ctxt *const crc_corr, struct rohc_extr_bits *const extr_bits) |
Attempt a packet/context repair upon CRC failure. More... | |
bool | rfc3095_decomp_decode_bits (const struct rohc_decomp_ctxt *const context, const struct rohc_extr_bits *const bits, const size_t payload_len, struct rohc_decoded_values *const decoded) |
Decode values from extracted bits. More... | |
void | rfc3095_decomp_update_ctxt (struct rohc_decomp_ctxt *const context, const struct rohc_decoded_values *const decoded, const size_t payload_len, bool *const do_change_mode) |
Update context with decoded values. More... | |
Generic framework for RFC3095-based decompression profiles such as IP-only, UDP, UDP-Lite, ESP, and RTP profiles.
|
static |
Build an uncompressed IP header.
context | The decompression context | |
decoded | The decoded IPv4 fields | |
dest | The buffer to store the IP header | |
uncomp_hdrs_max_len | The max length of the IP header | |
[out] | uncomp_hdrs_len | The length of the IPv4 header |
payload_size | The length of the IP payload | |
list_decomp | The list decompressor (IPv6 only) |
|
static |
Build an uncompressed IPv4 header.
context | The decompression context | |
decoded | The decoded IPv4 fields | |
dest | The buffer to store the IPv4 header | |
uncomp_hdrs_max_len | The max length of the IPv4 header | |
[out] | uncomp_hdrs_len | The length of the IPv4 header |
payload_size | The length of the IPv4 payload |
|
static |
Build an uncompressed IPv6 header.
context | The decompression context | |
decoded | The decoded IPv6 fields | |
dest | The buffer to store the IPv6 header | |
uncomp_hdrs_max_len | The max length of the IPv6 header | |
[out] | uncomp_hdrs_len | The length of the IPv6 header |
payload_size | The length of the IPv6 payload | |
list_decomp | The list decompressor |
|
static |
Check whether the CRC on uncompressed header is correct or not.
TODO: The CRC should be computed only on the CRC-DYNAMIC fields if the CRC-STATIC fields did not change.
decomp | The ROHC decompressor |
context | The decompression context |
outer_ip_hdr | The outer IP header |
inner_ip_hdr | The inner IP header if it exists, NULL otherwise |
next_header | The transport header, eg. UDP |
crc_type | The type of CRC |
crc_packet | The CRC extracted from the ROHC header |
|
static |
Decode IP values from extracted bits.
context | The decompression context |
ctxt | The decompression context for the IP header |
ip_id_decode | The context for decoding IP-ID offset |
decoded_sn | The SN that was decoded |
lsb_ref_type | The reference value to use to decode LSB values (used for context repair upon CRC failure) |
bits | The IP bits extracted from ROHC header (all headers included: static/dynamic chains, UO* base header, UO* extension header, UO* remainder header) |
descr | The description of the IP header |
ip_hdr_pos | The position of the IP header (1 = outer, 2 = inner) |
decoded | OUT: The corresponding decoded IP values |
|
static |
Is SN wraparound possible?
According to RFC3095, §5.3.2.2.4, step c, SN wraparound is possible if the inter-packet interval of the current packet is at least 2^k times the nominal inter-packet interval (with k the number of SN bits in the current header).
However SN wraparound may happen sooner depending on the shift parameter p of the W-LSB algorithm. If p is large, the interpretation interval is shifted on the left: the positive part of the interpretation interval is smaller. Less (lost) packets are needed to cause a wraparound.
The 'width of the positive part of the interpretation interval' (2^k - p) is used instead of the 'width of the full interpretation interval' (2^k).
A -10% marge is taken to handle problems due to clock precision.
cur_arrival_time | The arrival time of the current packet |
arrival_times | The arrival times for the last packets |
arrival_times_nr | The number of arrival times for last packets |
arrival_times_index | The index for the arrival time of the next packet |
k | The number of bits for SN |
p | The shift parameter p for SN |
|
static |
Parse the IP dynamic part of a ROHC packet.
See 5.7.7.3 and 5.7.7.4 in RFC 3095 for details.
context | The decompression context |
packet | The ROHC packet to parse |
length | The length of the ROHC packet |
bits | OUT: The bits extracted from the IP dynamic part |
list_decomp | The list decompressor (only for IPv6) |
|
static |
Decode the IPv4 dynamic part of a ROHC packet.
See 5.7.7.4 in RFC 3095 for details. Generic extension header list is not managed yet. See 3.3 in RFC 3843 for details on the Static IP Identifier (SID) flag.
Dynamic part: +---+---+---+---+---+---+---+---+ | Type of Service | +---+---+---+---+---+---+---+---+ | Time to Live | +---+---+---+---+---+---+---+---+ / Identification / 2 octets, sent verbatim +---+---+---+---+---+---+---+---+ | DF|RND|NBO|SID| 0 | +---+---+---+---+---+---+---+---+ / Generic extension header list / variable length +---+---+---+---+---+---+---+---+
context | The decompression context |
packet | The ROHC packet to decode |
length | The length of the ROHC packet |
bits | OUT: The bits extracted from the IP dynamic part |
|
static |
Decode the IPv6 dynamic part of a ROHC packet.
See 5.7.7.3 in RFC 3095 for details. Generic extension header list is not managed yet.
context | The decompression context |
packet | The ROHC packet to decode |
length | The length of the ROHC packet |
bits | OUT: The bits extracted from the IP dynamic part |
list_decomp | The list decompressor |
|
static |
Parse the extension 0 of the UO-1-ID or UOR-2* packet.
Bits extracted:
context | The decompression context |
rohc_data | The ROHC data to parse |
rohc_data_len | The length of the ROHC data to parse |
packet_type | The type of ROHC packet |
innermost_ip_hdr | The innermost IPv4 header with non-random IP-ID |
bits | IN: the bits already found in base header OUT: the bits found in the extension header 0 |
|
static |
Parse the extension 1 of the UO-1-ID or UOR-2* packet.
Bits extracted:
context | The decompression context |
rohc_data | The ROHC data to parse |
rohc_data_len | The length of the ROHC data to parse |
packet_type | The type of ROHC packet |
innermost_ip_hdr | The innermost IPv4 header with non-random IP-ID |
bits | IN: the bits already found in base header OUT: the bits found in the extension header 1 |
|
static |
Parse the extension 2 of the UO-1-ID or UOR-2* packet.
Bits extracted:
context | The decompression context |
rohc_data | The ROHC data to parse |
rohc_data_len | The length of the ROHC data to parse |
packet_type | The type of ROHC packet |
innermost_ip_hdr | The innermost IPv4 header with non-random IP-ID |
bits | IN: the bits already found in base header OUT: the bits found in the extension header 2 |
|
static |
Find out which extension is carried by the UOR-2 packet.
rohc_ext | The ROHC UOR-2 packet |
|
static |
Parse one IR packet.
IR packet (5.7.7.1): 0 1 2 3 4 5 6 7 --- --- --- --- --- --- --- --- 1 | Add-CID octet | if for small CIDs and CID != 0 +---+---+---+---+---+---+---+---+ 2 | 1 1 1 1 1 1 0 | D | +---+---+---+---+---+---+---+---+ | | 3 / 0-2 octets of CID info / 1-2 octets if for large CIDs | | +---+---+---+---+---+---+---+---+ 4 | Profile | 1 octet +---+---+---+---+---+---+---+---+ 5 | CRC | 1 octet +---+---+---+---+---+---+---+---+ | | 6 | Static chain | variable length | | +---+---+---+---+---+---+---+---+ | | 7 | Dynamic chain | present if D = 1, variable length | | +---+---+---+---+---+---+---+---+ 8 | SN | 2 octets if not RTP +---+---+---+---+---+---+---+---+ | | | Payload | variable length | | - - - - - - - - - - - - - - - -
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet | |
[out] | extr_crc | The CRC extracted from the ROHC packet |
bits | OUT: The bits extracted from the IR header | |
rohc_hdr_len | OUT: The size of the IR header |
|
static |
Parse one IR-DYN packet.
IR-DYN packet (5.7.7.2): 0 1 2 3 4 5 6 7 --- --- --- --- --- --- --- --- 1 : Add-CID octet : if for small CIDs and CID != 0 +---+---+---+---+---+---+---+---+ 2 | 1 1 1 1 1 0 0 0 | IR-DYN packet type +---+---+---+---+---+---+---+---+ : : 3 / 0-2 octets of CID info / 1-2 octets if for large CIDs : : +---+---+---+---+---+---+---+---+ 4 | Profile | 1 octet +---+---+---+---+---+---+---+---+ 5 | CRC | 1 octet +---+---+---+---+---+---+---+---+ | | 6 / Dynamic chain / variable length | | +---+---+---+---+---+---+---+---+ 7 | SN | 2 octets if not RTP +---+---+---+---+---+---+---+---+ : : / Payload / variable length : : - - - - - - - - - - - - - - - -
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
[out] | extr_crc | The CRC bits extracted from the IR-DYN header |
[out] | bits | The bits extracted from the IR-DYN header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
|
static |
Parse the IP static part of a ROHC packet.
See 5.7.7.3 and 5.7.7.4 in RFC 3095 for details.
context | The decompression context |
packet | The ROHC packet to parse |
length | The length of the ROHC packet |
bits | OUT: The bits extracted from the IP static part |
|
static |
Parse the IPv4 static part of a ROHC packet.
See 5.7.7.4 in RFC 3095 for details.
context | The decompression context |
packet | The ROHC packet to parse |
length | The length of the ROHC packet |
bits | OUT: The bits extracted from the IPv4 static part |
|
static |
Parse the IPv6 static part of a ROHC packet.
See 5.7.7.3 in RFC 3095 for details.
context | The decompression context |
packet | The ROHC packet to parse |
length | The length of the ROHC packet |
bits | OUT: The bits extracted from the IPv6 static part |
|
static |
Parse one UO-0 header.
0 1 2 3 4 5 6 7 --- --- --- --- --- --- --- --- 1 : Add-CID octet : | +---+---+---+---+---+---+---+---+ | 2 | first octet of base header | | +---+---+---+---+---+---+---+---+ | : : | 3 / 0, 1, or 2 octets of CID / | : : | +---+---+---+---+---+---+---+---+ | : remainder of base header : | 4 / see below for details / | : : | +---+---+---+---+---+---+---+---+ | : : | 5 / Extension / | : : | --- --- --- --- --- --- --- --- | : : | 6 + IP-ID of outer IPv4 header + : : (see section 5.7 or [RFC-3095]) --- --- --- --- --- --- --- --- 7 / AH data for outer list / | --- --- --- --- --- --- --- --- | : : | 8 + GRE checksum + | : : | --- --- --- --- --- --- --- --- | : : | 9 + IP-ID of inner IPv4 header + | : : | --- --- --- --- --- --- --- --- | 10 / AH data for inner list / | --- --- --- --- --- --- --- --- | : : | 11 + GRE checksum + | : : | --- --- --- --- --- --- --- --- : List of : 12 / Dynamic chains / variable, given by static chain : for additional IP headers : (includes no SN) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- : : RTP/UDP profiles only [RFC-3095] 13 + UDP Checksum + 2 octets, : : if context(UDP Checksum) != 0 --- --- --- --- --- --- --- --- UO-0 (5.7.1) 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ 2 | 0 | SN | CRC | +===+===+===+===+===+===+===+===+ Part 4 is empty.
Parts 7, 8, 10, 11 and 12 are not supported. Parts 1 and 3 are parsed in parent functions. Parts 6, 9, and 13 are parsed in sub-function. Parts 2, 4, and 5 are parsed in this function.
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
[out] | extr_crc | The CRC bits extracted from the UO-0 header |
[out] | bits | The bits extracted from the UO-0 header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
|
static |
Parse one UO-1 header for non-RTP profiles.
0 1 2 3 4 5 6 7 --- --- --- --- --- --- --- --- 1 : Add-CID octet : | +---+---+---+---+---+---+---+---+ | 2 | first octet of base header | | +---+---+---+---+---+---+---+---+ | : : | 3 / 0, 1, or 2 octets of CID / | : : | +---+---+---+---+---+---+---+---+ | : remainder of base header : | 4 / see below for details / | : : | +---+---+---+---+---+---+---+---+ | : : | 5 / Extension / | : : | --- --- --- --- --- --- --- --- | : : | 6 + IP-ID of outer IPv4 header + : : (see section 5.7 or [RFC-3095]) --- --- --- --- --- --- --- --- 7 / AH data for outer list / | --- --- --- --- --- --- --- --- | : : | 8 + GRE checksum + | : : | --- --- --- --- --- --- --- --- | : : | 9 + IP-ID of inner IPv4 header + | : : | --- --- --- --- --- --- --- --- | 10 / AH data for inner list / | --- --- --- --- --- --- --- --- | : : | 11 + GRE checksum + | : : | --- --- --- --- --- --- --- --- : List of : 12 / Dynamic chains / variable, given by static chain : for additional IP headers : (includes no SN) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- : : RTP/UDP profiles only [RFC-3095] 13 + UDP Checksum + 2 octets, : : if context(UDP Checksum) != 0 --- --- --- --- --- --- --- --- UO-1 (5.11.3): 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ 2 | 1 0 | IP-ID | +===+===+===+===+===+===+===+===+ 4 | SN | CRC | +---+---+---+---+---+---+---+---+
Parts 7, 8, 10, 11 and 12 are not supported. Parts 1 and 3 are parsed in parent functions. Parts 6, 9, and 13 are parsed in sub-function. Parts 2, 4, and 5 are parsed in this function.
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
[out] | extr_crc | The CRC bits extracted from the UO-1 header |
[out] | bits | The bits extracted from the UO-1 header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
|
static |
Parse one UO-1-ID header for RTP profiles.
0 1 2 3 4 5 6 7 --- --- --- --- --- --- --- --- 1 : Add-CID octet : | +---+---+---+---+---+---+---+---+ | 2 | first octet of base header | | +---+---+---+---+---+---+---+---+ | : : | 3 / 0, 1, or 2 octets of CID / | : : | +---+---+---+---+---+---+---+---+ | : remainder of base header : | 4 / see below for details / | : : | +---+---+---+---+---+---+---+---+ | : : | 5 / Extension / | : : | --- --- --- --- --- --- --- --- | : : | 6 + IP-ID of outer IPv4 header + : : (see section 5.7 or [RFC-3095]) --- --- --- --- --- --- --- --- 7 / AH data for outer list / | --- --- --- --- --- --- --- --- | : : | 8 + GRE checksum + | : : | --- --- --- --- --- --- --- --- | : : | 9 + IP-ID of inner IPv4 header + | : : | --- --- --- --- --- --- --- --- | 10 / AH data for inner list / | --- --- --- --- --- --- --- --- | : : | 11 + GRE checksum + | : : | --- --- --- --- --- --- --- --- : List of : 12 / Dynamic chains / variable, given by static chain : for additional IP headers : (includes no SN) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- : : RTP/UDP profiles only [RFC-3095] 13 + UDP Checksum + 2 octets, : : if context(UDP Checksum) != 0 --- --- --- --- --- --- --- --- UO-1-ID (5.7.3): 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ 2 | 1 0 |T=0| IP-ID | +===+===+===+===+===+===+===+===+ 4 | X | SN | CRC | +---+---+---+---+---+---+---+---+ X: X = 0 indicates that no extension is present; X = 1 indicates that an extension is present. T: T = 0 indicates format UO-1-ID; T = 1 indicates format UO-1-TS. 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.
Parts 7, 8, 10, 11 and 12 are not supported. Parts 1 and 3 are parsed in parent functions. Parts 6, 9, and 13 are parsed in sub-function. Parts 2, 4, and 5 are parsed in this function.
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
[out] | extr_crc | The CRC bits extracted from the UO-1-ID header |
[out] | bits | The bits extracted from the UO-1-ID header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
|
static |
Parse one UO-1 header for RTP profile.
0 1 2 3 4 5 6 7 --- --- --- --- --- --- --- --- 1 : Add-CID octet : | +---+---+---+---+---+---+---+---+ | 2 | first octet of base header | | +---+---+---+---+---+---+---+---+ | : : | 3 / 0, 1, or 2 octets of CID / | : : | +---+---+---+---+---+---+---+---+ | : remainder of base header : | 4 / see below for details / | : : | +---+---+---+---+---+---+---+---+ | : : | 5 / Extension / | : : | --- --- --- --- --- --- --- --- | : : | 6 + IP-ID of outer IPv4 header + : : (see section 5.7 or [RFC-3095]) --- --- --- --- --- --- --- --- 7 / AH data for outer list / | --- --- --- --- --- --- --- --- | : : | 8 + GRE checksum + | : : | --- --- --- --- --- --- --- --- | : : | 9 + IP-ID of inner IPv4 header + | : : | --- --- --- --- --- --- --- --- | 10 / AH data for inner list / | --- --- --- --- --- --- --- --- | : : | 11 + GRE checksum + | : : | --- --- --- --- --- --- --- --- : List of : 12 / Dynamic chains / variable, given by static chain : for additional IP headers : (includes no SN) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- : : RTP/UDP profiles only [RFC-3095] 13 + UDP Checksum + 2 octets, : : if context(UDP Checksum) != 0 --- --- --- --- --- --- --- --- UO-1-RTP (5.7.3): 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ 2 | 1 0 | TS | +===+===+===+===+===+===+===+===+ 4 | M | SN | CRC | +---+---+---+---+---+---+---+---+ T: T = 0 indicates format UO-1-ID; T = 1 indicates format UO-1-TS. UO-1-RTP cannot be used if there is no IPv4 header in the context or if value(RND) and value(RND2) are both 1.
Parts 7, 8, 10, 11 and 12 are not supported. Parts 1 and 3 are parsed in parent functions. Parts 6, 9, and 13 are parsed in sub-function. Parts 2, 4, and 5 are parsed in this function.
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
[out] | extr_crc | The CRC bits extracted from the UO-1-RTP header |
[out] | bits | The bits extracted from the UO-1-RTP header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
|
static |
Parse one UO-1-TS header for RTP profiles.
0 1 2 3 4 5 6 7 --- --- --- --- --- --- --- --- 1 : Add-CID octet : | +---+---+---+---+---+---+---+---+ | 2 | first octet of base header | | +---+---+---+---+---+---+---+---+ | : : | 3 / 0, 1, or 2 octets of CID / | : : | +---+---+---+---+---+---+---+---+ | : remainder of base header : | 4 / see below for details / | : : | +---+---+---+---+---+---+---+---+ | : : | 5 / Extension / | : : | --- --- --- --- --- --- --- --- | : : | 6 + IP-ID of outer IPv4 header + : : (see section 5.7 or [RFC-3095]) --- --- --- --- --- --- --- --- 7 / AH data for outer list / | --- --- --- --- --- --- --- --- | : : | 8 + GRE checksum + | : : | --- --- --- --- --- --- --- --- | : : | 9 + IP-ID of inner IPv4 header + | : : | --- --- --- --- --- --- --- --- | 10 / AH data for inner list / | --- --- --- --- --- --- --- --- | : : | 11 + GRE checksum + | : : | --- --- --- --- --- --- --- --- : List of : 12 / Dynamic chains / variable, given by static chain : for additional IP headers : (includes no SN) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- : : RTP/UDP profiles only [RFC-3095] 13 + UDP Checksum + 2 octets, : : if context(UDP Checksum) != 0 --- --- --- --- --- --- --- --- UO-1-TS (5.7.3): 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ 2 | 1 0 |T=1| TS | +===+===+===+===+===+===+===+===+ 4 | M | SN | CRC | +---+---+---+---+---+---+---+---+ T: T = 0 indicates format UO-1-ID; T = 1 indicates format UO-1-TS.
Parts 7, 8, 10, 11 and 12 are not supported. Parts 1 and 3 are parsed in parent functions. Parts 6, 9, and 13 are parsed in sub-function. Parts 2, 4, and 5 are parsed in this function.
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
[out] | extr_crc | The CRC bits extracted from the UO-1-TS header |
[out] | bits | The bits extracted from the UO-1-TS header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
|
static |
Parse the remainder of the UO* header.
0 1 2 3 4 5 6 7 --- --- --- --- --- --- --- --- 1 : Add-CID octet : | +---+---+---+---+---+---+---+---+ | 2 | first octet of base header | | +---+---+---+---+---+---+---+---+ | : : | 3 / 0, 1, or 2 octets of CID / | : : | +---+---+---+---+---+---+---+---+ | : remainder of base header : | 4 / see below for details / | : : | +---+---+---+---+---+---+---+---+ | : : | 5 / Extension / | : : | --- --- --- --- --- --- --- --- | : : | 6 + IP-ID of outer IPv4 header + : : (see section 5.7 or [RFC-3095]) --- --- --- --- --- --- --- --- 7 / AH data for outer list / | --- --- --- --- --- --- --- --- | : : | 8 + GRE checksum + | : : | --- --- --- --- --- --- --- --- | : : | 9 + IP-ID of inner IPv4 header + | : : | --- --- --- --- --- --- --- --- | 10 / AH data for inner list / | --- --- --- --- --- --- --- --- | : : | 11 + GRE checksum + | : : | --- --- --- --- --- --- --- --- : List of : 12 / Dynamic chains / variable, given by static chain : for additional IP headers : (includes no SN) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- : : RTP/UDP profiles only [RFC-3095] 13 + UDP Checksum + 2 octets, : : if context(UDP Checksum) != 0 --- --- --- --- --- --- --- ---
Parts 7, 8, 10, 11 and 12 are not supported. Parts 1, 2, 3, 4, and 5 are parsed in parent functions. Parts 6 and 9 are parsed in this function. Part 13 is parsed in profile-specific function.
context | The decompression context |
rohc_packet | The ROHC packet to decode |
rohc_length | The length of the ROHC packet |
bits | OUT: The bits extracted from the UO* header |
rohc_hdr_len | OUT: The size of the UO* header |
|
static |
Parse one UOR-2 header for non-RTP profiles.
0 1 2 3 4 5 6 7 --- --- --- --- --- --- --- --- 1 : Add-CID octet : | +---+---+---+---+---+---+---+---+ | 2 | first octet of base header | | +---+---+---+---+---+---+---+---+ | : : | 3 / 0, 1, or 2 octets of CID / | : : | +---+---+---+---+---+---+---+---+ | : remainder of base header : | 4 / see below for details / | : : | +---+---+---+---+---+---+---+---+ | : : | 5 / Extension / | : : | --- --- --- --- --- --- --- --- | : : | 6 + IP-ID of outer IPv4 header + : : (see section 5.7 or [RFC-3095]) --- --- --- --- --- --- --- --- 7 / AH data for outer list / | --- --- --- --- --- --- --- --- | : : | 8 + GRE checksum + | : : | --- --- --- --- --- --- --- --- | : : | 9 + IP-ID of inner IPv4 header + | : : | --- --- --- --- --- --- --- --- | 10 / AH data for inner list / | --- --- --- --- --- --- --- --- | : : | 11 + GRE checksum + | : : | --- --- --- --- --- --- --- --- : List of : 12 / Dynamic chains / variable, given by static chain : for additional IP headers : (includes no SN) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- : : RTP/UDP profiles only [RFC-3095] 13 + UDP Checksum + 2 octets, : : if context(UDP Checksum) != 0 --- --- --- --- --- --- --- --- UOR-2 (5.11.3): 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ 2 | 1 1 0 | SN | +===+===+===+===+===+===+===+===+ 4 | X | CRC | +---+---+---+---+---+---+---+---+
Parts 7, 8, 10, 11 and 12 are not supported. Parts 1 and 3 are parsed in parent functions. Parts 6, 9, and 13 are parsed in sub-function. Parts 2, 4, and 5 are parsed in this function.
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
[out] | extr_crc | The CRC bits extracted from the UOR-2 header |
[out] | bits | The bits extracted from the UOR-2 header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
|
static |
Parse one UOR-2-ID header for RTP profile (in 2 passes if needed)
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
[out] | extr_crc | The CRC bits extracted from the UOR-2-ID header |
[out] | bits | The bits extracted from the UOR-2-ID header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
|
static |
Parse one UOR-2-ID header for RTP profile.
0 1 2 3 4 5 6 7 --- --- --- --- --- --- --- --- 1 : Add-CID octet : | +---+---+---+---+---+---+---+---+ | 2 | first octet of base header | | +---+---+---+---+---+---+---+---+ | : : | 3 / 0, 1, or 2 octets of CID / | : : | +---+---+---+---+---+---+---+---+ | : remainder of base header : | 4 / see below for details / | : : | +---+---+---+---+---+---+---+---+ | : : | 5 / Extension / | : : | --- --- --- --- --- --- --- --- | : : | 6 + IP-ID of outer IPv4 header + : : (see section 5.7 or [RFC-3095]) --- --- --- --- --- --- --- --- 7 / AH data for outer list / | --- --- --- --- --- --- --- --- | : : | 8 + GRE checksum + | : : | --- --- --- --- --- --- --- --- | : : | 9 + IP-ID of inner IPv4 header + | : : | --- --- --- --- --- --- --- --- | 10 / AH data for inner list / | --- --- --- --- --- --- --- --- | : : | 11 + GRE checksum + | : : | --- --- --- --- --- --- --- --- : List of : 12 / Dynamic chains / variable, given by static chain : for additional IP headers : (includes no SN) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- : : RTP/UDP profiles only [RFC-3095] 13 + UDP Checksum + 2 octets, : : if context(UDP Checksum) != 0 --- --- --- --- --- --- --- --- UOR-2-ID (5.7.4): 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ 2 | 1 1 0 | IP-ID | +===+===+===+===+===+===+===+===+ 4a |T=0| M | SN | +---+---+---+---+---+---+---+---+ 4b | X | CRC | +---+---+---+---+---+---+---+---+ X: X = 0 indicates that no extension is present; X = 1 indicates that an extension is present. T: T = 0 indicates format UOR-2-ID; T = 1 indicates format UOR-2-TS.
Parts 7, 8, 10, 11 and 12 are not supported. Parts 1 and 3 are parsed in parent functions. Parts 6, 9, and 13 are parsed in sub-function. Parts 2, 4, and 5 are parsed in this function.
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
outer_rnd | The forced value for outer RND (used for reparsing) | |
inner_rnd | The forced value for inner RND (used for reparsing) | |
[out] | extr_crc | The CRC bits extracted from the UOR-2-ID header |
[out] | bits | The bits extracted from the UOR-2-ID header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
[out] | need_reparse | true if packet needs to be parsed again |
|
static |
Parse one UOR-2 header for RTP profile (in 2 passes if needed)
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
[out] | extr_crc | The CRC bits extracted from the UOR-2-RTP header |
[out] | bits | The bits extracted from the UOR-2-RTP header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
|
static |
Parse one UOR-2-RTP header for RTP profile.
0 1 2 3 4 5 6 7 --- --- --- --- --- --- --- --- 1 : Add-CID octet : | +---+---+---+---+---+---+---+---+ | 2 | first octet of base header | | +---+---+---+---+---+---+---+---+ | : : | 3 / 0, 1, or 2 octets of CID / | : : | +---+---+---+---+---+---+---+---+ | : remainder of base header : | 4 / see below for details / | : : | +---+---+---+---+---+---+---+---+ | : : | 5 / Extension / | : : | --- --- --- --- --- --- --- --- | : : | 6 + IP-ID of outer IPv4 header + : : (see section 5.7 or [RFC-3095]) --- --- --- --- --- --- --- --- 7 / AH data for outer list / | --- --- --- --- --- --- --- --- | : : | 8 + GRE checksum + | : : | --- --- --- --- --- --- --- --- | : : | 9 + IP-ID of inner IPv4 header + | : : | --- --- --- --- --- --- --- --- | 10 / AH data for inner list / | --- --- --- --- --- --- --- --- | : : | 11 + GRE checksum + | : : | --- --- --- --- --- --- --- --- : List of : 12 / Dynamic chains / variable, given by static chain : for additional IP headers : (includes no SN) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- : : RTP/UDP profiles only [RFC-3095] 13 + UDP Checksum + 2 octets, : : if context(UDP Checksum) != 0 --- --- --- --- --- --- --- --- UOR-2-RTP (5.7.4): 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ 2 | 1 1 0 | TS | +===+===+===+===+===+===+===+===+ 4a | TS| M | SN | +---+---+---+---+---+---+---+---+ 4b | X | CRC | +---+---+---+---+---+---+---+---+ X: X = 0 indicates that no extension is present; X = 1 indicates that an extension is present.
Parts 7, 8, 10, 11 and 12 are not supported. Parts 1 and 3 are parsed in parent functions. Parts 6, 9, and 13 are parsed in sub-function. Parts 2, 4, and 5 are parsed in this function.
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
outer_rnd | The forced value for outer RND (used for reparsing) | |
inner_rnd | The forced value for inner RND (used for reparsing) | |
[out] | extr_crc | The CRC bits extracted from the UOR-2-RTP header |
[out] | bits | The bits extracted from the UOR-2-RTP header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
[out] | need_reparse | true if packet needs to be parsed again |
|
static |
Parse one UOR-2-TS header for RTP profile (in 2 passes if needed)
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
[out] | extr_crc | The CRC bits extracted from the UOR-2-TS header |
[out] | bits | The bits extracted from the UOR-2-TS header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
|
static |
Parse one UOR-2-TS header for RTP profile.
0 1 2 3 4 5 6 7 --- --- --- --- --- --- --- --- 1 : Add-CID octet : | +---+---+---+---+---+---+---+---+ | 2 | first octet of base header | | +---+---+---+---+---+---+---+---+ | : : | 3 / 0, 1, or 2 octets of CID / | : : | +---+---+---+---+---+---+---+---+ | : remainder of base header : | 4 / see below for details / | : : | +---+---+---+---+---+---+---+---+ | : : | 5 / Extension / | : : | --- --- --- --- --- --- --- --- | : : | 6 + IP-ID of outer IPv4 header + : : (see section 5.7 or [RFC-3095]) --- --- --- --- --- --- --- --- 7 / AH data for outer list / | --- --- --- --- --- --- --- --- | : : | 8 + GRE checksum + | : : | --- --- --- --- --- --- --- --- | : : | 9 + IP-ID of inner IPv4 header + | : : | --- --- --- --- --- --- --- --- | 10 / AH data for inner list / | --- --- --- --- --- --- --- --- | : : | 11 + GRE checksum + | : : | --- --- --- --- --- --- --- --- : List of : 12 / Dynamic chains / variable, given by static chain : for additional IP headers : (includes no SN) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- : : RTP/UDP profiles only [RFC-3095] 13 + UDP Checksum + 2 octets, : : if context(UDP Checksum) != 0 --- --- --- --- --- --- --- --- UOR-2-TS (5.7.4): 0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ 2 | 1 1 0 | TS | +===+===+===+===+===+===+===+===+ 4a |T=1| M | SN | +---+---+---+---+---+---+---+---+ 4b | X | CRC | +---+---+---+---+---+---+---+---+ X: X = 0 indicates that no extension is present; X = 1 indicates that an extension is present. T: T = 0 indicates format UOR-2-ID; T = 1 indicates format UOR-2-TS.
Parts 7, 8, 10, 11 and 12 are not supported. Parts 1 and 3 are parsed in parent functions. Parts 6, 9, and 13 are parsed in sub-function. Parts 2, 4, and 5 are parsed in this function.
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
rohc_length | The length of the ROHC packet | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
outer_rnd | The forced value for outer RND (used for reparsing) | |
inner_rnd | The forced value for inner RND (used for reparsing) | |
[out] | extr_crc | The CRC bits extracted from the UOR-2-TS header |
[out] | bits | The bits extracted from the UOR-2-TS header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
[out] | need_reparse | true if packet needs to be parsed again |
|
static |
Reset the extracted bits for next parsing.
rfc3095_ctxt | The generic decompression context | |
[out] | bits | The extracted bits to reset |
bool rfc3095_decomp_attempt_repair | ( | const struct rohc_decomp *const | decomp, |
const struct rohc_decomp_ctxt *const | context, | ||
const struct rohc_ts | pkt_arrival_time, | ||
struct rohc_decomp_crc_corr_ctxt *const | crc_corr, | ||
struct rohc_extr_bits *const | extr_bits | ||
) |
Attempt a packet/context repair upon CRC failure.
decomp | The ROHC decompressor | |
context | The decompression context | |
pkt_arrival_time | The arrival time of the ROHC packet that caused the CRC failure | |
[in,out] | crc_corr | The context for corrections upon CRC failures |
[in,out] | extr_bits | The bits extracted from the ROHC header |
rohc_status_t rfc3095_decomp_build_hdrs | ( | const struct rohc_decomp *const | decomp, |
const struct rohc_decomp_ctxt *const | context, | ||
const rohc_packet_t | packet_type, | ||
const struct rohc_decomp_crc *const | extr_crc, | ||
const struct rohc_decoded_values *const | decoded, | ||
const size_t | payload_len, | ||
struct rohc_buf *const | uncomp_hdrs, | ||
size_t *const | uncomp_hdrs_len | ||
) |
Build the uncompressed headers.
decomp | The ROHC decompressor | |
context | The decompression context | |
packet_type | The type of ROHC packet | |
extr_crc | The CRC bits extracted from the ROHC header | |
decoded | The values decoded from ROHC header | |
payload_len | The length of the packet payload | |
[out] | uncomp_hdrs | The buffer to store the uncompressed headers |
[out] | uncomp_hdrs_len | The length of the uncompressed headers written into the buffer |
bool rfc3095_decomp_decode_bits | ( | const struct rohc_decomp_ctxt *const | context, |
const struct rohc_extr_bits *const | bits, | ||
const size_t | payload_len, | ||
struct rohc_decoded_values *const | decoded | ||
) |
Decode values from extracted bits.
The following values are decoded:
Other fields may be decoded by the profile-specific callback named decode_values_from_bits.
This function is one of the functions that must exist in one profile for the framework to work.
context | The decompression context | |
bits | The bits extracted from the ROHC packet | |
payload_len | The length of the packet payload (in bytes) | |
[out] | decoded | The corresponding decoded values |
bool rfc3095_decomp_parse_pkt | ( | const struct rohc_decomp_ctxt *const | context, |
const struct rohc_buf | rohc_packet, | ||
const size_t | large_cid_len, | ||
rohc_packet_t *const | packet_type, | ||
struct rohc_decomp_crc *const | extr_crc, | ||
struct rohc_extr_bits *const | bits, | ||
size_t *const | rohc_hdr_len | ||
) |
Parse one IR, IR-DYN, UO-0, UO-1*, or UOR-2* packet.
context | The decompression context | |
rohc_packet | The ROHC packet to decode | |
large_cid_len | The length of the optional large CID field | |
[in,out] | packet_type | IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet |
[out] | extr_crc | The CRC bits extracted from the ROHC header |
[out] | bits | The bits extracted from the ROHC header |
[out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
void rfc3095_decomp_update_ctxt | ( | struct rohc_decomp_ctxt *const | context, |
const struct rohc_decoded_values *const | decoded, | ||
const size_t | payload_len, | ||
bool *const | do_change_mode | ||
) |
Update context with decoded values.
The following decoded values are updated in context:
This function is one of the functions that must exist in one profile for the framework to work.
context | The decompression context | |
decoded | The decoded values to update in the context | |
payload_len | The length of the packet payload | |
[out] | do_change_mode | Whether the profile context wants to change its operational mode or not |
bool rohc_decomp_rfc3095_create | ( | const struct rohc_decomp_ctxt *const | context, |
struct rohc_decomp_rfc3095_ctxt **const | persist_ctxt, | ||
struct rohc_decomp_volat_ctxt *const | volat_ctxt, | ||
rohc_trace_callback2_t | trace_cb, | ||
void *const | trace_cb_priv, | ||
const int | profile_id | ||
) |
Create the RFC3095 volatile and persistent parts of the context.
This function is one of the functions that must exist in one profile for the framework to work.
context | The decompression context | |
[out] | persist_ctxt | The persistent part of the decompression context |
[out] | volat_ctxt | The volatile part of the decompression context |
trace_cb | The function to call for printing traces | |
trace_cb_priv | An optional private context, may be NULL | |
profile_id | The ID of the associated decompression profile |
void rohc_decomp_rfc3095_destroy | ( | struct rohc_decomp_rfc3095_ctxt *const | rfc3095_ctxt, |
const struct rohc_decomp_volat_ctxt *const | volat_ctxt | ||
) |
Destroy the context.
This function is one of the functions that must exist in one profile for the framework to work.
rfc3095_ctxt | The generic decompression context |
volat_ctxt | The volatile part of the decompression context |
uint32_t rohc_decomp_rfc3095_get_sn | ( | const struct rohc_decomp_ctxt *const | context | ) |
Get the reference SN value of the context.
This function is one of the functions that must exist in one profile for the framework to work.
context | The decompression context |