The implementation isn't endian friendly :(
Is it because of bitfields ? Should I rather use a full 64bit data field and mask it to get to my flags ?
There might also be issues with the `data' field if padding gets introduced.
Having the `type' field (as a uint8_t or char) first would solve this but loses some bits of storage. The other option would be making the type an array of char and bit bashing everything (and memcpy(2) multibyte fields since unaligned accesses aren't universal).