Module libdonet::datagram::byte_order

source ·
Expand description

Utils for swapping little-endian bytes to the compiling processor’s native endianness (byte order).

Functions§

  • Swaps 2 bytes in big endian byte order to little endian. Returns the input if the processor is big endian.
  • Swaps 4 bytes in big endian byte order to little endian. Returns the input if the processor is big endian.
  • Swaps 8 bytes in big endian byte order to little endian. Returns the input if the processor is big endian.
  • Swaps 2 bytes in little endian byte order to big endian. Returns the input if the processor is little endian.
  • Swaps 4 bytes in little endian byte order to big endian. Returns the input if the processor is little endian.
  • Swaps 8 bytes in little endian byte order to big endian. Returns the input if the processor is little endian.