27 #ifndef ROHC_COMP_SCHEMES_RFC4996_H
28 #define ROHC_COMP_SCHEMES_RFC4996_H
40 const uint8_t packet_value,
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)));
54 uint8_t *
const rohc_data,
55 const size_t rohc_max_len,
57 __attribute__((warn_unused_result, nonnull(2, 4)));
59 uint8_t *
const rohc_data,
60 const size_t rohc_max_len,
62 __attribute__((warn_unused_result, nonnull(2, 4)));
66 const uint32_t new_value,
67 const size_t nr_bits_63,
68 const size_t nr_bits_16383,
69 uint8_t *
const rohc_data,
70 const size_t rohc_max_len,
72 __attribute__((nonnull(5, 7), warn_unused_result));
76 uint32_t *
const residue_field,
77 const uint32_t scaling_factor,
78 const uint32_t unscaled_value)
79 __attribute__((nonnull(1, 2)));
83 __attribute__((warn_unused_result,
const));
85 __attribute__((warn_unused_result,
const));
89 const uint16_t ip_id_nbo,
90 const uint16_t ip_id_offset,
91 const size_t nr_bits_wlsb,
92 uint8_t *
const rohc_data,
93 const size_t rohc_max_len,
95 __attribute__((warn_unused_result, nonnull(5, 7)));
99 const uint8_t packet_value,
100 uint8_t *
const rohc_data,
101 const size_t rohc_max_len,
102 int *
const indicator)
103 __attribute__((warn_unused_result, nonnull(3, 5)));
int c_static_or_irreg8(const uint8_t context_value, const uint8_t packet_value, 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:51
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:227
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:449
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:304
The ROHC compression context.
Definition: rohc_comp_internals.h:306
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:332
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:136
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:382
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:178
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:93
unsigned int rsf_index_enc(const uint8_t rsf_flags)
Calculate the rsf_index from the rsf flags.
Definition: comp/schemes/rfc4996.c:348