| 
    ROHC compression/decompression library
    
   | 
 
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 "net_pkt.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 "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"
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 net_pkt *const packet) | 
| 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_check_profile (const struct rohc_comp *const comp, const struct net_pkt *const packet) | 
| Check if the given packet corresponds to the TCP profile.  More... | |
| static bool | c_tcp_check_context (const struct rohc_comp_ctxt *const context, const struct net_pkt *const packet, size_t *const cr_score) | 
| Check if the IP/TCP packet belongs to the context.  More... | |
| static int | c_tcp_encode (struct rohc_comp_ctxt *const context, const struct net_pkt *const uncomp_pkt, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len, rohc_packet_t *const packet_type, size_t *const payload_offset) | 
| 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 bool | rohc_comp_tcp_are_ipv6_exts_acceptable (const struct rohc_comp *const comp, uint8_t *const next_proto, const uint8_t *const exts, const size_t max_exts_len, size_t *const exts_len) | 
| Whether IPv6 extension headers are acceptable for TCP profile or not.  More... | |
| static bool | tcp_detect_changes (struct rohc_comp_ctxt *const context, const struct net_pkt *const uncomp_pkt, ip_context_t **const ip_inner_ctxt, const struct tcphdr **const tcp) | 
| Detect changes between packet and context.  More... | |
| static bool | tcp_detect_changes_ipv6_exts (struct rohc_comp_ctxt *const context, ip_context_t *const ip_context, uint8_t *const protocol, const uint8_t *const exts, const size_t max_exts_len, size_t *const exts_nr, size_t *const exts_len) | 
| Detect changes about IPv6 extension headers between packet and context.  More... | |
| static void | tcp_decide_state (struct rohc_comp_ctxt *const context, struct rohc_ts pkt_time) | 
| Decide the state that should be used for the next packet.  More... | |
| static bool | tcp_encode_uncomp_fields (struct rohc_comp_ctxt *const context, const struct net_pkt *const uncomp_pkt, const struct tcphdr *const tcp) | 
| Encode uncompressed fields with the corresponding encoding scheme.  More... | |
| static bool | tcp_encode_uncomp_ip_fields (struct rohc_comp_ctxt *const context, const struct net_pkt *const uncomp_pkt) | 
| Encode uncompressed IP fields with the corresponding encoding scheme.  More... | |
| static bool | tcp_encode_uncomp_tcp_fields (struct rohc_comp_ctxt *const context, const struct tcphdr *const tcp) | 
| Encode uncompressed TCP fields with the corresponding encoding scheme.  More... | |
| static rohc_packet_t | tcp_decide_packet (struct rohc_comp_ctxt *const context, const ip_context_t *const ip_inner_context, const struct tcphdr *const tcp) | 
| 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 ip_context_t *const ip_inner_context, const struct tcphdr *const tcp) | 
| 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 ip_context_t *const ip_inner_context, const struct tcphdr *const tcp) | 
| 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 ip_context_t *const ip_inner_context, const struct tcphdr *const tcp, 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 tcphdr *const tcp, 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 tcphdr *const tcp, 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 ip_packet *const ip, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len, const rohc_packet_t packet_type, size_t *const payload_offset) | 
| 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 ip_packet *ip, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len, const rohc_packet_t packet_type, size_t *const payload_offset) | 
| 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 ip_hdr *const inner_ip_hdr, const size_t inner_ip_hdr_len, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len, const rohc_packet_t packet_type, const struct tcphdr *const tcp, 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 ip_hdr *const inner_ip_hdr, const size_t inner_ip_hdr_len, const struct tcphdr *const tcp, 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 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 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 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 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 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 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 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 ip_hdr *const inner_ip_hdr, const size_t inner_ip_hdr_len, const struct tcphdr *const tcp, 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 ip_hdr *const inner_ip_hdr, const size_t inner_ip_hdr_len, const struct tcphdr *const tcp, const uint8_t crc, uint8_t *const rohc_data, const size_t rohc_max_len) | 
| Build a TCP co_common packet.  More... | |
| static tcp_ip_id_behavior_t | tcp_detect_ip_id_behavior (const uint16_t last_ip_id, const uint16_t new_ip_id) | 
| Detect the behavior of the IPv4 Identification field.  More... | |
| static void | 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... | |
ROHC compression context for the TCP profile.
| #define TRACE_GOTO_CHOICE rohc_comp_debug(context, "Compressed format choice LINE %d", __LINE__ ) | 
      
  | 
  static | 
