diff options
Diffstat (limited to 'src/cadet/gnunet-service-cadet-new_channel.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet-new_channel.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/cadet/gnunet-service-cadet-new_channel.c b/src/cadet/gnunet-service-cadet-new_channel.c index fb6379de5..32e4c6269 100644 --- a/src/cadet/gnunet-service-cadet-new_channel.c +++ b/src/cadet/gnunet-service-cadet-new_channel.c | |||
@@ -68,10 +68,10 @@ struct ChannelMessageIdentifier | |||
68 | /** | 68 | /** |
69 | * Message to create a Channel. | 69 | * Message to create a Channel. |
70 | */ | 70 | */ |
71 | struct GNUNET_CADET_ChannelCreateMessage | 71 | struct GNUNET_CADET_ChannelOpenMessage |
72 | { | 72 | { |
73 | /** | 73 | /** |
74 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE | 74 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN |
75 | */ | 75 | */ |
76 | struct GNUNET_MessageHeader header; | 76 | struct GNUNET_MessageHeader header; |
77 | 77 | ||
@@ -96,7 +96,7 @@ struct GNUNET_CADET_ChannelCreateMessage | |||
96 | /** | 96 | /** |
97 | * Message for cadet data traffic. | 97 | * Message for cadet data traffic. |
98 | */ | 98 | */ |
99 | struct GNUNET_CADET_ChannelDataMessage | 99 | struct GNUNET_CADET_ChannelAppDataMessage |
100 | { | 100 | { |
101 | /** | 101 | /** |
102 | * Type: #GNUNET_MESSAGE_TYPE_CADET_UNICAST, | 102 | * Type: #GNUNET_MESSAGE_TYPE_CADET_UNICAST, |
@@ -126,7 +126,7 @@ struct GNUNET_CADET_ChannelDataMessage | |||
126 | struct GNUNET_CADET_ChannelDataAckMessage | 126 | struct GNUNET_CADET_ChannelDataAckMessage |
127 | { | 127 | { |
128 | /** | 128 | /** |
129 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK | 129 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK |
130 | */ | 130 | */ |
131 | struct GNUNET_MessageHeader header; | 131 | struct GNUNET_MessageHeader header; |
132 | 132 | ||
@@ -219,7 +219,7 @@ struct CadetReliableMessage | |||
219 | /** | 219 | /** |
220 | * Data message we are trying to send. | 220 | * Data message we are trying to send. |
221 | */ | 221 | */ |
222 | struct GNUNET_CADET_ChannelDataMessage data_message; | 222 | struct GNUNET_CADET_ChannelAppDataMessage data_message; |
223 | 223 | ||
224 | /* followed by variable-size payload */ | 224 | /* followed by variable-size payload */ |
225 | }; | 225 | }; |
@@ -265,8 +265,8 @@ struct CadetChannel | |||
265 | 265 | ||
266 | /** | 266 | /** |
267 | * Last entry in the tunnel's queue relating to control messages | 267 | * Last entry in the tunnel's queue relating to control messages |
268 | * (#GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE or | 268 | * (#GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN or |
269 | * #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_ACK). Used to cancel | 269 | * #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK). Used to cancel |
270 | * transmission in case we receive updated information. | 270 | * transmission in case we receive updated information. |
271 | */ | 271 | */ |
272 | struct CadetTunnelQueueEntry *last_control_qe; | 272 | struct CadetTunnelQueueEntry *last_control_qe; |
@@ -531,7 +531,7 @@ static void | |||
531 | send_create (void *cls) | 531 | send_create (void *cls) |
532 | { | 532 | { |
533 | struct CadetChannel *ch = cls; | 533 | struct CadetChannel *ch = cls; |
534 | struct GNUNET_CADET_ChannelCreateMessage msgcc; | 534 | struct GNUNET_CADET_ChannelOpenMessage msgcc; |
535 | uint32_t options; | 535 | uint32_t options; |
536 | 536 | ||
537 | options = 0; | 537 | options = 0; |
@@ -542,7 +542,7 @@ send_create (void *cls) | |||
542 | if (ch->out_of_order) | 542 | if (ch->out_of_order) |
543 | options |= GNUNET_CADET_OPTION_OUT_OF_ORDER; | 543 | options |= GNUNET_CADET_OPTION_OUT_OF_ORDER; |
544 | msgcc.header.size = htons (sizeof (msgcc)); | 544 | msgcc.header.size = htons (sizeof (msgcc)); |
545 | msgcc.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE); | 545 | msgcc.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN); |
546 | msgcc.opt = htonl (options); | 546 | msgcc.opt = htonl (options); |
547 | msgcc.port = ch->port; | 547 | msgcc.port = ch->port; |
548 | msgcc.gid = ch->gid; | 548 | msgcc.gid = ch->gid; |
@@ -698,7 +698,7 @@ send_channel_ack (struct CadetChannel *ch) | |||
698 | { | 698 | { |
699 | struct GNUNET_CADET_ChannelDataAckMessage msg; | 699 | struct GNUNET_CADET_ChannelDataAckMessage msg; |
700 | 700 | ||
701 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK); | 701 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK); |
702 | msg.header.size = htons (sizeof (msg)); | 702 | msg.header.size = htons (sizeof (msg)); |
703 | msg.gid = ch->gid; | 703 | msg.gid = ch->gid; |
704 | msg.mid.mid = htonl (ntohl (ch->mid_recv.mid) - 1); | 704 | msg.mid.mid = htonl (ntohl (ch->mid_recv.mid) - 1); |
@@ -1003,8 +1003,8 @@ GCCH_handle_local_data (struct CadetChannel *ch, | |||
1003 | /* Everything is correct, send the message. */ | 1003 | /* Everything is correct, send the message. */ |
1004 | crm = GNUNET_malloc (sizeof (*crm) + payload_size); | 1004 | crm = GNUNET_malloc (sizeof (*crm) + payload_size); |
1005 | crm->ch = ch; | 1005 | crm->ch = ch; |
1006 | crm->data_message.header.size = htons (sizeof (struct GNUNET_CADET_ChannelDataMessage) + payload_size); | 1006 | crm->data_message.header.size = htons (sizeof (struct GNUNET_CADET_ChannelAppDataMessage) + payload_size); |
1007 | crm->data_message.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA); | 1007 | crm->data_message.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA); |
1008 | ch->mid_send.mid = htonl (ntohl (ch->mid_send.mid) + 1); | 1008 | ch->mid_send.mid = htonl (ntohl (ch->mid_send.mid) + 1); |
1009 | crm->data_message.mid = ch->mid_send; | 1009 | crm->data_message.mid = ch->mid_send; |
1010 | crm->data_message.gid = ch->gid; | 1010 | crm->data_message.gid = ch->gid; |