ROHC compression/decompression library
Defines | Functions
rohc_utils.h File Reference

Miscellaneous utils for ROHC libraries. More...

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

Go to the source code of this file.


#define rohc_max(value1, value2)   ( ((value1) >= (value2)) ? (value1) : (value2) )
#define rohc_min(value1, value2)   ( ((value1) <= (value2)) ? (value1) : (value2) )


uint32_t ROHC_EXPORT rohc_ntoh32 (const uint32_t net32) __attribute__((const ))
uint16_t ROHC_EXPORT rohc_ntoh16 (const uint16_t net16) __attribute__((const ))
uint32_t ROHC_EXPORT rohc_hton32 (const uint32_t host32) __attribute__((const ))
uint16_t ROHC_EXPORT rohc_hton16 (const uint16_t host16) __attribute__((const ))

Detailed Description

Miscellaneous utils for ROHC libraries.

Didier Barvaux <>

Define Documentation

#define rohc_max (   value1,
)    ( ((value1) >= (value2)) ? (value1) : (value2) )

Get the max value of the 2 given

#define rohc_min (   value1,
)    ( ((value1) <= (value2)) ? (value1) : (value2) )

Get the max value of the 2 given

Referenced by code_UOR2_TS_bytes(), rohc_comp_get_segment(), rohc_compress2(), and rohc_decompress().

Function Documentation

uint16_t ROHC_EXPORT rohc_hton16 ( const uint16_t  host16) const
uint32_t ROHC_EXPORT rohc_hton32 ( const uint32_t  host32) const
uint16_t ROHC_EXPORT rohc_ntoh16 ( const uint16_t  net16) const
uint32_t ROHC_EXPORT rohc_ntoh32 ( const uint32_t  net32) const