Build a TCP co_common packet.
| context | The compression context | |
| inner_ip_ctxt | The specific IP text | |
| tcp_context | The specific TCP context | |
| inner_ip_hdr | The innermost IP header | |
| inner_ip_hdr_len | The length of the innermost IP header | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP rnd_1 packet.
Send LSBs of sequence number See RFC4996 page 81
| context | The compression context | |
| tcp_context | The specific TCP context | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP rnd_2 packet.
Send scaled sequence number LSBs See RFC4996 page 81
| context | The compression context | |
| tcp_context | The specific TCP context | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP rnd_3 packet.
Send acknowlegment number LSBs See RFC4996 page 81
| context | The compression context | |
| tcp_context | The specific TCP context | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP rnd_4 packet.
Send acknowlegment number scaled See RFC4996 page 81
| context | The compression context | |
| tcp_context | The specific TCP context | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP rnd_5 packet.
Send ACK and sequence number See RFC4996 page 82
| context | The compression context | |
| tcp_context | The specific TCP context | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP rnd_6 packet.
Send both ACK and scaled sequence number LSBs See RFC4996 page 82
| context | The compression context | |
| tcp_context | The specific TCP context | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP rnd_7 packet.
Send ACK and window See RFC4996 page 82
| context | The compression context | |
| tcp_context | The specific TCP context | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP rnd_8 packet.
Send LSBs of TTL, RSF flags, change ECN behavior and options list See RFC4996 page 82
| context | The compression context | |
| inner_ip_ctxt | The specific IP innermost context | |
| tcp_context | The specific TCP context | |
| inner_ip_hdr | The innermost IP header | |
| inner_ip_hdr_len | The length of the innermost IP header | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP seq_1 packet.
Send LSBs of sequence number See RFC4996 page 83
| context | The compression context | |
| inner_ip_ctxt | The specific IP innermost context | |
| tcp_context | The specific TCP context | |
| inner_ip_hdr | The innermost IP header | |
| inner_ip_hdr_len | The length of the innermost IP header | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP seq_2 packet.
Send scaled sequence number LSBs See RFC4996 page 83
| context | The compression context | |
| inner_ip_ctxt | The specific IP innermost context | |
| tcp_context | The specific TCP context | |
| inner_ip_hdr | The innermost IP header | |
| inner_ip_hdr_len | The length of the innermost IP header | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP seq_3 packet.
Send acknowledgment number LSBs See RFC4996 page 83
| context | The compression context | |
| inner_ip_ctxt | The specific IP innermost context | |
| tcp_context | The specific TCP context | |
| inner_ip_hdr | The innermost IP header | |
| inner_ip_hdr_len | The length of the innermost IP header | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP seq_4 packet.
Send scaled acknowledgment number scaled See RFC4996 page 84
| context | The compression context | |
| inner_ip_ctxt | The specific IP innermost context | |
| tcp_context | The specific TCP context | |
| inner_ip_hdr | The innermost IP header | |
| inner_ip_hdr_len | The length of the innermost IP header | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP seq_5 packet.
Send ACK and sequence number See RFC4996 page 84
| context | The compression context | |
| inner_ip_ctxt | The specific IP innermost context | |
| tcp_context | The specific TCP context | |
| inner_ip_hdr | The innermost IP header | |
| inner_ip_hdr_len | The length of the innermost IP header | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP seq_6 packet.
See RFC4996 page 84
| context | The compression context | |
| inner_ip_ctxt | The specific IP innermost context | |
| tcp_context | The specific TCP context | |
| inner_ip_hdr | The innermost IP header | |
| inner_ip_hdr_len | The length of the innermost IP header | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP seq_7 packet.
Send ACK and window See RFC4996 page 85
| context | The compression context | |
| inner_ip_ctxt | The specific IP innermost context | |
| tcp_context | The specific TCP context | |
| inner_ip_hdr | The innermost IP header | |
| inner_ip_hdr_len | The length of the innermost IP header | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Build a TCP seq_8 packet.
Send LSBs of TTL, RSF flags, change ECN behavior, and options list See RFC4996 page 85
| context | The compression context | |
| inner_ip_ctxt | The specific IP innermost context | |
| tcp_context | The specific TCP context | |
| inner_ip_hdr | The innermost IP header | |
| inner_ip_hdr_len | The length of the innermost IP header | |
| tcp | The TCP header to compress | |
| crc | The CRC on the uncompressed headers | |
| [out] | rohc_data | The ROHC packet being built | 
| rohc_max_len | The max remaining length in the ROHC buffer | 
      
  | 
  static | 
