ROHC compression/decompression library
Functions | Variables
d_tcp.c File Reference

ROHC decompression context for the TCP profile. More...

#include "d_tcp_defines.h"
#include "d_tcp_static.h"
#include "d_tcp_dynamic.h"
#include "d_tcp_irregular.h"
#include "d_tcp_opts_list.h"
#include "rohc_decomp.h"
#include "rohc_decomp_internals.h"
#include "rohc_packets.h"
#include "rohc_bit_ops.h"
#include "rohc_traces_internal.h"
#include "rohc_utils.h"
#include "rohc_debug.h"
#include "schemes/rfc4996.h"
#include "schemes/decomp_wlsb.h"
#include "schemes/tcp_sack.h"
#include "schemes/tcp_ts.h"
#include "protocols/tcp.h"
#include "protocols/ip_numbers.h"
#include "crc.h"
#include "config.h"
#include <string.h>
#include <stdint.h>
Include dependency graph for d_tcp.c:

Functions

static bool d_tcp_create (const struct rohc_decomp_ctxt *const context, struct d_tcp_context **const persist_ctxt, struct rohc_decomp_volat_ctxt *const volat_ctxt)
 Create the TCP decompression context. More...
 
static void d_tcp_destroy (struct d_tcp_context *const tcp_context, const struct rohc_decomp_volat_ctxt *const volat_ctxt)
 Destroy the context. More...
 
static rohc_packet_t tcp_detect_packet_type (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len)
 Detect the type of ROHC packet for the TCP profile. More...
 
static uint32_t d_tcp_get_msn (const struct rohc_decomp_ctxt *const context)
 Get the reference MSN value of the context. More...
 
static bool d_tcp_parse_packet (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_tcp_extr_bits *const extr_bits, size_t *const rohc_hdr_len)
 Parse the given ROHC packet for the TCP profile. More...
 
static bool d_tcp_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, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len)
 Parse the given IR packet for the TCP profile. More...
 
static bool d_tcp_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, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len)
 Parse othe given IR-DYN packet for the TCP profile. More...
 
static bool d_tcp_parse_CO (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, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len)
 Parse the given CO packet for the TCP profile. More...
 
static bool d_tcp_parse_rnd_1 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given rnd_1 packet for the TCP profile. More...
 
static bool d_tcp_parse_rnd_2 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given rnd_2 packet for the TCP profile. More...
 
static bool d_tcp_parse_rnd_3 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given rnd_3 packet for the TCP profile. More...
 
static bool d_tcp_parse_rnd_4 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given rnd_4 packet for the TCP profile. More...
 
static bool d_tcp_parse_rnd_5 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given rnd_5 packet for the TCP profile. More...
 
static bool d_tcp_parse_rnd_6 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given rnd_6 packet for the TCP profile. More...
 
static bool d_tcp_parse_rnd_7 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given rnd_7 packet for the TCP profile. More...
 
static bool d_tcp_parse_rnd_8 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given rnd_8 packet for the TCP profile. More...
 
static bool d_tcp_parse_seq_1 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given seq_1 packet for the TCP profile. More...
 
static bool d_tcp_parse_seq_2 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given seq_2 packet for the TCP profile. More...
 
static bool d_tcp_parse_seq_3 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given seq_3 packet for the TCP profile. More...
 
static bool d_tcp_parse_seq_4 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given seq_4 packet for the TCP profile. More...
 
static bool d_tcp_parse_seq_5 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given seq_5 packet for the TCP profile. More...
 
static bool d_tcp_parse_seq_6 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given seq_6 packet for the TCP profile. More...
 
static bool d_tcp_parse_seq_7 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given seq_7 packet for the TCP profile. More...
 
