|
M_uint16 | M_hton16 (M_uint16 h16) M_WARN_UNUSED_RESULT |
|
M_uint32 | M_hton32 (M_uint32 h32) M_WARN_UNUSED_RESULT |
|
M_uint64 | M_hton64 (M_uint64 h64) M_WARN_UNUSED_RESULT |
|
M_uint16 | M_htol16 (M_uint16 h16) M_WARN_UNUSED_RESULT |
|
M_uint32 | M_htol32 (M_uint32 h32) M_WARN_UNUSED_RESULT |
|
M_uint64 | M_htol64 (M_uint64 h64) M_WARN_UNUSED_RESULT |
|
M_uint16 | M_ntoh16 (M_uint16 be16) M_WARN_UNUSED_RESULT |
|
M_uint32 | M_ntoh32 (M_uint32 be32) M_WARN_UNUSED_RESULT |
|
M_uint64 | M_ntoh64 (M_uint64 be64) M_WARN_UNUSED_RESULT |
|
M_uint16 | M_ltoh16 (M_uint16 be16) M_WARN_UNUSED_RESULT |
|
M_uint32 | M_ltoh32 (M_uint32 be32) M_WARN_UNUSED_RESULT |
|
M_uint64 | M_ltoh64 (M_uint64 be64) M_WARN_UNUSED_RESULT |
|
Conversion between byte orders.
◆ M_endian_t
Endianness
Enumerator |
---|
M_ENDIAN_BIG | |
M_ENDIAN_LITTLE | |
◆ M_hton16()
M_uint16 M_hton16 |
( |
M_uint16 |
h16 | ) |
|
Convert a 16-bit unsigned integer in host byte order to network byte order.
- Parameters
-
[in] | h16 | 16-bit unsigned integer in host byte order. |
- Returns
- 16-bit unsigned integer in network byte order.
◆ M_hton32()
M_uint32 M_hton32 |
( |
M_uint32 |
h32 | ) |
|
Convert a 32-bit unsigned integer in host byte order to network byte order.
- Parameters
-
[in] | h32 | 32-bit unsigned integer in host byte order. |
- Returns
- 32-bit unsigned integer in network byte order.
◆ M_hton64()
M_uint64 M_hton64 |
( |
M_uint64 |
h64 | ) |
|
Convert a 64-bit unsigned integer in host byte order to network byte order.
- Parameters
-
[in] | h64 | 64-bit unsigned integer in host byte order. |
- Returns
- 64-bit unsigned integer in network byte order.
◆ M_htol16()
M_uint16 M_htol16 |
( |
M_uint16 |
h16 | ) |
|
Convert a 16-bit unsigned integer in host byte order to little endian byte order.
- Parameters
-
[in] | h16 | 16-bit unsigned integer in host byte order. |
- Returns
- 16-bit unsigned integer in little endian byte order.
◆ M_htol32()
M_uint32 M_htol32 |
( |
M_uint32 |
h32 | ) |
|
Convert a 32-bit unsigned integer in host byte order to little endian byte order.
- Parameters
-
[in] | h32 | 32-bit unsigned integer in host byte order. |
- Returns
- 32-bit unsigned integer in little endian byte order.
◆ M_htol64()
M_uint64 M_htol64 |
( |
M_uint64 |
h64 | ) |
|
Convert a 64-bit unsigned integer in host byte order to little endian byte order.
- Parameters
-
[in] | h64 | 64-bit unsigned integer in host byte order. |
- Returns
- 64-bit unsigned integer in little endian byte order.
◆ M_ntoh16()
M_uint16 M_ntoh16 |
( |
M_uint16 |
be16 | ) |
|
Convert a 16-bit unsigned integer in network byte order to host byte order.
- Parameters
-
[in] | be16 | 16-bit unsigned integer in network byte order. |
- Returns
- 16-bit unsigned integer in little host byte order.
◆ M_ntoh32()
M_uint32 M_ntoh32 |
( |
M_uint32 |
be32 | ) |
|
Convert a 32-bit unsigned integer in network byte order to host byte order.
- Parameters
-
[in] | be32 | 32-bit unsigned integer in network byte order. |
- Returns
- 32-bit unsigned integer in little host byte order.
◆ M_ntoh64()
M_uint64 M_ntoh64 |
( |
M_uint64 |
be64 | ) |
|
Convert a 64-bit unsigned integer in network byte order to host byte order.
- Parameters
-
[in] | be64 | 64-bit unsigned integer in network byte order. |
- Returns
- 64-bit unsigned integer in little host byte order.
◆ M_ltoh16()
M_uint16 M_ltoh16 |
( |
M_uint16 |
be16 | ) |
|
Convert a 16-bit unsigned integer in little endian byte order to host byte order.
- Parameters
-
[in] | be16 | 16-bit unsigned integer in little endian byte order. |
- Returns
- 16-bit unsigned integer in little host byte order.
◆ M_ltoh32()
M_uint32 M_ltoh32 |
( |
M_uint32 |
be32 | ) |
|
Convert a 32-bit unsigned integer in little endian byte order to host byte order.
- Parameters
-
[in] | be32 | 32-bit unsigned integer in little endian byte order. |
- Returns
- 32-bit unsigned integer in little host byte order.
◆ M_ltoh64()
M_uint64 M_ltoh64 |
( |
M_uint64 |
be64 | ) |
|
Convert a 64-bit unsigned integer in little endian byte order to host byte order.
- Parameters
-
[in] | be64 | 64-bit unsigned integer in little endian byte order. |
- Returns
- 64-bit unsigned integer in little host byte order.