__builtin_bswap32() is used to reverse bytes (it\'s used for littel/big endian issues (from gcc)).
__builtin_bswap32()
htonl() is used to reverse bytes too (conver
htonl()
bswap_32 always reverse byte order, on any architecture.
htonl/ntohl reverses byteorder on little endian machines only.
For example, on PowerPC (big endian), ntohl/htonl just returns input value, no more, while bswap32 anyway will reverse byte order.