d_uncompressed.c File Reference

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

#include "rohc_decomp.h"
#include "rohc_decomp_internals.h"
#include "rohc_bit_ops.h"
#include "rohc_traces_internal.h"
#include "crc.h"
#include "rohc_decomp_detect_packet.h"
#include <string.h>
Include dependency graph for d_uncompressed.c:

Data Structures

struct  rohc_uncomp_extr_bits
struct  rohc_uncomp_decoded

Functions

static bool uncomp_new_context (const struct rohc_decomp_ctxt *const context, void **const persist_ctxt, struct rohc_decomp_volat_ctxt *const volat_ctxt)
 Create the Uncompressed volatile and persistent parts of the context.
static void uncomp_free_context (void *const persist_ctxt, const struct rohc_decomp_volat_ctxt *const volat_ctxt)
 Destroy profile-specific data, nothing to destroy for the uncompressed profile.
static rohc_packet_t uncomp_detect_pkt_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 Uncompressed profile.
static bool uncomp_parse_pkt (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_uncomp_extr_bits *const extr_bits, size_t *const rohc_hdr_len)
 Parse one IR or Normal packet for the Uncompressed profile.
static bool uncomp_parse_ir (const struct rohc_decomp_ctxt *const context, const struct rohc_buf rohc_packet, const size_t large_cid_len, struct rohc_decomp_crc *const extr_crc, struct rohc_uncomp_extr_bits *const extr_bits, size_t *const rohc_hdr_len)
 Parse one IR packet for the Uncompressed profile.
static bool uncomp_parse_normal (const struct rohc_decomp_ctxt *const context, const struct rohc_buf rohc_packet, const size_t large_cid_len, struct rohc_decomp_crc *const extr_crc, struct rohc_uncomp_extr_bits *const extr_bits, size_t *const rohc_hdr_len)
 Parse one Normal packet for the Uncompressed profile.
static bool uncomp_decode_bits (const struct rohc_decomp_ctxt *const context, const struct rohc_uncomp_extr_bits *const extr_bits, const size_t payload_len, struct rohc_uncomp_decoded *const decoded)
 Decode values from extracted bits for the Uncompressed profile.
static rohc_status_t uncomp_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_uncomp_decoded *const decoded, const size_t payload_len, struct rohc_buf *const uncomp_hdrs, size_t *const uncomp_hdrs_len)
 Build the uncompressed headers for the Uncompressed profile.
static void uncomp_update_ctxt (struct rohc_decomp_ctxt *const context, const struct rohc_uncomp_decoded *const decoded, const size_t payload_len, bool *const do_change_mode)
 Update the decompression context with the infos of current packet.
static bool uncomp_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_uncomp_extr_bits *const extr_bits)
 Attempt a packet/context repair upon CRC failure.
static uint32_t uncomp_get_sn (const struct rohc_decomp_ctxt *const context)
 Get the reference SN value of the context. Always return 0 for the uncompressed profile.

Variables

struct rohc_decomp_profile d_uncomp_profile
 Define the decompression part of the Uncompressed profile as described in the RFC 3095.

Detailed Description

ROHC decompression context for the uncompressed profile.

Author:
Didier Barvaux <didier.barvaux@toulouse.viveris.com>
Didier Barvaux <didier@barvaux.org>

Function Documentation

static bool uncomp_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_uncomp_extr_bits *const   extr_bits 
) [static]

Attempt a packet/context repair upon CRC failure.

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

Parameters:
decomp The ROHC decompressor
context The decompression context
pkt_arrival_time The arrival time of the ROHC packet that caused the CRC failure
[in,out] crc_corr The context for corrections upon CRC failures
[in,out] extr_bits The bits extracted from the ROHC header
Returns:
true if repair is possible, false if not
static rohc_status_t uncomp_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_uncomp_decoded *const   decoded,
const size_t  payload_len,
struct rohc_buf *const   uncomp_hdrs,
size_t *const   uncomp_hdrs_len 
) [static]

Build the uncompressed headers for the Uncompressed profile.

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

Parameters:
decomp The ROHC decompressor
context The decompression context
packet_type The type of ROHC packet
extr_crc The CRC bits extracted from the ROHC header
decoded The values decoded from ROHC header
payload_len The length of the packet payload (in bytes)
[out] uncomp_hdrs The uncompressed headers being built
[out] uncomp_hdrs_len The length of the uncompressed headers written into the buffer
Returns:
Possible values:
  • ROHC_STATUS_OK if headers are built successfully,
  • ROHC_STATUS_OUTPUT_TOO_SMALL if uncomp_packet is too small
