|
ROHC compression/decompression library
|
Library of decoding methods from RFC4997 and RFC4996. More...


Go to the source code of this file.
Functions | |
| uint32_t | d_lsb (const struct rohc_decomp_ctxt *const context, int num_lsbs_param, int offset_param, unsigned int context_value, unsigned int value) |
| Decompress the lower bits from the given value and the context value. | |
| int | d_static_or_irreg8 (const uint8_t *rohc_data, const uint8_t context_value, const int indicator, uint8_t *const decoded_value) |
| Decompress the 8-bit given value, according to the indicator. | |
| int | d_static_or_irreg16 (const uint8_t *rohc_data, const uint16_t context_value, const int indicator, uint16_t *const decoded_value) |
| Decompress the 16-bit given value, according to the indicator. | |
| int | variable_length_32_dec (const struct rohc_lsb_decode *const lsb, const struct rohc_decomp_ctxt *const context, const uint8_t *rohc_data, const int indicator, uint32_t *const decoded_value) |
| Decode the 32 bits value, according to the indicator. | |
| int | d_optional32 (const int flag, const uint8_t *const data, const size_t data_len, uint32_t context_value, uint32_t *const decoded_value) |
| Decode the 32 bits value, according to the indicator. | |
| uint32_t | d_field_scaling (const uint32_t stride_value, const uint32_t scaled_value, const uint32_t residue_field) |
| Calculate the value from the scaling factor, scaled value and residue. | |
| unsigned int | rsf_index_dec (unsigned int rsf_index) |
| Calculate the rsf flags from the rsf index. | |
| uint16_t | d_ip_id_lsb (const struct rohc_decomp_ctxt *const context, const int behavior, const unsigned int k, const unsigned int p, const uint16_t context_ip_id, const uint16_t value, const uint16_t msn) |
| 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 int behavior, const int indicator, const uint16_t context_ip_id, uint16_t *const ip_id, const uint16_t msn) |
| Decompress the IP-ID. | |
| int | dscp_decode (const uint8_t *const rohc_data, const uint8_t context_value, const int indicator, uint8_t *const decoded_value) |
| Decode the DSCP field. | |
Variables | |
| unsigned int | lsb_xor_masks [] |
| Table of the mask for lsb() | |
| unsigned int | variable_length_32_size [] |
| Table of the size of the variable_length_32 encode value. | |
Library of decoding methods from RFC4997 and RFC4996.
| uint32_t d_field_scaling | ( | const uint32_t | scaling_factor, |
| const uint32_t | scaled_value, | ||
| const uint32_t | residue_field | ||
| ) |
Calculate the value from the scaling factor, scaled value and residue.
See RFC4996 page 49
| scaling_factor | The scaling factor |
| scaled_value | The scaled value |
| residue_field | The residue value |
| uint16_t d_ip_id_lsb | ( | const struct rohc_decomp_ctxt *const | context, |
| const int | behavior, | ||
| const unsigned int | k, | ||
| const unsigned int | p, | ||
| const uint16_t | context_ip_id, | ||
| const uint16_t | value, | ||
| const uint16_t | msn | ||
| ) |
Decompress the lower bits of IP-ID.
See RFC4996 page 75
| context | The decompression context |
| behavior | The IP-ID behavior |
| k | The num_lsbs_param parameter for d_lsb() |
| p | The offset parameter for d_lsb() |
| context_ip_id | The context IP-ID value |
| value | The value to decompress |
| msn | The Master Sequence Number |
| uint32_t d_lsb | ( | const struct rohc_decomp_ctxt *const | context, |
| int | num_lsbs_param, | ||
| int | offset_param, | ||
| unsigned int | context_value, | ||
| unsigned int | value | ||
| ) |
Decompress the lower bits from the given value and the context value.
See RFC4997 page 27
| context | The decompression context |
| num_lsbs_param | The number of bits |
| offset_param | The offset |
| context_value | The value of the context |
| value | The compressed value |
| int d_optional32 | ( | const int | flag, |
| const uint8_t *const | data, | ||
| const size_t | data_len, | ||
| uint32_t | context_value, | ||
| uint32_t *const | decoded_value | ||
| ) |
Decode the 32 bits value, according to the indicator.
See RFC4996 page 47
| flag | Flag of compression | |
| data | The remaining part of the ROHC packet | |
| data_len | The length of the remaining part of the packet | |
| context_value | The context value | |
| [out] | decoded_value | The uncompressed value |
| int d_optional_ip_id_lsb | ( | const struct rohc_decomp_ctxt *const | context, |
| const uint8_t *const | rohc_data, | ||
| const int | behavior, | ||
| const int | indicator, | ||
| const uint16_t | context_ip_id, | ||
| uint16_t *const | ip_id, | ||
| const uint16_t | msn | ||
| ) |
Decompress the IP-ID.
See RFC4996 page 76
| context | The decompression context |
| rohc_data | The compressed value |
| behavior | The IP-ID behavior |
| indicator | The compression indicator |
| context_ip_id | The context IP-ID value |
| ip_id | Pointer to the uncompressed IP-ID |
| msn | The Master Sequence Number |
| int d_static_or_irreg16 | ( | const uint8_t * | rohc_data, |
| const uint16_t | context_value, | ||
| const int | indicator, | ||
| uint16_t *const | decoded_value | ||
| ) |
Decompress the 16-bit given value, according to the indicator.
| rohc_data | The packet value | |
| context_value | The context value | |
| indicator | The indicator of compression | |
| [out] | decoded_value | The decoded value |
| int d_static_or_irreg8 | ( | const uint8_t * | rohc_data, |
| const uint8_t | context_value, | ||
| const int | indicator, | ||
| uint8_t *const | decoded_value | ||
| ) |
Decompress the 8-bit given value, according to the indicator.
| rohc_data | The packet value | |
| context_value | The context value | |
| indicator | The indicator of compression | |
| [out] | decoded_value | The decoded value |
| int dscp_decode | ( | const uint8_t *const | rohc_data, |
| const uint8_t | context_value, | ||
| const int | indicator, | ||
| uint8_t *const | decoded_value | ||
| ) |
Decode the DSCP field.
| rohc_data | The compressed value | |
| context_value | The context DSCP value | |
| indicator | The indicator of the compression | |
| [out] | decoded_value | The decoded value |
| unsigned int rsf_index_dec | ( | unsigned int | rsf_index | ) |
Calculate the rsf flags from the rsf index.
See RFC4996 page 71
| rsf_index | The rsf index |
| int variable_length_32_dec | ( | const struct rohc_lsb_decode *const | lsb, |
| const struct rohc_decomp_ctxt *const | context, | ||
| const uint8_t * | rohc_data, | ||
| const int | indicator, | ||
| uint32_t *const | decoded_value | ||
| ) |
Decode the 32 bits value, according to the indicator.
See RFC4996 page 46
| lsb | The WLSB decoding context | |
| context | The decompression context | |
| rohc_data | The compressed value | |
| indicator | The indicator of compression | |
| [out] | decoded_value | The decoded value (in NBO) |
| unsigned int lsb_xor_masks[] |
Table of the mask for lsb()
| unsigned int variable_length_32_size[] |
Table of the size of the variable_length_32 encode value.
1.7.6.1