27 #ifndef ROHC_COMP_INTERNALS_H    28 #define ROHC_COMP_INTERNALS_H    48 #define ROHC_OA_REPEAT_DEFAULT 4U    52 #define CHANGE_TO_IR_COUNT  1700    56 #define CHANGE_TO_IR_TIME  1000U    60 #define CHANGE_TO_FO_COUNT  700    64 #define CHANGE_TO_FO_TIME  500U    68 #define rohc_comp_warn(context, format, ...) \    69         rohc_warning((context)->compressor, ROHC_TRACE_COMP, \    70                      (context)->profile->id, \    71                      format, ##__VA_ARGS__)    74 #define rohc_comp_debug(context, format, ...) \    75         rohc_debug((context)->compressor, ROHC_TRACE_COMP, \    76                    (context)->profile->id, \    77                    format, ##__VA_ARGS__)    80 #define rohc_comp_dump_buf(context, descr, buf, buf_len) \    82                 if(((context)->compressor->features & ROHC_COMP_FEATURE_DUMP_PACKETS) != 0) { \    83                         rohc_dump_buf((context)->compressor->trace_callback, \    84                                       (context)->compressor->trace_callback_priv, \    85                                       ROHC_TRACE_COMP, ROHC_TRACE_DEBUG, \    86                                       descr, buf, buf_len); \   219                 __attribute__((warn_unused_result, 
nonnull(1, 2)));
   227                 __attribute__((warn_unused_result, 
nonnull(1, 2)));
   241                 __attribute__((warn_unused_result, 
nonnull(1, 2)));
   256                       uint8_t *
const rohc_pkt,
   257                       const size_t rohc_pkt_max_len,
   259                 __attribute__((warn_unused_result, 
nonnull(1, 2, 3, 5)));
   267                          const uint8_t *
const packet,
   268                          const size_t packet_len,
   269                          const uint8_t *
const feedback_data,
   270                          const size_t feedback_data_len)
   271                 __attribute__((warn_unused_result, 
nonnull(1, 3, 5)));
   380         __attribute__((warn_unused_result, 
nonnull(1)));
   383                                    const uint8_t *
const packet,
   384                                    const size_t packet_len,
   385                                    const uint8_t *
const feedback_data,
   386                                    const size_t feedback_data_len,
   388                                    uint32_t *
const sn_bits,
   389                                    size_t *
const sn_bits_nr,
   391                                    uint8_t crc_in_packet,
   392                                    size_t crc_pos_from_end)
   393         __attribute__((warn_unused_result, 
nonnull(1, 2, 4, 6, 7, 8)));
 int total_last_uncompressed_size
Definition: rohc_comp_internals.h:358
 
rohc_reordering_offset_t reorder_ratio
Definition: rohc_comp_internals.h:175
 
int(* rohc_comp_random_cb_t)(const struct rohc_comp *const comp, void *const user_context)
The prototype of the callback for random numbers. 
Definition: rohc_comp.h:289
 
The unique fingerprint of one compression context or uncompressed packet. 
 
uint8_t state_oa_repeat_nr
Definition: rohc_comp_internals.h:321
 
#define ROHC_PROFILE_ID_MINOR_MAX
Definition: rohc_profiles.h:57
 
void(* destroy)(struct rohc_comp_ctxt *const context)
The handler used to destroy the profile-specific part of the compression context. ...
Definition: rohc_comp_internals.h:233
 
struct rohc_comp_ctxt * contexts
Definition: rohc_comp_internals.h:116
 
void * random_cb_ctxt
Definition: rohc_comp_internals.h:166
 
int total_compressed_size
Definition: rohc_comp_internals.h:155
 
rohc_comp_features_t features
Definition: rohc_comp_internals.h:113
 
rohc_cid_t cid
Definition: rohc_comp_internals.h:294
 
rohc_reordering_offset_t
The different values of reordering offset. 
Definition: rohc.h:204
 
rohc_mode_t
ROHC operation modes. 
Definition: rohc.h:112
 
int header_last_uncompressed_size
Definition: rohc_comp_internals.h:362
 
struct hashtable contexts_cr
Definition: rohc_comp_internals.h:120
 
struct rohc_ts go_back_ir_time
The last time that the context was in IR state, used for the periodic refreshes of the context...
Definition: rohc_comp_internals.h:346
 
