![]() |
DDraceNetwork Documentation
|
Functions | |
| void | swap_endian (void *data, unsigned elem_size, unsigned num) |
| unsigned | bytes_be_to_uint (const unsigned char *bytes) |
| void | uint_to_bytes_be (unsigned char *bytes, unsigned value) |
Byte-manipulation utilities.
| unsigned bytes_be_to_uint | ( | const unsigned char * | bytes | ) |
Packs 4 big endian bytes into an unsigned.
| bytes | Pointer to an array of bytes that will be packed. |
| void swap_endian | ( | void * | data, |
| unsigned | elem_size, | ||
| unsigned | num ) |
Swaps the endianness of data. Each element is swapped individually by reversing its bytes.
| data | Pointer to data to be swapped. |
| elem_size | Size in bytes of each element. |
| num | Number of elements. |
| void uint_to_bytes_be | ( | unsigned char * | bytes, |
| unsigned | value ) |
Packs an unsigned into 4 big endian bytes.
| bytes | Pointer to an array where the bytes will be stored. |
| value | The values that will be packed into the array. |