ROHC compression/decompression library
Functions | Variables
d_udp.c File Reference

ROHC decompression context for the UDP profile. More...

#include "d_udp.h"
#include "rohc_traces.h"
#include "rohc_bit_ops.h"
#include "rohc_debug.h"
#include "crc.h"
#include "protocols/udp.h"
#include "config.h"
Include dependency graph for d_udp.c:

Functions

void * d_udp_create (void)
 Create the UDP decompression context.
int udp_parse_static_udp (struct d_generic_context *context, const unsigned char *packet, unsigned int length, struct rohc_extr_bits *const bits)
 Parse the UDP static part of the ROHC packet.
void udp_update_context (const struct d_context *context, const struct rohc_decoded_values decoded)
 Update context with decoded UDP values.

Variables

struct d_profile d_udp_profile
 Define the decompression part of the UDP profile as described in the RFC 3095.

Detailed Description

ROHC decompression context for the UDP profile.

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

Function Documentation

void* d_udp_create ( void  )
int udp_parse_static_udp ( struct d_generic_context context,
const unsigned char *  packet,
unsigned int  length,
struct rohc_extr_bits *const  bits 
)

Parse the UDP static part of the ROHC packet.

Parameters:
contextThe generic decompression context
packetThe ROHC packet to parse
lengthThe length of the ROHC packet
bitsOUT: The bits extracted from the ROHC header
Returns:
The number of bytes read in the ROHC packet, -1 in case of failure

References GET_NEXT_16_BITS, rohc_debugf, rohc_extr_bits::udp_dst, rohc_extr_bits::udp_dst_nr, rohc_extr_bits::udp_src, and rohc_extr_bits::udp_src_nr.

Referenced by d_udp_create(), and d_udp_lite_create().

void udp_update_context ( const struct d_context context,
const struct rohc_decoded_values  decoded 
)

Update context with decoded UDP values.

The following decoded values are updated in context:

  • UDP source port
  • UDP destination port
Parameters:
contextThe decompression context
decodedThe decoded values to update in the context

References udphdr::dest, d_generic_changes::next_header, d_generic_context::outer_ip_changes, udphdr::source, d_context::specific, rohc_decoded_values::udp_dst, and rohc_decoded_values::udp_src.

Referenced by d_udp_create(), and d_udp_lite_create().


Variable Documentation

Initial value:
{
        ROHC_PROFILE_UDP,       
        "UDP / Decompressor",   
        d_generic_decode,       
        d_udp_create,
        d_udp_destroy,
        d_generic_get_sn,
}

Define the decompression part of the UDP profile as described in the RFC 3095.