csp_endian.h File Reference
#include <stdint.h>

Go to the source code of this file.

Functions

uint16_t csp_hton16 (uint16_t h16)
 Convert 16-bit integer from host byte order to network byte order. More...
 
uint16_t csp_ntoh16 (uint16_t n16)
 Convert 16-bit integer from host byte order to host byte order. More...
 
uint32_t csp_hton32 (uint32_t h32)
 Convert 32-bit integer from host byte order to network byte order. More...
 
uint32_t csp_ntoh32 (uint32_t n32)
 Convert 32-bit integer from host byte order to host byte order. More...
 
uint64_t csp_hton64 (uint64_t h64)
 Convert 64-bit integer from host byte order to network byte order. More...
 
uint64_t csp_ntoh64 (uint64_t n64)
 Convert 64-bit integer from host byte order to host byte order. More...
 
uint16_t csp_htobe16 (uint16_t h16)
 Convert 16-bit integer from host byte order to big endian byte order. More...
 
uint16_t csp_htole16 (uint16_t h16)
 Convert 16-bit integer from host byte order to little endian byte order. More...
 
uint16_t csp_betoh16 (uint16_t be16)
 Convert 16-bit integer from big endian byte order to little endian byte order. More...
 
uint16_t csp_letoh16 (uint16_t le16)
 Convert 16-bit integer from little endian byte order to host byte order. More...
 
uint32_t csp_htobe32 (uint32_t h32)
 Convert 32-bit integer from host byte order to big endian byte order. More...
 
uint32_t csp_htole32 (uint32_t h32)
 Convert 32-bit integer from little endian byte order to host byte order. More...
 
uint32_t csp_betoh32 (uint32_t be32)
 Convert 32-bit integer from big endian byte order to host byte order. More...
 
uint32_t csp_letoh32 (uint32_t le32)
 Convert 32-bit integer from little endian byte order to host byte order. More...
 
uint64_t csp_htobe64 (uint64_t h64)
 Convert 64-bit integer from host byte order to big endian byte order. More...
 
uint64_t csp_htole64 (uint64_t h64)
 Convert 64-bit integer from host byte order to little endian byte order. More...
 
uint64_t csp_betoh64 (uint64_t be64)
 Convert 64-bit integer from big endian byte order to host byte order. More...
 
uint64_t csp_letoh64 (uint64_t le64)
 Convert 64-bit integer from little endian byte order to host byte order. More...
 
float csp_htonflt (float f)
 Convert float from host to network byte order. More...
 
float csp_ntohflt (float f)
 Convert float from network to host byte order. More...
 
double csp_htondbl (double d)
 Convert double from host to network byte order. More...
 
double csp_ntohdbl (double d)
 Convert double from network to host order. More...