SWAB(3)
NAME
swab − swap bytes
USAGE
swab(from, to, nbytes)
char *from, *to;
DESCRIPTION
Swab copies nbytes bytes from a place pointed to by from to the position specified by to, exchanging adjacent even and odd bytes. It is useful for carrying binary data between various machines.
NOTES
Nbytes should be even.