diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-01-18 10:51:16 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-01-18 10:51:16 +0100 |
commit | a1bd2dcc29c126023dbd1ddf83d7514859d1775b (patch) | |
tree | 9e23f546f72f800c6451a9ab717bed6fa87e2ead /src/cadet/gnunet-service-cadet-new_channel.c | |
parent | 4ed4bcba53601d97793663017efcda877c3c490a (diff) | |
download | gnunet-a1bd2dcc29c126023dbd1ddf83d7514859d1775b.tar.gz gnunet-a1bd2dcc29c126023dbd1ddf83d7514859d1775b.zip |
cadet message struct and type rename-fest
Diffstat (limited to 'src/cadet/gnunet-service-cadet-new_channel.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet-new_channel.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/cadet/gnunet-service-cadet-new_channel.c b/src/cadet/gnunet-service-cadet-new_channel.c index 00bdf569e..fb6379de5 100644 --- a/src/cadet/gnunet-service-cadet-new_channel.c +++ b/src/cadet/gnunet-service-cadet-new_channel.c | |||
@@ -68,7 +68,7 @@ struct ChannelMessageIdentifier | |||
68 | /** | 68 | /** |
69 | * Message to create a Channel. | 69 | * Message to create a Channel. |
70 | */ | 70 | */ |
71 | struct GNUNET_CADET_ChannelCreate | 71 | struct GNUNET_CADET_ChannelCreateMessage |
72 | { | 72 | { |
73 | /** | 73 | /** |
74 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE | 74 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE |
@@ -96,7 +96,7 @@ struct GNUNET_CADET_ChannelCreate | |||
96 | /** | 96 | /** |
97 | * Message for cadet data traffic. | 97 | * Message for cadet data traffic. |
98 | */ | 98 | */ |
99 | struct GNUNET_CADET_Data | 99 | struct GNUNET_CADET_ChannelDataMessage |
100 | { | 100 | { |
101 | /** | 101 | /** |
102 | * Type: #GNUNET_MESSAGE_TYPE_CADET_UNICAST, | 102 | * Type: #GNUNET_MESSAGE_TYPE_CADET_UNICAST, |
@@ -123,10 +123,10 @@ struct GNUNET_CADET_Data | |||
123 | /** | 123 | /** |
124 | * Message to acknowledge end-to-end data. | 124 | * Message to acknowledge end-to-end data. |
125 | */ | 125 | */ |
126 | struct GNUNET_CADET_DataACK | 126 | struct GNUNET_CADET_ChannelDataAckMessage |
127 | { | 127 | { |
128 | /** | 128 | /** |
129 | * Type: #GNUNET_MESSAGE_TYPE_CADET_DATA_ACK | 129 | * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_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_Data data_message; | 222 | struct GNUNET_CADET_ChannelDataMessage data_message; |
223 | 223 | ||
224 | /* followed by variable-size payload */ | 224 | /* followed by variable-size payload */ |
225 | }; | 225 | }; |
@@ -266,7 +266,7 @@ struct CadetChannel | |||
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_CREATE or |
269 | * #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_ACK). Used to cancel | 269 | * #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_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_ChannelCreate msgcc; | 534 | struct GNUNET_CADET_ChannelCreateMessage msgcc; |
535 | uint32_t options; | 535 | uint32_t options; |
536 | 536 | ||
537 | options = 0; | 537 | options = 0; |
@@ -696,9 +696,9 @@ send_ack_cb (void *cls) | |||
696 | static void | 696 | static void |
697 | send_channel_ack (struct CadetChannel *ch) | 697 | send_channel_ack (struct CadetChannel *ch) |
698 | { | 698 | { |
699 | struct GNUNET_CADET_DataACK msg; | 699 | struct GNUNET_CADET_ChannelDataAckMessage msg; |
700 | 700 | ||
701 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_DATA_ACK); | 701 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_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_Data) + payload_size); | 1006 | crm->data_message.header.size = htons (sizeof (struct GNUNET_CADET_ChannelDataMessage) + payload_size); |
1007 | crm->data_message.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_DATA); | 1007 | crm->data_message.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_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; |