static bool d_tcp_parse_seq_8 (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given seq_8 packet for the TCP profile. More...
 
static bool d_tcp_parse_co_common (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_decomp_crc *const extr_crc, struct rohc_tcp_extr_bits *const bits, size_t *const rohc_hdr_len, bool *const has_opts_list)
 Parse the given co_common packet for the TCP profile. More...
 
static void d_tcp_reset_extr_bits (const struct rohc_decomp_ctxt *const context, struct rohc_tcp_extr_bits *const bits)
 Reset the extracted bits for next parsing. More...
 
static bool d_tcp_decode_bits (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_extr_bits *const bits, const size_t payload_len, struct rohc_tcp_decoded_values *const decoded)
 Decode values from extracted bits. More...
 
static bool d_tcp_decode_bits_ip_hdrs (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_extr_bits *const bits, struct rohc_tcp_decoded_values *const decoded)
 Decode values for all IP headers from extracted bits. More...
 
static bool d_tcp_decode_bits_ip_hdr (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_extr_ip_bits *const ip_bits, const ip_context_t *const ip_context, const uint16_t decoded_msn, struct rohc_tcp_decoded_ip_values *const ip_decoded)
 Decode values for one IP header from extracted bits. More...
 
static bool d_tcp_decode_bits_tcp_hdr (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_extr_bits *const bits, const size_t payload_len, struct rohc_tcp_decoded_values *const decoded)
 Decode values for the TCP header from extracted bits. More...
 
static void d_tcp_decode_bits_tcp_flags (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_extr_bits *const bits, struct rohc_tcp_decoded_values *const decoded)
 Decode values for the TCP header flags from extracted bits. More...
 
static bool d_tcp_decode_bits_tcp_opts (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_extr_bits *const bits, struct rohc_tcp_decoded_values *const decoded)
 Decode values for the TCP options from extracted bits. More...
 
static bool d_tcp_decode_opt_ts_field (const struct rohc_decomp_ctxt *const context, const char *const descr, const struct rohc_lsb_decode *const lsb_ctxt, const struct rohc_lsb_field32 ts, uint32_t *const ts_decoded)
 Decode the given TS field of the TCP TimeStamp (TS) option. More...
 
static void d_tcp_decode_opt_sack (const struct rohc_decomp_ctxt *const context, const uint32_t ack_num, const struct d_tcp_opt_sack bits, struct d_tcp_opt_sack *const decoded)
 Decode the TCP SACK option. More...
 
static bool d_tcp_build_ipv4_hdr (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_ip_values *const decoded, struct rohc_buf *const uncomp_packet, size_t *const ip_hdr_len)
 Build one single uncompressed IPv4 header. More...
 
static bool d_tcp_build_ipv6_hdr (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_ip_values *const decoded, struct rohc_buf *const uncomp_packet, size_t *const ip_hdr_len)
 Build one single uncompressed IPv6 header. More...
 
static bool d_tcp_build_ip_hdr (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_ip_values *const decoded, struct rohc_buf *const uncomp_packet, size_t *const ip_hdr_len)
 Build one single uncompressed IP header. More...
 
static bool d_tcp_build_ip_hdrs (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_values *const decoded, struct rohc_buf *const uncomp_packet, size_t *const ip_hdrs_len)
 Build all of the uncompressed IP headers. More...
 
static bool d_tcp_build_tcp_hdr (const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_values *const decoded, struct rohc_buf *const uncomp_packet, size_t *const tcp_full_len)
 Build the uncompressed TCP header. More...
 
static rohc_status_t d_tcp_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_tcp_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...
 
static bool d_tcp_check_uncomp_crc (const struct rohc_decomp *const decomp, const struct rohc_decomp_ctxt *const context, struct rohc_buf *const uncomp_hdrs, 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 d_tcp_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_tcp_extr_bits *const bits)
 Attempt a packet/context repair upon CRC failure. More...
 
static void d_tcp_update_ctxt (struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_values *const decoded, const size_t payload_len, bool *const do_change_mode)
 Update the decompression context with the infos of current packet. More...
 

Variables

const struct rohc_decomp_profile d_tcp_profile
 Define the decompression part of the TCP profile as described in the RFC 3095. More...
 

Detailed Description

ROHC decompression context for the TCP profile.

Author
FWX rohc_.nosp@m.team.nosp@m.@dial.nosp@m.ine..nosp@m.fr
Didier Barvaux didie.nosp@m.r@ba.nosp@m.rvaux.nosp@m..org
Didier Barvaux didie.nosp@m.r.ba.nosp@m.rvaux.nosp@m.@tou.nosp@m.louse.nosp@m..viv.nosp@m.eris..nosp@m.com

Function Documentation

static bool d_tcp_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_tcp_extr_bits *const  bits 
)
static

Attempt a packet/context repair upon CRC failure.

