rfc4996.h File Reference

Library of decoding methods from RFC4997 and RFC4996. More...

#include "interval.h"
#include "decomp_wlsb.h"
#include <stdint.h>
Include dependency graph for decomp/schemes/rfc4996.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int d_static_or_irreg8 (const uint8_t *const rohc_data, const size_t rohc_len, const int indicator, struct rohc_lsb_field8 *const lsb)
 Decompress the 8-bit given value, according to the indicator.
int d_static_or_irreg16 (const uint8_t *const rohc_data, const size_t rohc_len, const int indicator, struct rohc_lsb_field16 *const lsb)
 Decompress the 16-bit given value, according to the indicator.
int variable_length_32_dec (const uint8_t *const rohc_data, const size_t rohc_len, const int indicator, struct rohc_lsb_field32 *const lsb)
 Decode the 32 bits value, according to the indicator.
unsigned int rsf_index_dec (const unsigned int rsf_index)
 Calculate the rsf flags from the rsf index.
bool d_ip_id_lsb (const struct rohc_decomp_ctxt *const context, const struct rohc_lsb_decode *const ip_id_lsb_ctxt, const uint16_t msn, const uint32_t ip_id_bits, const size_t ip_id_bits_nr, const rohc_lsb_shift_t p, uint16_t *const ip_id)
 Decompress the lower bits of IP-ID.
int d_optional_ip_id_lsb (const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_data, const size_t data_len, const int behavior, const int indicator, struct rohc_lsb_field16 *const lsb)
 Decompress the IP-ID.

Detailed Description

Library of decoding methods from RFC4997 and RFC4996.

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

Function Documentation

bool d_ip_id_lsb ( const struct rohc_decomp_ctxt *const   context,
const struct rohc_lsb_decode *const   ip_id_lsb_ctxt,
const uint16_t  msn,
const uint32_t  ip_id_bits,
const size_t  ip_id_bits_nr,
const rohc_lsb_shift_t  p,
uint16_t *const   ip_id 
)

Decompress the lower bits of IP-ID.

See RFC4996 page 75

Parameters:
context The decompression context
ip_id_lsb_ctxt The LSB decoding context for the IP-ID offset
msn The Master Sequence Number
ip_id_bits The received IP-ID offset bits to decode
ip_id_bits_nr The number of received IP-ID offset bits to decode
p The offset parameter p to use for LSB decoding
[out] ip_id The decoded IP-ID value
Returns:
true if IP-ID was successfully decoded, false if decoding failed
Todo:
TODO: could be merged with decomp/schemes/ip_id_offset.[ch] module
int d_optional_ip_id_lsb ( const struct rohc_decomp_ctxt *const   context,
const uint8_t *const   rohc_data,
const size_t  data_len,
const int  behavior,
const int  indicator,
struct rohc_lsb_field16 *const   lsb 
)

Decompress the IP-ID.

See RFC4996 page 76

Parameters:
context The decompression context
rohc_data The ROHC data to parse
data_len The length of the ROHC data to parse (in bytes)
behavior The IP-ID behavior
indicator The compression indicator
[out] lsb The LSB bits extracted from the ROHC packet
Returns:
The length (in bytes) of the compressed value, -1 if ROHC data is malformed
int d_static_or_irreg16 ( const uint8_t *const   rohc_data,
const size_t  rohc_len,
const int  indicator,
struct rohc_lsb_field16 *const   lsb 
)

Decompress the 16-bit given value, according to the indicator.

Parameters:
rohc_data The ROHC data to parse
rohc_len The length of the ROHC data to parse (in bytes)
indicator The indicator of compression
[out] lsb The LSB bits extracted from the ROHC packet
Returns:
The length (in bytes) of the compressed value, -1 if ROHC data is malformed
int d_static_or_irreg8 ( const uint8_t *const   rohc_data,
const size_t  rohc_len,
const int  indicator,
struct rohc_lsb_field8 *const   lsb 
)

Decompress the 8-bit given value, according to the indicator.

Parameters:
rohc_data The ROHC data to parse
rohc_len The length of the ROHC data to parse (in bytes)
indicator The indicator of compression
[out] lsb The LSB bits extracted from the ROHC packet
Returns:
The length (in bytes) of the compressed value, -1 if ROHC data is malformed
unsigned int rsf_index_dec ( const unsigned int  rsf_index  ) 

Calculate the rsf flags from the rsf index.

See RFC4996 page 71

Parameters:
rsf_index The rsf index
Returns:
The rsf flags
int variable_length_32_dec ( const uint8_t *const   rohc_data,
const size_t  rohc_len,
const int  indicator,
struct rohc_lsb_field32 *const   lsb 
)

Decode the 32 bits value, according to the indicator.

See RFC4996 page 46

Parameters:
rohc_data The ROHC data to parse
rohc_len The length of the ROHC data to parse (in bytes)
indicator The indicator of compression
[out] lsb The LSB bits extracted from the ROHC packet
Returns:
The length (in bytes) of the compressed value, -1 if ROHC data is malformed

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