diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-09-12 11:31:50 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-09-12 11:31:50 +0000 |
commit | 02ccdcf0ef5c039224a397f057b2a76f54364d92 (patch) | |
tree | db9e4faee6831b965fedb5648915a556be5ff091 /src/cadet/cadet_protocol.h | |
parent | 17987cc9db00b169dd8bff5a620e5d5ab51ff044 (diff) | |
download | gnunet-02ccdcf0ef5c039224a397f057b2a76f54364d92.tar.gz gnunet-02ccdcf0ef5c039224a397f057b2a76f54364d92.zip |
realigning CADET messages and bumping message types to avoid interactions with incompatible old versions complicating diagnostics
Diffstat (limited to 'src/cadet/cadet_protocol.h')
-rw-r--r-- | src/cadet/cadet_protocol.h | 57 |
1 files changed, 41 insertions, 16 deletions
diff --git a/src/cadet/cadet_protocol.h b/src/cadet/cadet_protocol.h index e40fa0e7b..2df652e34 100644 --- a/src/cadet/cadet_protocol.h +++ b/src/cadet/cadet_protocol.h | |||
@@ -61,6 +61,11 @@ struct GNUNET_CADET_ConnectionCreate | |||
61 | struct GNUNET_MessageHeader header; | 61 | struct GNUNET_MessageHeader header; |
62 | 62 | ||
63 | /** | 63 | /** |
64 | * For alignment. | ||
65 | */ | ||
66 | uint32_t reserved GNUNET_PACKED; | ||
67 | |||
68 | /** | ||
64 | * ID of the connection | 69 | * ID of the connection |
65 | */ | 70 | */ |
66 | struct GNUNET_CADET_Hash cid; | 71 | struct GNUNET_CADET_Hash cid; |
@@ -78,14 +83,19 @@ struct GNUNET_CADET_ConnectionCreate | |||
78 | */ | 83 | */ |
79 | struct GNUNET_CADET_ConnectionACK | 84 | struct GNUNET_CADET_ConnectionACK |
80 | { | 85 | { |
81 | /** | 86 | /** |
82 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK | 87 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK |
83 | */ | 88 | */ |
84 | struct GNUNET_MessageHeader header; | 89 | struct GNUNET_MessageHeader header; |
85 | 90 | ||
86 | /** | 91 | /** |
87 | * ID of the connection. | 92 | * For alignment. |
88 | */ | 93 | */ |
94 | uint32_t reserved GNUNET_PACKED; | ||
95 | |||
96 | /** | ||
97 | * ID of the connection. | ||
98 | */ | ||
89 | struct GNUNET_CADET_Hash cid; | 99 | struct GNUNET_CADET_Hash cid; |
90 | 100 | ||
91 | }; | 101 | }; |
@@ -96,14 +106,19 @@ struct GNUNET_CADET_ConnectionACK | |||
96 | */ | 106 | */ |
97 | struct GNUNET_CADET_KX | 107 | struct GNUNET_CADET_KX |
98 | { | 108 | { |
99 | /** | 109 | /** |
100 | * Type: #GNUNET_MESSAGE_TYPE_CADET_KX. | 110 | * Type: #GNUNET_MESSAGE_TYPE_CADET_KX. |
101 | */ | 111 | */ |
102 | struct GNUNET_MessageHeader header; | 112 | struct GNUNET_MessageHeader header; |
113 | |||
114 | /** | ||
115 | * For alignment. | ||
116 | */ | ||
117 | uint32_t reserved GNUNET_PACKED; | ||
103 | 118 | ||
104 | /** | 119 | /** |
105 | * ID of the connection. | 120 | * ID of the connection. |
106 | */ | 121 | */ |
107 | struct GNUNET_CADET_Hash cid; | 122 | struct GNUNET_CADET_Hash cid; |
108 | 123 | ||
109 | /* Specific KX message follows. */ | 124 | /* Specific KX message follows. */ |
@@ -222,9 +237,9 @@ struct GNUNET_CADET_ChannelCreate | |||
222 | struct GNUNET_MessageHeader header; | 237 | struct GNUNET_MessageHeader header; |
223 | 238 | ||
224 | /** | 239 | /** |
225 | * ID of the channel | 240 | * Channel options. |
226 | */ | 241 | */ |
227 | CADET_ChannelNumber chid GNUNET_PACKED; | 242 | uint32_t opt GNUNET_PACKED; |
228 | 243 | ||
229 | /** | 244 | /** |
230 | * Destination port. | 245 | * Destination port. |
@@ -232,9 +247,9 @@ struct GNUNET_CADET_ChannelCreate | |||
232 | struct GNUNET_HashCode port; | 247 | struct GNUNET_HashCode port; |
233 | 248 | ||
234 | /** | 249 | /** |
235 | * Channel options. | 250 | * ID of the channel |
236 | */ | 251 | */ |
237 | uint32_t opt GNUNET_PACKED; | 252 | CADET_ChannelNumber chid GNUNET_PACKED; |
238 | }; | 253 | }; |
239 | 254 | ||
240 | 255 | ||
@@ -367,6 +382,11 @@ struct GNUNET_CADET_ConnectionBroken | |||
367 | struct GNUNET_MessageHeader header; | 382 | struct GNUNET_MessageHeader header; |
368 | 383 | ||
369 | /** | 384 | /** |
385 | * For alignment. | ||
386 | */ | ||
387 | uint32_t reserved GNUNET_PACKED; | ||
388 | |||
389 | /** | ||
370 | * ID of the connection. | 390 | * ID of the connection. |
371 | */ | 391 | */ |
372 | struct GNUNET_CADET_Hash cid; | 392 | struct GNUNET_CADET_Hash cid; |
@@ -394,6 +414,11 @@ struct GNUNET_CADET_ConnectionDestroy | |||
394 | struct GNUNET_MessageHeader header; | 414 | struct GNUNET_MessageHeader header; |
395 | 415 | ||
396 | /** | 416 | /** |
417 | * For alignment. | ||
418 | */ | ||
419 | uint32_t reserved GNUNET_PACKED; | ||
420 | |||
421 | /** | ||
397 | * ID of the connection. | 422 | * ID of the connection. |
398 | */ | 423 | */ |
399 | struct GNUNET_CADET_Hash cid; | 424 | struct GNUNET_CADET_Hash cid; |