> Just remeber you'll be in trouble if the other end dont have the same
> endianness as yours - man htons
Or if the other end uses a different size  or encoding  of the
primitive types, or a different alignment  or ordering  of the
elements in the struct.
In summary, do not exchange (e.g. through sockets or files) structs
without proper serialization.
 E.g. on some platforms a long is 32 bits wide, on others 64 bits.
 Besides endianess, the hardware could, theoretically, implement
integers with floating-point number to save circuits. This can
be done with what C99 refers to as "trap representation."
 E.g. some platforms will align longs to 32 bit boundaries, others
to 64 bit boundaries.
 Optimizing compilers may rearrange elements within a struct to
give a smaller memory footprint.