[hpsdr] Network Byte Order

Jeremy McDermond mcdermj at xenotropic.com
Mon Aug 2 02:50:22 PDT 2010


Just listened to the Teamspeak session for Friday and Phil and Bill's quick conversation regarding conversion of bytes to unsigned integers and such.

As a comment from the peanut gallery, I would highly encourage you to use network byte order for anything inside of the packet.  While both the Mac (since the Intel conversion) and PC's are Little Endian, some of the embedded systems that might be used in the project might not be.  See the standard htonl, htons, ntohs, and ntohl functions.  Also note that network byte order is kinda a pain for PC folk since NBO is Big Endian (the historical myth for this is that Sun defined NBO, and Sun was using m68k chips that were big endian).

--
Jeremy McDermond (NH6Z)
Xenotropic Systems
mcdermj at xenotropic.com






More information about the Hpsdr mailing list