d_tcp_static.c File Reference

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

#include "d_tcp_static.h"
#include "d_tcp_defines.h"
#include "rohc_bit_ops.h"
#include "rohc_utils.h"
#include "protocols/ip_numbers.h"
#include <string.h>
Include dependency graph for d_tcp_static.c:

Functions

static int tcp_parse_static_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, uint8_t *const nh_proto)
 Decode the static IP header of the rohc packet.
static int tcp_parse_static_ipv6_option (const struct rohc_decomp_ctxt *const context, struct rohc_tcp_extr_ip_bits *const ip_bits, ip_option_context_t *const opt_context, const uint8_t protocol, const uint8_t *const rohc_packet, const size_t rohc_length)
 Decode the static IPv6 option header of the rohc packet.
static int tcp_parse_static_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 static part of the ROHC packet.
bool tcp_parse_static_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 static chain of the IR packet.

Detailed Description

Handle the static chain of the TCP decompression profile.

Author:
FWX <rohc_team@dialine.fr>
Didier Barvaux <didier@barvaux.org>
Didier Barvaux <didier.barvaux@toulouse.viveris.com>

Function Documentation

bool tcp_parse_static_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 static chain of the IR packet.

Parameters:
context The decompression context
rohc_packet The remaining part of the ROHC packet
rohc_length The remaining length (in bytes) of the ROHC packet
[out] bits The bits extracted from the static chain
[out] parsed_len The length (in bytes) of static chain in case of success
Returns:
true in the static chain was successfully parsed, false if the ROHC packet was malformed
static int tcp_parse_static_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,
uint8_t *const   nh_proto 
) [static]

Decode the static IP header of the rohc packet.

Parameters:
context The decompression context
rohc_packet The remaining part of the ROHC packet
rohc_length The remaining length (in bytes) of the ROHC packet
[out] ip_bits The bits extracted from the IP part of the static chain
[out] nh_proto The next header protocol of the last extension header
Returns:
The length of static IP header in case of success, -1 if an error occurs
static int tcp_parse_static_ipv6_option ( const struct rohc_decomp_ctxt *const   context,
struct rohc_tcp_extr_ip_bits *const   ip_bits,
ip_option_context_t *const   opt_context,
const uint8_t  protocol,
const uint8_t *const   rohc_packet,
const size_t  rohc_length 
) [static]

Decode the static IPv6 option header of the rohc packet.

Parameters:
context The decompression context
[out] ip_bits The bits extracted from the IP part of the static chain
[out] opt_context The specific IPv6 option decompression context
protocol The protocol of the IPv6 option
rohc_packet The remaining part of the ROHC packet
rohc_length The remaining length (in bytes) of the ROHC packet
Returns:
The length of static IP header in case of success, -1 if an error occurs
static int tcp_parse_static_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 static part of the ROHC packet.

Parameters:
context The decompression context
rohc_packet The remaining part of the ROHC packet
rohc_length The remaining length (in bytes) of the ROHC packet
[out] bits The bits extracted from the CO packet
Returns:
The number of bytes read in the ROHC packet, -1 in case of failure

Generated on 4 Jul 2018 for ROHC compression/decompression library by  doxygen 1.6.1