yw_swap_bytes

Name

yw_swap_bytes -- swap bytes in 32bit words

Synopsis


     #include <yw/util.h>
   

void yw_swap_bytes(uint32_t *ptr, int n);

DESCRIPTION

This function swaps n 32 bit words pointed by ptr converting between big and little endian or the other way around. If words were in little endian order, after treating with this function they are in big endian, and vice versa. You may want to look at macro YW_HOST_ENDIAN which evaluates to YW_LITTLE_ENDIAN or YW_BIG_ENDIAN, which are defined in <yw/config.h> file (included by all yw/*.h headers). Note that PDP endian is not supported (we're in XXI centry, you know :^).

INFO

Generated from: recv.c,v 1.12 2001/05/11 10:38:05 malekith Exp.