ROHC decompression context for the UDP-Lite profile. More...
#include "d_ip.h"#include "d_udp.h"#include "rohc_decomp_rfc3095.h"#include "rohc_bit_ops.h"#include "rohc_traces_internal.h"#include "rohc_debug.h"#include "rohc_utils.h"#include "rohc_packets.h"#include "crc.h"#include "protocols/udp_lite.h"#include <string.h>
Data Structures | |
| struct | d_udp_lite_context |
| Define the UDP-Lite part of the decompression profile context. More... | |
Functions | |
| static bool | d_udp_lite_create (const struct rohc_decomp_ctxt *const context, struct rohc_decomp_rfc3095_ctxt **const persist_ctxt, struct rohc_decomp_volat_ctxt *const volat_ctxt) |
| Create the UDP-Lite decompression context. | |
| static void | d_udp_lite_destroy (struct rohc_decomp_rfc3095_ctxt *const rfc3095_ctxt, const struct rohc_decomp_volat_ctxt *const volat_ctxt) |
| Destroy the context. | |
| static rohc_packet_t | udp_lite_detect_packet_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 UDP-Lite profile. | |
| static bool | d_udp_lite_parse (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_extr_bits *const bits, size_t *const rohc_hdr_len) |
| Decode one IR, IR-DYN or UO* packet for UDP-Lite profile. | |
| static int | udp_lite_parse_dynamic_udp (const struct rohc_decomp_ctxt *const context, const uint8_t *packet, const size_t length, struct rohc_extr_bits *const bits) |
| Parse the UDP-Lite dynamic part of the ROHC packet. | |
| static int | udp_lite_parse_uo_remainder (const struct rohc_decomp_ctxt *const context, const uint8_t *packet, unsigned int length, struct rohc_extr_bits *const bits) |
| Parse the UDP-Lite remainder of the UO* ROHC packets. | |
| static bool | udp_lite_decode_values_from_bits (const struct rohc_decomp_ctxt *context, const struct rohc_extr_bits *const bits, struct rohc_decoded_values *const decoded) |
| Decode UDP-Lite values from extracted bits. | |
| static int | udp_lite_build_uncomp_udp (const struct rohc_decomp_ctxt *const context, const struct rohc_decoded_values *const decoded, uint8_t *const dest, const unsigned int payload_len) |
| Build an uncompressed UDP-Lite header. | |
| static void | udp_lite_update_context (struct rohc_decomp_ctxt *const context, const struct rohc_decoded_values *const decoded) |
| Update context with decoded UDP-Lite values. | |
Variables | |
| struct rohc_decomp_profile | d_udplite_profile |
| Define the decompression part of the UDP-Lite profile as described in the RFC 4019. | |
ROHC decompression context for the UDP-Lite profile.
| static bool d_udp_lite_create | ( | const struct rohc_decomp_ctxt *const | context, | |
| struct rohc_decomp_rfc3095_ctxt **const | persist_ctxt, | |||
| struct rohc_decomp_volat_ctxt *const | volat_ctxt | |||
| ) | [static] |
Create the UDP-Lite decompression context.
This function is one of the functions that must exist in one profile for the framework to work.
| context | The main decompression context | |
| [out] | persist_ctxt | The persistent part of the decompression context |
| [out] | volat_ctxt | The volatile part of the decompression context |
| static void d_udp_lite_destroy | ( | struct rohc_decomp_rfc3095_ctxt *const | rfc3095_ctxt, | |
| const struct rohc_decomp_volat_ctxt *const | volat_ctxt | |||
| ) | [static] |
Destroy the context.
This function is one of the functions that must exist in one profile for the framework to work.
| rfc3095_ctxt | The persistent decompression context for the RFC3095 profiles | |
| volat_ctxt | The volatile decompression context |
| static bool d_udp_lite_parse | ( | 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_extr_bits *const | bits, | |||
| size_t *const | rohc_hdr_len | |||
| ) | [static] |
Decode one IR, IR-DYN or UO* packet for UDP-Lite 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 decode | |
| 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 header |
| [out] | bits | The bits extracted from the ROHC header |
| [out] | rohc_hdr_len | The length of the ROHC header (in bytes) |
| static int udp_lite_build_uncomp_udp | ( | const struct rohc_decomp_ctxt *const | context, | |
| const struct rohc_decoded_values *const | decoded, | |||
| uint8_t *const | dest, | |||
| const unsigned int | payload_len | |||
| ) | [static] |
Build an uncompressed UDP-Lite header.
| context | The decompression context | |
| decoded | The values decoded from the ROHC header | |
| dest | The buffer to store the UDP-Lite header | |
| payload_len | The length of the UDP-Lite payload |
| static bool udp_lite_decode_values_from_bits | ( | const struct rohc_decomp_ctxt * | context, | |
| const struct rohc_extr_bits *const | bits, | |||
| struct rohc_decoded_values *const | decoded | |||
| ) | [static] |
Decode UDP-Lite values from extracted bits.
The following values are decoded:
| context | The decompression context | |
| bits | The extracted bits | |
| decoded | OUT: The corresponding decoded values |
| static rohc_packet_t udp_lite_detect_packet_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 UDP-Lite profile.
Parse optional CCE packet type, then normal packet type.
| 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 int udp_lite_parse_dynamic_udp | ( | const struct rohc_decomp_ctxt *const | context, | |
| const uint8_t * | packet, | |||
| const size_t | length, | |||
| struct rohc_extr_bits *const | bits | |||
| ) | [static] |
Parse the UDP-Lite dynamic part of the ROHC packet.
| context | The decompression context | |
| packet | The ROHC packet to parse | |
| length | The length of the ROHC packet | |
| bits | OUT: The bits extracted from the ROHC header |
| static int udp_lite_parse_uo_remainder | ( | const struct rohc_decomp_ctxt *const | context, | |
| const uint8_t * | packet, | |||
| unsigned int | length, | |||
| struct rohc_extr_bits *const | bits | |||
| ) | [static] |
Parse the UDP-Lite remainder of the UO* ROHC packets.
| context | The decompression context | |
| packet | The ROHC packet to parse | |
| length | The length of the ROHC packet | |
| bits | OUT: The bits extracted from the ROHC header |
| static void udp_lite_update_context | ( | struct rohc_decomp_ctxt *const | context, | |
| const struct rohc_decoded_values *const | decoded | |||
| ) | [static] |
Update context with decoded UDP-Lite values.
The following decoded values are updated in context:
| context | The decompression context | |
| decoded | The decoded values to update in the context |
{
.id = ROHC_PROFILE_UDPLITE,
.msn_max_bits = 16,
.new_context = (rohc_decomp_new_context_t) d_udp_lite_create,
.free_context = (rohc_decomp_free_context_t) d_udp_lite_destroy,
.detect_pkt_type = udp_lite_detect_packet_type,
.parse_pkt = (rohc_decomp_parse_pkt_t) d_udp_lite_parse,
.decode_bits = (rohc_decomp_decode_bits_t) rfc3095_decomp_decode_bits,
.build_hdrs = (rohc_decomp_build_hdrs_t) rfc3095_decomp_build_hdrs,
.update_ctxt = (rohc_decomp_update_ctxt_t) rfc3095_decomp_update_ctxt,
.attempt_repair = (rohc_decomp_attempt_repair_t) rfc3095_decomp_attempt_repair,
.get_sn = rohc_decomp_rfc3095_get_sn,
}
Define the decompression part of the UDP-Lite profile as described in the RFC 4019.
1.6.1