A production issue has led our team to the following questions:
ntohs
and ntohl
implemented?I know the implications behind questions may seem far-fetched and ridiculous, but I have been asked to investigate.
The hardware in question is an Intel box, little endian, 64-bit processor and compiled in 64 bit.
/usr/include/bits/byteswap.h
for the __bswap_16
and __bswap_32
functions, which are used when optimization is enabled (see <netinet/in.h>
for details of how.)-save-temps
option to keep the intermediate .s
files, or use -S
to stop after compilation and before assembling the code, or use http://gcc.godbolt.org/