uint32_t ENDIAN_BE32 (uint32_t var )
If the host is big-endian, this macro does nothing (expands simply to var); else, it performs a quadruple byte swap.