ROHC compression/decompression library
Functions
ip_id.c File Reference

IP-ID decompression routines. More...

#include "ip_id.h"
#include "interval.h"
#include <stdlib.h>
#include <assert.h>
Include dependency graph for ip_id.c:

Functions

void d_ip_id_init (struct d_ip_id_decode *const ip_id, const uint16_t id_ref, const uint16_t sn_ref)
 Initialize an IP-ID object.
int d_ip_id_decode (const struct d_ip_id_decode *const ip_id, const uint16_t m, const size_t k, const uint16_t sn, uint16_t *const decoded)
 Decode the IP-ID offset in a ROHC packet and compute the associated IP-ID.
void d_ip_id_update (struct d_ip_id_decode *const ip_id, const uint16_t id_ref, const uint16_t sn_ref)
 Update the reference values for the IP-ID and the SN.

Detailed Description

IP-ID decompression routines.

Author:
Didier Barvaux <didier.barvaux@toulouse.viveris.com>
The hackers from ROHC for Linux

Function Documentation

int d_ip_id_decode ( const struct d_ip_id_decode *const  ip_id,
const uint16_t  m,
const size_t  k,
const uint16_t  sn,
uint16_t *const  decoded 
)

Decode the IP-ID offset in a ROHC packet and compute the associated IP-ID.

Parameters:
ip_idThe IP-ID object
mThe IP-ID offset
kThe number of bits used to code the IP-ID offset
snThe SN of the ROHC packet that contains the IP-ID offset
decodedOUT: The computed IP-ID
Returns:
1 in case of success, 0 otherwise

References f(), d_ip_id_decode::id_ref, and d_ip_id_decode::sn_ref.

Referenced by decode_uo0(), decode_uo1(), and decode_uor2().

void d_ip_id_init ( struct d_ip_id_decode *const  ip_id,
const uint16_t  id_ref,
const uint16_t  sn_ref 
)

Initialize an IP-ID object.

Parameters:
ip_idThe IP-ID object to initialize
id_refThe IP-ID reference
sn_refThe reference Sequence Number (SN)

References d_ip_id_decode::id_ref, and d_ip_id_decode::sn_ref.

Referenced by ip_decode_dynamic_ip(), and rtp_decode_dynamic_rtp().

void d_ip_id_update ( struct d_ip_id_decode *const  ip_id,
const uint16_t  id_ref,
const uint16_t  sn_ref 
)

Update the reference values for the IP-ID and the SN.

Parameters:
ip_idThe IP-ID object
id_refThe new IP-ID reference
sn_refThe new SN reference

References d_ip_id_decode::id_ref, and d_ip_id_decode::sn_ref.

Referenced by decode_uo0(), decode_uo1(), and decode_uor2().