ROHC compression/decompression library
|
Offset IP-ID decoding. More...
Data Structures | |
struct | ip_id_offset_decode |
Defines a IP-ID object to help computing the IP-ID value from an IP-ID offset. More... | |
Functions | |
struct ip_id_offset_decode * | ip_id_offset_new (void) |
Create a new Offset IP-ID decoding context. | |
void | ip_id_offset_free (struct ip_id_offset_decode *const ipid) |
Destroy a given Offset IP-ID decoding context. | |
bool | ip_id_offset_decode (const struct ip_id_offset_decode *const ipid, const uint16_t m, const size_t k, const uint32_t sn, uint16_t *const decoded) |
Decode the given IP-ID offset. | |
void | ip_id_offset_set_ref (struct ip_id_offset_decode *const ipid, const uint16_t id_ref, const uint32_t sn_ref) |
Update the reference values for the IP-ID and the SN. |
Offset IP-ID decoding.
bool ip_id_offset_decode | ( | const struct ip_id_offset_decode *const | ipid, |
const uint16_t | m, | ||
const size_t | k, | ||
const uint32_t | sn, | ||
uint16_t *const | decoded | ||
) |
Decode the given IP-ID offset.
ipid | The Offset IP-ID object |
m | The IP-ID offset to decode |
k | The number of bits used to code the IP-ID offset |
sn | The SN of the ROHC packet that contains the IP-ID offset |
decoded | OUT: The computed IP-ID |
References ip_id_offset_decode::lsb, and rohc_lsb_decode16().
void ip_id_offset_free | ( | struct ip_id_offset_decode *const | ipid | ) |
Destroy a given Offset IP-ID decoding context.
See 4.5.5 in the RFC 3095 for details about Offset IP-ID encoding.
ipid | The Offset IP-ID decoding context to destroy |
References ip_id_offset_decode::lsb, and rohc_lsb_free().
Referenced by d_generic_create(), and d_generic_destroy().
struct ip_id_offset_decode* ip_id_offset_new | ( | void | ) | [read] |
Create a new Offset IP-ID decoding context.
See 4.5.5 in the RFC 3095 for details about Offset IP-ID encoding.
References ip_id_offset_decode::lsb, rohc_lsb_new(), and ROHC_LSB_SHIFT_IP_ID.
Referenced by d_generic_create().
void ip_id_offset_set_ref | ( | struct ip_id_offset_decode *const | ipid, |
const uint16_t | id_ref, | ||
const uint32_t | sn_ref | ||
) |
Update the reference values for the IP-ID and the SN.
ipid | The Offset IP-ID decoding object |
id_ref | The new IP-ID reference |
sn_ref | The new SN reference |
References ip_id_offset_decode::lsb, and rohc_lsb_set_ref().