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.

Defines

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

Functions

uint32_t ROHC_EXPORT rohc_ntoh32 (const uint32_t net32)
 Convert a 32-bit long integer from network to host byte orders.
uint16_t ROHC_EXPORT rohc_ntoh16 (const uint16_t net16)
 Convert a 16-bit short integer from network to host byte orders.
uint32_t ROHC_EXPORT rohc_hton32 (const uint32_t host32)
 Convert a 32-bit long integer from host to network byte orders.
uint16_t ROHC_EXPORT rohc_hton16 (const uint16_t host16)
 Convert a 16-bit short integer from host to network byte orders.

Detailed Description

Miscellaneous utils for ROHC libraries.

Author:
Didier Barvaux <didier@barvaux.org>

Define Documentation

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

Get the max value of the 2 given

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

Get the max value of the 2 given


Function Documentation

uint16_t ROHC_EXPORT rohc_hton16 ( const uint16_t  host16)

Convert a 16-bit short integer from host to network byte orders.

Parameters:
host16The 16-bit short integer in host byte order
Returns:
The 16-bit short integer converted in network byte order
uint32_t ROHC_EXPORT rohc_hton32 ( const uint32_t  host32)

Convert a 32-bit long integer from host to network byte orders.

Parameters:
host32The 32-bit long integer in host byte order
Returns:
The 32-bit long integer converted in network byte order
uint16_t ROHC_EXPORT rohc_ntoh16 ( const uint16_t  net16)

Convert a 16-bit short integer from network to host byte orders.

Parameters:
net16The 16-bit short integer in network byte order
Returns:
The 16-bit short integer converted in host byte order
uint32_t ROHC_EXPORT rohc_ntoh32 ( const uint32_t  net32)

Convert a 32-bit long integer from network to host byte orders.

Parameters:
net32The 32-bit long integer in network byte order
Returns:
The 32-bit long integer converted in host byte order