rohc_comp_get_last_packet_info2

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS
STRUCTURES
RETURN VALUE
SEE ALSO

NAME

rohc_comp_get_last_packet_info2 − Get some information about the last compressed packet.

SYNOPSIS

#include <rohc/rohc_comp.h>

bool rohc_comp_get_last_packet_info2(
const struct rohc_comp *const comp
,
rohc_comp_last_packet_info2_t *const info

);

DESCRIPTION

Get some information about the last compressed packet.

To use the function, call it with a pointer on a pre−allocated rohc_comp_last_packet_info2_t structure with the version_major and version_minor fields set to one of the following supported versions:

• Major 0, minor 0

See the rohc_comp_last_packet_info2_t structure for details about fields that are supported in the above versions.

PARAMETERS

comp

The ROHC compressor to get information from

info [input, output]

The structure where information will be stored

STRUCTURES

Some information about the last compressed packet
The structure is used by the rohc_comp_get_last_packet_info2 function to store some information about the last compressed packet.

Versioning works as follow:

• The version_major field defines the compatibility level. If the major number given by user does not match the one expected by the library, an error is returned.

• The version_minor field defines the extension level. If the minor number given by user does not match the one expected by the library, only the fields supported in that minor version will be filled by rohc_comp_get_last_packet_info2.

Notes for developers:

• Increase the major version if a field is removed.

• Increase the major version if a field is added at the beginning or in the middle of the structure.

• Increase the minor version if a field is added at the very end of the structure.

• The version_major and version_minor fields must be located at the very beginning of the structure.

• The structure must be packed.

Supported versions:

• Major 0 / Minor 0 contains: version_major, version_minor, context_id, is_context_init, context_mode, context_state, context_used, profile_id, packet_type, total_last_uncomp_size, header_last_uncomp_size, total_last_comp_size, and header_last_comp_size

struct rohc_comp_last_packet_info2_t {
unsigned short version_major; /* The major version of this structure */
unsigned short version_minor; /* The minor version of this structure */
unsigned int context_id; /* The Context ID (CID) */
bool is_context_init; /* Whether the context was initialized (created/re-used) by the packet */
rohc_mode_t context_mode; /* The mode of the last context used by the compressor */
rohc_comp_state_t context_state; /* The state of the last context used by the compressor */
bool context_used; /* Whether the last context used by the compressor is still in use */
int profile_id; /* The profile ID of the last context used by the compressor */
rohc_packet_t packet_type; /* The type of ROHC packet created for the last compressed packet */
unsigned long total_last_uncomp_size; /* The uncompressed size (in bytes) of the last compressed packet */
unsigned long header_last_uncomp_size; /* The uncompressed size (in bytes) of the last compressed header */
unsigned long total_last_comp_size; /* The compressed size (in bytes) of the last compressed packet */
unsigned long header_last_comp_size; /* The compressed size (in bytes) of the last compressed header */
};

RETURN VALUE

true in case of success, false otherwise

SEE ALSO

rohc_comp.h(3), rohc_comp_last_packet_info2_t(3)