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

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

#include <netinet/ip.h>
#include <netinet/udp.h>
#include "d_generic.h"
#include "d_udp.h"
#include "udp_lite.h"
Include dependency graph for d_udp_lite.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  d_udp_lite_context
 Define the UDP-Lite part of the decompression profile context. More...

Functions

int udp_lite_decode_dynamic_udp (struct d_generic_context *context, const unsigned char *packet, unsigned int length, unsigned char *dest)
 Decode the UDP-Lite dynamic part of the ROHC packet.
int udp_lite_build_uncompressed_udp (struct d_generic_context *context, struct d_generic_changes *active, unsigned char *dest, int payload_size)
 Build an uncompressed UDP-Lite header.

Detailed Description

ROHC decompression context for the UDP-Lite profile.

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

Function Documentation

int udp_lite_build_uncompressed_udp ( struct d_generic_context context,
struct d_generic_changes active,
unsigned char *  dest,
int  payload_size 
)

Build an uncompressed UDP-Lite header.

Parameters:
contextThe generic decompression context
activeThe UDP-Lite header changes
destThe buffer to store the UDP-Lite header (MUST be at least of sizeof(struct udphdr) length)
payload_sizeThe length of the UDP-Lite payload
Returns:
The length of the next header (ie. the UDP-Lite header), -1 in case of error

References d_udp_lite_context::cce_packet, d_udp_lite_context::cfi, d_udp_lite_context::cfp, d_generic_changes::next_header, rohc_debugf, and d_generic_context::specific.

Referenced by d_udp_lite_create().

int udp_lite_decode_dynamic_udp ( struct d_generic_context context,
const unsigned char *  packet,
unsigned int  length,
unsigned char *  dest 
)

Decode the UDP-Lite dynamic part of the ROHC packet.

Parameters:
contextThe generic decompression context
packetThe ROHC packet to decode
lengthThe length of the ROHC packet
destThe decoded UDP header
Returns:
The number of bytes read in the ROHC packet, -1 in case of failure

References d_udp_lite_context::cfi, d_udp_lite_context::cfp, GET_NEXT_16_BITS, ip_decode_dynamic_ip(), PACKET_IR, PACKET_IR_DYN, d_generic_context::packet_type, rohc_debugf, and d_generic_context::specific.

Referenced by d_udp_lite_create().