Parameters
decompThe ROHC decompressor
contextThe decompression context
pkt_arrival_timeThe arrival time of the ROHC packet that caused the CRC failure
[in,out]crc_corrThe context for corrections upon CRC failures
[in,out]bitsThe bits extracted from the ROHC header
Returns
true if repair is possible, false if not
static rohc_status_t d_tcp_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_tcp_decoded_values *const  decoded,
const size_t  payload_len,
struct rohc_buf *const  uncomp_hdrs,
size_t *const  uncomp_hdrs_len 
)
static

Build the uncompressed headers.

Build all the uncompressed IP headers, TCP headers from the context and packet informations.

Parameters
decompThe ROHC decompressor
contextThe decompression context
packet_typeThe type of ROHC packet
extr_crcThe CRC bits extracted from the ROHC header
decodedThe values decoded from ROHC header
payload_lenThe length of the packet payload (in bytes)
[out]uncomp_hdrsThe uncompressed headers being built
[out]uncomp_hdrs_lenThe length of the uncompressed headers written into the buffer
Returns
Possible values:
  • ROHC_STATUS_OK if headers are built successfully,
  • ROHC_STATUS_BAD_CRC if headers do not match CRC,
  • ROHC_STATUS_OUTPUT_TOO_SMALL if uncomp_packet is too small
static bool d_tcp_build_ip_hdr ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_ip_values *const  decoded,
struct rohc_buf *const  uncomp_packet,
size_t *const  ip_hdr_len 
)
static

Build one single uncompressed IP header.

Build one single uncompressed IP header - IPv4 or IPv6 - from the context and packet informations.

Parameters
contextThe decompression context
decodedThe values decoded from the ROHC packet
[out]uncomp_packetThe uncompressed packet being built
[out]ip_hdr_lenThe length of the IP header (in bytes)
Returns
true if IP header was successfully built, false if the output uncomp_packet was not large enough
static bool d_tcp_build_ip_hdrs ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_values *const  decoded,
struct rohc_buf *const  uncomp_packet,
size_t *const  ip_hdrs_len 
)
static

Build all of the uncompressed IP headers.

Build all of the uncompressed IP headers - IPv4 or IPv6 - from the context and packet informations.

Parameters
contextThe decompression context
decodedThe values decoded from the ROHC packet
[out]uncomp_packetThe uncompressed packet being built
[out]ip_hdrs_lenThe length of all the IP headers (in bytes)
Returns
true if IP headers were successfully built, false if the output uncomp_packet was not large enough
static bool d_tcp_build_ipv4_hdr ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_ip_values *const  decoded,
struct rohc_buf *const  uncomp_packet,
size_t *const  ip_hdr_len 
)
static

Build one single uncompressed IPv4 header.

Build one single uncompressed IPv4 header from the context and packet informations.

Parameters
contextThe decompression context
decodedThe values decoded from the ROHC packet
[out]uncomp_packetThe uncompressed packet being built
[out]ip_hdr_lenThe length of the IPv4 header (in bytes)
Returns
true if IPv4 header was successfully built, false if the output uncomp_packet was not large enough
static bool d_tcp_build_ipv6_hdr ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_ip_values *const  decoded,
struct rohc_buf *const  uncomp_packet,
size_t *const  ip_hdr_len 
)
static

Build one single uncompressed IPv6 header.

Build one single uncompressed IPv6 header - including IPv6 extension headers - from the context and packet informations.

Parameters
contextThe decompression context
decodedThe values decoded from the ROHC packet
[out]uncomp_packetThe uncompressed packet being built
[out]ip_hdr_lenThe length of the IPv6 header (in bytes)
Returns
true if IPv6 header was successfully built, false if the output uncomp_packet was not large enough
static bool d_tcp_build_tcp_hdr ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_values *const  decoded,
struct rohc_buf *const  uncomp_packet,
size_t *const  tcp_full_len 
)
static

Build the uncompressed TCP header.

Build the uncompressed TCP header - including the TCP options - from the context and packet informations.

Parameters
contextThe decompression context
decodedThe values decoded from ROHC header
[out]uncomp_packetThe uncompressed packet being built
[out]tcp_full_lenThe length of the TCP header (in bytes)
Returns
true if TCP header was successfully built, false if the output uncomp_packet was not large enough
static bool d_tcp_check_uncomp_crc ( const struct rohc_decomp *const  decomp,
const struct rohc_decomp_ctxt *const  context,
struct rohc_buf *const  uncomp_hdrs,
const rohc_crc_type_t  crc_type,
const uint8_t  crc_packet 
)
static

