|
|
|
@ -230,7 +230,7 @@ static inline uint64_t byteorder_swapll(uint64_t v);
|
|
|
|
|
* @param[in] v The integer to convert. |
|
|
|
|
* @returns Converted integer. |
|
|
|
|
*/ |
|
|
|
|
static inline uint16_t HTONS(uint16_t a); |
|
|
|
|
static inline uint16_t HTONS(uint16_t v); |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Convert from host byte order to network byte order, 32 bit. |
|
|
|
@ -238,7 +238,7 @@ static inline uint16_t HTONS(uint16_t a);
|
|
|
|
|
* @param[in] v The integer to convert. |
|
|
|
|
* @returns Converted integer. |
|
|
|
|
*/ |
|
|
|
|
static inline uint32_t HTONL(uint32_t a); |
|
|
|
|
static inline uint32_t HTONL(uint32_t v); |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Convert from host byte order to network byte order, 64 bit. |
|
|
|
@ -246,7 +246,7 @@ static inline uint32_t HTONL(uint32_t a);
|
|
|
|
|
* @param[in] v The integer to convert. |
|
|
|
|
* @returns Converted integer. |
|
|
|
|
*/ |
|
|
|
|
static inline uint64_t HTONLL(uint64_t a); |
|
|
|
|
static inline uint64_t HTONLL(uint64_t v); |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Convert from network byte order to host byte order, 16 bit. |
|
|
|
@ -254,7 +254,7 @@ static inline uint64_t HTONLL(uint64_t a);
|
|
|
|
|
* @param[in] v The integer to convert. |
|
|
|
|
* @returns Converted integer. |
|
|
|
|
*/ |
|
|
|
|
static inline uint16_t NTOHS(uint16_t a); |
|
|
|
|
static inline uint16_t NTOHS(uint16_t v); |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Convert from network byte order to host byte order, 32 bit. |
|
|
|
@ -262,7 +262,7 @@ static inline uint16_t NTOHS(uint16_t a);
|
|
|
|
|
* @param[in] v The integer to convert. |
|
|
|
|
* @returns Converted integer. |
|
|
|
|
*/ |
|
|
|
|
static inline uint32_t NTOHL(uint32_t a); |
|
|
|
|
static inline uint32_t NTOHL(uint32_t v); |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Convert from network byte order to host byte order, 64 bit. |
|
|
|
@ -270,7 +270,7 @@ static inline uint32_t NTOHL(uint32_t a);
|
|
|
|
|
* @param[in] v The integer to convert. |
|
|
|
|
* @returns Converted integer. |
|
|
|
|
*/ |
|
|
|
|
static inline uint64_t NTOHLL(uint64_t a); |
|
|
|
|
static inline uint64_t NTOHLL(uint64_t v); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* **************************** IMPLEMENTATION ***************************** */ |
|
|
|
@ -379,36 +379,36 @@ static inline uint64_t byteorder_ntohll(network_uint64_t v)
|
|
|
|
|
return _byteorder_swap(v.u64, ll); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static inline uint16_t HTONS(uint16_t a) |
|
|
|
|
static inline uint16_t HTONS(uint16_t v) |
|
|
|
|
{ |
|
|
|
|
return byteorder_htons(a).u16; |
|
|
|
|
return byteorder_htons(v).u16; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static inline uint32_t HTONL(uint32_t a) |
|
|
|
|
static inline uint32_t HTONL(uint32_t v) |
|
|
|
|
{ |
|
|
|
|
return byteorder_htonl(a).u32; |
|
|
|
|
return byteorder_htonl(v).u32; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static inline uint64_t HTONLL(uint64_t a) |
|
|
|
|
static inline uint64_t HTONLL(uint64_t v) |
|
|
|
|
{ |
|
|
|
|
return byteorder_htonll(a).u64; |
|
|
|
|
return byteorder_htonll(v).u64; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static inline uint16_t NTOHS(uint16_t a) |
|
|
|
|
static inline uint16_t NTOHS(uint16_t v) |
|
|
|
|
{ |
|
|
|
|
network_uint16_t input = { a }; |
|
|
|
|
network_uint16_t input = { v }; |
|
|
|
|
return byteorder_ntohs(input); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static inline uint32_t NTOHL(uint32_t a) |
|
|
|
|
static inline uint32_t NTOHL(uint32_t v) |
|
|
|
|
{ |
|
|
|
|
network_uint32_t input = { a }; |
|
|
|
|
network_uint32_t input = { v }; |
|
|
|
|
return byteorder_ntohl(input); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static inline uint64_t NTOHLL(uint64_t a) |
|
|
|
|
static inline uint64_t NTOHLL(uint64_t v) |
|
|
|
|
{ |
|
|
|
|
network_uint64_t input = { a }; |
|
|
|
|
network_uint64_t input = { v }; |
|
|
|
|
return byteorder_ntohll(input); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|