Re: [dev] network protocol packing

From: Martti Kühne <mysatyre_AT_gmail.com>
Date: Tue, 1 Jul 2014 15:01:27 +0300

On Tue, Jul 1, 2014 at 2:56 PM, Markus Teich <markus.teich_AT_stusta.mhn.de> wrote:
> thanks for your feedback. What about declaring a struct for each message-type:
>
> struct msg_signed_data {
> unsigned int op;
> struct foo data;
> struct bar signature;
> };
>
> This should also solve the alignment issues, or am I mistaken here? It also
> reduces the amount of memcpy.
>

Is this skipping the padding or including it now? Including it would
mean there would be "more" to memcpy?
if you want to look at struct paddings, here we go... [0]

cheers!
mar77i

[0] https://gist.github.com/mar77i/b2cbe1a6c0c2194d7804
Received on Tue Jul 01 2014 - 14:01:27 CEST

This archive was generated by hypermail 2.3.0 : Tue Jul 01 2014 - 14:12:11 CEST