rohc_decomp_set_prtt

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS
STRUCTURES
RETURN VALUE
EXAMPLE
SEE ALSO

NAME

rohc_decomp_set_prtt − Set the number of packets sent during one Round-Trip Time (RTT).

SYNOPSIS

#include <rohc/rohc_decomp.h>

bool rohc_decomp_set_prtt(
struct rohc_decomp *const decomp
,
const size_t prtt

);

DESCRIPTION

Set the maximum number of packets sent in worst case by the remote ROHC compressor for one given stream (ie. one compression/decompression context) during one Round−Trip Time (RTT).

The number of packets sent by the remote ROHC compressor is used to estimate how many SN bits those feedbacks shall transmit to avoid any ambiguity at compressor about the ROHC packet that is (n)acknowledged by the decompressor.

The pRTT value must be in range [0 ; SIZE_MAX/2[. If set to 0, all SN bits are always transmitted.

The default value is 50 packets / RTT, ie. a RTT of 1 second with one packet transmitted every 20 milliseconds (classic VoIP stream). If your network streams and conditions differ, change the default value.

PARAMETERS

decomp

The ROHC decompressor

prtt

The number of packets sent during one RTT

STRUCTURES

RETURN VALUE

true if the new value was successfully set, false otherwise

EXAMPLE

struct rohc_decomp *decomp;
_type_t cid_type = ROHC_SMALL_CID;
_t max_cid = ROHC_SMALL_CID_MAX;

/* create the ROHC decompressor in bi−directional mode */
decomp = rohc_decomp_new2(cid_type, max_cid, ROHC_O_MODE);
if(decomp == NULL)
{
fprintf(stderr, "failed to create the ROHC decompressor0);
goto destroy_comp;
}

if(!rohc_decomp_set_prtt(decomp, 0))
{
fprintf(stderr, "failed to configure decompressor pRTT0);
goto destroy_decomp;
}

SEE ALSO

rohc_decomp.h(3), rohc_decomp_get_prtt(3), rohc_decompress3(3)