|
Open Model Railroad Network (OpenMRN)
|
#include <architecture/byte_order.h>Go to the source code of this file.
Macros | |
| #define | htobe16(x) OSSwapHostToBigInt16(x) |
| Converts a host endian 16-bit value to big endian. | |
| #define | htole16(x) OSSwapHostToLittleInt16(x) |
| Converts a host endian 16-bit value to little endian. | |
| #define | be16toh(x) OSSwapBigToHostInt16(x) |
| Converts a big endian 16-bit value to host endian. | |
| #define | le16toh(x) OSSwapLittleToHostInt16(x) |
| Converts a little endian 16-bit value to host endian. | |
| #define | htobe32(x) OSSwapHostToBigInt32(x) |
| Converts a host endian 32-bit value to big endian. | |
| #define | htole32(x) OSSwapHostToLittleInt32(x) |
| Converts a host endian 32-bit value to little endian. | |
| #define | be32toh(x) OSSwapBigToHostInt32(x) |
| Converts a big endian 32-bit value to host endian. | |
| #define | le32toh(x) OSSwapLittleToHostInt32(x) |
| Converts a little endian 32-bit value to host endian. | |
| #define | htobe64(x) OSSwapHostToBigInt64(x) |
| Converts a host endian 64-bit value to big endian. | |
| #define | htole64(x) OSSwapHostToLittleInt64(x) |
| Converts a host endian 64-bit value to little endian. | |
| #define | be64toh(x) OSSwapBigToHostInt64(x) |
| Converts a big endian 64-bit value to host endian. | |
| #define | le64toh(x) OSSwapLittleToHostInt64(x) |
| Converts a little endian 64-bit value to host endian. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This file represents endian swapping for OS X (MACH)
Definition in file mach/endian.h.
| #define be16toh | ( | x | ) | OSSwapBigToHostInt16(x) |
Converts a big endian 16-bit value to host endian.
Definition at line 41 of file mach/endian.h.
| #define be32toh | ( | x | ) | OSSwapBigToHostInt32(x) |
Converts a big endian 32-bit value to host endian.
Definition at line 50 of file mach/endian.h.
| #define be64toh | ( | x | ) | OSSwapBigToHostInt64(x) |
Converts a big endian 64-bit value to host endian.
Definition at line 59 of file mach/endian.h.
| #define htobe16 | ( | x | ) | OSSwapHostToBigInt16(x) |
Converts a host endian 16-bit value to big endian.
Definition at line 37 of file mach/endian.h.
| #define htobe32 | ( | x | ) | OSSwapHostToBigInt32(x) |
Converts a host endian 32-bit value to big endian.
Definition at line 46 of file mach/endian.h.
| #define htobe64 | ( | x | ) | OSSwapHostToBigInt64(x) |
Converts a host endian 64-bit value to big endian.
Definition at line 55 of file mach/endian.h.
| #define htole16 | ( | x | ) | OSSwapHostToLittleInt16(x) |
Converts a host endian 16-bit value to little endian.
Definition at line 39 of file mach/endian.h.
| #define htole32 | ( | x | ) | OSSwapHostToLittleInt32(x) |
Converts a host endian 32-bit value to little endian.
Definition at line 48 of file mach/endian.h.
| #define htole64 | ( | x | ) | OSSwapHostToLittleInt64(x) |
Converts a host endian 64-bit value to little endian.
Definition at line 57 of file mach/endian.h.
| #define le16toh | ( | x | ) | OSSwapLittleToHostInt16(x) |
Converts a little endian 16-bit value to host endian.
Definition at line 43 of file mach/endian.h.
| #define le32toh | ( | x | ) | OSSwapLittleToHostInt32(x) |
Converts a little endian 32-bit value to host endian.
Definition at line 52 of file mach/endian.h.
| #define le64toh | ( | x | ) | OSSwapLittleToHostInt64(x) |
Converts a little endian 64-bit value to host endian.
Definition at line 61 of file mach/endian.h.