Basic concepts on Endianness - CodeProject
Function Purpose ntohs Convert a 16-bit quantity from network byte order to host byte order (Big-Endian to Little-Endian). ntohl Convert a 32-bit quantity from network byte order to host byte order (Big-Endian to Little-Endian). htons Convert a 16-bit qua...