ROHC compression/decompression library
Functions
d_tcp_dynamic.c File Reference

Handle the dynamic chain of the TCP decompression profile. More...

#include "d_tcp_dynamic.h"
#include "d_tcp_defines.h"
#include "d_tcp_opts_list.h"
#include "rohc_utils.h"
#include "protocols/ip_numbers.h"
#include "schemes/rfc4996.h"
#include <string.h>
Include dependency graph for d_tcp_dynamic.c:

Functions

static int tcp_parse_dynamic_ip (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_tcp_extr_ip_bits *const ip_bits)
 Decode the dynamic IP header of the rohc packet. More...
 
static int tcp_parse_dynamic_ipv6_option (const struct rohc_decomp_ctxt *const context, ip_option_context_t *const opt_context, const uint8_t *const rohc_packet, const size_t rohc_length)
 Decode the dynamic IPv6 option header of the rohc packet. More...
 
static int tcp_parse_dynamic_tcp (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_tcp_extr_bits *const bits)
 Decode the TCP dynamic part of the ROHC packet. More...
 
bool tcp_parse_dyn_chain (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, struct rohc_tcp_extr_bits *const bits, size_t *const parsed_len)
 Parse the dynamic chain of the IR/IR-DYN packet. More...
 

Detailed Description

Handle the dynamic chain of the TCP decompression 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

bool tcp_parse_dyn_chain ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_tcp_extr_bits *const  bits,
size_t *const  parsed_len 
)

Parse the dynamic chain of the IR/IR-DYN packet.

Parameters
contextThe decompression context
rohc_packetThe remaining part of the ROHC packet
rohc_lengthThe remaining length (in bytes) of the ROHC packet
[out]parsed_lenThe length (in bytes) of static chain in case of success
[out]bitsThe bits extracted from the dynamic chain
Returns
true in the dynamic chain was successfully parsed, false if the ROHC packet was malformed
static int tcp_parse_dynamic_ip ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_tcp_extr_ip_bits *const  ip_bits 
)
static

Decode the dynamic IP header of the rohc packet.

Parameters
contextThe decompression context
rohc_packetThe remaining part of the ROHC packet
rohc_lengthThe remaining length (in bytes) of the ROHC packet
[out]ip_bitsThe bits extracted from the IP part of the dynamic chain
Returns
The length of dynamic IP header in case of success, -1 if an error occurs
static int tcp_parse_dynamic_ipv6_option ( const struct rohc_decomp_ctxt *const  context,
ip_option_context_t *const  opt_context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length 
)
static

Decode the dynamic IPv6 option header of the rohc packet.

Parameters
contextThe decompression context
opt_contextThe specific IPv6 option decompression context
rohc_packetThe remaining part of the ROHC packet
rohc_lengthThe remaining length (in bytes) of the ROHC packet
Returns
The length of dynamic IP header -1 if an error occurs
static int tcp_parse_dynamic_tcp ( const struct rohc_decomp_ctxt *const  context,
const uint8_t *const  rohc_packet,
const size_t  rohc_length,
struct rohc_tcp_extr_bits *const  bits 
)
static

Decode the TCP dynamic part of the ROHC packet.

Parameters
contextThe decompression context
rohc_packetThe remaining part of the ROHC packet
rohc_lengthThe remaining length (in bytes) of the ROHC packet
[out]bitsThe bits extracted from the TCP part of the dynamic chain
Returns
The number of bytes read in the ROHC packet, -1 in case of failure