Check if the IP/TCP packet belongs to the context.
Conditions are:
This function is one of the functions that must exist in one profile for the framework to work.
| context | The compression context | |
| packet | The IP/TCP packet to check | |
| [out] | cr_score | The score of the context for Context Replication (CR) | 
      
  | 
  static | 
Check if the given packet corresponds to the TCP profile.
Conditions are:
This function is one of the functions that must exist in one profile for the framework to work.
| comp | The ROHC compressor | 
| packet | The packet to check | 
      
  | 
  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.
| ctxt | The compression context to create | 
| base_ctxt | The base context given to initialize the new context | 
      
  | 
  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.
| context | The compression context | 
| packet | The IP/TCP packet given to initialize the new context | 
      
  | 
  static | 
Destroy the TCP context.
| context | The TCP compression context to destroy | 
      
  | 
  static | 
Encode an IP/TCP packet according to a pattern decided by several different factors.
| context | The compression context | 
| uncomp_pkt | The uncompressed packet to encode | 
| rohc_pkt | OUT: The ROHC packet | 
| rohc_pkt_max_len | The maximum length of the ROHC packet | 
| packet_type | OUT: The type of ROHC packet that is created | 
| payload_offset | OUT: The offset for the payload in the IP packet | 
      
  | 
  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.
| context | The compression context | 
| feedback_type | The feedback type | 
| packet | The whole feedback packet with CID bits | 
| packet_len | The length of the whole feedback packet with CID bits | 
| feedback_data | The feedback data without the CID bits | 
| feedback_data_len | The length of the feedback data without the CID bits | 
      
  | 
  static | 
Update the profile when FEEDBACK-2 is received.
| context | The compression context | 
| packet | The whole feedback packet with CID bits | 
| packet_len | The length of the whole feedback packet with CID bits | 
| feedback_data | The feedback data without the CID bits | 
| feedback_data_len | The length of the feedback data without the CID bits | 
      
  | 
  static | 
Perform the required actions after the reception of a positive ACK.
| context | The compression context that received a positive ACK | 
| sn_bits | The LSB bits of the acknowledged SN | 
| sn_bits_nr | The number of LSB bits of the acknowledged SN | 
| sn_not_valid | Whether the received SN may be considered as valid or not | 
      
  | 
  static | 
Determine the MSN value for the next packet.
Profile MSN is an internal increasing 16-bit number. See RFC 6846, §6.1.1.
| context | The compression context | 
      
  | 
  static | 
Compress the innermost IP header AND the TCP header.
See RFC4996 page 77
| context | The compression context | 
| tcp_context | The specific TCP context | 
| inner_ip_ctxt | The specific IP innermost context | 
| inner_ip_hdr | The innermost IP header | 
| inner_ip_hdr_len | The length of the innermost IP header | 
| rohc_pkt | OUT: The ROHC packet | 
| rohc_pkt_max_len | The maximum length of the ROHC packet | 
| packet_type | OUT: The type of ROHC packet that is created | 
| tcp | The TCP header to compress | 
| crc | The CRC on the uncompressed headers | 
      
  | 
  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
    |                               |
     - - - - - - - - - - - - - - - -| context | The compression context | 
| ip | The outer IP header | 
| rohc_pkt | OUT: The ROHC packet | 
| rohc_pkt_max_len | The maximum length of the ROHC packet | 
| packet_type | The type of ROHC packet to create | 
| payload_offset | OUT: The offset for the payload in the IP packet | 
      
  | 
  static | 
Encode an IP/TCP packet as IR, IR-CR or IR-DYN packet.
| context | The compression context | 
| ip | The outer IP header | 
| rohc_pkt | OUT: The ROHC packet | 
| rohc_pkt_max_len | The maximum length of the ROHC packet | 
| packet_type | The type of ROHC packet that is created | 
| payload_offset | OUT: The offset for the payload in the IP packet | 
      
  | 
  static | 
