|
ROHC compression/decompression library
|
ROHC decompression context for the UDP profile. More...
#include "d_udp.h"#include "rohc_traces_internal.h"#include "rohc_bit_ops.h"#include "rohc_debug.h"#include "rohc_utils.h"#include "crc.h"#include "protocols/udp.h"#include "rohc_decomp_internals.h"#include <assert.h>
Functions | |
| void * | d_udp_create (const struct d_context *const context) |
| Create the UDP decompression context. | |
| int | udp_parse_static_udp (const struct d_context *const context, const unsigned char *packet, unsigned int length, struct rohc_extr_bits *const bits) |
| Parse the UDP static part of the ROHC packet. | |
| void | udp_update_context (const struct d_context *context, const struct rohc_decoded_values decoded) |
| Update context with decoded UDP values. | |
Variables | |
| struct d_profile | d_udp_profile |
| Define the decompression part of the UDP profile as described in the RFC 3095. | |
ROHC decompression context for the UDP profile.
| void* d_udp_create | ( | const struct d_context *const | context | ) |
Create the UDP decompression context.
This function is one of the functions that must exist in one profile for the framework to work.
| context | The decompression context |
References d_generic_context::build_next_header, d_generic_context::compute_crc_dynamic, d_generic_context::compute_crc_static, d_generic_create(), d_generic_destroy(), d_generic_context::decode_values_from_bits, d_context::decompressor, d_generic_context::detect_packet_type, d_profile::id, d_generic_context::inner_ip_changes, ip_detect_packet_type(), d_generic_changes::next_header, d_generic_changes::next_header_len, d_generic_context::next_header_len, d_generic_context::next_header_proto, d_generic_context::outer_ip_changes, d_generic_context::parse_dyn_next_hdr, d_generic_context::parse_static_next_hdr, d_generic_context::parse_uo_remainder, d_context::profile, rohc_error, ROHC_IPPROTO_UDP, rohc_lsb_free(), rohc_lsb_new(), ROHC_LSB_SHIFT_SN, ROHC_TRACE_DECOMP, d_generic_context::sn_lsb_ctxt, d_generic_context::specific, rohc_decomp::trace_callback, d_udp_context::udp_checksum_present, udp_compute_crc_dynamic(), udp_compute_crc_static(), udp_parse_static_udp(), udp_update_context(), d_generic_context::update_context, and zfree.
| int udp_parse_static_udp | ( | const struct d_context *const | context, |
| const unsigned char * | packet, | ||
| unsigned int | length, | ||
| struct rohc_extr_bits *const | bits | ||
| ) |
Parse the UDP static 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 |
References d_context::decompressor, d_udp_context::dport, GET_NEXT_16_BITS, d_profile::id, rohc_extr_bits::is_context_reused, d_context::num_recv_packets, d_context::profile, rohc_decomp_debug, rohc_hton16(), rohc_ntoh16(), ROHC_TRACE_DECOMP, rohc_warning, d_context::specific, d_generic_context::specific, d_udp_context::sport, rohc_extr_bits::udp_dst, rohc_extr_bits::udp_dst_nr, rohc_extr_bits::udp_src, and rohc_extr_bits::udp_src_nr.
Referenced by d_udp_create(), and d_udp_lite_create().
| void udp_update_context | ( | const struct d_context * | context, |
| const struct rohc_decoded_values | decoded | ||
| ) |
Update context with decoded UDP values.
The following decoded values are updated in context:
| context | The decompression context |
| decoded | The decoded values to update in the context |
References udphdr::dest, d_generic_changes::next_header, d_generic_context::outer_ip_changes, udphdr::source, d_context::specific, rohc_decoded_values::udp_dst, and rohc_decoded_values::udp_src.
Referenced by d_udp_create(), and d_udp_lite_create().
| struct d_profile d_udp_profile |
{
ROHC_PROFILE_UDP,
"UDP / Decompressor",
d_generic_decode,
d_udp_create,
d_udp_destroy,
d_generic_get_sn,
}
Define the decompression part of the UDP profile as described in the RFC 3095.
1.7.6.1