#include #include #include uint16_t uint16_load_bigendian(const unsigned char *s) { uint16_t x; memcpy(&x,s,sizeof x); return be16toh(x); }