ROHC compression/decompression library
Data Structures | Defines | Functions
d_generic.h File Reference

ROHC generic decompression context for IP-only, UDP and UDP Lite profiles. More...

#include "rohc_decomp.h"
#include "rohc_packets.h"
#include "comp_list.h"
#include "lsb_decode.h"
#include "ip_id_offset_decode.h"
#include "ip.h"
#include "crc.h"
#include <stddef.h>
#include <stdbool.h>
Include dependency graph for d_generic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rohc_extr_ip_bits
struct  rohc_extr_bits
 The bits extracted from ROHC UO* base headers. More...
struct  rohc_decoded_ip_values
struct  rohc_decoded_values
 The values decoded from the bits extracted from ROHC header. More...
struct  d_generic_changes
 Store information about an IP header between the different decompressions of IP packets. More...
struct  d_generic_context
 The generic decompression context. More...
struct  list_decomp
 The list decompressor. More...

Defines

#define MAX_ITEM   15
#define LIST_COMP_WINDOW   100
#define L   5

Functions

void * d_generic_create (void)
 Create the generic decompression context.
void d_generic_destroy (void *context)
 Destroy the context.
int d_generic_decode (struct rohc_decomp *decomp, struct d_context *context, const unsigned char *const rohc_packet, const unsigned int rohc_length, const size_t add_cid_len, const size_t large_cid_len, unsigned char *dest)
 Decode one IR, IR-DYN or UO* packet.
int d_generic_get_sn (struct d_context *context)
 Get the reference SN value of the context.

Detailed Description

ROHC generic decompression context for IP-only, UDP and UDP Lite profiles.

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

Define Documentation

#define L   5
#define LIST_COMP_WINDOW   100

Referenced by d_generic_destroy().

#define MAX_ITEM   15

Function Documentation

void* d_generic_create ( void  )
int d_generic_decode ( struct rohc_decomp decomp,
struct d_context context,
const unsigned char *const  rohc_packet,
const unsigned int  rohc_length,
const size_t  add_cid_len,
const size_t  large_cid_len,
unsigned char *  dest 
)

Decode one IR, IR-DYN or UO* packet.

This function is one of the functions that must exist in one profile for the framework to work.

Parameters:
decompThe ROHC decompressor
contextThe decompression context
rohc_packetThe ROHC packet to decode
rohc_lengthThe length of the ROHC packet
add_cid_lenThe length of the optional Add-CID field
large_cid_lenThe length of the optional large CID field
destOUT: The decoded IP packet
Returns:
The length of the uncompressed IP packet or ROHC_ERROR if an error occurs or ROHC_ERROR_CRC if a CRC error occurs

References d_generic_context::detect_packet_type, NO_CONTEXT, PACKET_IR, PACKET_IR_DYN, d_generic_context::packet_type, PACKET_UO_0, PACKET_UO_1, PACKET_UO_1_ID, PACKET_UO_1_RTP, PACKET_UO_1_TS, PACKET_UOR_2, PACKET_UOR_2_ID, PACKET_UOR_2_RTP, PACKET_UOR_2_TS, rohc_debugf, ROHC_ERROR, rohc_get_packet_descr(), d_context::specific, d_context::state, and STATIC_CONTEXT.

Referenced by d_udp_lite_decode().

void d_generic_destroy ( void *  context)
int d_generic_get_sn ( struct d_context context)

Get the reference SN value of the context.

This function is one of the functions that must exist in one profile for the framework to work.

Parameters:
contextThe decompression context
Returns:
The reference SN value

References rohc_lsb_get_ref(), d_generic_context::sn_lsb_ctxt, and d_context::specific.