27 #ifndef ROHC_DECOMP_INTERNALS_H
28 #define ROHC_DECOMP_INTERNALS_H
43 #define D_NUM_PROFILES 7U
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
230 #define ROHC_MAX_ARRIVAL_TIMES 10U
343 __attribute__((warn_unused_result, nonnull(1, 2, 3)));
347 __attribute__((nonnull(2)));
350 const uint8_t *
const rohc_packet,
351 const size_t rohc_length,
352 const size_t large_cid_len)
353 __attribute__((warn_unused_result, nonnull(1, 2)));
357 const size_t large_cid_len,
360 void *
const extr_bits,
361 size_t *
const rohc_hdr_len)
362 __attribute__((warn_unused_result, nonnull(1, 4, 5, 6, 7)));
365 const void *
const extr_bits,
366 const size_t payload_len,
367 void *
const decoded_values)
368 __attribute__((warn_unused_result, nonnull(1, 2, 4)));
374 const void *
const decoded_values,
375 const size_t payload_len,
377 size_t *
const uncomp_hdrs_len)
378 __attribute__((warn_unused_result, nonnull(1, 2, 4, 5, 7, 8)));
381 const void *
const decoded_values,
382 const size_t payload_len,
383 bool *
const do_change_mode)
384 __attribute__((nonnull(1, 2, 4)));
388 const struct rohc_ts pkt_arrival_time,
390 void *
const extr_bits)
391 __attribute__((warn_unused_result, nonnull(1, 2, 4, 5)));
394 __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:324
Functions to create ROHC feedback.
struct d_statistics stats
Definition: rohc_decomp_internals.h:201
uint8_t rru[ROHC_MAX_MRRU]
Definition: rohc_decomp_internals.h:183
#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:423
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
uint8_t crc_table_7[256]
Definition: rohc_decomp_internals.h:195
rohc_packet_t packet_type
Definition: rohc_decomp_internals.h:310
const rohc_profile_t id
Definition: rohc_decomp_internals.h:406
rohc_decomp_build_hdrs_t build_hdrs
Definition: rohc_decomp_internals.h:429
struct rohc_decomp_volat_ctxt volat_ctxt
Definition: rohc_decomp_internals.h:287
struct rohc_decomp_crc crc
Definition: rohc_decomp_internals.h:259
unsigned long corrected_wrong_sn_updates
Definition: rohc_decomp_internals.h:329
uint32_t(* rohc_decomp_get_sn_t)(const struct rohc_decomp_ctxt *const context)
Definition: rohc_decomp_internals.h:393
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:413
uint8_t crc_table_8[256]
Definition: rohc_decomp_internals.h:197
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
struct rohc_ack_rate_limit static_nack
Definition: rohc_decomp_internals.h:127
unsigned long header_uncompressed_size
Definition: rohc_decomp_internals.h:317
unsigned long num_recv_packets
Definition: rohc_decomp_internals.h:322
size_t rru_len
Definition: rohc_decomp_internals.h:185
struct rohc_medium medium
Definition: rohc_decomp_internals.h:145
unsigned long corrected_sn_wraparounds
Definition: rohc_decomp_internals.h:326
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:386
unsigned long nr_misordered_packets
Definition: rohc_decomp_internals.h:334
The ROHC decompression profile.
Definition: rohc_decomp_internals.h:403
rohc_decomp_attempt_repair_t attempt_repair
Definition: rohc_decomp_internals.h:435
unsigned long corrected_crc_failures
Definition: rohc_decomp_internals.h:95
bool(* 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:364
unsigned int first_used
Definition: rohc_decomp_internals.h:297
struct rohc_ack_stats last_pkt_feedbacks[ROHC_FEEDBACK_RESERVED]
Definition: rohc_decomp_internals.h:175
size_t threshold
Definition: rohc_decomp_internals.h:115
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
struct rohc_decomp_crc_corr_ctxt crc_corr
Definition: rohc_decomp_internals.h:305
rohc_decomp_update_ctxt_t update_ctxt
Definition: rohc_decomp_internals.h:432
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
struct rohc_ack_rate_limit nack
Definition: rohc_decomp_internals.h:125
rohc_decomp_get_sn_t get_sn
Definition: rohc_decomp_internals.h:438
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:340
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:349
#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
bool enabled_profiles[D_NUM_PROFILES]
Definition: rohc_decomp_internals.h:151
rohc_cid_t cid
Definition: rohc_decomp_internals.h:277
rohc_crc_type_t
Definition: crc.h:56
A network buffer for the ROHC library.
Definition: rohc_buf.h:104
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
struct rohc_ts arrival_times[ROHC_MAX_ARRIVAL_TIMES]
Definition: rohc_decomp_internals.h:232
rohc_decomp_state_t
The ROHC decompressor states.
Definition: rohc_decomp.h:74
rohc_decomp_features_t
The different features of the ROHC decompressor.
Definition: rohc_decomp.h:285
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:345
size_t n
Definition: rohc_decomp_internals.h:114
const size_t msn_max_bits
Definition: rohc_decomp_internals.h:409
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
struct rohc_ack_rate_limit speed
Definition: rohc_decomp_internals.h:123
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:355
ROHC medium (CID characteristics)
Definition: rohc_internal.h:124
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:420
struct rohc_ack_rate_limits ack_rate_limits
Definition: rohc_decomp_internals.h:171
rohc_crc_type_t type
Definition: rohc_decomp_internals.h:243
bool is_duplicated
Definition: rohc_decomp_internals.h:336
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
struct rohc_ack_stats last_pkt_feedbacks[ROHC_FEEDBACK_RESERVED]
Definition: rohc_decomp_internals.h:302
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.h:212
ROHC decompression routines.
rohc_packet_t
The different types of ROHC packets.
Definition: rohc_packets.h:49
unsigned long corrected_sn_wraparounds
Definition: rohc_decomp_internals.h:98
unsigned long failed_crc
Definition: rohc_decomp_internals.h:83
uint8_t crc_table_3[256]
Definition: rohc_decomp_internals.h:193
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:417
unsigned long nr_lost_packets
Definition: rohc_decomp_internals.h:332
rohc_decomp_decode_bits_t decode_bits
Definition: rohc_decomp_internals.h:426
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:380
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:370
size_t k
Definition: rohc_decomp_internals.h:113