aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/cadet_protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/cadet_protocol.h')
-rw-r--r--src/cadet/cadet_protocol.h48
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 */
69struct GNUNET_CADET_ConnectionCreateMessage { 69struct 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 */
102struct GNUNET_CADET_ConnectionCreateAckMessage { 103struct 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 */
123struct GNUNET_CADET_ConnectionBrokenMessage { 125struct 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 */
154struct GNUNET_CADET_ConnectionDestroyMessage { 157struct 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 */
183struct CadetEncryptedMessageIdentifier { 187struct 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 */
195enum GNUNET_CADET_KX_Flags { 200enum 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 */
211struct GNUNET_CADET_TunnelKeyExchangeMessage { 217struct 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 */
266struct GNUNET_CADET_TunnelKeyExchangeAuthMessage { 273struct 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 */
293struct GNUNET_CADET_AxHeader { 301struct 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 */
314struct GNUNET_CADET_TunnelEncryptedMessage { 323struct 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 */
357struct GNUNET_CADET_ChannelOpenMessage { 367struct 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 */
384struct GNUNET_CADET_ChannelOpenAckMessage { 395struct 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 */
412struct GNUNET_CADET_ChannelDestroyMessage { 424struct 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 */
433struct ChannelMessageIdentifier { 446struct 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 */
444struct GNUNET_CADET_ChannelAppDataMessage { 458struct 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 */
469struct GNUNET_CADET_ChannelDataAckMessage { 484struct 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 */