ROHC compression/decompression library
|
The generic compression context. More...
#include <c_generic.h>
Data Fields | |
uint32_t | sn |
The Sequence Number (SN), may be 16-bit or 32-bit long. | |
struct c_wlsb * | sn_window |
A window used to encode the SN. | |
int | ir_count |
The number of packets sent while in Initialization & Refresh (IR) state. | |
int | fo_count |
The number of packets sent while in First Order (FO) state. | |
int | so_count |
The number of packets sent while in Second Order (SO) state. | |
size_t | go_back_fo_count |
The number of packet sent while in SO state, used for the periodic refreshes of the context. | |
size_t | go_back_ir_count |
The number of packet sent while in FO or SO state, used for the periodic refreshes of the context. | |
size_t | ip_hdr_nr |
struct ip_header_info | outer_ip_flags |
Information about the outer IP header. | |
struct ip_header_info | inner_ip_flags |
Information about the inner IP header. | |
struct generic_tmp_vars | tmp |
Temporary variables that are used during one single compression of packet. | |
unsigned int | next_header_proto |
The protocol number registered by IANA for the next header protocol. | |
unsigned int | next_header_len |
The length of the next header. | |
bool(* | encode_uncomp_fields )(struct rohc_comp_ctxt *const context, const struct net_pkt *const uncomp_pkt) |
void(* | decide_state )(struct rohc_comp_ctxt *const context) |
The handler used to decide the state that should be used for the next packet. | |
rohc_packet_t(* | decide_FO_packet )(const struct rohc_comp_ctxt *context) |
The handler used to decide which packet to send in FO state. | |
rohc_packet_t(* | decide_SO_packet )(const struct rohc_comp_ctxt *context) |
The handler used to decide which packet to send in SO state. | |
rohc_ext_t(* | decide_extension )(const struct rohc_comp_ctxt *context) |
void(* | init_at_IR )(const struct rohc_comp_ctxt *context, const unsigned char *next_header) |
The handler used to initialize some data just before the IR packet build. | |
uint32_t(* | get_next_sn )(const struct rohc_comp_ctxt *const context, const struct net_pkt *const uncomp_pkt) |
size_t(* | code_static_part )(const struct rohc_comp_ctxt *const context, const unsigned char *const next_header, unsigned char *const dest, const size_t counter) |
The handler used to add the static part of the next header to the ROHC packet. | |
size_t(* | code_dynamic_part )(const struct rohc_comp_ctxt *const context, const unsigned char *const next_header, unsigned char *const dest, const size_t counter) |
The handler used to add the dynamic part of the next header to the ROHC pachet. | |
int(* | code_ir_remainder )(const struct rohc_comp_ctxt *const context, unsigned char *const dest, const size_t dest_max_len, const size_t counter) |
The handler used to add the IR/IR-DYN remainder header to the ROHC pachet. | |
size_t(* | code_UO_packet_head )(const struct rohc_comp_ctxt *const context, const unsigned char *const next_header, unsigned char *const dest, const size_t counter, size_t *const first_position) |
The handler used to add an additional header in the head of the UO-0, UO-1 and UO-2 packets. | |
size_t(* | code_uo_remainder )(const struct rohc_comp_ctxt *const context, const unsigned char *const next_header, unsigned char *const dest, const size_t counter) |
The handler used to add an additional header in the tail of the UO-0, UO-1 and UO-2 packets. | |
uint8_t(* | compute_crc_static )(const uint8_t *const ip, const uint8_t *const ip2, const uint8_t *const next_header, const rohc_crc_type_t crc_type, const uint8_t init_val, const uint8_t *const crc_table) |
The handler used to compute the CRC-STATIC value. | |
uint8_t(* | compute_crc_dynamic )(const uint8_t *const ip, const uint8_t *const ip2, const uint8_t *const next_header, const rohc_crc_type_t crc_type, const uint8_t init_val, const uint8_t *const crc_table) |
The handler used to compute the CRC-DYNAMIC value. | |
void * | specific |
Profile-specific data. |
The generic compression context.
The object defines the generic context that manages IP(/nextheader) and IP/IP(/nextheader) packets. nextheader is managed by the profile-specific part of the context.
size_t(* c_generic_context::code_dynamic_part)(const struct rohc_comp_ctxt *const context, const unsigned char *const next_header, unsigned char *const dest, const size_t counter) |
The handler used to add the dynamic part of the next header to the ROHC pachet.
int(* c_generic_context::code_ir_remainder)(const struct rohc_comp_ctxt *const context, unsigned char *const dest, const size_t dest_max_len, const size_t counter) |
The handler used to add the IR/IR-DYN remainder header to the ROHC pachet.
size_t(* c_generic_context::code_static_part)(const struct rohc_comp_ctxt *const context, const unsigned char *const next_header, unsigned char *const dest, const size_t counter) |
The handler used to add the static part of the next header to the ROHC packet.
size_t(* c_generic_context::code_UO_packet_head)(const struct rohc_comp_ctxt *const context, const unsigned char *const next_header, unsigned char *const dest, const size_t counter, size_t *const first_position) |
The handler used to add an additional header in the head of the UO-0, UO-1 and UO-2 packets.
size_t(* c_generic_context::code_uo_remainder)(const struct rohc_comp_ctxt *const context, const unsigned char *const next_header, unsigned char *const dest, const size_t counter) |
The handler used to add an additional header in the tail of the UO-0, UO-1 and UO-2 packets.
uint8_t(* c_generic_context::compute_crc_dynamic)(const uint8_t *const ip, const uint8_t *const ip2, const uint8_t *const next_header, const rohc_crc_type_t crc_type, const uint8_t init_val, const uint8_t *const crc_table) |
The handler used to compute the CRC-DYNAMIC value.
uint8_t(* c_generic_context::compute_crc_static)(const uint8_t *const ip, const uint8_t *const ip2, const uint8_t *const next_header, const rohc_crc_type_t crc_type, const uint8_t init_val, const uint8_t *const crc_table) |
The handler used to compute the CRC-STATIC value.
rohc_ext_t(* c_generic_context::decide_extension)(const struct rohc_comp_ctxt *context) |
The handler used to decide which extension to send
rohc_packet_t(* c_generic_context::decide_FO_packet)(const struct rohc_comp_ctxt *context) |
The handler used to decide which packet to send in FO state.
rohc_packet_t(* c_generic_context::decide_SO_packet)(const struct rohc_comp_ctxt *context) |
The handler used to decide which packet to send in SO state.
void(* c_generic_context::decide_state)(struct rohc_comp_ctxt *const context) |
The handler used to decide the state that should be used for the next packet.
bool(* c_generic_context::encode_uncomp_fields)(struct rohc_comp_ctxt *const context, const struct net_pkt *const uncomp_pkt) |
The handler for encoding profile-specific uncompressed header fields
The number of packets sent while in First Order (FO) state.
uint32_t(* c_generic_context::get_next_sn)(const struct rohc_comp_ctxt *const context, const struct net_pkt *const uncomp_pkt) |
Determine the next SN value
The number of packet sent while in SO state, used for the periodic refreshes of the context.
The number of packet sent while in FO or SO state, used for the periodic refreshes of the context.
void(* c_generic_context::init_at_IR)(const struct rohc_comp_ctxt *context, const unsigned char *next_header) |
The handler used to initialize some data just before the IR packet build.
Information about the inner IP header.
size_t c_generic_context::ip_hdr_nr |
The number of IP headers
The number of packets sent while in Initialization & Refresh (IR) state.
unsigned int c_generic_context::next_header_len |
The length of the next header.
unsigned int c_generic_context::next_header_proto |
The protocol number registered by IANA for the next header protocol.
Information about the outer IP header.
uint32_t c_generic_context::sn |
The Sequence Number (SN), may be 16-bit or 32-bit long.
struct c_wlsb* c_generic_context::sn_window |
A window used to encode the SN.
The number of packets sent while in Second Order (SO) state.
Profile-specific data.
Temporary variables that are used during one single compression of packet.