uint8_t oa_repetitions_nr
Definition: rohc_comp_internals.h:172
 
int header_uncompressed_size
Definition: rohc_comp_internals.h:353
 
bool rohc_comp_reinit_context(struct rohc_comp_ctxt *const context)
Re-initialize the given context. 
Definition: rohc_comp.c:4127
 
uint16_t num_contexts_used
Definition: rohc_comp_internals.h:118
 
void rohc_comp_change_mode(struct rohc_comp_ctxt *const context, const rohc_mode_t new_mode)
Change the mode of the context. 
Definition: rohc_comp.c:3879
 
ROHC compression routines. 
 
The ROHC compressor. 
Definition: rohc_comp_internals.h:107
 
int num_sent_packets
Definition: rohc_comp_internals.h:367
 
uint64_t periodic_refreshes_fo_timeout_time
Definition: rohc_comp_internals.h:187
 
struct rohc_comp_ctxt * next_cr
Definition: rohc_comp_internals.h:283
 
bool rohc_comp_feedback_parse_opts(const struct rohc_comp_ctxt *const context, const uint8_t *const packet, const size_t packet_len, const uint8_t *const feedback_data, const size_t feedback_data_len, size_t opts_present[ROHC_FEEDBACK_OPT_MAX], uint32_t *const sn_bits, size_t *const sn_bits_nr, const rohc_feedback_crc_t crc_type, uint8_t crc_in_packet, size_t crc_pos_from_end)
Parse FEEDBACK-2 options. 
Definition: rohc_comp.c:4226
 
rohc_comp_random_cb_t random_cb
Definition: rohc_comp_internals.h:164
 
uint64_t latest_used
Definition: rohc_comp_internals.h:291
 
struct rohc_comp * compressor
Definition: rohc_comp_internals.h:297
 
struct rohc_comp_ctxt * uncompressed_ctxt
Definition: rohc_comp_internals.h:121
 
struct rohc_comp_ctxt * last_context
Definition: rohc_comp_internals.h:158
 
void * trace_callback_priv
Definition: rohc_comp_internals.h:194
 
bool enabled_profiles[ROHC_PROFILE_ID_MAJOR_MAX+1][ROHC_PROFILE_ID_MINOR_MAX+1]
Definition: rohc_comp_internals.h:124
 
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
 
struct rohc_comp_ctxt * prev
Definition: rohc_comp_internals.h:280
 
int total_compressed_size
Definition: rohc_comp_internals.h:351
 
uint8_t * rru
Definition: rohc_comp_internals.h:133
 
bool(* feedback)(struct rohc_comp_ctxt *const context, const enum rohc_feedback_type feedback_type, const uint8_t *const packet, const size_t packet_len, const uint8_t *const feedback_data, const size_t feedback_data_len)
The handler used to warn the profile-specific part of the context about the arrival of feedback data...
Definition: rohc_comp_internals.h:265
 
Window-based Least Significant Bits (W-LSB) encoding. 
 
size_t go_back_fo_count
The number of packet sent while in SO state, used for the periodic refreshes of the context...
Definition: rohc_comp_internals.h:328
 
The ROHC compression profile. 
Definition: rohc_comp_internals.h:204
 
struct rohc_medium medium
Definition: rohc_comp_internals.h:110
 
rohc_rtp_detection_callback_t rtp_callback
Definition: rohc_comp_internals.h:143
 
bool(* rohc_rtp_detection_callback_t)(const unsigned char *const ip, const unsigned char *const udp, const unsigned char *const payload, const unsigned int payload_size, void *const rtp_private)
The prototype of the RTP detection callback. 
Definition: rohc_comp.h:264
 
The ROHC compression context. 
Definition: rohc_comp_internals.h:278
 
rohc_mode_t mode
Definition: rohc_comp_internals.h:311
 
const struct rohc_comp_profile * profile
Definition: rohc_comp_internals.h:300
 
int used
Definition: rohc_comp_internals.h:289
 
size_t rru_off
Definition: rohc_comp_internals.h:135
 
const rohc_profile_t id
Definition: rohc_comp_internals.h:207
 
struct rohc_ts go_back_fo_time
The last time that the context was in FO state, used for the periodic refreshes of the context...
Definition: rohc_comp_internals.h:334
 
Information about the uncompressed packet headers. 
 
void * specific
Definition: rohc_comp_internals.h:302
 