static bool uncomp_decode_bits ( const struct rohc_decomp_ctxt *const   context,
const struct rohc_uncomp_extr_bits *const   extr_bits,
const size_t  payload_len,
struct rohc_uncomp_decoded *const   decoded 
) [static]

Decode values from extracted bits for the Uncompressed profile.

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

Parameters:
context The decompression context
extr_bits The bits extracted from the ROHC packet
payload_len The length of the packet payload (in bytes)
[out] decoded The corresponding decoded values
Returns:
true if decoding is successful, false otherwise
static rohc_packet_t uncomp_detect_pkt_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 Uncompressed profile.

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

Parameters:
context The decompression context
rohc_packet The ROHC packet
rohc_length The length of the ROHC packet
large_cid_len The length of the optional large CID field
Returns:
The packet type
static void uncomp_free_context ( void *const   persist_ctxt,
const struct rohc_decomp_volat_ctxt *const   volat_ctxt 
) [static]

Destroy profile-specific data, nothing to destroy for the uncompressed profile.

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

Parameters:
persist_ctxt The persistent part of the decompression context
volat_ctxt The volatile part of the decompression context
static uint32_t uncomp_get_sn ( const struct rohc_decomp_ctxt *const   context  )  [static]

Get the reference SN value of the context. Always return 0 for the uncompressed profile.

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

Parameters:
context The decompression context
Returns:
The reference SN value
static bool uncomp_new_context ( const struct rohc_decomp_ctxt *const   context,
void **const   persist_ctxt,
struct rohc_decomp_volat_ctxt *const   volat_ctxt 
) [static]

Create the Uncompressed volatile and persistent parts of the context.

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

Parameters:
context The decompression context
[out] persist_ctxt The persistent part of the decompression context
[out] volat_ctxt The volatile part of the decompression context
Returns:
true if the Uncompressed context was successfully created, false if a problem occurred
static bool uncomp_parse_ir ( const struct rohc_decomp_ctxt *const   context,
const struct rohc_buf  rohc_packet,
const size_t  large_cid_len,
struct rohc_decomp_crc *const   extr_crc,
struct rohc_uncomp_extr_bits *const   extr_bits,
size_t *const   rohc_hdr_len 
) [static]

Parse one IR packet for the Uncompressed profile.

Parameters:
context The decompression context
rohc_packet The ROHC packet to decode
large_cid_len The length of the optional large CID field
[out] extr_crc The CRC extracted from the ROHC packet
[out] extr_bits The bits extracted from the ROHC packet
[out] rohc_hdr_len The length of the ROHC header (in bytes)
Returns:
true if parsing was successful, false if packet was malformed
static bool uncomp_parse_normal ( const struct rohc_decomp_ctxt *const   context,
const struct rohc_buf  rohc_packet,
const size_t  large_cid_len,
struct rohc_decomp_crc *const   extr_crc,
struct rohc_uncomp_extr_bits *const   extr_bits,
size_t *const   rohc_hdr_len 
) [static]

Parse one Normal packet for the Uncompressed profile.

Parameters:
context The decompression context
rohc_packet The ROHC packet to decode
large_cid_len The length of the optional large CID field
[out] extr_crc The CRC extracted from the ROHC packet
[out] extr_bits The bits extracted from the ROHC packet
[out] rohc_hdr_len The length of the ROHC header (in bytes)
Returns:
true if parsing was successful, false if packet was malformed
static bool uncomp_parse_pkt ( 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_uncomp_extr_bits *const   extr_bits,
size_t *const   rohc_hdr_len 
) [static]

Parse one IR or Normal packet for the Uncompressed profile.

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

Parameters:
context The decompression context
rohc_packet The ROHC packet to parse
large_cid_len The length of the optional large CID field
[in,out] packet_type IN: The type of the ROHC packet to parse OUT: The type of the parsed ROHC packet
[out] extr_crc The CRC bits extracted from the ROHC packet
[out] extr_bits The bits extracted from the ROHC packet
[out] rohc_hdr_len The length of the ROHC header (in bytes)
Returns:
true if parsing was successful, false if packet was malformed
static void uncomp_update_ctxt ( struct rohc_decomp_ctxt *const   context,
const struct rohc_uncomp_decoded *const   decoded,
const size_t  payload_len,
bool *const   do_change_mode 
) [static]

Update the decompression context with the infos of current packet.

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

Parameters:
context The decompression context
decoded The decoded values to update in the context
payload_len The length of the packet payload (in bytes)
[out] do_change_mode Whether the profile context wants to change its operational mode or not

Variable Documentation

Initial value:

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


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