27 #ifndef ROHC_DECOMP_INTERNALS_H 28 #define ROHC_DECOMP_INTERNALS_H 43 #define rohc_decomp_warn(context, format, ...) \ 44 rohc_warning((context)->decompressor, ROHC_TRACE_DECOMP, \ 45 (context)->profile->id, \ 46 format, ##__VA_ARGS__) 49 #define rohc_decomp_debug(context, format, ...) \ 50 rohc_debug((context)->decompressor, ROHC_TRACE_DECOMP, \ 51 (context)->profile->id, \ 52 format, ##__VA_ARGS__) 55 #define rohc_decomp_dump_buf(context, descr, buf, buf_len) \ 57 if(((context)->decompressor->features & ROHC_DECOMP_FEATURE_DUMP_PACKETS) != 0) { \ 58 rohc_dump_buf((context)->decompressor->trace_callback, \ 59 (context)->decompressor->trace_callback_priv, \ 60 ROHC_TRACE_DECOMP, ROHC_TRACE_DEBUG, \ 61 descr, buf, buf_len); \ 214 #define ROHC_MAX_ARRIVAL_TIMES 10U 340 __attribute__((warn_unused_result,
nonnull(1, 2, 3)));
347 const uint8_t *
const rohc_packet,
348 const size_t rohc_length,
349 const size_t large_cid_len)
350 __attribute__((warn_unused_result,
nonnull(1, 2)));
354 const size_t large_cid_len,
357 void *
const extr_bits,
358 size_t *
const rohc_hdr_len)
359 __attribute__((warn_unused_result,
nonnull(1, 4, 5, 6, 7)));
362 const void *
const extr_bits,
363 const size_t payload_len,
364 void *
const decoded_values)
365 __attribute__((warn_unused_result,
nonnull(1, 2, 4)));
371 const void *
const decoded_values,
372 const size_t payload_len,
374 size_t *
const uncomp_hdrs_len)
375 __attribute__((warn_unused_result,
nonnull(1, 2, 4, 5, 7, 8)));
378 const void *
const decoded_values,
379 const size_t payload_len,
380 bool *
const do_change_mode)
381 __attribute__((
nonnull(1, 2, 4)));
385 const struct rohc_ts pkt_arrival_time,
387 void *
const extr_bits)
388 __attribute__((warn_unused_result,
nonnull(1, 2, 4, 5)));
391 __attribute__((warn_unused_result,
nonnull(1)));
size_t arrival_times_index
Definition: rohc_decomp_internals.h:220
unsigned long corrected_crc_failures
Definition: rohc_decomp_internals.h:321
Functions to create ROHC feedback.
unsigned long header_last_compressed_size
Definition: rohc_decomp_internals.h:316
struct d_statistics stats
Definition: rohc_decomp_internals.h:185
#define ROHC_MAX_ARRIVAL_TIMES
Definition: rohc_decomp_internals.h:214
#define ROHC_PROFILE_ID_MINOR_MAX
Definition: rohc_profiles.h:57
The ROHC decompressor.
Definition: rohc_decomp_internals.h:138
rohc_decomp_parse_pkt_t parse_pkt
Definition: rohc_decomp_internals.h:420
Definition: rohc_decomp_internals.h:199
unsigned long corrected_wrong_sn_updates
Definition: rohc_decomp_internals.h:97
uint32_t needed
Definition: rohc_decomp_internals.h:130
Definition: rohc_decomp_internals.h:225
Definition: rohc_decomp_internals.h:128
rohc_mode_t
ROHC operation modes.
Definition: rohc.h:112
The volatile part of the ROHC decompression context.
Definition: rohc_decomp_internals.h:249
size_t arrival_times_nr
Definition: rohc_decomp_internals.h:218
const rohc_profile_t id
Definition: rohc_decomp_internals.h:403
rohc_decomp_build_hdrs_t build_hdrs
Definition: rohc_decomp_internals.h:426
struct rohc_decomp_volat_ctxt volat_ctxt
Definition: rohc_decomp_internals.h:280
struct rohc_decomp_crc crc
Definition: rohc_decomp_internals.h:252
unsigned long corrected_wrong_sn_updates
Definition: rohc_decomp_internals.h:326
struct rohc_decomp_crc_one uncomp
Definition: rohc_decomp_internals.h:238
uint32_t(* rohc_decomp_get_sn_t)(const struct rohc_decomp_ctxt *const context)
Definition: rohc_decomp_internals.h:390
size_t sn_feedback_min_bits
Definition: rohc_decomp_internals.h:165
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:410
unsigned long total_last_uncompressed_size
Definition: rohc_decomp_internals.h:310
rohc_status_t
The status code of several functions in the library API.
Definition: rohc.h:80
struct rohc_decomp * decompressor
Definition: rohc_decomp_internals.h:273
struct rohc_ack_rate_limit static_nack
Definition: rohc_decomp_internals.h:123
unsigned long header_uncompressed_size
Definition: rohc_decomp_internals.h:305
uint8_t bits
Definition: rohc_decomp_internals.h:228
unsigned long num_recv_packets
Definition: rohc_decomp_internals.h:319
size_t rru_len
Definition: rohc_decomp_internals.h:179
struct rohc_medium medium
Definition: rohc_decomp_internals.h:141
bool enabled_profiles[ROHC_PROFILE_ID_MAJOR_MAX+1][ROHC_PROFILE_ID_MINOR_MAX+1]
Definition: rohc_decomp_internals.h:147
unsigned long corrected_sn_wraparounds
Definition: rohc_decomp_internals.h:323
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:383
unsigned long nr_misordered_packets
Definition: rohc_decomp_internals.h:331
The ROHC decompression profile.
Definition: rohc_decomp_internals.h:400
rohc_decomp_attempt_repair_t attempt_repair
Definition: rohc_decomp_internals.h:432
unsigned long corrected_crc_failures
Definition: rohc_decomp_internals.h:91
struct rohc_ack_stats last_pkt_feedbacks[ROHC_FEEDBACK_RESERVED]
Definition: rohc_decomp_internals.h:171
size_t threshold
Definition: rohc_decomp_internals.h:111
unsigned long total_last_compressed_size
Definition: rohc_decomp_internals.h:312
void * extr_bits
Definition: rohc_decomp_internals.h:256
void * persist_ctxt
Definition: rohc_decomp_internals.h:278
unsigned long total_compressed_size
Definition: rohc_decomp_internals.h:303
Definition: rohc_decomp_internals.h:200
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:260
size_t prtt
Definition: rohc_decomp_internals.h:163
uint32_t sent
Definition: rohc_decomp_internals.h:131
struct rohc_decomp_crc_corr_ctxt crc_corr
Definition: rohc_decomp_internals.h:293
rohc_decomp_update_ctxt_t update_ctxt
Definition: rohc_decomp_internals.h:429
size_t mrru
Definition: rohc_decomp_internals.h:181
uint32_t last_pkts_errors
Definition: rohc_decomp_internals.h:169
Definition: feedback.h:55
unsigned long total_uncompressed_size
Definition: rohc_decomp_internals.h:88
struct rohc_ack_rate_limit nack
Definition: rohc_decomp_internals.h:121
rohc_decomp_get_sn_t get_sn
Definition: rohc_decomp_internals.h:435
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:337
rohc_decomp_crc_corr_t algo
Definition: rohc_decomp_internals.h:210
rohc_trace_callback2_t trace_callback
Definition: rohc_decomp_internals.h:188
rohc_decomp_state_t state
Definition: rohc_decomp_internals.h:285
Some compressor statistics.
Definition: rohc_decomp_internals.h:74
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:346
struct rohc_decomp_ctxt ** contexts
Definition: rohc_decomp_internals.h:153
unsigned long header_compressed_size
Definition: rohc_decomp_internals.h:307
rohc_cid_t cid
Definition: rohc_decomp_internals.h:270
rohc_crc_type_t
Definition: crc.h:56
A network buffer for the ROHC library.
Definition: rohc_buf.h:102
Definition: rohc_decomp_internals.h:201
A timestamp for the ROHC library.
Definition: rohc_time.h:51
rohc_crc_type_t type
Definition: rohc_decomp_internals.h:227
struct rohc_decomp_ctxt * last_context
Definition: rohc_decomp_internals.h:157
rohc_mode_t target_mode
Definition: rohc_decomp_internals.h:150
unsigned long failed_no_context
Definition: rohc_decomp_internals.h:81
struct rohc_ts arrival_times[ROHC_MAX_ARRIVAL_TIMES]
Definition: rohc_decomp_internals.h:216
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:233
The ROHC decompression context.
Definition: rohc_decomp_internals.h:267
void(* rohc_decomp_free_context_t)(void *const persist_ctxt, const struct rohc_decomp_volat_ctxt *const volat_ctxt)
Definition: rohc_decomp_internals.h:342
size_t n
Definition: rohc_decomp_internals.h:110
rohc_packet_t last_packet_type
Definition: rohc_decomp_internals.h:298
const size_t msn_max_bits
Definition: rohc_decomp_internals.h:406
Definition: rohc_decomp_internals.h:207
const struct rohc_decomp_profile * profile
Definition: rohc_decomp_internals.h:276
uint16_t num_contexts_used
Definition: rohc_decomp_internals.h:155
unsigned long failed_decomp
Definition: rohc_decomp_internals.h:83
rohc_decomp_features_t features
Definition: rohc_decomp_internals.h:144
uint16_t rohc_cid_t
Definition: rohc.h:196
struct rohc_ack_rate_limit speed
Definition: rohc_decomp_internals.h:119
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:352
ROHC medium (CID characteristics)
Definition: rohc_internal.h:211
ROHC private common definitions and routines.
size_t counter
Definition: rohc_decomp_internals.h:212
void * trace_callback_priv
Definition: rohc_decomp_internals.h:190
rohc_decomp_detect_pkt_type_t detect_pkt_type
Definition: rohc_decomp_internals.h:417
struct rohc_ack_rate_limits ack_rate_limits
Definition: rohc_decomp_internals.h:167
bool is_duplicated
Definition: rohc_decomp_internals.h:333
unsigned long total_uncompressed_size
Definition: rohc_decomp_internals.h:301
uint32_t last_pkts_errors
Definition: rohc_decomp_internals.h:288
struct rohc_decomp_crc_one comp
Definition: rohc_decomp_internals.h:236
struct rohc_ack_stats last_pkt_feedbacks[ROHC_FEEDBACK_RESERVED]
Definition: rohc_decomp_internals.h:290
Definition: rohc_decomp_internals.h:116
uint8_t * rru
Definition: rohc_decomp_internals.h:177
rohc_decomp_crc_corr_t
The different correction algorithms available in case of CRC failure.
Definition: rohc_decomp_internals.h:197
The user configuration for feedback rate-limiting.
Definition: rohc_decomp_internals.h:107
unsigned long received
Definition: rohc_decomp_internals.h:77
rohc_mode_t mode
Definition: rohc_decomp_internals.h:283
unsigned long total_compressed_size
Definition: rohc_decomp_internals.h:86
rohc_profile_t
The different ROHC compression/decompression profiles.
Definition: rohc_profiles.h:76
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:94
unsigned long failed_crc
Definition: rohc_decomp_internals.h:79
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:414
unsigned long nr_lost_packets
Definition: rohc_decomp_internals.h:329
rohc_decomp_decode_bits_t decode_bits
Definition: rohc_decomp_internals.h:423
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:377
unsigned long header_last_uncompressed_size
Definition: rohc_decomp_internals.h:314
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:361
#define ROHC_PROFILE_ID_MAJOR_MAX
Definition: rohc_profiles.h:54
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:367
size_t k
Definition: rohc_decomp_internals.h:109