rohc_decomp_get_last_packet_info − Get some information about the last decompressed packet.
#include <rohc/rohc_decomp.h>
bool
rohc_decomp_get_last_packet_info(
const struct rohc_decomp *const decomp,
rohc_decomp_last_packet_info_t *const info
);
Get some information about the last decompressed packet.
To use the function, call it with a pointer on a pre−allocated rohc_decomp_last_packet_info_t structure with the version_major and version_minor fields set to one of the following supported versions:
• Major 0, minor 0
• Major 0, minor 1
• Major 0, minor 2
See rohc_decomp_last_packet_info_t for details about fields that are supported in the above versions.
decomp |
The ROHC decompressor to get information from |
info [input, output]
The structure where information will be stored
Some
information about the last decompressed packet
The structure is used by the
rohc_decomp_get_last_packet_info function to store
some information about the last decompressed 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_decomp_get_last_packet_info.
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_mode, context_state, profile_id, nr_lost_packets, nr_misordered_packets, and is_duplicated
• Major 0 / Minor = 1 added: corrected_crc_failures, corrected_sn_wraparounds, corrected_wrong_sn_updates, and packet_type
struct
rohc_decomp_last_packet_info_t {
unsigned short version_major; /* The major version of
this structure */
unsigned short version_minor; /* The minor version of
this structure */
rohc_mode_t context_mode; /* The mode of the last
context used by the compressor */
rohc_decomp_state_t context_state; /* The state of
the last context used by the compressor */
int profile_id; /* The profile ID of the last context
used by the compressor */
unsigned long nr_lost_packets; /* The number of
(possible) lost packet(s) before last packet */
unsigned long nr_misordered_packets; /* The number of
packet(s) before the last packet if late */
bool is_duplicated; /* Is last packet a (possible)
duplicated packet? */
unsigned long corrected_crc_failures; /* The number
of successful corrections upon CRC failure */
unsigned long corrected_sn_wraparounds; /* The number
of successful corrections of SN wraparound upon CRC failure
*/
unsigned long corrected_wrong_sn_updates; /* The
number of successful corrections of incorrect SN updates
upon CRC failure */
rohc_packet_t packet_type; /* The type of the last
decompressed ROHC packet */
unsigned long total_last_comp_size; /* The compressed
size (in bytes) of the last decompressed packet */
unsigned long header_last_comp_size; /* The
compressed size (in bytes) of the last decompressed header
*/
unsigned long total_last_uncomp_size; /* The
uncompressed size (in bytes) of the last decompressed packet
*/
unsigned long header_last_uncomp_size; /* The
uncompressed size (in bytes) of the last decompressed header
*/
};
true in case of success, false otherwise
rohc_decomp.h(3), rohc_decomp_last_packet_info_t(3)