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>
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. | |
ROHC decompression context for the uncompressed profile.
| 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.
| 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 |
| 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.
| 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 |
| 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.
| 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 |
| 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.
| 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 |
| 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.
| 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.
| context | The decompression context |
| 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.
| context | The decompression context | |
| [out] | persist_ctxt | The persistent part of the decompression context |
| [out] | volat_ctxt | The volatile part of the decompression context |
| 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.
| 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) |
| 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.
| 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) |
| 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.
| 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) |
| 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.
| 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 |
{
.id = ROHC_PROFILE_UNCOMPRESSED,
.msn_max_bits = 0,
.new_context = uncomp_new_context,
.free_context = uncomp_free_context,
.detect_pkt_type = uncomp_detect_pkt_type,
.parse_pkt = (rohc_decomp_parse_pkt_t) uncomp_parse_pkt,
.decode_bits = (rohc_decomp_decode_bits_t) uncomp_decode_bits,
.build_hdrs = (rohc_decomp_build_hdrs_t) uncomp_build_hdrs,
.update_ctxt = (rohc_decomp_update_ctxt_t) uncomp_update_ctxt,
.attempt_repair = (rohc_decomp_attempt_repair_t) uncomp_attempt_repair,
.get_sn = uncomp_get_sn,
}
Define the decompression part of the Uncompressed profile as described in the RFC 3095.
1.6.1