rohc_comp_state_t state
Definition: rohc_comp_internals.h:313
 
bool do_ctxt_replication
Definition: rohc_comp_internals.h:305
 
struct rohc_fingerprint fingerprint
Definition: rohc_comp_internals.h:286
 
struct rohc_comp_ctxt * next
Definition: rohc_comp_internals.h:281
 
size_t rru_len
Definition: rohc_comp_internals.h:137
 
int total_uncompressed_size
Definition: rohc_comp_internals.h:153
 
int total_last_compressed_size
Definition: rohc_comp_internals.h:360
 
int total_uncompressed_size
Definition: rohc_comp_internals.h:349
 
A timestamp for the ROHC library. 
Definition: rohc_time.h:51
 
rohc_packet_t packet_type
Definition: rohc_comp_internals.h:318
 
rohc_comp_features_t
The different features of the ROHC compressor. 
Definition: rohc_comp.h:226
 
The information collected about the packet headers. 
Definition: uncomp_pkt_hdrs.h:102
 
rohc_comp_state_t
The different ROHC compressor states. 
Definition: rohc_comp.h:83
 
rohc_trace_callback2_t trace_callback
Definition: rohc_comp_internals.h:192
 
Definition of ROHC packets and extensions. 
 
int header_compressed_size
Definition: rohc_comp_internals.h:355
 
bool(* create)(struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs)
The handler used to create the profile-specific part of the compression context from a given packet...
Definition: rohc_comp_internals.h:217
 
bool(* is_cr_possible)(const struct rohc_comp_ctxt *const ctxt, const struct rohc_pkt_hdrs *const pkt_hdrs)
The handler used to check whether Context Replication is possible. 
Definition: rohc_comp_internals.h:239
 
void rohc_comp_change_state(struct rohc_comp_ctxt *const context, const rohc_comp_state_t new_state)
Change the state of the context. 
Definition: rohc_comp.c:3939
 
int header_last_compressed_size
Definition: rohc_comp_internals.h:364
 
void * rtp_private
Definition: rohc_comp_internals.h:145
 
uint16_t rohc_cid_t
Definition: rohc.h:196
 
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...
Definition: rohc_comp_internals.h:340
 
ROHC medium (CID characteristics) 
Definition: rohc_internal.h:211
 
int num_packets
Definition: rohc_comp_internals.h:151
 
ROHC private common definitions and routines. 
 
struct rohc_comp_ctxt * prev_cr
Definition: rohc_comp_internals.h:282
 
struct hashtable contexts_by_fingerprint
Definition: rohc_comp_internals.h:119
 
Definition: feedback.h:95
 
size_t periodic_refreshes_ir_timeout_pkts
Definition: rohc_comp_internals.h:178
 
size_t periodic_refreshes_fo_timeout_pkts
Definition: rohc_comp_internals.h:184
 
The unique fingerprint of one compression context or uncompressed packet. 
Definition: rohc_fingerprint.h:69
 
rohc_cid_t cr_base_cid
Definition: rohc_comp_internals.h:307
 
rohc_feedback_type
Definition: feedback.h:42
 
bool(* clone)(struct rohc_comp_ctxt *const ctxt, const struct rohc_comp_ctxt *const base_ctxt)
The handler used to create the profile-specific part of the compression context from a given context...
Definition: rohc_comp_internals.h:225
 
rohc_profile_t
The different ROHC compression/decompression profiles. 
Definition: rohc_profiles.h:76
 
Definition: hashtable.h:45
 
uint64_t periodic_refreshes_ir_timeout_time
Definition: rohc_comp_internals.h:181
 
rohc_packet_t
The different types of ROHC packets. 
Definition: rohc_packets.h:55
 
Efficient, secure hash table. 
 
size_t mrru
Definition: rohc_comp_internals.h:189
 
ROHC feedback definitions and formats. 
 
int(* encode)(struct rohc_comp_ctxt *const context, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len, rohc_packet_t *const packet_type)
The handler used to encode uncompressed IP packets. 
Definition: rohc_comp_internals.h:254
 
#define ROHC_PROFILE_ID_MAJOR_MAX
Definition: rohc_profiles.h:54
 
rohc_feedback_crc_t
Whether the feedback is protected by a CRC or not. 
Definition: feedback.h:62
 
Internal ROHC macros and functions for traces.