Check whether the CRC on uncompressed header is correct or not.

Parameters
decompThe ROHC decompressor
contextThe decompression context
uncomp_hdrsThe uncompressed headers
crc_typeThe type of CRC
crc_packetThe CRC extracted from the ROHC header
Returns
true if the CRC is correct, false otherwise
static bool d_tcp_create ( const struct rohc_decomp_ctxt *const  context,
struct d_tcp_context **const  persist_ctxt,
struct rohc_decomp_volat_ctxt *const  volat_ctxt 
)
static

Create the TCP decompression context.

This function is one of the functions that must exist in one profile for the framework to work.

Parameters
contextThe main decompression context
[out]persist_ctxtThe persistent part of the decompression context
[out]volat_ctxtThe volatile part of the decompression context
Returns
true if creation succeeded, false in case of problem
static bool d_tcp_decode_bits ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_extr_bits *const  bits,
const size_t  payload_len,
struct rohc_tcp_decoded_values *const  decoded 
)
static

Decode values from extracted bits.

Parameters
contextThe decompression context
bitsThe bits extracted from the ROHC packet
payload_lenThe length of the packet payload (in bytes)
[out]decodedThe corresponding decoded values
Returns
true if decoding is successful, false otherwise
static bool d_tcp_decode_bits_ip_hdr ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_extr_ip_bits *const  ip_bits,
const ip_context_t *const  ip_context,
const uint16_t  decoded_msn,
struct rohc_tcp_decoded_ip_values *const  ip_decoded 
)
static

Decode values for one IP header from extracted bits.

Parameters
contextThe decompression context
ip_bitsThe IP bits extracted from the ROHC packet
ip_contextThe IP values recorded in context
decoded_msnThe decoded Master Sequence Number (MSN)
[out]ip_decodedThe corresponding decoded IP values
Returns
true if decoding is successful, false otherwise
static bool d_tcp_decode_bits_ip_hdrs ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_extr_bits *const  bits,
struct rohc_tcp_decoded_values *const  decoded 
)
static

Decode values for all IP headers from extracted bits.

Parameters
contextThe decompression context
bitsThe bits extracted from the ROHC packet
[out]decodedThe corresponding decoded values
Returns
true if decoding is successful, false otherwise
static void d_tcp_decode_bits_tcp_flags ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_extr_bits *const  bits,
struct rohc_tcp_decoded_values *const  decoded 
)
static

Decode values for the TCP header flags from extracted bits.

Parameters
contextThe decompression context
bitsThe bits extracted from the ROHC packet
[out]decodedThe corresponding decoded values
static bool d_tcp_decode_bits_tcp_hdr ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_extr_bits *const  bits,
const size_t  payload_len,
struct rohc_tcp_decoded_values *const  decoded 
)
static

Decode values for the TCP header from extracted bits.

Parameters
contextThe decompression context
bitsThe bits extracted from the ROHC packet
payload_lenThe length of the packet payload (in bytes)
[out]decodedThe corresponding decoded values
Returns
true if decoding is successful, false otherwise
static bool d_tcp_decode_bits_tcp_opts ( const struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_extr_bits *const  bits,
struct rohc_tcp_decoded_values *const  decoded 
)
static

Decode values for the TCP options from extracted bits.

Parameters
contextThe decompression context
bitsThe bits extracted from the ROHC packet
[out]decodedThe corresponding decoded values
Returns
true if decoding is successful, false otherwise
static void d_tcp_decode_opt_sack ( const struct rohc_decomp_ctxt *const  context,
const uint32_t  ack_num,
const struct d_tcp_opt_sack  bits,
struct d_tcp_opt_sack *const  decoded 
)
static

Decode the TCP SACK option.

Warning
The available length in the opt_sack->uncomp_opt buffer shall have been checked before calling this function
Parameters
contextThe decompression context
ack_numThe TCP ACK number of the current packet
bitsThe bits of SACK option extracted from the packet
[out]decodedThe values decoded from the ROHC packet
static bool d_tcp_decode_opt_ts_field ( const struct rohc_decomp_ctxt *const  context,
const char *const  descr,
const struct rohc_lsb_decode *const  lsb_ctxt,
const struct rohc_lsb_field32  ts,
uint32_t *const  ts_decoded 
)
static

Decode the given TS field of the TCP TimeStamp (TS) option.

