Hacker News new | ask | show | jobs
by P-Nuts 110 days ago
You just define the structures in terms of some e.g. uint32_le etc types for which you provide conversion functions to native endianness. On a little endian platform the conversion is a no-op.