Miscellaneous utils for ROHC libraries.
More...
#include <stdint.h>
#include <stdbool.h>
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) ) |
|
|
static unsigned int | rohc_b2u (const bool boolean) |
| Convert the given boolean value to one unsigned integer. More...
|
|
uint32_t | rohc_ntoh32 (const uint32_t net32) |
| Convert a 32-bit long integer from network to host byte orders. More...
|
|
uint16_t | rohc_ntoh16 (const uint16_t net16) |
| Convert a 16-bit short integer from network to host byte orders. More...
|
|
uint32_t | rohc_hton32 (const uint32_t host32) |
| Convert a 32-bit long integer from host to network byte orders. More...
|
|
uint16_t | rohc_hton16 (const uint16_t host16) |
| Convert a 16-bit short integer from host to network byte orders. More...
|
|
Miscellaneous utils for ROHC libraries.
- Author
- Didier Barvaux didie.nosp@m.r@ba.nosp@m.rvaux.nosp@m..org
#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
TODO
Enumerator |
---|
ROHC_TRISTATE_NONE |
|
ROHC_TRISTATE_YES |
|
ROHC_TRISTATE_NO |
|
static unsigned int rohc_b2u |
( |
const bool |
boolean | ) |
|
|
inlinestatic |
Convert the given boolean value to one unsigned integer.
true is converted to 1 ; false is converted to 0
- Parameters
-
boolean | The boolean value to convert |
- Returns
- The converted unsigned integer value
uint16_t rohc_hton16 |
( |
const uint16_t |
host16 | ) |
|
Convert a 16-bit short integer from host to network byte orders.
- Parameters
-
host16 | The 16-bit short integer in host byte order |
- Returns
- The 16-bit short integer converted in network byte order
uint32_t rohc_hton32 |
( |
const uint32_t |
host32 | ) |
|
Convert a 32-bit long integer from host to network byte orders.
- Parameters
-
host32 | The 32-bit long integer in host byte order |
- Returns
- The 32-bit long integer converted in network byte order
uint16_t rohc_ntoh16 |
( |
const uint16_t |
net16 | ) |
|
Convert a 16-bit short integer from network to host byte orders.
- Parameters
-
net16 | The 16-bit short integer in network byte order |
- Returns
- The 16-bit short integer converted in host byte order
uint32_t rohc_ntoh32 |
( |
const uint32_t |
net32 | ) |
|
Convert a 32-bit long integer from network to host byte orders.
- Parameters
-
net32 | The 32-bit long integer in network byte order |
- Returns
- The 32-bit long integer converted in host byte order