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

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

#include "rohc_comp_internals.h"
#include "rohc_traces_internal.h"
#include "rohc_utils.h"
#include "rohc_packets.h"
#include "rohc_buf.h"
#include "rohc_time_internal.h"
#include "protocols/ip_numbers.h"
#include "protocols/ip.h"
#include "protocols/ipv4.h"
#include "protocols/ipv6.h"
#include "protocols/tcp.h"
#include "schemes/cid.h"
#include "schemes/ip_id_offset.h"
#include "schemes/rfc4996.h"
#include "schemes/ipv6_exts.h"
#include "c_tcp_opts_list.h"
#include "sdvl.h"
#include "crc.h"
#include "rohc_bit_ops.h"
#include "c_tcp_defines.h"
#include "c_tcp_static.h"
#include "c_tcp_dynamic.h"
#include "c_tcp_replicate.h"
#include "c_tcp_irregular.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"
Include dependency graph for c_tcp.c:

Macros

#define TRACE_GOTO_CHOICE   rohc_comp_debug(context, "Compressed format choice LINE %d", __LINE__ )
 

Functions

static bool c_tcp_create_from_ctxt (struct rohc_comp_ctxt *const ctxt, const struct rohc_comp_ctxt *const base_ctxt)
 Create a new TCP context and initialize it thanks to the given context. More...
 
static bool c_tcp_create_from_pkt (struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs)
 Create a new TCP context and initialize it thanks to the given IP/TCP packet. More...
 
static void c_tcp_destroy (struct rohc_comp_ctxt *const context)
 Destroy the TCP context. More...
 
static bool c_tcp_is_cr_possible (const struct rohc_comp_ctxt *const ctxt, const struct rohc_pkt_hdrs *const pkt_hdrs)
 Check whether the given context is valid for Context Replication (CR) More...
 
static int c_tcp_encode (struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len, rohc_packet_t *const packet_type)
 Encode an IP/TCP packet according to a pattern decided by several different factors. More...
 
static uint16_t c_tcp_get_next_msn (const struct rohc_comp_ctxt *const context)
 Determine the MSN value for the next packet. More...
 
static void tcp_detect_changes (struct rohc_comp_ctxt *const context, ip_context_t *const inner_ip_ctxt, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, struct tcp_tmp_variables *const tmp)
 Detect changes between packet and context. More...
 
static void tcp_detect_changes_ipv6_exts (struct rohc_comp_ctxt *const context, ip_context_t *const ip_context, const struct rohc_pkt_ip_hdr *const ip_hdr, struct tcp_tmp_variables *const tmp)
 Detect changes about IPv6 extension headers between packet and context. More...
 
static void tcp_detect_changes_tcp_hdr (struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, struct tcp_tmp_variables *const tmp)
 Encode uncompressed TCP fields with the corresponding encoding scheme. More...
 
static rohc_packet_t tcp_decide_packet (const struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, const struct tcp_tmp_variables *const tmp)
 Decide which packet to send when in the different states. More...
 
static rohc_packet_t tcp_decide_FO_packet (const struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, const struct tcp_tmp_variables *const tmp)
 Decide which packet to send when in FO state. More...
 
static rohc_packet_t tcp_decide_SO_packet (const struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, const struct tcp_tmp_variables *const tmp)
 Decide which packet to send when in SO state. More...
 
static rohc_packet_t tcp_decide_FO_SO_packet (const struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, const struct tcp_tmp_variables *const tmp, const bool crc7_at_least)
 Decide which packet to send when in FO or SO state. More...
 
static rohc_packet_t tcp_decide_FO_SO_packet_seq (const struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, const struct tcp_tmp_variables *const tmp, const bool crc7_at_least)
 Decide which seq packet to send when in FO or SO state. More...
 
static rohc_packet_t tcp_decide_FO_SO_packet_rnd (const struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, const struct tcp_tmp_variables *const tmp, const bool crc7_at_least)
 Decide which rnd packet to send when in FO or SO state. More...
 
static int code_IR_packet (struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, struct tcp_tmp_variables *const tmp, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len, const rohc_packet_t packet_type)
 Encode an IP/TCP packet as IR, IR-CR or IR-DYN packet. More...
 
static int code_CO_packet (struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, struct tcp_tmp_variables *const tmp, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len, const rohc_packet_t packet_type)
 Build the CO packet. More...
 
static int co_baseheader (struct rohc_comp_ctxt *const context, struct sc_tcp_context *const tcp_context, ip_context_t *const inner_ip_ctxt, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, struct tcp_tmp_variables *const tmp, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len, const rohc_packet_t packet_type, const uint8_t crc)
 Compress the innermost IP header AND the TCP header. More...
 
