27 #ifndef ROHC_DECOMP_INTERNALS_H 28 #define ROHC_DECOMP_INTERNALS_H 43 #define D_NUM_PROFILES 10U 47 #define rohc_decomp_warn(context, format, ...) \ 48 rohc_warning((context)->decompressor, ROHC_TRACE_DECOMP, \ 49 (context)->profile->id, \ 50 format, ##__VA_ARGS__) 53 #define rohc_decomp_debug(context, format, ...) \ 54 rohc_debug((context)->decompressor, ROHC_TRACE_DECOMP, \ 55 (context)->profile->id, \ 56 format, ##__VA_ARGS__) 59 #define rohc_decomp_dump_buf(context, descr, buf, buf_len) \ 61 if(((context)->decompressor->features & ROHC_DECOMP_FEATURE_DUMP_PACKETS) != 0) { \ 62 rohc_dump_buf((context)->decompressor->trace_callback, \ 63 (context)->decompressor->trace_callback_priv, \ 64 ROHC_TRACE_DECOMP, ROHC_TRACE_DEBUG, \ 65 descr, buf, buf_len); \ 181 #define ROHC_MAX_MRRU 65535 193 uint8_t crc_table_3[256];
195 uint8_t crc_table_7[256];
197 uint8_t crc_table_8[256];
230 #define ROHC_MAX_ARRIVAL_TIMES 10U 352 __attribute__((warn_unused_result, nonnull(1, 2, 3)));
356 __attribute__((nonnull(2)));
359 const uint8_t *
const rohc_packet,
360 const size_t rohc_length,
361 const size_t large_cid_len)
362 __attribute__((warn_unused_result, nonnull(1, 2)));
366 const size_t large_cid_len,
369 void *
const extr_bits,
370 size_t *
const rohc_hdr_len)
371 __attribute__((warn_unused_result, nonnull(1, 4, 5, 6, 7)));
374 const void *
const extr_bits,
375 const size_t payload_len,
376 void *
const decoded_values)
377 __attribute__((warn_unused_result, nonnull(1, 2, 4)));
383 const void *
const decoded_values,
384 const size_t payload_len,
386 size_t *
const uncomp_hdrs_len)
387 __attribute__((warn_unused_result, nonnull(1, 2, 4, 5, 7, 8)));
390 const void *
const decoded_values,
391 const size_t payload_len,
392 bool *
const do_change_mode)
393 __attribute__((nonnull(1, 2, 4)));
397 const struct rohc_ts pkt_arrival_time,
399 void *
const extr_bits)
400 __attribute__((warn_unused_result, nonnull(1, 2, 4, 5)));
403 __attribute__((warn_unused_result, nonnull(1)));
size_t arrival_times_index
Definition: rohc_decomp_internals.h:236
unsigned long corrected_crc_failures
Definition: rohc_decomp_internals.h:333
Functions to create ROHC feedback.
unsigned long header_last_compressed_size
Definition: rohc_decomp_internals.h:328
#define ROHC_MAX_ARRIVAL_TIMES
Definition: rohc_decomp_internals.h:230
The ROHC decompressor.
Definition: rohc_decomp_internals.h:142
rohc_decomp_parse_pkt_t parse_pkt
Definition: rohc_decomp_internals.h:432
Definition: rohc_decomp_internals.h:215
size_t rohc_cid_t
Definition: rohc.h:195
unsigned long corrected_wrong_sn_updates
Definition: rohc_decomp_internals.h:101
uint32_t needed
Definition: rohc_decomp_internals.h:134
Definition: rohc_decomp_internals.h:132
rohc_mode_t
ROHC operation modes.
Definition: rohc.h:111
The volatile part of the ROHC decompression context.
Definition: rohc_decomp_internals.h:256
size_t arrival_times_nr
Definition: rohc_decomp_internals.h:234
rohc_packet_t packet_type
Definition: rohc_decomp_internals.h:310
const rohc_profile_t id
Definition: rohc_decomp_internals.h:415
rohc_decomp_build_hdrs_t build_hdrs
Definition: rohc_decomp_internals.h:438
unsigned long corrected_wrong_sn_updates
Definition: rohc_decomp_internals.h:338
uint32_t(* rohc_decomp_get_sn_t)(const struct rohc_decomp_ctxt *const context)
Definition: rohc_decomp_internals.h:402
size_t sn_feedback_min_bits
Definition: rohc_decomp_internals.h:169
rohc_decomp_new_context_t new_context
The handler used to create the profile-specific part of the decompression context.
Definition: rohc_decomp_internals.h:422
unsigned long total_last_uncompressed_size
Definition: rohc_decomp_internals.h:322
rohc_status_t
The status code of several functions in the library API.
Definition: rohc.h:79
struct rohc_decomp * decompressor
Definition: rohc_decomp_internals.h:280
unsigned long header_uncompressed_size
Definition: rohc_decomp_internals.h:317
unsigned long num_recv_packets
Definition: rohc_decomp_internals.h:331
size_t rru_len
Definition: rohc_decomp_internals.h:185
unsigned long corrected_sn_wraparounds
Definition: rohc_decomp_internals.h:335
bool(* rohc_decomp_attempt_repair_t)(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, void *const extr_bits)
Definition: rohc_decomp_internals.h:395
unsigned long nr_misordered_packets
Definition: rohc_decomp_internals.h:343
The ROHC decompression profile.
Definition: rohc_decomp_internals.h:412
rohc_decomp_attempt_repair_t attempt_repair
Definition: rohc_decomp_internals.h:444
unsigned long corrected_crc_failures
Definition: rohc_decomp_internals.h:95
unsigned int first_used
Definition: rohc_decomp_internals.h:297
size_t threshold
Definition: rohc_decomp_internals.h:115
unsigned long total_last_compressed_size
Definition: rohc_decomp_internals.h:324
void * extr_bits
Definition: rohc_decomp_internals.h:263
void * persist_ctxt
Definition: rohc_decomp_internals.h:285
unsigned long total_compressed_size
Definition: rohc_decomp_internals.h:315
Definition: rohc_decomp_internals.h:216
uint8_t bits
Definition: rohc_decomp_internals.h:244
void(* rohc_trace_callback2_t)(void *const priv_ctxt, const rohc_trace_level_t level, const rohc_trace_entity_t entity, const int profile, const char *const format,...)
The function prototype for the trace callback.
Definition: rohc_traces.h:118
void * decoded_values
Definition: rohc_decomp_internals.h:267
size_t prtt
Definition: rohc_decomp_internals.h:167
uint32_t sent
Definition: rohc_decomp_internals.h:135
rohc_decomp_update_ctxt_t update_ctxt
Definition: rohc_decomp_internals.h:441
size_t mrru
Definition: rohc_decomp_internals.h:187
uint32_t last_pkts_errors
Definition: rohc_decomp_internals.h:173
Definition: feedback.h:55
unsigned long total_uncompressed_size
Definition: rohc_decomp_internals.h:92
rohc_decomp_get_sn_t get_sn
Definition: rohc_decomp_internals.h:447
size_t num_contexts_used
Definition: rohc_decomp_internals.h:159
bool(* rohc_decomp_new_context_t)(const struct rohc_decomp_ctxt *const context, void **const persist_ctxt, struct rohc_decomp_volat_ctxt *const volat_ctxt)
Definition: rohc_decomp_internals.h:349
rohc_decomp_crc_corr_t algo
Definition: rohc_decomp_internals.h:226
rohc_trace_callback2_t trace_callback
Definition: rohc_decomp_internals.h:204
rohc_decomp_state_t state
Definition: rohc_decomp_internals.h:292
Some compressor statistics.
Definition: rohc_decomp_internals.h:78
rohc_packet_t(* rohc_decomp_detect_pkt_type_t)(const struct rohc_decomp_ctxt *const context, const uint8_t *const rohc_packet, const size_t rohc_length, const size_t large_cid_len)
Definition: rohc_decomp_internals.h:358
#define ROHC_MAX_MRRU
Definition: rohc_decomp_internals.h:181
unsigned int latest_used
Definition: rohc_decomp_internals.h:295
struct rohc_decomp_ctxt ** contexts
Definition: rohc_decomp_internals.h:157
unsigned long header_compressed_size
Definition: rohc_decomp_internals.h:319
rohc_cid_t cid
Definition: rohc_decomp_internals.h:277
rohc_crc_type_t
Definition: crc.h:58
A network buffer for the ROHC library.
Definition: rohc_buf.h:102
Definition: rohc_decomp_internals.h:217
#define D_NUM_PROFILES
Definition: rohc_decomp_internals.h:43
A timestamp for the ROHC library.
Definition: rohc_time.h:51
struct rohc_decomp_ctxt * last_context
Definition: rohc_decomp_internals.h:161
rohc_mode_t target_mode
Definition: rohc_decomp_internals.h:154
unsigned long failed_no_context
Definition: rohc_decomp_internals.h:85
rohc_decomp_state_t
The ROHC decompressor states.
Definition: rohc_decomp.h:75
rohc_decomp_features_t
The different features of the ROHC decompressor.
Definition: rohc_decomp.h:296
Definition: rohc_decomp_internals.h:241
The ROHC decompression context.
Definition: rohc_decomp_internals.h:274
void(* rohc_decomp_free_context_t)(void *const persist_ctxt, const struct rohc_decomp_volat_ctxt *const volat_ctxt)
Definition: rohc_decomp_internals.h:354
size_t n
Definition: rohc_decomp_internals.h:114
const size_t msn_max_bits
Definition: rohc_decomp_internals.h:418
Definition: rohc_decomp_internals.h:223
const struct rohc_decomp_profile * profile
Definition: rohc_decomp_internals.h:283
unsigned long failed_decomp
Definition: rohc_decomp_internals.h:87
rohc_decomp_features_t features
Definition: rohc_decomp_internals.h:148
bool(* rohc_decomp_parse_pkt_t)(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, void *const extr_bits, size_t *const rohc_hdr_len)
Definition: rohc_decomp_internals.h:364
ROHC medium (CID characteristics)
Definition: rohc_internal.h:146
ROHC private common definitions and routines.
size_t counter
Definition: rohc_decomp_internals.h:228
void * trace_callback_priv
Definition: rohc_decomp_internals.h:206
rohc_decomp_detect_pkt_type_t detect_pkt_type
Definition: rohc_decomp_internals.h:429
rohc_crc_type_t type
Definition: rohc_decomp_internals.h:243
bool is_duplicated
Definition: rohc_decomp_internals.h:345
unsigned long total_uncompressed_size
Definition: rohc_decomp_internals.h:313
uint32_t last_pkts_errors
Definition: rohc_decomp_internals.h:300
size_t bits_nr
Definition: rohc_decomp_internals.h:245
Definition: rohc_decomp_internals.h:120
rohc_decomp_crc_corr_t
The different correction algorithms available in case of CRC failure.
Definition: rohc_decomp_internals.h:213
The user configuration for feedback rate-limiting.
Definition: rohc_decomp_internals.h:111
unsigned long received
Definition: rohc_decomp_internals.h:81
rohc_mode_t mode
Definition: rohc_decomp_internals.h:290
unsigned long total_compressed_size
Definition: rohc_decomp_internals.h:90
rohc_profile_t
The different ROHC compression/decompression profiles.
Definition: rohc_profiles.h:70
ROHC decompression routines.
rohc_packet_t
The different types of ROHC packets.
Definition: rohc_packets.h:55
unsigned long corrected_sn_wraparounds
Definition: rohc_decomp_internals.h:98
unsigned long failed_crc
Definition: rohc_decomp_internals.h:83
rohc_decomp_free_context_t free_context
The handler used to destroy the profile-specific part of the decompression context.
Definition: rohc_decomp_internals.h:426
unsigned long nr_lost_packets
Definition: rohc_decomp_internals.h:341
rohc_decomp_decode_bits_t decode_bits
Definition: rohc_decomp_internals.h:435
void(* rohc_decomp_update_ctxt_t)(struct rohc_decomp_ctxt *const context, const void *const decoded_values, const size_t payload_len, bool *const do_change_mode)
Definition: rohc_decomp_internals.h:389
unsigned long header_last_uncompressed_size
Definition: rohc_decomp_internals.h:326
rohc_status_t(* rohc_decomp_decode_bits_t)(const struct rohc_decomp_ctxt *const context, const void *const extr_bits, const size_t payload_len, void *const decoded_values)
Definition: rohc_decomp_internals.h:373
Internal ROHC macros and functions for traces.
rohc_status_t(* rohc_decomp_build_hdrs_t)(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 void *const decoded_values, const size_t payload_len, struct rohc_buf *const uncomp_hdrs, size_t *const uncomp_hdrs_len)
Definition: rohc_decomp_internals.h:379
size_t k
Definition: rohc_decomp_internals.h:113