1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

core: byteorder.h: rename HTON* -> hton*, NTOH* -> ntoh*

This commit is contained in:
Kaspar Schleiser 2017-04-13 10:59:39 +02:00
parent 70ed63ed25
commit 89390a83d4

View File

@ -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 v);
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 v);
* @param[in] v The integer to convert.
* @returns Converted integer.
*/
static inline uint32_t HTONL(uint32_t v);
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 v);
* @param[in] v The integer to convert.
* @returns Converted integer.
*/
static inline uint64_t HTONLL(uint64_t v);
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 v);
* @param[in] v The integer to convert.
* @returns Converted integer.
*/
static inline uint16_t NTOHS(uint16_t v);
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 v);
* @param[in] v The integer to convert.
* @returns Converted integer.
*/
static inline uint32_t NTOHL(uint32_t v);
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 v);
* @param[in] v The integer to convert.
* @returns Converted integer.
*/
static inline uint64_t NTOHLL(uint64_t v);
static inline uint64_t ntohll(uint64_t v);
/* **************************** IMPLEMENTATION ***************************** */
@ -385,34 +385,34 @@ static inline uint64_t byteorder_ntohll(network_uint64_t v)
return _byteorder_swap(v.u64, ll);
}
static inline uint16_t HTONS(uint16_t v)
static inline uint16_t htons(uint16_t v)
{
return byteorder_htons(v).u16;
}
static inline uint32_t HTONL(uint32_t v)
static inline uint32_t htonl(uint32_t v)
{
return byteorder_htonl(v).u32;
}
static inline uint64_t HTONLL(uint64_t v)
static inline uint64_t htonll(uint64_t v)
{
return byteorder_htonll(v).u64;
}
static inline uint16_t NTOHS(uint16_t v)
static inline uint16_t ntohs(uint16_t v)
{
network_uint16_t input = { v };
return byteorder_ntohs(input);
}
static inline uint32_t NTOHL(uint32_t v)
static inline uint32_t ntohl(uint32_t v)
{
network_uint32_t input = { v };
return byteorder_ntohl(input);
}
static inline uint64_t NTOHLL(uint64_t v)
static inline uint64_t ntohll(uint64_t v)
{
network_uint64_t input = { v };
return byteorder_ntohll(input);