ROHC compression/decompression library
Functions
c_udp.h File Reference

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

#include "rohc_comp_internals.h"
#include <stdint.h>
#include <stdbool.h>
Include dependency graph for c_udp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

size_t udp_code_uo_remainder (const struct rohc_comp_ctxt *context, const uint8_t *next_header, uint8_t *const dest, const size_t counter)
 Build UDP-related fields in the tail of the UO packets. More...
 
size_t udp_code_static_udp_part (const struct rohc_comp_ctxt *const context, const uint8_t *const next_header, uint8_t *const dest, const size_t counter)
 Build the static part of the UDP header. More...
 

Detailed Description

ROHC compression context for the UDP profile.

Author
Didier Barvaux didie.nosp@m.r.ba.nosp@m.rvaux.nosp@m.@tou.nosp@m.louse.nosp@m..viv.nosp@m.eris..nosp@m.com

Function Documentation

◆ udp_code_static_udp_part()

size_t udp_code_static_udp_part ( const struct rohc_comp_ctxt *const  context,
const uint8_t *const  next_header,
uint8_t *const  dest,
const size_t  counter 
)

Build the static part of the UDP header.

 Static part of UDP header (5.7.7.5):

    +---+---+---+---+---+---+---+---+
 1  /          Source Port          /   2 octets
    +---+---+---+---+---+---+---+---+
 2  /       Destination Port        /   2 octets
    +---+---+---+---+---+---+---+---+
Parameters
contextThe compression context
next_headerThe UDP header
destThe rohc-packet-under-build buffer
counterThe current position in the rohc-packet-under-build buffer
Returns
The new position in the rohc-packet-under-build buffer

◆ udp_code_uo_remainder()

size_t udp_code_uo_remainder ( const struct rohc_comp_ctxt *const  context,
const uint8_t *const  next_header,
uint8_t *const  dest,
const size_t  counter 
)

Build UDP-related fields in the tail of the UO packets.

     --- --- --- --- --- --- --- ---
    :                               :
 13 +         UDP Checksum          +  2 octets,
    :                               :  if context(UDP Checksum) != 0
     --- --- --- --- --- --- --- ---
Parameters
contextThe compression context
next_headerThe UDP header
destThe rohc-packet-under-build buffer
counterThe current position in the rohc-packet-under-build buffer
Returns
The new position in the rohc-packet-under-build buffer