static int c_tcp_build_rnd_1 (const struct rohc_comp_ctxt *const context, const struct sc_tcp_context *const tcp_context, const struct tcphdr *const tcp, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP rnd_1 packet. More...
 
static int c_tcp_build_rnd_2 (const struct rohc_comp_ctxt *const context, const struct sc_tcp_context *const tcp_context, const struct tcphdr *const tcp, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP rnd_2 packet. More...
 
static int c_tcp_build_rnd_3 (const struct rohc_comp_ctxt *const context, const struct sc_tcp_context *const tcp_context, const struct tcphdr *const tcp, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP rnd_3 packet. More...
 
static int c_tcp_build_rnd_4 (const struct rohc_comp_ctxt *const context, const struct sc_tcp_context *const tcp_context, const struct tcphdr *const tcp, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP rnd_4 packet. More...
 
static int c_tcp_build_rnd_5 (const struct rohc_comp_ctxt *const context, const struct sc_tcp_context *const tcp_context, const struct tcphdr *const tcp, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP rnd_5 packet. More...
 
static int c_tcp_build_rnd_6 (const struct rohc_comp_ctxt *const context, const struct sc_tcp_context *const tcp_context, const struct tcphdr *const tcp, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP rnd_6 packet. More...
 
static int c_tcp_build_rnd_7 (const struct rohc_comp_ctxt *const context, const struct sc_tcp_context *const tcp_context, const struct tcphdr *const tcp, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP rnd_7 packet. More...
 
static int c_tcp_build_rnd_8 (const struct rohc_comp_ctxt *const context, const ip_context_t *const inner_ip_ctxt, struct sc_tcp_context *const tcp_context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, struct tcp_tmp_variables *const tmp, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP rnd_8 packet. More...
 
static int c_tcp_build_seq_1 (const struct rohc_comp_ctxt *const context, const ip_context_t *const inner_ip_ctxt, const struct sc_tcp_context *const tcp_context, const struct ip_hdr *const inner_ip_hdr, const size_t inner_ip_hdr_len, const struct tcphdr *const tcp, const uint16_t innermost_ip_id_delta, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP seq_1 packet. More...
 
static int c_tcp_build_seq_2 (const struct rohc_comp_ctxt *const context, const ip_context_t *const inner_ip_ctxt, const struct sc_tcp_context *const tcp_context, const struct ip_hdr *const inner_ip_hdr, const size_t inner_ip_hdr_len, const struct tcphdr *const tcp, const uint16_t innermost_ip_id_delta, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP seq_2 packet. More...
 
static int c_tcp_build_seq_3 (const struct rohc_comp_ctxt *const context, const ip_context_t *const inner_ip_ctxt, const struct sc_tcp_context *const tcp_context, const struct ip_hdr *const inner_ip_hdr, const size_t inner_ip_hdr_len, const struct tcphdr *const tcp, const uint16_t innermost_ip_id_delta, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP seq_3 packet. More...
 
static int c_tcp_build_seq_4 (const struct rohc_comp_ctxt *const context, const ip_context_t *const inner_ip_ctxt, const struct sc_tcp_context *const tcp_context, const struct ip_hdr *const inner_ip_hdr, const size_t inner_ip_hdr_len, const struct tcphdr *const tcp, const uint16_t innermost_ip_id_delta, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP seq_4 packet. More...
 
static int c_tcp_build_seq_5 (const struct rohc_comp_ctxt *const context, const ip_context_t *const inner_ip_ctxt, const struct sc_tcp_context *const tcp_context, const struct ip_hdr *const inner_ip_hdr, const size_t inner_ip_hdr_len, const struct tcphdr *const tcp, const uint16_t innermost_ip_id_delta, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP seq_5 packet. More...
 
static int c_tcp_build_seq_6 (const struct rohc_comp_ctxt *const context, const ip_context_t *const inner_ip_ctxt, const struct sc_tcp_context *const tcp_context, const struct ip_hdr *const inner_ip_hdr, const size_t inner_ip_hdr_len, const struct tcphdr *const tcp, const uint16_t innermost_ip_id_delta, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP seq_6 packet. More...
 
static int c_tcp_build_seq_7 (const struct rohc_comp_ctxt *const context, const ip_context_t *const inner_ip_ctxt, const struct sc_tcp_context *const tcp_context, const struct ip_hdr *const inner_ip_hdr, const size_t inner_ip_hdr_len, const struct tcphdr *const tcp, const uint16_t innermost_ip_id_delta, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP seq_7 packet. More...
 
static int c_tcp_build_seq_8 (const struct rohc_comp_ctxt *const context, const ip_context_t *const inner_ip_ctxt, struct sc_tcp_context *const tcp_context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, struct tcp_tmp_variables *const tmp, const uint16_t innermost_ip_id_delta, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP seq_8 packet. More...
 
static int c_tcp_build_co_common (const struct rohc_comp_ctxt *const context, const ip_context_t *const inner_ip_ctxt, struct sc_tcp_context *const tcp_context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, struct tcp_tmp_variables *const tmp, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len)
 Build a TCP co_common packet. More...
 
static bool tcp_detect_ecn_used_behavior (struct rohc_comp_ctxt *const context, const uint8_t pkt_ecn_vals, const uint8_t pkt_outer_dscp_changed, const uint8_t pkt_res_val)
 Detect the behavior of the IP/TCP ECN flags and TCP RES flags. More...
 
static void tcp_field_descr_change (const struct rohc_comp_ctxt *const context, const char *const name, const bool changed, const size_t nr_trans)
 Print a debug trace for the field change. More...
 
static void tcp_field_descr_present (const struct rohc_comp_ctxt *const context, const char *const name, const bool present)
 Print a debug trace for the field presence. More...
 
static bool c_tcp_feedback (struct rohc_comp_ctxt *const context, const enum rohc_feedback_type feedback_type, const uint8_t *const packet, const size_t packet_len, const uint8_t *const feedback_data, const size_t feedback_data_len)
 Update the profile when feedback is received. More...
 
static bool c_tcp_feedback_2 (struct rohc_comp_ctxt *const context, const uint8_t *const packet, const size_t packet_len, const uint8_t *const feedback_data, const size_t feedback_data_len)
 Update the profile when FEEDBACK-2 is received. More...
 
static void c_tcp_feedback_ack (struct rohc_comp_ctxt *const context, const uint32_t sn_bits, const size_t sn_bits_nr, const bool sn_not_valid)
 Perform the required actions after the reception of a positive ACK. More...
 

Variables

const struct rohc_comp_profile c_tcp_profile
 Define the compression part of the TCP profile as described in the RFC 3095. More...
 

Detailed Description

ROHC compression 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

Macro Definition Documentation

◆ TRACE_GOTO_CHOICE

#define TRACE_GOTO_CHOICE   rohc_comp_debug(context, "Compressed format choice LINE %d", __LINE__ )

Function Documentation

◆ c_tcp_build_co_common()

static int c_tcp_build_co_common ( const struct rohc_comp_ctxt *const  context,
const ip_context_t *const  inner_ip_ctxt,
struct sc_tcp_context *const  tcp_context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
struct tcp_tmp_variables *const  tmp,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP co_common packet.

Parameters
contextThe compression context
inner_ip_ctxtThe context of the innermost IP header
tcp_contextThe specific TCP context
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for the compressed packet
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
true if the packet is successfully built, false otherwise

◆ c_tcp_build_rnd_1()

static int c_tcp_build_rnd_1 ( const struct rohc_comp_ctxt *const  context,
const struct sc_tcp_context *const  tcp_context,
const struct tcphdr *const  tcp,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP rnd_1 packet.

Send LSBs of sequence number See RFC4996 page 81

Parameters
contextThe compression context
tcp_contextThe specific TCP context
tcpThe TCP header to compress
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_rnd_2()

static int c_tcp_build_rnd_2 ( const struct rohc_comp_ctxt *const  context,
const struct sc_tcp_context *const  tcp_context,
const struct tcphdr *const  tcp,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP rnd_2 packet.

Send scaled sequence number LSBs See RFC4996 page 81

Parameters
contextThe compression context
tcp_contextThe specific TCP context
tcpThe TCP header to compress
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_rnd_3()

static int c_tcp_build_rnd_3 ( const struct rohc_comp_ctxt *const  context,
const struct sc_tcp_context *const  tcp_context,
const struct tcphdr *const  tcp,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP rnd_3 packet.

Send acknowlegment number LSBs See RFC4996 page 81

Parameters
contextThe compression context
tcp_contextThe specific TCP context
tcpThe TCP header to compress
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_rnd_4()

static int c_tcp_build_rnd_4 ( const struct rohc_comp_ctxt *const  context,
const struct sc_tcp_context *const  tcp_context,
const struct tcphdr *const  tcp,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP rnd_4 packet.

Send acknowlegment number scaled See RFC4996 page 81

Parameters
contextThe compression context
tcp_contextThe specific TCP context
tcpThe TCP header to compress
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_rnd_5()

static int c_tcp_build_rnd_5 ( const struct rohc_comp_ctxt *const  context,
const struct sc_tcp_context *const  tcp_context,
const struct tcphdr *const  tcp,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP rnd_5 packet.

Send ACK and sequence number See RFC4996 page 82

Parameters
contextThe compression context
tcp_contextThe specific TCP context
tcpThe TCP header to compress
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_rnd_6()

static int c_tcp_build_rnd_6 ( const struct rohc_comp_ctxt *const  context,
const struct sc_tcp_context *const  tcp_context,
const struct tcphdr *const  tcp,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP rnd_6 packet.

Send both ACK and scaled sequence number LSBs See RFC4996 page 82

Parameters
contextThe compression context
tcp_contextThe specific TCP context
tcpThe TCP header to compress
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_rnd_7()

static int c_tcp_build_rnd_7 ( const struct rohc_comp_ctxt *const  context,
const struct sc_tcp_context *const  tcp_context,
const struct tcphdr *const  tcp,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP rnd_7 packet.

Send ACK and window See RFC4996 page 82

Parameters
contextThe compression context
tcp_contextThe specific TCP context
tcpThe TCP header to compress
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_rnd_8()

static int c_tcp_build_rnd_8 ( const struct rohc_comp_ctxt *const  context,
const ip_context_t *const  inner_ip_ctxt,
struct sc_tcp_context *const  tcp_context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
struct tcp_tmp_variables *const  tmp,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP rnd_8 packet.

Send LSBs of TTL, RSF flags, change ECN behavior and options list See RFC4996 page 82

Parameters
contextThe compression context
inner_ip_ctxtThe specific IP innermost context
tcp_contextThe specific TCP context
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for compressed packet
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_seq_1()

static int c_tcp_build_seq_1 ( const struct rohc_comp_ctxt *const  context,
const ip_context_t *const  inner_ip_ctxt,
const struct sc_tcp_context *const  tcp_context,
const struct ip_hdr *const  inner_ip_hdr,
const size_t  inner_ip_hdr_len,
const struct tcphdr *const  tcp,
const uint16_t  innermost_ip_id_delta,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP seq_1 packet.

Send LSBs of sequence number See RFC4996 page 83

Parameters
contextThe compression context
inner_ip_ctxtThe specific IP innermost context
tcp_contextThe specific TCP context
inner_ip_hdrThe innermost IP header
inner_ip_hdr_lenThe length of the innermost IP header
tcpThe TCP header to compress
innermost_ip_id_deltaThe offset between the innermost IP-ID and MSN
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_seq_2()

static int c_tcp_build_seq_2 ( const struct rohc_comp_ctxt *const  context,
const ip_context_t *const  inner_ip_ctxt,
const struct sc_tcp_context *const  tcp_context,
const struct ip_hdr *const  inner_ip_hdr,
const size_t  inner_ip_hdr_len,
const struct tcphdr *const  tcp,
const uint16_t  innermost_ip_id_delta,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP seq_2 packet.

Send scaled sequence number LSBs See RFC4996 page 83

Parameters
contextThe compression context
inner_ip_ctxtThe specific IP innermost context
tcp_contextThe specific TCP context
inner_ip_hdrThe innermost IP header
inner_ip_hdr_lenThe length of the innermost IP header
tcpThe TCP header to compress
crcThe CRC on the uncompressed headers
innermost_ip_id_deltaThe offset between the innermost IP-ID and MSN
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_seq_3()

static int c_tcp_build_seq_3 ( const struct rohc_comp_ctxt *const  context,
const ip_context_t *const  inner_ip_ctxt,
const struct sc_tcp_context *const  tcp_context,
const struct ip_hdr *const  inner_ip_hdr,
const size_t  inner_ip_hdr_len,
const struct tcphdr *const  tcp,
const uint16_t  innermost_ip_id_delta,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP seq_3 packet.

Send acknowledgment number LSBs See RFC4996 page 83

Parameters
contextThe compression context
inner_ip_ctxtThe specific IP innermost context
tcp_contextThe specific TCP context
inner_ip_hdrThe innermost IP header
inner_ip_hdr_lenThe length of the innermost IP header
tcpThe TCP header to compress
innermost_ip_id_deltaThe offset between the innermost IP-ID and MSN
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_seq_4()

static int c_tcp_build_seq_4 ( const struct rohc_comp_ctxt *const  context,
const ip_context_t *const  inner_ip_ctxt,
const struct sc_tcp_context *const  tcp_context,
const struct ip_hdr *const  inner_ip_hdr,
const size_t  inner_ip_hdr_len,
const struct tcphdr *const  tcp,
const uint16_t  innermost_ip_id_delta,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP seq_4 packet.

Send scaled acknowledgment number scaled See RFC4996 page 84

Parameters
contextThe compression context
inner_ip_ctxtThe specific IP innermost context
tcp_contextThe specific TCP context
inner_ip_hdrThe innermost IP header
inner_ip_hdr_lenThe length of the innermost IP header
tcpThe TCP header to compress
innermost_ip_id_deltaThe offset between the innermost IP-ID and MSN
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_seq_5()

static int c_tcp_build_seq_5 ( const struct rohc_comp_ctxt *const  context,
const ip_context_t *const  inner_ip_ctxt,
const struct sc_tcp_context *const  tcp_context,
const struct ip_hdr *const  inner_ip_hdr,
const size_t  inner_ip_hdr_len,
const struct tcphdr *const  tcp,
const uint16_t  innermost_ip_id_delta,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP seq_5 packet.

Send ACK and sequence number See RFC4996 page 84

Parameters
contextThe compression context
inner_ip_ctxtThe specific IP innermost context
tcp_contextThe specific TCP context
inner_ip_hdrThe innermost IP header
inner_ip_hdr_lenThe length of the innermost IP header
tcpThe TCP header to compress
innermost_ip_id_deltaThe offset between the innermost IP-ID and MSN
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_seq_6()

static int c_tcp_build_seq_6 ( const struct rohc_comp_ctxt *const  context,
const ip_context_t *const  inner_ip_ctxt,
const struct sc_tcp_context *const  tcp_context,
const struct ip_hdr *const  inner_ip_hdr,
const size_t  inner_ip_hdr_len,
const struct tcphdr *const  tcp,
const uint16_t  innermost_ip_id_delta,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP seq_6 packet.

See RFC4996 page 84

Parameters
contextThe compression context
inner_ip_ctxtThe specific IP innermost context
tcp_contextThe specific TCP context
inner_ip_hdrThe innermost IP header
inner_ip_hdr_lenThe length of the innermost IP header
tcpThe TCP header to compress
innermost_ip_id_deltaThe offset between the innermost IP-ID and MSN
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_seq_7()

static int c_tcp_build_seq_7 ( const struct rohc_comp_ctxt *const  context,
const ip_context_t *const  inner_ip_ctxt,
const struct sc_tcp_context *const  tcp_context,
const struct ip_hdr *const  inner_ip_hdr,
const size_t  inner_ip_hdr_len,
const struct tcphdr *const  tcp,
const uint16_t  innermost_ip_id_delta,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP seq_7 packet.

Send ACK and window See RFC4996 page 85

Parameters
contextThe compression context
inner_ip_ctxtThe specific IP innermost context
tcp_contextThe specific TCP context
inner_ip_hdrThe innermost IP header
inner_ip_hdr_lenThe length of the innermost IP header
tcpThe TCP header to compress
innermost_ip_id_deltaThe offset between the innermost IP-ID and MSN
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_build_seq_8()

static int c_tcp_build_seq_8 ( const struct rohc_comp_ctxt *const  context,
const ip_context_t *const  inner_ip_ctxt,
struct sc_tcp_context *const  tcp_context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
struct tcp_tmp_variables *const  tmp,
const uint16_t  innermost_ip_id_delta,
const uint8_t  crc,
uint8_t *const  rohc_data,
const size_t  rohc_max_len 
)
static

Build a TCP seq_8 packet.

Send LSBs of TTL, RSF flags, change ECN behavior, and options list See RFC4996 page 85

Parameters
contextThe compression context
inner_ip_ctxtThe specific IP innermost context
tcp_contextThe specific TCP context
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for compressed packet
innermost_ip_id_deltaThe offset between the innermost IP-ID and MSN
crcThe CRC on the uncompressed headers
[out]rohc_dataThe ROHC packet being built
rohc_max_lenThe max remaining length in the ROHC buffer
Returns
The length appended in the ROHC buffer if positive, -1 in case of error

◆ c_tcp_create_from_ctxt()

static bool c_tcp_create_from_ctxt ( struct rohc_comp_ctxt *const  ctxt,
const struct rohc_comp_ctxt *const  base_ctxt 
)
static

Create a new TCP context and initialize it thanks to the given context.

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

Parameters
ctxtThe compression context to create
base_ctxtThe base context given to initialize the new context
Returns
true if successful, false otherwise

◆ c_tcp_create_from_pkt()

static bool c_tcp_create_from_pkt ( struct rohc_comp_ctxt *const  context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs 
)
static

Create a new TCP context and initialize it thanks to the given IP/TCP packet.

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

Parameters
contextThe compression context
uncomp_pkt_hdrsThe uncompressed headers to initialize the new context
Returns
true if successful, false otherwise

◆ c_tcp_destroy()

static void c_tcp_destroy ( struct rohc_comp_ctxt *const  context)
static

Destroy the TCP context.

Parameters
contextThe TCP compression context to destroy

◆ c_tcp_encode()

static int c_tcp_encode ( struct rohc_comp_ctxt *const  context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
uint8_t *const  rohc_pkt,
const size_t  rohc_pkt_max_len,
rohc_packet_t *const  packet_type 
)
static

Encode an IP/TCP packet according to a pattern decided by several different factors.

  1. Check if we have double IP headers.
  2. Check if the IP-ID fields are random and if they are in NBO.
  3. Decide in which state to go (IR, FO or SO).
  4. Decide how many bits are needed to send the IP-ID and SN fields and more important update the sliding windows.
  5. Decide which packet type to send.
  6. Code the packet.
    Parameters
    contextThe compression context
    uncomp_pkt_hdrsThe uncompressed headers to encode
    rohc_pktOUT: The ROHC packet
    rohc_pkt_max_lenThe maximum length of the ROHC packet
    packet_typeOUT: The type of ROHC packet that is created
    Returns
    The length of the ROHC packet if successful, -1 otherwise
    Todo:
    TODO: the code that parses IP headers in IP/UDP/RTP profiles could probably be re-used (and maybe enhanced if needed)

◆ c_tcp_feedback()

static bool c_tcp_feedback ( struct rohc_comp_ctxt *const  context,
const enum rohc_feedback_type  feedback_type,
const uint8_t *const  packet,
const size_t  packet_len,
const uint8_t *const  feedback_data,
const size_t  feedback_data_len 
)
static

Update the profile when feedback is received.

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

Parameters
contextThe compression context
feedback_typeThe feedback type
packetThe whole feedback packet with CID bits
packet_lenThe length of the whole feedback packet with CID bits
feedback_dataThe feedback data without the CID bits
feedback_data_lenThe length of the feedback data without the CID bits
Returns
true if the feedback was successfully handled, false if the feedback could not be taken into account

◆ c_tcp_feedback_2()

static bool c_tcp_feedback_2 ( struct rohc_comp_ctxt *const  context,
const uint8_t *const  packet,
const size_t  packet_len,
const uint8_t *const  feedback_data,
const size_t  feedback_data_len 
)
static

Update the profile when FEEDBACK-2 is received.

Parameters
contextThe compression context
packetThe whole feedback packet with CID bits
packet_lenThe length of the whole feedback packet with CID bits
feedback_dataThe feedback data without the CID bits
feedback_data_lenThe length of the feedback data without the CID bits
Returns
true if the feedback was successfully handled, false if the feedback could not be taken into account

◆ c_tcp_feedback_ack()

static void c_tcp_feedback_ack ( struct rohc_comp_ctxt *const  context,
const uint32_t  sn_bits,
const size_t  sn_bits_nr,
const bool  sn_not_valid 
)
static

Perform the required actions after the reception of a positive ACK.

Parameters
contextThe compression context that received a positive ACK
sn_bitsThe LSB bits of the acknowledged SN
sn_bits_nrThe number of LSB bits of the acknowledged SN
sn_not_validWhether the received SN may be considered as valid or not

◆ c_tcp_get_next_msn()

static uint16_t c_tcp_get_next_msn ( const struct rohc_comp_ctxt *const  context)
static

Determine the MSN value for the next packet.

Profile MSN is an internal increasing 16-bit number. See RFC 6846, §6.1.1.

Parameters
contextThe compression context
Returns
The MSN value for the next ROHC packet

◆ c_tcp_is_cr_possible()

static bool c_tcp_is_cr_possible ( const struct rohc_comp_ctxt *const  ctxt,
const struct rohc_pkt_hdrs *const  pkt_hdrs 
)
static

Check whether the given context is valid for Context Replication (CR)

Parameters
ctxtThe context to check Context Replication for
pkt_hdrsThe information collected about packet headers
Returns
true if CR is possible, false if CR is not possible

◆ co_baseheader()

static int co_baseheader ( struct rohc_comp_ctxt *const  context,
struct sc_tcp_context *const  tcp_context,
ip_context_t *const  inner_ip_ctxt,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
struct tcp_tmp_variables *const  tmp,
uint8_t *const  rohc_pkt,
const size_t  rohc_pkt_max_len,
const rohc_packet_t  packet_type,
const uint8_t  crc 
)
static

Compress the innermost IP header AND the TCP header.

See RFC4996 page 77

Parameters
contextThe compression context
tcp_contextThe specific TCP context
inner_ip_ctxtThe specific IP innermost context
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for the compressed packet
rohc_pktOUT: The ROHC packet
rohc_pkt_max_lenThe maximum length of the ROHC packet
packet_typeOUT: The type of ROHC packet that is created
crcThe CRC on the uncompressed headers
Returns
The position in the rohc-packet-under-build buffer -1 in case of problem

◆ code_CO_packet()

static int code_CO_packet ( struct rohc_comp_ctxt *const  context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
struct tcp_tmp_variables *const  tmp,
uint8_t *const  rohc_pkt,
const size_t  rohc_pkt_max_len,
const rohc_packet_t  packet_type 
)
static

Build the CO packet.

See RFC4996 page 46

 CO packet (RFC4996 §7.3 page 41):

      0   1   2   3   4   5   6   7
     --- --- --- --- --- --- --- ---
 1  :         Add-CID octet         :  if for small CIDs and CID != 0
    +---+---+---+---+---+---+---+---+
 2  |   First octet of base header  |  (with type indication)
    +---+---+---+---+---+---+---+---+
    |                               |
 3  /    0-2 octets of CID info     /  1-2 octets if for 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 compression context
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for the compressed packet
rohc_pktOUT: The ROHC packet
rohc_pkt_max_lenThe maximum length of the ROHC packet
packet_typeThe type of ROHC packet to create
Returns
The length of the ROHC packet if successful, -1 otherwise

◆ code_IR_packet()

static int code_IR_packet ( struct rohc_comp_ctxt *const  context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
struct tcp_tmp_variables *const  tmp,
uint8_t *const  rohc_pkt,
const size_t  rohc_pkt_max_len,
const rohc_packet_t  packet_type 
)
static

Encode an IP/TCP packet as IR, IR-CR or IR-DYN packet.

Parameters
contextThe compression context
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for the compressed packet
rohc_pktOUT: The ROHC packet
rohc_pkt_max_lenThe maximum length of the ROHC packet
packet_typeThe type of ROHC packet that is created
Returns
The length of the ROHC packet if successful, -1 otherwise

◆ tcp_decide_FO_packet()

static rohc_packet_t tcp_decide_FO_packet ( const struct rohc_comp_ctxt *const  context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
const struct tcp_tmp_variables *const  tmp 
)
static

Decide which packet to send when in FO state.

Parameters
contextThe compression context
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for the compressed packet
Returns
  • The packet type among ROHC_PACKET_IR, ROHC_PACKET_IR_DYN, ROHC_PACKET_TCP_RND_8, ROHC_PACKET_TCP_SEQ_8 and ROHC_PACKET_TCP_CO_COMMON in case of success
  • ROHC_PACKET_UNKNOWN in case of failure

◆ tcp_decide_FO_SO_packet()

static rohc_packet_t tcp_decide_FO_SO_packet ( const struct rohc_comp_ctxt *const  context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
const struct tcp_tmp_variables *const  tmp,
const bool  crc7_at_least 
)
static

Decide which packet to send when in FO or SO state.

Parameters
contextThe compression context
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for the compressed packet
crc7_at_leastWhether packet types with CRC strictly smaller than 8 bits are allowed or not
Returns
  • The packet type among ROHC_PACKET_IR, ROHC_PACKET_IR_DYN, ROHC_PACKET_TCP_RND_[1-8], ROHC_PACKET_TCP_SEQ_[1-8] and ROHC_PACKET_TCP_CO_COMMON in case of success
  • ROHC_PACKET_UNKNOWN in case of failure

◆ tcp_decide_FO_SO_packet_rnd()

static rohc_packet_t tcp_decide_FO_SO_packet_rnd ( const struct rohc_comp_ctxt *const  context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
const struct tcp_tmp_variables *const  tmp,
const bool  crc7_at_least 
)
static

Decide which rnd packet to send when in FO or SO state.

Parameters
contextThe compression context
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for the compressed packet
crc7_at_leastWhether packet types with CRC strictly smaller than 8 bits are allowed or not
Returns
  • The packet type among ROHC_PACKET_TCP_SEQ_[1-8] and ROHC_PACKET_TCP_CO_COMMON in case of success
  • ROHC_PACKET_UNKNOWN in case of failure

◆ tcp_decide_FO_SO_packet_seq()

static rohc_packet_t tcp_decide_FO_SO_packet_seq ( const struct rohc_comp_ctxt *const  context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
const struct tcp_tmp_variables *const  tmp,
const bool  crc7_at_least 
)
static

Decide which seq packet to send when in FO or SO state.

Parameters
contextThe compression context
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for the compressed packet
crc7_at_leastWhether packet types with CRC strictly smaller than 8 bits are allowed or not
Returns
  • The packet type among ROHC_PACKET_TCP_SEQ_[1-8] and ROHC_PACKET_TCP_CO_COMMON in case of success
  • ROHC_PACKET_UNKNOWN in case of failure

◆ tcp_decide_packet()

static rohc_packet_t tcp_decide_packet ( const struct rohc_comp_ctxt *const  context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
const struct tcp_tmp_variables *const  tmp 
)
static

Decide which packet to send when in the different states.

Parameters
contextThe compression context
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for the compressed packet
Returns
  • The packet type among ROHC_PACKET_IR, ROHC_PACKET_IR_DYN, ROHC_PACKET_TCP_RND_[1-8], ROHC_PACKET_TCP_SEQ_[1-8] and ROHC_PACKET_TCP_CO_COMMON in case of success
  • ROHC_PACKET_UNKNOWN in case of failure

◆ tcp_decide_SO_packet()

static rohc_packet_t tcp_decide_SO_packet ( const struct rohc_comp_ctxt *const  context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
const struct tcp_tmp_variables *const  tmp 
)
static

Decide which packet to send when in SO state.

Parameters
contextThe compression context
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for the compressed packet
Returns
  • The packet type among ROHC_PACKET_IR, ROHC_PACKET_IR_CR, ROHC_PACKET_IR_DYN, ROHC_PACKET_TCP_RND_[1-8], ROHC_PACKET_TCP_SEQ_[1-8] and ROHC_PACKET_TCP_CO_COMMON in case of success
  • ROHC_PACKET_UNKNOWN in case of failure

◆ tcp_detect_changes()

static void tcp_detect_changes ( struct rohc_comp_ctxt *const  context,
ip_context_t *const  inner_ip_ctxt,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
struct tcp_tmp_variables *const  tmp 
)
static

Detect changes between packet and context.

Parameters
contextThe compression context to compare
inner_ip_ctxtThe context of the innermost IP header
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for the compressed packet

◆ tcp_detect_changes_ipv6_exts()

static void tcp_detect_changes_ipv6_exts ( struct rohc_comp_ctxt *const  context,
ip_context_t *const  ip_context,
const struct rohc_pkt_ip_hdr *const  ip_hdr,
struct tcp_tmp_variables *const  tmp 
)
static

Detect changes about IPv6 extension headers between packet and context.

Parameters
contextThe compression context to compare
ip_contextThe specific IP compression context
ip_hdrThe information collected about the packet IP header
tmpThe temporary state for the compressed packet

◆ tcp_detect_changes_tcp_hdr()

static void tcp_detect_changes_tcp_hdr ( struct rohc_comp_ctxt *const  context,
const struct rohc_pkt_hdrs *const  uncomp_pkt_hdrs,
struct tcp_tmp_variables *const  tmp 
)
static

Encode uncompressed TCP fields with the corresponding encoding scheme.

Parameters
contextThe compression context
uncomp_pkt_hdrsThe uncompressed headers to encode
tmpThe temporary state for the compressed packet

◆ tcp_detect_ecn_used_behavior()

static bool tcp_detect_ecn_used_behavior ( struct rohc_comp_ctxt *const  context,
const uint8_t  pkt_ecn_vals,
const uint8_t  pkt_outer_dscp_changed,
const uint8_t  pkt_res_val 
)
static

Detect the behavior of the IP/TCP ECN flags and TCP RES flags.

What value for ecn_used? The ecn_used controls the presence of IP ECN flags, TCP ECN flags, but also TCP RES flags.

Parameters
[in,out]contextThe compression context to compare
pkt_ecn_valsThe values of the IP/ECN flags in the current packet
pkt_outer_dscp_changedWhether at least one DSCP changed in the current packet
pkt_res_valThe TCP RES flags in the current packet
Returns
Whether the ecn_used flag changed or not

◆ tcp_field_descr_change()

static void tcp_field_descr_change ( const struct rohc_comp_ctxt *const  context,
const char *const  name,
const bool  changed,
const size_t  nr_trans 
)
static

Print a debug trace for the field change.

Parameters
contextThe compression context
nameThe name of the field
changedWhether the field changed or not
nr_transThe number of times the field was transmitted since the last change

◆ tcp_field_descr_present()

static void tcp_field_descr_present ( const struct rohc_comp_ctxt *const  context,
const char *const  name,
const bool  present 
)
static

Print a debug trace for the field presence.

Parameters
contextThe compression context
nameThe name of the field
presentWhether the field is present or not

Variable Documentation

◆ c_tcp_profile

const struct rohc_comp_profile c_tcp_profile
Initial value:
=
{
.destroy = c_tcp_destroy,
.is_cr_possible = c_tcp_is_cr_possible,
.encode = c_tcp_encode,
.feedback = c_tcp_feedback,
}
Definition: rohc_profiles.h:104
static bool c_tcp_create_from_ctxt(struct rohc_comp_ctxt *const ctxt, const struct rohc_comp_ctxt *const base_ctxt)
Create a new TCP context and initialize it thanks to the given context.
Definition: c_tcp.c:403
static bool c_tcp_feedback(struct rohc_comp_ctxt *const context, const enum rohc_feedback_type feedback_type, const uint8_t *const packet, const size_t packet_len, const uint8_t *const feedback_data, const size_t feedback_data_len)
Update the profile when feedback is received.
Definition: c_tcp.c:4470
static bool c_tcp_create_from_pkt(struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs)
Create a new TCP context and initialize it thanks to the given IP/TCP packet.
Definition: c_tcp.c:558
static void c_tcp_destroy(struct rohc_comp_ctxt *const context)
Destroy the TCP context.
Definition: c_tcp.c:786
static bool c_tcp_is_cr_possible(const struct rohc_comp_ctxt *const ctxt, const struct rohc_pkt_hdrs *const pkt_hdrs)
Check whether the given context is valid for Context Replication (CR)
Definition: c_tcp.c:811
static int c_tcp_encode(struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len, rohc_packet_t *const packet_type)
Encode an IP/TCP packet according to a pattern decided by several different factors.
Definition: c_tcp.c:871

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