27 #ifndef ROHC_COMP_SCHEMES_RFC4996_H 28 #define ROHC_COMP_SCHEMES_RFC4996_H 41 uint8_t *
const rohc_data,
42 const size_t rohc_max_len,
44 __attribute__((warn_unused_result, nonnull(3, 5)));
47 uint8_t *
const rohc_data,
48 const size_t rohc_max_len,
50 __attribute__((warn_unused_result, nonnull(3, 5)));
53 uint8_t *
const rohc_data,
54 const size_t rohc_max_len,
56 __attribute__((warn_unused_result, nonnull(3, 5)));
60 uint8_t *
const rohc_data,
61 const size_t rohc_max_len,
63 __attribute__((warn_unused_result, nonnull(2, 4)));
65 uint8_t *
const rohc_data,
66 const size_t rohc_max_len,
68 __attribute__((warn_unused_result, nonnull(2, 4)));
72 const uint32_t new_value,
73 const size_t nr_bits_63,
74 const size_t nr_bits_16383,
75 uint8_t *
const rohc_data,
76 const size_t rohc_max_len,
78 __attribute__((nonnull(5, 7), warn_unused_result));
82 uint32_t *
const residue_field,
83 const uint32_t scaling_factor,
84 const uint32_t unscaled_value)
85 __attribute__((nonnull(1, 2)));
89 __attribute__((warn_unused_result,
const));
91 __attribute__((warn_unused_result,
const));
95 const uint16_t ip_id_nbo,
96 const uint16_t ip_id_offset,
97 const size_t nr_bits_wlsb,
98 uint8_t *
const rohc_data,
99 const size_t rohc_max_len,
100 int *
const indicator)
101 __attribute__((warn_unused_result, nonnull(5, 7)));
105 const uint8_t packet_value,
106 uint8_t *
const rohc_data,
107 const size_t rohc_max_len,
108 int *
const indicator)
109 __attribute__((warn_unused_result, nonnull(3, 5)));
113 const size_t nr_trans)
114 __attribute__((warn_unused_result,
const));
116 const size_t nr_trans)
117 __attribute__((warn_unused_result,
const));
int variable_length_32_enc(const uint32_t old_value, const uint32_t new_value, const size_t nr_bits_63, const size_t nr_bits_16383, uint8_t *const rohc_data, const size_t rohc_max_len, int *const indicator)
Compress the given 32-bit value.
Definition: comp/schemes/rfc4996.c:272
bool tcp_is_ack_scaled_possible(const uint16_t ack_stride, const size_t nr_trans)
Whether the ACK number may be transmitted scaled or not.
Definition: comp/schemes/rfc4996.c:537
int dscp_encode(const uint8_t context_value, const uint8_t packet_value, uint8_t *const rohc_data, const size_t rohc_max_len, int *const indicator)
Encode the DSCP field.
Definition: comp/schemes/rfc4996.c:492
bool tcp_is_ack_stride_static(const uint16_t ack_stride, const size_t nr_trans)
Whether the ack_stride scaling factor shall be transmitted or not.
Definition: comp/schemes/rfc4996.c:552
void c_field_scaling(uint32_t *const scaled_value, uint32_t *const residue_field, const uint32_t scaling_factor, const uint32_t unscaled_value)
Calculate the scaled and residue values from unscaled value and scaling factor.
Definition: comp/schemes/rfc4996.c:349
int c_static_or_irreg8(const uint8_t packet_value, const bool is_static, uint8_t *const rohc_data, const size_t rohc_max_len, int *const indicator)
Compress the 8 bits given, depending of the context value.
Definition: comp/schemes/rfc4996.c:52
The ROHC compression context.
Definition: rohc_comp_internals.h:326
bool rsf_index_enc_possible(const uint8_t rsf_flags)
Is is possible to use the rsf_index_enc encoding?
Definition: comp/schemes/rfc4996.c:377
int c_zero_or_irreg16(const uint16_t packet_value, uint8_t *const rohc_data, const size_t rohc_max_len, int *const indicator)
Compress the 16 bits value, regarding if null or not.
Definition: comp/schemes/rfc4996.c:181
int c_optional_ip_id_lsb(const int behavior, const uint16_t ip_id_nbo, const uint16_t ip_id_offset, const size_t nr_bits_wlsb, uint8_t *const rohc_data, const size_t rohc_max_len, int *const indicator)
Compress or not the IP-ID.
Definition: comp/schemes/rfc4996.c:427
int c_zero_or_irreg32(const uint32_t packet_value, uint8_t *const rohc_data, const size_t rohc_max_len, int *const indicator)
Compress the 32 bits value, regarding if null or not.
Definition: comp/schemes/rfc4996.c:223
int c_static_or_irreg16(const uint16_t packet_value, const bool is_static, uint8_t *const rohc_data, const size_t rohc_max_len, int *const indicator)
Compress the 16 bits given, depending of the context value.
Definition: comp/schemes/rfc4996.c:94
int c_static_or_irreg32(const uint32_t packet_value, const bool is_static, uint8_t *const rohc_data, const size_t rohc_max_len, int *const indicator)
Compress the 32 bits given, depending of the context value.
Definition: comp/schemes/rfc4996.c:138
unsigned int rsf_index_enc(const uint8_t rsf_flags)
Calculate the rsf_index from the rsf flags.
Definition: comp/schemes/rfc4996.c:393