Back to index

glibc  2.9
Functions
htons.c File Reference
#include <netinet/in.h>

Go to the source code of this file.

Functions

uint16_t htons (uint16_t x)

Function Documentation

Definition at line 25 of file htons.c.

{
#if BYTE_ORDER == BIG_ENDIAN
  return x;
#elif BYTE_ORDER == LITTLE_ENDIAN
  return __bswap_16 (x);
#else
# error "What kind of system is this?"
#endif
}

Here is the caller graph for this function: