rohc_decomp_set_mrru

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS
STRUCTURES
RETURN VALUE
NOTES
EXAMPLE
SEE ALSO

NAME

rohc_decomp_set_mrru − Set the Maximum Reconstructed Reception Unit (MRRU).

SYNOPSIS

#include <rohc/rohc_decomp.h>

bool rohc_decomp_set_mrru(
struct rohc_decomp *const decomp
,
const size_t mrru

);

DESCRIPTION

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. Every received segment will be dropped.

If segmentation is enabled and used by the compressor, the function rohc_decompress3 will return ROHC_OK and one empty uncompressed packet upon decompression until the last segment is received (or a non−segment is received). Decompressed data will be returned at that time.

PARAMETERS

decomp

The ROHC decompressor

mrru

The new MRRU value (in bytes)

STRUCTURES

RETURN VALUE

true if the MRRU was successfully set, false otherwise

NOTES

Changing the MRRU value while library is used may lead to destruction of the current RRU.

EXAMPLE

struct rohc_decomp *decomp;
rru = 500;

/* create the ROHC decompressor in uni−directional mode */
decomp = rohc_decomp_new2(ROHC_SMALL_CID, ROHC_SMALL_CID_MAX, ROHC_U_MODE);
if(decomp == NULL)
{
fprintf(stderr, "failed to create the ROHC decompressor0);
goto destroy_comp;
}

/* set the MRRU at decompressor */
if(!rohc_decomp_set_mrru(decomp, mrru))
{
fprintf(stderr, "failed to set the MRRU at decompressor0);
goto destroy_decomp;
}

SEE ALSO

rohc_decomp.h(3), ROHC_MAX_MRRU(3), rohc_decompress3(3), rohc_decomp_get_mrru(3), rohc_comp_set_mrru(3), rohc_comp_get_mrru(3)