Byte-swapping functions
kswap.h contains functions that will help converting 16, 32 and 64 bit length data between little-endian and big-endian representations. More...Functions | |
Q_UINT16 | KFromToBigEndian (Q_UINT16 b) |
void | KFromToBigEndian (Q_UINT16 *out, Q_UINT16 *in, uint len) |
Q_UINT32 | KFromToBigEndian (Q_UINT32 b) |
void | KFromToBigEndian (Q_UINT32 *out, Q_UINT32 *in, uint len) |
Q_UINT64 | KFromToBigEndian (Q_UINT64 b) |
void | KFromToBigEndian (Q_UINT64 *out, Q_UINT64 *in, uint len) |
Q_INT16 | KFromToBigEndian (Q_INT16 b) |
void | KFromToBigEndian (Q_INT16 *out, Q_INT16 *in, uint len) |
Q_INT32 | KFromToBigEndian (Q_INT32 b) |
void | KFromToBigEndian (Q_INT32 *out, Q_INT32 *in, uint len) |
Q_INT64 | KFromToBigEndian (Q_INT64 b) |
void | KFromToBigEndian (Q_INT64 *out, Q_INT64 *in, uint len) |
Q_UINT16 | KFromToLittleEndian (Q_UINT16 b) |
void | KFromToLittleEndian (Q_UINT16 *out, Q_UINT16 *in, uint len) |
Q_UINT32 | KFromToLittleEndian (Q_UINT32 b) |
void | KFromToLittleEndian (Q_UINT32 *out, Q_UINT32 *in, uint len) |
Q_UINT64 | KFromToLittleEndian (Q_UINT64 b) |
void | KFromToLittleEndian (Q_UINT64 *out, Q_UINT64 *in, uint len) |
Q_INT16 | KFromToLittleEndian (Q_INT16 b) |
void | KFromToLittleEndian (Q_INT16 *out, Q_INT16 *in, uint len) |
Q_INT32 | KFromToLittleEndian (Q_INT32 b) |
void | KFromToLittleEndian (Q_INT32 *out, Q_INT32 *in, uint len) |
Q_INT64 | KFromToLittleEndian (Q_INT64 b) |
void | KFromToLittleEndian (Q_INT64 *out, Q_INT64 *in, uint len) |
Detailed Description
kswap.h contains functions that will help converting 16, 32 and 64 bit length data between little-endian and big-endian representations.The KSWAP_16, KSWAP_32 and KSWAP_64 functions are always swaps the byte order of the supplied argument (which should be 16, 32 or 64 bit wide). These functions are inline, and tries to use the most optimized function of the underlying system (bswap_xx functions from byteswap.h in GLIBC, or ntohs and ntohl on little-endian machines, and if neither are applicable, some fast custom code).
The KFromTo{Little|Big}Endian functions are for converting big-endian and little-endian data to and from the machine endianness.
Function Documentation
|
Converts a 16 bit unsigned value from/to big-endian byte order to/from the machine order.
|
|
Converts a 16 bit unsigned array from/to big-endian byte order to/from the machine order.
|
|
Converts a 32 bit unsigned value from/to big-endian byte order to/from the machine order.
|
|
Converts a 32 bit unsigned array from/to big-endian byte order to/from the machine order.
|
|
Converts a 64 bit unsigned value from/to big-endian byte order to/from the machine order.
|
|
Converts a 64 bit unsigned array from/to big-endian byte order to/from the machine order.
|
|
Converts a 16 bit signed value from/to big-endian byte order to/from the machine order.
|
|
Converts a 16 bit signed array from/to big-endian byte order to/from the machine order.
|
|
Converts a 32 bit signed value from/to big-endian byte order to/from the machine order.
|
|
Converts a 32 bit signed array from/to big-endian byte order to/from the machine order.
|
|
Converts a 64 bit signed value from/to big-endian byte order to/from the machine order.
|
|
Converts a 64 bit signed array from/to big-endian byte order to/from the machine order.
|
|
Converts a 16 bit unsigned value from/to little-endian byte order to/from the machine order.
Definition at line 276 of file kswap.h. Referenced by KNTLM::getAuth(), and KNTLM::getNegotiate(). |
|
Converts a 16 bit unsigned array from/to little-endian byte order to/from the machine order.
|
|
Converts a 32 bit unsigned value from/to little-endian byte order to/from the machine order.
|
|
Converts a 32 bit unsigned array from/to little-endian byte order to/from the machine order.
|
|
Converts a 64 bit unsigned value from/to little-endian byte order to/from the machine order.
|
|
Converts a 64 bit unsigned array from/to little-endian byte order to/from the machine order.
|
|
Converts a 16 bit signed value from/to little-endian byte order to/from the machine order.
|
|
Converts a 16 bit signed array from/to little-endian byte order to/from the machine order.
|
|
Converts a 32 bit signed value from/to little-endian byte order to/from the machine order.
|
|
Converts a 32 bit signed array from/to little-endian byte order to/from the machine order.
|
|
Converts a 64 bit signed value from/to little-endian byte order to/from the machine order.
|
|
Converts a 64 bit signed array from/to little-endian byte order to/from the machine order.
|