MySQL 9.1.0
Source Code Documentation
byteorder.h File Reference

plugin/group_replication/libmysqlgcs/include/mysql/gcs/xplatform/byteorder.h More...

Go to the source code of this file.

Functions

uint16_t le16toh (uint16_t x)
 Converting a 16 bit integer from little-endian byte order to host byteorder. More...
 
uint32_t le32toh (uint32_t x)
 Converting a 32 bit integer from little-endian byte order to host byteorder. More...
 
uint64_t le64toh (uint64_t x)
 Converting a 64 bit integer from little-endian byte order to host byteorder. More...
 
uint16_t htole16 (uint16_t x)
 Converting a 16 bit integer from host's byte order to little-endian byte order. More...
 
uint32_t htole32 (uint32_t x)
 Converting a 32 bit integer from host's byte order to little-endian byte order. More...
 
uint64_t htole64 (uint64_t x)
 Converting a 64 bit integer from host's byte order to little-endian byte order. More...
 

Detailed Description

plugin/group_replication/libmysqlgcs/include/mysql/gcs/xplatform/byteorder.h

Author
Neha Kumari

The file contains functions to convert the byte encoding of integer values to and from little-endian and big-endian byte order.

Function Documentation

◆ htole16()

uint16_t htole16 ( uint16_t  x)
inline

Converting a 16 bit integer from host's byte order to little-endian byte order.

Parameters
x16-bit integer in host byte order
Returns
16-bit integer in little endian byte order

◆ htole32()

uint32_t htole32 ( uint32_t  x)
inline

Converting a 32 bit integer from host's byte order to little-endian byte order.

Parameters
x32-bit integer in host byte order
Returns
32-bit integer in little endian byte order

◆ htole64()

uint64_t htole64 ( uint64_t  x)
inline

Converting a 64 bit integer from host's byte order to little-endian byte order.

Parameters
x64-bit integer in host's byte order
Returns
64-bit integer in little endian byte order

◆ le16toh()

uint16_t le16toh ( uint16_t  x)
inline

Converting a 16 bit integer from little-endian byte order to host byteorder.

Parameters
x16-bit integer in little endian byte order
Returns
16-bit integer in host byte order

◆ le32toh()

uint32_t le32toh ( uint32_t  x)
inline

Converting a 32 bit integer from little-endian byte order to host byteorder.

Parameters
x32-bit integer in little endian byte order
Returns
32-bit integer in host byte order

◆ le64toh()

uint64_t le64toh ( uint64_t  x)
inline

Converting a 64 bit integer from little-endian byte order to host byteorder.

Parameters
x64-bit integer in little endian byte order
Returns
64-bit integer in host byte order