rohc_comp_get_mrru

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS
STRUCTURES
RETURN VALUE
EXAMPLE
SEE ALSO

NAME

rohc_comp_get_mrru − Get the Maximum Reconstructed Reception Unit (MRRU).

SYNOPSIS

#include <rohc/rohc_comp.h>

bool rohc_comp_get_mrru(
const struct rohc_comp *const comp
,
size_t *const mrru

);

DESCRIPTION

Get the current 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 MRRU value is 0, segmentation is disabled.

If segmentation is enabled and used by the compressor, the function rohc_comp_get_segment2 can be used to retrieve ROHC segments.

PARAMETERS

comp

The ROHC compressor

mrru [output]

The current MRRU value (in bytes)

STRUCTURES

RETURN VALUE

true if MRRU was successfully retrieved, false otherwise

EXAMPLE

struct rohc_comp *comp;
rru;

/* retrieve current compressor MRRU */
if(!rohc_comp_get_mrru(comp, &mrru))
{
fprintf(stderr, "failed to get MRRU for compressor0);
goto error;
}
the current MMRU at compressor is %zu bytes0, mrru);

SEE ALSO

rohc_comp.h(3), ROHC_MAX_MRRU(3), rohc_comp_get_segment2(3), rohc_comp_set_mrru(3), rohc_decomp_set_mrru(3), rohc_decomp_get_mrru(3)