Warning
The available length in the opt_ts->uncomp_opt buffer shall have been checked before calling this function
Parameters
contextThe decompression context
descrA description for the TS field being decoded
lsb_ctxtThe LSB decoding context to use for decoding
tsThe TS bits extracted from the ROHC packet
[out]ts_decodedThe decoded TS field (in HBO)
Returns
true if TS field was successfully decoded, false if a problem occurred during decoding
static void d_tcp_destroy ( struct d_tcp_context *const  tcp_context,
const struct rohc_decomp_volat_ctxt *const  volat_ctxt 
)
static

Destroy the context.

This function is one of the functions that must exist in one profile for the framework to work.

Parameters
tcp_contextThe persistent decompression context for the TCP profile
volat_ctxtThe volatile decompression context
static uint32_t d_tcp_get_msn ( const struct rohc_decomp_ctxt *const  context)
static

Get the reference MSN value of the context.

This function is one of the functions that must exist in one profile for the framework to work.

Parameters
contextThe decompression context
Returns
The reference MSN value
static bool d_tcp_parse_CO ( 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,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len 
)
static

Parse the given CO packet for the TCP profile.

  RFC 6846, section 7.3. Compressed (CO) Packets

     0   1   2   3   4   5   6   7
    --- --- --- --- --- --- --- ---
 1  :         Add-CID octet         :  if for small CIDs and CID 1-15
    +---+---+---+---+---+---+---+---+
 2  |   First octet of base header  |  (with type indication)
    +---+---+---+---+---+---+---+---+
    :                               :
 3  /   0, 1, or 2 octets of CID    /  1-2 octets if large CIDs
    :                               :
    +---+---+---+---+---+---+---+---+
 4  /   Remainder of base header    /  variable number of octets
    +---+---+---+---+---+---+---+---+
    :        Irregular chain        :
 5  /   (including irregular chain  /  variable
    :    items for TCP options)     :
     --- --- --- --- --- --- --- ---
    |                               |
 6  /            Payload            / variable length
    |                               |
     - - - - - - - - - - - - - - - -
Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
large_cid_lenThe length of the optional large CID field
packet_typeThe type of the ROHC packet to parse
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
Returns
true if parsing was successful, false if packet was malformed
Todo:
TODO: avoid malloc/free of packed_rohc_packet
static bool d_tcp_parse_co_common ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given co_common packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_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,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len 
)
static

Parse the given IR packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet to decode
large_cid_lenThe length of the optional large CID field
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the IR packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_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,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len 
)
static

Parse othe given IR-DYN packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet to decode
large_cid_lenThe length of the optional large CID field
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the IR-DYN packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_packet ( 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_tcp_extr_bits *const  extr_bits,
size_t *const  rohc_hdr_len 
)
static

Parse the given ROHC packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to parse
large_cid_lenThe length of the optional large CID field
[in,out]packet_typeIN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]extr_bitsThe bits extracted from the ROHC packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_rnd_1 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given rnd_1 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_rnd_2 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given rnd_2 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_rnd_3 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given rnd_3 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_rnd_4 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given rnd_4 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_rnd_5 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given rnd_5 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_rnd_6 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given rnd_6 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_rnd_7 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given rnd_7 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_rnd_8 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given rnd_8 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_seq_1 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given seq_1 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_seq_2 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given seq_2 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_seq_3 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given seq_3 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_seq_4 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given seq_4 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_seq_5 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given seq_5 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_seq_6 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given seq_6 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_seq_7 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given seq_7 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static bool d_tcp_parse_seq_8 ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_decomp_crc *const  extr_crc,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  rohc_hdr_len,
bool *const  has_opts_list 
)
static

Parse the given seq_8 packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
[out]extr_crcThe CRC bits extracted from the ROHC header
[out]bitsThe bits extracted from the CO packet
[out]rohc_hdr_lenThe length of the ROHC header (in bytes)
[out]has_opts_listWhether the list TCP options is present after the CO packet
Returns
true if parsing was successful, false if packet was malformed
static void d_tcp_reset_extr_bits ( const struct rohc_decomp_ctxt *const  context,
struct rohc_tcp_extr_bits *const  bits 
)
static

Reset the extracted bits for next parsing.

