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_connection.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_connection.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet_connection.c | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index 500511ce4..351bf2d3c 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c | |||
@@ -549,7 +549,7 @@ send_ack (struct CadetConnection *c, | |||
549 | { | 549 | { |
550 | struct CadetFlowControl *next_fc; | 550 | struct CadetFlowControl *next_fc; |
551 | struct CadetFlowControl *prev_fc; | 551 | struct CadetFlowControl *prev_fc; |
552 | struct GNUNET_CADET_ACK msg; | 552 | struct GNUNET_CADET_ConnectionEncryptedAckMessage msg; |
553 | uint32_t ack; | 553 | uint32_t ack; |
554 | int delta; | 554 | int delta; |
555 | 555 | ||
@@ -609,7 +609,7 @@ send_ack (struct CadetConnection *c, | |||
609 | 609 | ||
610 | /* Build ACK message and send on conn */ | 610 | /* Build ACK message and send on conn */ |
611 | msg.header.size = htons (sizeof (msg)); | 611 | msg.header.size = htons (sizeof (msg)); |
612 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_ACK); | 612 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK); |
613 | msg.ack = htonl (ack); | 613 | msg.ack = htonl (ack); |
614 | msg.cid = c->id; | 614 | msg.cid = c->id; |
615 | 615 | ||
@@ -730,7 +730,7 @@ conn_message_sent (void *cls, | |||
730 | } | 730 | } |
731 | else /* CONN_CREATE or CONN_ACK */ | 731 | else /* CONN_CREATE or CONN_ACK */ |
732 | { | 732 | { |
733 | GNUNET_assert (GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED != type); | 733 | GNUNET_assert (GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED != type); |
734 | forced = GNUNET_YES; | 734 | forced = GNUNET_YES; |
735 | } | 735 | } |
736 | 736 | ||
@@ -750,14 +750,14 @@ conn_message_sent (void *cls, | |||
750 | switch (type) | 750 | switch (type) |
751 | { | 751 | { |
752 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE: | 752 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE: |
753 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK: | 753 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK: |
754 | c->maintenance_q = NULL; | 754 | c->maintenance_q = NULL; |
755 | /* Don't trigger a keepalive for sent ACKs, only SYN and SYNACKs */ | 755 | /* Don't trigger a keepalive for sent ACKs, only SYN and SYNACKs */ |
756 | if (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE == type || !fwd) | 756 | if (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE == type || !fwd) |
757 | schedule_next_keepalive (c, fwd); | 757 | schedule_next_keepalive (c, fwd); |
758 | break; | 758 | break; |
759 | 759 | ||
760 | case GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED: | 760 | case GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED: |
761 | if (GNUNET_YES == sent) | 761 | if (GNUNET_YES == sent) |
762 | { | 762 | { |
763 | fc->last_pid_sent = pid; | 763 | fc->last_pid_sent = pid; |
@@ -783,12 +783,12 @@ conn_message_sent (void *cls, | |||
783 | } | 783 | } |
784 | break; | 784 | break; |
785 | 785 | ||
786 | case GNUNET_MESSAGE_TYPE_CADET_KX: | 786 | case GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX: |
787 | if (GNUNET_YES == sent) | 787 | if (GNUNET_YES == sent) |
788 | connection_reset_timeout (c, fwd); | 788 | connection_reset_timeout (c, fwd); |
789 | break; | 789 | break; |
790 | 790 | ||
791 | case GNUNET_MESSAGE_TYPE_CADET_POLL: | 791 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL: |
792 | fc->poll_msg = NULL; | 792 | fc->poll_msg = NULL; |
793 | if (2 == c->destroy) | 793 | if (2 == c->destroy) |
794 | { | 794 | { |
@@ -809,7 +809,7 @@ conn_message_sent (void *cls, | |||
809 | LOG (GNUNET_ERROR_TYPE_DEBUG, " task %u\n", fc->poll_task); | 809 | LOG (GNUNET_ERROR_TYPE_DEBUG, " task %u\n", fc->poll_task); |
810 | break; | 810 | break; |
811 | 811 | ||
812 | case GNUNET_MESSAGE_TYPE_CADET_ACK: | 812 | case GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK: |
813 | fc->ack_msg = NULL; | 813 | fc->ack_msg = NULL; |
814 | break; | 814 | break; |
815 | 815 | ||
@@ -1029,10 +1029,10 @@ is_fwd (const struct CadetConnection *c, | |||
1029 | static void | 1029 | static void |
1030 | send_connection_ack (struct CadetConnection *c, int fwd) | 1030 | send_connection_ack (struct CadetConnection *c, int fwd) |
1031 | { | 1031 | { |
1032 | struct GNUNET_CADET_ConnectionACK msg; | 1032 | struct GNUNET_CADET_ConnectionCreateMessageAckMessage msg; |
1033 | struct CadetTunnel *t; | 1033 | struct CadetTunnel *t; |
1034 | const uint16_t size = sizeof (struct GNUNET_CADET_ConnectionACK); | 1034 | const uint16_t size = sizeof (struct GNUNET_CADET_ConnectionCreateMessageAckMessage); |
1035 | const uint16_t type = GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK; | 1035 | const uint16_t type = GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK; |
1036 | 1036 | ||
1037 | GCC_check_connections (); | 1037 | GCC_check_connections (); |
1038 | t = c->t; | 1038 | t = c->t; |
@@ -1047,7 +1047,7 @@ send_connection_ack (struct CadetConnection *c, int fwd) | |||
1047 | 1047 | ||
1048 | GNUNET_assert (NULL == c->maintenance_q); | 1048 | GNUNET_assert (NULL == c->maintenance_q); |
1049 | c->maintenance_q = GCP_send (get_hop (c, fwd), &msg.header, | 1049 | c->maintenance_q = GCP_send (get_hop (c, fwd), &msg.header, |
1050 | GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK, 0, | 1050 | GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK, 0, |
1051 | c, fwd, | 1051 | c, fwd, |
1052 | &conn_message_sent, NULL); | 1052 | &conn_message_sent, NULL); |
1053 | LOG (GNUNET_ERROR_TYPE_DEBUG, " C_P+ %p %u (conn`ACK)\n", | 1053 | LOG (GNUNET_ERROR_TYPE_DEBUG, " C_P+ %p %u (conn`ACK)\n", |
@@ -1076,10 +1076,10 @@ send_broken (struct CadetConnection *c, | |||
1076 | const struct GNUNET_PeerIdentity *id2, | 1076 | const struct GNUNET_PeerIdentity *id2, |
1077 | int fwd) | 1077 | int fwd) |
1078 | { | 1078 | { |
1079 | struct GNUNET_CADET_ConnectionBroken msg; | 1079 | struct GNUNET_CADET_ConnectionBrokenMessage msg; |
1080 | 1080 | ||
1081 | GCC_check_connections (); | 1081 | GCC_check_connections (); |
1082 | msg.header.size = htons (sizeof (struct GNUNET_CADET_ConnectionBroken)); | 1082 | msg.header.size = htons (sizeof (struct GNUNET_CADET_ConnectionBrokenMessage)); |
1083 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN); | 1083 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN); |
1084 | msg.cid = c->id; | 1084 | msg.cid = c->id; |
1085 | msg.reserved = htonl (0); | 1085 | msg.reserved = htonl (0); |
@@ -1106,13 +1106,13 @@ send_broken_unknown (const struct GNUNET_CADET_ConnectionTunnelIdentifier *conne | |||
1106 | const struct GNUNET_PeerIdentity *id2, | 1106 | const struct GNUNET_PeerIdentity *id2, |
1107 | struct CadetPeer *neighbor) | 1107 | struct CadetPeer *neighbor) |
1108 | { | 1108 | { |
1109 | struct GNUNET_CADET_ConnectionBroken msg; | 1109 | struct GNUNET_CADET_ConnectionBrokenMessage msg; |
1110 | 1110 | ||
1111 | GCC_check_connections (); | 1111 | GCC_check_connections (); |
1112 | LOG (GNUNET_ERROR_TYPE_INFO, "--> BROKEN on unknown connection %s\n", | 1112 | LOG (GNUNET_ERROR_TYPE_INFO, "--> BROKEN on unknown connection %s\n", |
1113 | GNUNET_sh2s (&connection_id->connection_of_tunnel)); | 1113 | GNUNET_sh2s (&connection_id->connection_of_tunnel)); |
1114 | 1114 | ||
1115 | msg.header.size = htons (sizeof (struct GNUNET_CADET_ConnectionBroken)); | 1115 | msg.header.size = htons (sizeof (struct GNUNET_CADET_ConnectionBrokenMessage)); |
1116 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN); | 1116 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN); |
1117 | msg.cid = *connection_id; | 1117 | msg.cid = *connection_id; |
1118 | msg.reserved = htonl (0); | 1118 | msg.reserved = htonl (0); |
@@ -1161,7 +1161,7 @@ send_connection_keepalive (struct CadetConnection *c, int fwd) | |||
1161 | 1161 | ||
1162 | GNUNET_assert (NULL != c->t); | 1162 | GNUNET_assert (NULL != c->t); |
1163 | msg.size = htons (sizeof (msg)); | 1163 | msg.size = htons (sizeof (msg)); |
1164 | msg.type = htons (GNUNET_MESSAGE_TYPE_CADET_KEEPALIVE); | 1164 | msg.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_KEEPALIVE); |
1165 | 1165 | ||
1166 | GNUNET_assert (NULL == | 1166 | GNUNET_assert (NULL == |
1167 | GCT_send_prebuilt_message (&msg, c->t, c, | 1167 | GCT_send_prebuilt_message (&msg, c->t, c, |
@@ -1419,7 +1419,7 @@ static void | |||
1419 | send_poll (void *cls) | 1419 | send_poll (void *cls) |
1420 | { | 1420 | { |
1421 | struct CadetFlowControl *fc = cls; | 1421 | struct CadetFlowControl *fc = cls; |
1422 | struct GNUNET_CADET_Poll msg; | 1422 | struct GNUNET_CADET_ConnectionHopByHopPollMessage msg; |
1423 | struct CadetConnection *c; | 1423 | struct CadetConnection *c; |
1424 | int fwd; | 1424 | int fwd; |
1425 | 1425 | ||
@@ -1430,7 +1430,7 @@ send_poll (void *cls) | |||
1430 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Polling connection %s %s\n", | 1430 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Polling connection %s %s\n", |
1431 | GCC_2s (c), GC_f2s (fwd)); | 1431 | GCC_2s (c), GC_f2s (fwd)); |
1432 | 1432 | ||
1433 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_POLL); | 1433 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL); |
1434 | msg.header.size = htons (sizeof (msg)); | 1434 | msg.header.size = htons (sizeof (msg)); |
1435 | msg.cid = c->id; | 1435 | msg.cid = c->id; |
1436 | msg.pid = htonl (fc->last_pid_sent); | 1436 | msg.pid = htonl (fc->last_pid_sent); |
@@ -1848,7 +1848,7 @@ log_message (const struct GNUNET_MessageHeader *message, | |||
1848 | switch (type) | 1848 | switch (type) |
1849 | { | 1849 | { |
1850 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE: | 1850 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE: |
1851 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK: | 1851 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK: |
1852 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN: | 1852 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN: |
1853 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY: | 1853 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY: |
1854 | arrow = "=="; | 1854 | arrow = "=="; |
@@ -1877,7 +1877,7 @@ log_message (const struct GNUNET_MessageHeader *message, | |||
1877 | */ | 1877 | */ |
1878 | void | 1878 | void |
1879 | GCC_handle_create (struct CadetPeer *peer, | 1879 | GCC_handle_create (struct CadetPeer *peer, |
1880 | const struct GNUNET_CADET_ConnectionCreate *msg) | 1880 | const struct GNUNET_CADET_ConnectionCreateMessage *msg) |
1881 | { | 1881 | { |
1882 | const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid; | 1882 | const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid; |
1883 | struct GNUNET_PeerIdentity *id; | 1883 | struct GNUNET_PeerIdentity *id; |
@@ -1892,7 +1892,7 @@ GCC_handle_create (struct CadetPeer *peer, | |||
1892 | size = ntohs (msg->header.size); | 1892 | size = ntohs (msg->header.size); |
1893 | 1893 | ||
1894 | /* Calculate hops */ | 1894 | /* Calculate hops */ |
1895 | size -= sizeof (struct GNUNET_CADET_ConnectionCreate); | 1895 | size -= sizeof (struct GNUNET_CADET_ConnectionCreateMessage); |
1896 | if (0 != size % sizeof (struct GNUNET_PeerIdentity)) | 1896 | if (0 != size % sizeof (struct GNUNET_PeerIdentity)) |
1897 | { | 1897 | { |
1898 | GNUNET_break_op (0); | 1898 | GNUNET_break_op (0); |
@@ -2017,7 +2017,7 @@ GCC_handle_create (struct CadetPeer *peer, | |||
2017 | */ | 2017 | */ |
2018 | void | 2018 | void |
2019 | GCC_handle_confirm (struct CadetPeer *peer, | 2019 | GCC_handle_confirm (struct CadetPeer *peer, |
2020 | const struct GNUNET_CADET_ConnectionACK *msg) | 2020 | const struct GNUNET_CADET_ConnectionCreateMessageAckMessage *msg) |
2021 | { | 2021 | { |
2022 | struct CadetConnection *c; | 2022 | struct CadetConnection *c; |
2023 | enum CadetConnectionState oldstate; | 2023 | enum CadetConnectionState oldstate; |
@@ -2141,7 +2141,7 @@ GCC_handle_confirm (struct CadetPeer *peer, | |||
2141 | */ | 2141 | */ |
2142 | void | 2142 | void |
2143 | GCC_handle_broken (struct CadetPeer *peer, | 2143 | GCC_handle_broken (struct CadetPeer *peer, |
2144 | const struct GNUNET_CADET_ConnectionBroken *msg) | 2144 | const struct GNUNET_CADET_ConnectionBrokenMessage *msg) |
2145 | { | 2145 | { |
2146 | struct CadetConnection *c; | 2146 | struct CadetConnection *c; |
2147 | struct CadetTunnel *t; | 2147 | struct CadetTunnel *t; |
@@ -2212,7 +2212,7 @@ GCC_handle_broken (struct CadetPeer *peer, | |||
2212 | */ | 2212 | */ |
2213 | void | 2213 | void |
2214 | GCC_handle_destroy (struct CadetPeer *peer, | 2214 | GCC_handle_destroy (struct CadetPeer *peer, |
2215 | const struct GNUNET_CADET_ConnectionDestroy *msg) | 2215 | const struct GNUNET_CADET_ConnectionDestroyMessage *msg) |
2216 | { | 2216 | { |
2217 | struct CadetConnection *c; | 2217 | struct CadetConnection *c; |
2218 | int fwd; | 2218 | int fwd; |
@@ -2274,7 +2274,7 @@ GCC_handle_destroy (struct CadetPeer *peer, | |||
2274 | */ | 2274 | */ |
2275 | void | 2275 | void |
2276 | GCC_handle_ack (struct CadetPeer *peer, | 2276 | GCC_handle_ack (struct CadetPeer *peer, |
2277 | const struct GNUNET_CADET_ACK *msg) | 2277 | const struct GNUNET_CADET_ConnectionEncryptedAckMessage *msg) |
2278 | { | 2278 | { |
2279 | struct CadetConnection *c; | 2279 | struct CadetConnection *c; |
2280 | struct CadetFlowControl *fc; | 2280 | struct CadetFlowControl *fc; |
@@ -2343,7 +2343,7 @@ GCC_handle_ack (struct CadetPeer *peer, | |||
2343 | */ | 2343 | */ |
2344 | void | 2344 | void |
2345 | GCC_handle_poll (struct CadetPeer *peer, | 2345 | GCC_handle_poll (struct CadetPeer *peer, |
2346 | const struct GNUNET_CADET_Poll *msg) | 2346 | const struct GNUNET_CADET_ConnectionHopByHopPollMessage *msg) |
2347 | { | 2347 | { |
2348 | struct CadetConnection *c; | 2348 | struct CadetConnection *c; |
2349 | struct CadetFlowControl *fc; | 2349 | struct CadetFlowControl *fc; |
@@ -2466,7 +2466,7 @@ check_message (const struct GNUNET_MessageHeader *message, | |||
2466 | 2466 | ||
2467 | /* Check PID for payload messages */ | 2467 | /* Check PID for payload messages */ |
2468 | type = ntohs (message->type); | 2468 | type = ntohs (message->type); |
2469 | if (GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED == type) | 2469 | if (GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED == type) |
2470 | { | 2470 | { |
2471 | fc = fwd ? &c->bck_fc : &c->fwd_fc; | 2471 | fc = fwd ? &c->bck_fc : &c->fwd_fc; |
2472 | LOG (GNUNET_ERROR_TYPE_DEBUG, " PID %u (expected in interval [%u,%u])\n", | 2472 | LOG (GNUNET_ERROR_TYPE_DEBUG, " PID %u (expected in interval [%u,%u])\n", |
@@ -2537,7 +2537,7 @@ check_message (const struct GNUNET_MessageHeader *message, | |||
2537 | */ | 2537 | */ |
2538 | void | 2538 | void |
2539 | GCC_handle_kx (struct CadetPeer *peer, | 2539 | GCC_handle_kx (struct CadetPeer *peer, |
2540 | const struct GNUNET_CADET_KX *msg) | 2540 | const struct GNUNET_CADET_TunnelKeyExchangeMessage *msg) |
2541 | { | 2541 | { |
2542 | const struct GNUNET_CADET_ConnectionTunnelIdentifier* cid; | 2542 | const struct GNUNET_CADET_ConnectionTunnelIdentifier* cid; |
2543 | struct CadetConnection *c; | 2543 | struct CadetConnection *c; |
@@ -2594,7 +2594,7 @@ GCC_handle_kx (struct CadetPeer *peer, | |||
2594 | */ | 2594 | */ |
2595 | void | 2595 | void |
2596 | GCC_handle_encrypted (struct CadetPeer *peer, | 2596 | GCC_handle_encrypted (struct CadetPeer *peer, |
2597 | const struct GNUNET_CADET_Encrypted *msg) | 2597 | const struct GNUNET_CADET_ConnectionEncryptedMessage *msg) |
2598 | { | 2598 | { |
2599 | const struct GNUNET_CADET_ConnectionTunnelIdentifier* cid; | 2599 | const struct GNUNET_CADET_ConnectionTunnelIdentifier* cid; |
2600 | struct CadetConnection *c; | 2600 | struct CadetConnection *c; |
@@ -3227,7 +3227,7 @@ GCC_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | |||
3227 | GC_f2s(fwd), size); | 3227 | GC_f2s(fwd), size); |
3228 | switch (type) | 3228 | switch (type) |
3229 | { | 3229 | { |
3230 | case GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED: | 3230 | case GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED: |
3231 | LOG (GNUNET_ERROR_TYPE_DEBUG, " Q_N+ %p %u, PIDsnt: %u, ACKrcv: %u\n", | 3231 | LOG (GNUNET_ERROR_TYPE_DEBUG, " Q_N+ %p %u, PIDsnt: %u, ACKrcv: %u\n", |
3232 | fc, fc->queue_n, fc->last_pid_sent, fc->last_ack_recv); | 3232 | fc, fc->queue_n, fc->last_pid_sent, fc->last_ack_recv); |
3233 | if (GNUNET_NO == force) | 3233 | if (GNUNET_NO == force) |
@@ -3236,18 +3236,18 @@ GCC_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | |||
3236 | } | 3236 | } |
3237 | break; | 3237 | break; |
3238 | 3238 | ||
3239 | case GNUNET_MESSAGE_TYPE_CADET_KX: | 3239 | case GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX: |
3240 | /* nothing to do here */ | 3240 | /* nothing to do here */ |
3241 | break; | 3241 | break; |
3242 | 3242 | ||
3243 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE: | 3243 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE: |
3244 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK: | 3244 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK: |
3245 | /* Should've only be used for restransmissions. */ | 3245 | /* Should've only be used for restransmissions. */ |
3246 | GNUNET_break (0 == payload_type); | 3246 | GNUNET_break (0 == payload_type); |
3247 | break; | 3247 | break; |
3248 | 3248 | ||
3249 | case GNUNET_MESSAGE_TYPE_CADET_ACK: | 3249 | case GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK: |
3250 | case GNUNET_MESSAGE_TYPE_CADET_POLL: | 3250 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL: |
3251 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY: | 3251 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY: |
3252 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN: | 3252 | case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN: |
3253 | GNUNET_assert (GNUNET_YES == force); | 3253 | GNUNET_assert (GNUNET_YES == force); |
@@ -3265,7 +3265,7 @@ GCC_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | |||
3265 | GNUNET_break (0); | 3265 | GNUNET_break (0); |
3266 | LOG (GNUNET_ERROR_TYPE_DEBUG, "queue full: %u/%u\n", | 3266 | LOG (GNUNET_ERROR_TYPE_DEBUG, "queue full: %u/%u\n", |
3267 | fc->queue_n, fc->queue_max); | 3267 | fc->queue_n, fc->queue_max); |
3268 | if (GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED == type) | 3268 | if (GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED == type) |
3269 | { | 3269 | { |
3270 | fc->queue_n--; | 3270 | fc->queue_n--; |
3271 | } | 3271 | } |
@@ -3331,15 +3331,15 @@ GCC_send_create (struct CadetConnection *c) | |||
3331 | size_t size; | 3331 | size_t size; |
3332 | 3332 | ||
3333 | GCC_check_connections (); | 3333 | GCC_check_connections (); |
3334 | size = sizeof (struct GNUNET_CADET_ConnectionCreate); | 3334 | size = sizeof (struct GNUNET_CADET_ConnectionCreateMessage); |
3335 | size += c->path->length * sizeof (struct GNUNET_PeerIdentity); | 3335 | size += c->path->length * sizeof (struct GNUNET_PeerIdentity); |
3336 | { | 3336 | { |
3337 | /* Allocate message on the stack */ | 3337 | /* Allocate message on the stack */ |
3338 | unsigned char cbuf[size]; | 3338 | unsigned char cbuf[size]; |
3339 | struct GNUNET_CADET_ConnectionCreate *msg; | 3339 | struct GNUNET_CADET_ConnectionCreateMessage *msg; |
3340 | struct GNUNET_PeerIdentity *peers; | 3340 | struct GNUNET_PeerIdentity *peers; |
3341 | 3341 | ||
3342 | msg = (struct GNUNET_CADET_ConnectionCreate *) cbuf; | 3342 | msg = (struct GNUNET_CADET_ConnectionCreateMessage *) cbuf; |
3343 | msg->header.size = htons (size); | 3343 | msg->header.size = htons (size); |
3344 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE); | 3344 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE); |
3345 | msg->reserved = htonl (0); | 3345 | msg->reserved = htonl (0); |
@@ -3449,7 +3449,7 @@ GCC_send_ack (struct CadetConnection *c, int fwd, int force) | |||
3449 | void | 3449 | void |
3450 | GCC_send_destroy (struct CadetConnection *c) | 3450 | GCC_send_destroy (struct CadetConnection *c) |
3451 | { | 3451 | { |
3452 | struct GNUNET_CADET_ConnectionDestroy msg; | 3452 | struct GNUNET_CADET_ConnectionDestroyMessage msg; |
3453 | 3453 | ||
3454 | if (GNUNET_YES == c->destroy) | 3454 | if (GNUNET_YES == c->destroy) |
3455 | return; | 3455 | return; |