Login Page - Create Account

Support Board

Date/Time: Fri, 19 Jan 2018 11:44:58 +0000

Post From: DTC Protocol

[2016-06-16 07:59:22]
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.