diff options
Diffstat (limited to 'src/cadet/cadet_protocol.h')
-rw-r--r-- | src/cadet/cadet_protocol.h | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/src/cadet/cadet_protocol.h b/src/cadet/cadet_protocol.h index 6252a1da5..e3417f8c4 100644 --- a/src/cadet/cadet_protocol.h +++ b/src/cadet/cadet_protocol.h | |||
@@ -66,7 +66,8 @@ GNUNET_NETWORK_STRUCT_BEGIN | |||
66 | /** | 66 | /** |
67 | * Message for cadet connection creation. | 67 | * Message for cadet connection creation. |
68 | */ | 68 | */ |
69 | struct GNUNET_CADET_ConnectionCreateMessage { | 69 | struct GNUNET_CADET_ConnectionCreateMessage |
70 | { | ||
70 | /** | 71 | /** |
71 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE | 72 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE |
72 | * | 73 | * |
@@ -99,7 +100,8 @@ struct GNUNET_CADET_ConnectionCreateMessage { | |||
99 | /** | 100 | /** |
100 | * Message for ack'ing a connection | 101 | * Message for ack'ing a connection |
101 | */ | 102 | */ |
102 | struct GNUNET_CADET_ConnectionCreateAckMessage { | 103 | struct GNUNET_CADET_ConnectionCreateAckMessage |
104 | { | ||
103 | /** | 105 | /** |
104 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK | 106 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK |
105 | */ | 107 | */ |
@@ -120,7 +122,8 @@ struct GNUNET_CADET_ConnectionCreateAckMessage { | |||
120 | /** | 122 | /** |
121 | * Message for notifying a disconnection in a path | 123 | * Message for notifying a disconnection in a path |
122 | */ | 124 | */ |
123 | struct GNUNET_CADET_ConnectionBrokenMessage { | 125 | struct GNUNET_CADET_ConnectionBrokenMessage |
126 | { | ||
124 | /** | 127 | /** |
125 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN. | 128 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN. |
126 | */ | 129 | */ |
@@ -151,7 +154,8 @@ struct GNUNET_CADET_ConnectionBrokenMessage { | |||
151 | /** | 154 | /** |
152 | * Message to destroy a connection. | 155 | * Message to destroy a connection. |
153 | */ | 156 | */ |
154 | struct GNUNET_CADET_ConnectionDestroyMessage { | 157 | struct GNUNET_CADET_ConnectionDestroyMessage |
158 | { | ||
155 | /** | 159 | /** |
156 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY | 160 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY |
157 | */ | 161 | */ |
@@ -180,7 +184,8 @@ struct GNUNET_CADET_ConnectionDestroyMessage { | |||
180 | * against the respective #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED | 184 | * against the respective #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED |
181 | * messages. | 185 | * messages. |
182 | */ | 186 | */ |
183 | struct CadetEncryptedMessageIdentifier { | 187 | struct CadetEncryptedMessageIdentifier |
188 | { | ||
184 | /** | 189 | /** |
185 | * This number is incremented by one per message. It may wrap around. | 190 | * This number is incremented by one per message. It may wrap around. |
186 | * In network byte order. | 191 | * In network byte order. |
@@ -192,7 +197,8 @@ struct CadetEncryptedMessageIdentifier { | |||
192 | /** | 197 | /** |
193 | * Flags to be used in GNUNET_CADET_KX. | 198 | * Flags to be used in GNUNET_CADET_KX. |
194 | */ | 199 | */ |
195 | enum GNUNET_CADET_KX_Flags { | 200 | enum GNUNET_CADET_KX_Flags |
201 | { | ||
196 | /** | 202 | /** |
197 | * Should the peer reply with its KX details? | 203 | * Should the peer reply with its KX details? |
198 | */ | 204 | */ |
@@ -208,7 +214,8 @@ enum GNUNET_CADET_KX_Flags { | |||
208 | /** | 214 | /** |
209 | * Message for a Key eXchange for a tunnel. | 215 | * Message for a Key eXchange for a tunnel. |
210 | */ | 216 | */ |
211 | struct GNUNET_CADET_TunnelKeyExchangeMessage { | 217 | struct GNUNET_CADET_TunnelKeyExchangeMessage |
218 | { | ||
212 | /** | 219 | /** |
213 | * Type: #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX or | 220 | * Type: #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX or |
214 | * #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX_AUTH as part | 221 | * #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX_AUTH as part |
@@ -263,7 +270,8 @@ struct GNUNET_CADET_TunnelKeyExchangeMessage { | |||
263 | * Message for a Key eXchange for a tunnel, with authentication. | 270 | * Message for a Key eXchange for a tunnel, with authentication. |
264 | * Used as a response to the initial KX as well as for rekeying. | 271 | * Used as a response to the initial KX as well as for rekeying. |
265 | */ | 272 | */ |
266 | struct GNUNET_CADET_TunnelKeyExchangeAuthMessage { | 273 | struct GNUNET_CADET_TunnelKeyExchangeAuthMessage |
274 | { | ||
267 | /** | 275 | /** |
268 | * Message header with key material. | 276 | * Message header with key material. |
269 | */ | 277 | */ |
@@ -290,7 +298,8 @@ struct GNUNET_CADET_TunnelKeyExchangeAuthMessage { | |||
290 | * Encrypted axolotl header with numbers that identify which | 298 | * Encrypted axolotl header with numbers that identify which |
291 | * keys in which ratchet are to be used to decrypt the body. | 299 | * keys in which ratchet are to be used to decrypt the body. |
292 | */ | 300 | */ |
293 | struct GNUNET_CADET_AxHeader { | 301 | struct GNUNET_CADET_AxHeader |
302 | { | ||
294 | /** | 303 | /** |
295 | * Number of messages sent with the current ratchet key. | 304 | * Number of messages sent with the current ratchet key. |
296 | */ | 305 | */ |
@@ -311,7 +320,8 @@ struct GNUNET_CADET_AxHeader { | |||
311 | /** | 320 | /** |
312 | * Axolotl-encrypted tunnel message with application payload. | 321 | * Axolotl-encrypted tunnel message with application payload. |
313 | */ | 322 | */ |
314 | struct GNUNET_CADET_TunnelEncryptedMessage { | 323 | struct GNUNET_CADET_TunnelEncryptedMessage |
324 | { | ||
315 | /** | 325 | /** |
316 | * Type: #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED | 326 | * Type: #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED |
317 | */ | 327 | */ |
@@ -354,7 +364,8 @@ struct GNUNET_CADET_TunnelEncryptedMessage { | |||
354 | /** | 364 | /** |
355 | * Message to create a Channel. | 365 | * Message to create a Channel. |
356 | */ | 366 | */ |
357 | struct GNUNET_CADET_ChannelOpenMessage { | 367 | struct GNUNET_CADET_ChannelOpenMessage |
368 | { | ||
358 | /** | 369 | /** |
359 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN | 370 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN |
360 | */ | 371 | */ |
@@ -381,7 +392,8 @@ struct GNUNET_CADET_ChannelOpenMessage { | |||
381 | * Message to acknowledge opening a channel of type | 392 | * Message to acknowledge opening a channel of type |
382 | * #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK. | 393 | * #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK. |
383 | */ | 394 | */ |
384 | struct GNUNET_CADET_ChannelOpenAckMessage { | 395 | struct GNUNET_CADET_ChannelOpenAckMessage |
396 | { | ||
385 | /** | 397 | /** |
386 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK | 398 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK |
387 | */ | 399 | */ |
@@ -409,7 +421,8 @@ struct GNUNET_CADET_ChannelOpenAckMessage { | |||
409 | * Message to destroy a channel of type | 421 | * Message to destroy a channel of type |
410 | * #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY. | 422 | * #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY. |
411 | */ | 423 | */ |
412 | struct GNUNET_CADET_ChannelDestroyMessage { | 424 | struct GNUNET_CADET_ChannelDestroyMessage |
425 | { | ||
413 | /** | 426 | /** |
414 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY | 427 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY |
415 | */ | 428 | */ |
@@ -430,7 +443,8 @@ struct GNUNET_CADET_ChannelDestroyMessage { | |||
430 | /** | 443 | /** |
431 | * Number used to uniquely identify messages in a CADET Channel. | 444 | * Number used to uniquely identify messages in a CADET Channel. |
432 | */ | 445 | */ |
433 | struct ChannelMessageIdentifier { | 446 | struct ChannelMessageIdentifier |
447 | { | ||
434 | /** | 448 | /** |
435 | * Unique ID of the message, cycles around, in NBO. | 449 | * Unique ID of the message, cycles around, in NBO. |
436 | */ | 450 | */ |
@@ -441,7 +455,8 @@ struct ChannelMessageIdentifier { | |||
441 | /** | 455 | /** |
442 | * Message for cadet data traffic. | 456 | * Message for cadet data traffic. |
443 | */ | 457 | */ |
444 | struct GNUNET_CADET_ChannelAppDataMessage { | 458 | struct GNUNET_CADET_ChannelAppDataMessage |
459 | { | ||
445 | /** | 460 | /** |
446 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA. | 461 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA. |
447 | */ | 462 | */ |
@@ -466,7 +481,8 @@ struct GNUNET_CADET_ChannelAppDataMessage { | |||
466 | /** | 481 | /** |
467 | * Message to acknowledge end-to-end data. | 482 | * Message to acknowledge end-to-end data. |
468 | */ | 483 | */ |
469 | struct GNUNET_CADET_ChannelDataAckMessage { | 484 | struct GNUNET_CADET_ChannelDataAckMessage |
485 | { | ||
470 | /** | 486 | /** |
471 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK | 487 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK |
472 | */ | 488 | */ |