25 #ifndef ROHC_COMMON_INTERVAL_H 26 #define ROHC_COMMON_INTERVAL_H 28 #include <rohc/rohc.h> 35 #define ROHC_WLSB_WIDTH_MAX UINT8_MAX 50 #define ROHC_LSB_SHIFT_TCP_TS_1B ROHC_LSB_SHIFT_SN 51 #define ROHC_LSB_SHIFT_TCP_TS_2B ROHC_LSB_SHIFT_SN 54 #define ROHC_LSB_SHIFT_TCP_ACK_SCALED ROHC_LSB_SHIFT_TCP_TTL 135 __attribute__((warn_unused_result,
const));
140 __attribute__((warn_unused_result, const));
143 __attribute__((warn_unused_result,
const));
146 __attribute__((warn_unused_result,
const));
149 __attribute__((warn_unused_result,
const));
153 __attribute__((warn_unused_result,
const));
156 __attribute__((warn_unused_result,
const));
176 computed_p = (k <= 2 ? 0 : (1 << (k - 2)) - 1);
181 computed_p = (k <= 4 ? 1 : (1 << (k - 5)) - 1);
202 return (k <= 2 ? 0 : (1 << (k - 2)) - 1);
215 return (k <= 4 ? 1 : (1 << (k - 5)) - 1);
int32_t rohc_interval_get_rfc5225_msn_p(const size_t k, rohc_reordering_offset_t reorder_ratio)
Get shift parameter p from number of bytes k and reorder ratio.
Definition: interval.c:90
rohc_lsb_shift_t
the different values of the shift parameter of the LSB algorithm
Definition: interval.h:47
uint16_t min
Definition: interval.h:103
Definition: interval.h:62
rohc_reordering_offset_t
The different values of reordering offset.
Definition: rohc.h:204
Definition: interval.h:55
Definition: interval.h:61
An interval of 8-bit values.
Definition: interval.h:80
static int32_t rohc_interval_compute_p_rtp_ts(const size_t k)
Compute the shift parameter p for the f function.
Definition: interval.h:200
static int32_t rohc_interval_compute_p(const size_t k, const rohc_lsb_shift_t p)
Compute the shift parameter p for the f function.
Definition: interval.h:167
Definition: interval.h:52
An interval of 32-bit values.
Definition: interval.h:122
uint8_t max
Definition: interval.h:83
static int32_t rohc_interval_compute_p_esp_sn(const size_t k)
Compute the shift parameter p for the f function.
Definition: interval.h:226
Definition: interval.h:56
int32_t rohc_interval_get_rfc5225_id_id_p(const size_t k)
Get shift parameter p from number of bytes k for ip_id_lsb.
Definition: interval.c:124
uint8_t min
Definition: interval.h:82
static int32_t rohc_interval_compute_p_rtp_sn(const size_t k)
Compute the shift parameter p for the f function.
Definition: interval.h:213
struct rohc_interval32 rohc_f_32bits(const uint32_t v_ref, const size_t k, const rohc_lsb_shift_t p)
The f function as defined in LSB encoding for 32-bit fields.
Definition: interval.c:48
Definition: interval.h:57
Definition: interval.h:60
Definition: interval.h:58
Definition: interval.h:53
uint32_t max
Definition: interval.h:125
An interval of 16-bit values.
Definition: interval.h:101
uint16_t max
Definition: interval.h:104
uint32_t min
Definition: interval.h:124
Definition: interval.h:59
Definition: interval.h:49