Date/Time: Fri, 19 Jan 2018 11:44:58 +0000
Post From: DTC Protocol
|vbmithr - Posts: 204|
The fields are packed in order, 8 bytes aligned. That is, supposing the address of the first field is zero, the fields of size n can only start at an entire multiple of n.
And the byte order is little endian. Padding is added in the serialization in order to ensure that all fields start at an address that is a multiple of their size.
See https://github.com/vbmithr/ocaml-dtc/blob/master/lib/cstructs.ml in order to see where to add padding.
Hope this helps.