Make the cstruct definitions more closely match the interface definitions in the C headers

The definitions in the public C headers constitute a defacto part of
the protocol spec. Keeping the definitions in sync should make it easier
to spot interoperability problems.