rohc_comp_set_mrru − Set the Maximum Reconstructed Reception Unit (MRRU).
#include <rohc/rohc_comp.h>
bool
rohc_comp_set_mrru(
struct rohc_comp *const comp,
const size_t mrru
);
Set the Maximum Reconstructed Reception Unit (MRRU).
The MRRU is the largest cumulative length (in bytes) of the ROHC segments that are parts of the same ROHC packet. In short, the ROHC decompressor does not expect to reassemble ROHC segments whose total length is larger than MRRU. So, the ROHC compressor shall not segment ROHC packets greater than the MRRU.
The MRRU value must be in range [0 ; ROHC_MAX_MRRU]. Remember that the MRRU includes the 32−bit CRC that protects it. If set to 0, segmentation is disabled as no segment headers are allowed on the channel. No segment will be generated.
According to RF5225 §6.1, ROHC segmentation cannot be enabled if any ROHCv2 profile is also enabled.
If segmentation is enabled and used by the compressor, the function rohc_comp_get_segment2 can be used to retrieve ROHC segments.
comp |
The ROHC compressor |
|||
mrru |
The new MRRU value (in bytes) |
true if the MRRU was successfully set, false otherwise
struct
rohc_comp *comp;
rru = 500;
/* set the MRRU
at compressor */
if(!rohc_comp_set_mrru(comp, mrru))
{
fprintf(stderr, "failed to set the MRRU at
compressor0);
goto destroy_comp;
}
rohc_comp.h(3), ROHC_MAX_MRRU(3), rohc_comp_get_segment2(3), rohc_comp_get_mrru(3), rohc_decomp_set_mrru(3)