Parameters
contextThe decompression context
[out]bitsThe extracted bits to reset
static void d_tcp_update_ctxt ( struct rohc_decomp_ctxt *const  context,
const struct rohc_tcp_decoded_values *const  decoded,
const size_t  payload_len,
bool *const  do_change_mode 
)
static

Update the decompression context with the infos of current packet.

Parameters
contextThe decompression context
decodedThe decoded values to update in the context
payload_lenThe length of the packet payload (in bytes)
[out]do_change_modeWhether the profile context wants to change its operational mode or not
static rohc_packet_t tcp_detect_packet_type ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
const size_t  large_cid_len 
)
static

Detect the type of ROHC packet for the TCP profile.

Parameters
contextThe decompression context
rohc_packetThe ROHC packet
rohc_lengthThe length of the ROHC packet
large_cid_lenThe length of the optional large CID field
Returns
The packet type

Variable Documentation

const struct rohc_decomp_profile d_tcp_profile
Initial value:
=
{
.msn_max_bits = 16,
.detect_pkt_type = tcp_detect_packet_type,
.get_sn = d_tcp_get_msn
}
Definition: rohc.h:228
bool(* rohc_decomp_attempt_repair_t)(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, void *const extr_bits)
Definition: rohc_decomp_internals.h:386
bool(* rohc_decomp_decode_bits_t)(const struct rohc_decomp_ctxt *const context, const void *const extr_bits, const size_t payload_len, void *const decoded_values)
Definition: rohc_decomp_internals.h:364
bool(* rohc_decomp_new_context_t)(const struct rohc_decomp_ctxt *const context, void **const persist_ctxt, struct rohc_decomp_volat_ctxt *const volat_ctxt)
Definition: rohc_decomp_internals.h:340
static bool d_tcp_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_tcp_extr_bits *const bits)
Attempt a packet/context repair upon CRC failure.
Definition: d_tcp.c:4109
static rohc_status_t d_tcp_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_tcp_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.
Definition: d_tcp.c:3922
static void d_tcp_update_ctxt(struct rohc_decomp_ctxt *const context, const struct rohc_tcp_decoded_values *const decoded, const size_t payload_len, bool *const do_change_mode)
Update the decompression context with the infos of current packet.
Definition: d_tcp.c:4129
static void d_tcp_destroy(struct d_tcp_context *const tcp_context, const struct rohc_decomp_volat_ctxt *const volat_ctxt)
Destroy the context.
Definition: d_tcp.c:547
static bool d_tcp_create(const struct rohc_decomp_ctxt *const context, struct d_tcp_context **const persist_ctxt, struct rohc_decomp_volat_ctxt *const volat_ctxt)
Create the TCP decompression context.
Definition: d_tcp.c:367
void(* rohc_decomp_free_context_t)(void *const persist_ctxt, const struct rohc_decomp_volat_ctxt *const volat_ctxt)
Definition: rohc_decomp_internals.h:345
bool(* rohc_decomp_parse_pkt_t)(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, void *const extr_bits, size_t *const rohc_hdr_len)
Definition: rohc_decomp_internals.h:355
static rohc_packet_t tcp_detect_packet_type(const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len)
Detect the type of ROHC packet for the TCP profile.
Definition: d_tcp.c:591
static uint32_t d_tcp_get_msn(const struct rohc_decomp_ctxt *const context)
Get the reference MSN value of the context.
Definition: d_tcp.c:4343
static bool d_tcp_decode_bits(const struct rohc_decomp_ctxt *const context, const struct rohc_tcp_extr_bits *const bits, const size_t payload_len, struct rohc_tcp_decoded_values *const decoded)
Decode values from extracted bits.
Definition: d_tcp.c:2556
void(* rohc_decomp_update_ctxt_t)(struct rohc_decomp_ctxt *const context, const void *const decoded_values, const size_t payload_len, bool *const do_change_mode)
Definition: rohc_decomp_internals.h:380
static bool d_tcp_parse_packet(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_tcp_extr_bits *const extr_bits, size_t *const rohc_hdr_len)
Parse the given ROHC packet for the TCP profile.
Definition: d_tcp.c:744
rohc_status_t(* rohc_decomp_build_hdrs_t)(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 void *const decoded_values, const size_t payload_len, struct rohc_buf *const uncomp_hdrs, size_t *const uncomp_hdrs_len)
Definition: rohc_decomp_internals.h:370

Define the decompression part of the TCP profile as described in the RFC 3095.