Whether IPv6 extension headers are acceptable for TCP profile or not.
TCP options are acceptable if:
| comp | The ROHC compressor | |
| [in,out] | next_proto | in: the protocol type of the first extension header out: the protocol type of the transport header | 
| exts | The beginning of the IPv6 extension headers | |
| max_exts_len | The maximum length (in bytes) of the extension headers | |
| [out] | exts_len | The length (in bytes) of the IPv6 extension headers | 
      
  | 
  static | 
Decide which packet to send when in FO state.
| context | The compression context | 
| ip_inner_context | The context of the inner IP header | 
| tcp | The TCP header to compress | 
      
  | 
  static | 
Decide which packet to send when in FO or SO state.
| context | The compression context | 
| ip_inner_context | The context of the inner IP header | 
| tcp | The TCP header to compress | 
| crc7_at_least | Whether packet types with CRC strictly smaller than 8 bits are allowed or not | 
      
  | 
  static | 
Decide which rnd packet to send when in FO or SO state.
| context | The compression context | 
| tcp | The TCP header to compress | 
| crc7_at_least | Whether packet types with CRC strictly smaller than 8 bits are allowed or not | 
      
  | 
  static | 
Decide which seq packet to send when in FO or SO state.
| context | The compression context | 
| tcp | The TCP header to compress | 
| crc7_at_least | Whether packet types with CRC strictly smaller than 8 bits are allowed or not | 
      
  | 
  static | 
Decide which packet to send when in the different states.
| context | The compression context | 
| ip_inner_context | The context of the inner IP header | 
| tcp | The TCP header to compress | 
      
  | 
  static | 
Decide which packet to send when in SO state.
| context | The compression context | 
| ip_inner_context | The context of the inner IP header | 
| tcp | The TCP header to compress | 
      
  | 
  static | 
Decide the state that should be used for the next packet.
The three states are:
| context | The compression context | 
| pkt_time | The time of packet arrival | 
      
  | 
  static | 
Detect changes between packet and context.
| context | The compression context to compare | |
| uncomp_pkt | The uncompressed packet to compare | |
| [out] | ip_inner_ctxt | The context of the inner IP header | 
| [out] | tcp | The TCP header found in uncompressed headers | 
      
  | 
  static | 
Detect changes about IPv6 extension headers between packet and context.
| context | The compression context to compare | |
| ip_context | The specific IP compression context | |
| [in,out] | protocol | in: the protocol type of the first extension header out: the protocol type of the transport header | 
| exts | The beginning of the IPv6 extension headers | |
| max_exts_len | The maximum length (in bytes) of the extension headers | |
| [out] | exts_nr | The number of IPv6 extension headers | 
| [out] | exts_len | The length (in bytes) of the IPv6 extension headers | 
      
  | 
  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.
| [in,out] | context | The compression context to compare | 
| pkt_ecn_vals | The values of the IP/ECN flags in the current packet | |
| pkt_outer_dscp_changed | Whether at least one DSCP changed in the current packet | |
| pkt_res_val | The TCP RES flags in the current packet | 
      
  | 
  static | 
Detect the behavior of the IPv4 Identification field.
| last_ip_id | The IP-ID value of the previous packet (in HBO) | 
| new_ip_id | The IP-ID value of the current packet (in HBO) | 
      
  | 
  static | 
Encode uncompressed fields with the corresponding encoding scheme.
| context | The compression context | 
| uncomp_pkt | The uncompressed packet to encode | 
| tcp | The uncompressed TCP header to encode | 
      
  | 
  static | 
Encode uncompressed IP fields with the corresponding encoding scheme.
| context | The compression context | 
| uncomp_pkt | The uncompressed packet to encode | 
      
  | 
  static | 
Encode uncompressed TCP fields with the corresponding encoding scheme.
| context | The compression context | 
| tcp | The uncompressed TCP header to encode | 
      
  | 
  static | 
Print a debug trace for the field change.
| context | The compression context | 
| name | The name of the field | 
| changed | Whether the field changed or not | 
| nr_trans | The number of times the field was transmitted since the last change | 
      
  | 
  static | 
Print a debug trace for the field presence.
| context | The compression context | 
| name | The name of the field | 
| present | Whether the field is present or not | 
| const struct rohc_comp_profile c_tcp_profile | 
Define the compression part of the TCP profile as described in the RFC 3095.
 1.8.13