diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-01-30 14:03:46 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-01-30 14:03:46 +0100 |
commit | 129bc8e9845b4c17e988e0b3ebb3eea5a232e288 (patch) | |
tree | bf72870c06e412350a84648ae551dd8c7d6a0434 /src/cadet/gnunet-service-cadet-new_channel.c | |
parent | 48332ff7d4631f9be2a059c2fe150e3be5fb37f6 (diff) | |
download | gnunet-129bc8e9845b4c17e988e0b3ebb3eea5a232e288.tar.gz gnunet-129bc8e9845b4c17e988e0b3ebb3eea5a232e288.zip |
pass connection tunnel identifier to channel when receiving messages, so that performance can be matched
Diffstat (limited to 'src/cadet/gnunet-service-cadet-new_channel.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet-new_channel.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/cadet/gnunet-service-cadet-new_channel.c b/src/cadet/gnunet-service-cadet-new_channel.c index 7929d3c4b..afce4680f 100644 --- a/src/cadet/gnunet-service-cadet-new_channel.c +++ b/src/cadet/gnunet-service-cadet-new_channel.c | |||
@@ -838,9 +838,11 @@ send_open_ack (void *cls) | |||
838 | * #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK. | 838 | * #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK. |
839 | * | 839 | * |
840 | * @param ch channel that got the duplicate open | 840 | * @param ch channel that got the duplicate open |
841 | * @param cti identifier of the connection that delivered the message | ||
841 | */ | 842 | */ |
842 | void | 843 | void |
843 | GCCH_handle_duplicate_open (struct CadetChannel *ch) | 844 | GCCH_handle_duplicate_open (struct CadetChannel *ch, |
845 | const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti) | ||
844 | { | 846 | { |
845 | if (NULL == ch->dest) | 847 | if (NULL == ch->dest) |
846 | { | 848 | { |
@@ -955,7 +957,8 @@ GCCH_bind (struct CadetChannel *ch, | |||
955 | if (GNUNET_YES == ch->is_loopback) | 957 | if (GNUNET_YES == ch->is_loopback) |
956 | { | 958 | { |
957 | ch->state = CADET_CHANNEL_OPEN_SENT; | 959 | ch->state = CADET_CHANNEL_OPEN_SENT; |
958 | GCCH_handle_channel_open_ack (ch); | 960 | GCCH_handle_channel_open_ack (ch, |
961 | NULL); | ||
959 | } | 962 | } |
960 | else | 963 | else |
961 | { | 964 | { |
@@ -1040,9 +1043,11 @@ GCCH_channel_local_destroy (struct CadetChannel *ch, | |||
1040 | * (the port is open on the other side). Begin transmissions. | 1043 | * (the port is open on the other side). Begin transmissions. |
1041 | * | 1044 | * |
1042 | * @param ch channel to destroy | 1045 | * @param ch channel to destroy |
1046 | * @param cti identifier of the connection that delivered the message | ||
1043 | */ | 1047 | */ |
1044 | void | 1048 | void |
1045 | GCCH_handle_channel_open_ack (struct CadetChannel *ch) | 1049 | GCCH_handle_channel_open_ack (struct CadetChannel *ch, |
1050 | const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti) | ||
1046 | { | 1051 | { |
1047 | switch (ch->state) | 1052 | switch (ch->state) |
1048 | { | 1053 | { |
@@ -1125,10 +1130,12 @@ is_before (void *cls, | |||
1125 | * and send an ACK to the other end (once flow control allows it!) | 1130 | * and send an ACK to the other end (once flow control allows it!) |
1126 | * | 1131 | * |
1127 | * @param ch channel that got data | 1132 | * @param ch channel that got data |
1133 | * @param cti identifier of the connection that delivered the message | ||
1128 | * @param msg message that was received | 1134 | * @param msg message that was received |
1129 | */ | 1135 | */ |
1130 | void | 1136 | void |
1131 | GCCH_handle_channel_plaintext_data (struct CadetChannel *ch, | 1137 | GCCH_handle_channel_plaintext_data (struct CadetChannel *ch, |
1138 | const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti, | ||
1132 | const struct GNUNET_CADET_ChannelAppDataMessage *msg) | 1139 | const struct GNUNET_CADET_ChannelAppDataMessage *msg) |
1133 | { | 1140 | { |
1134 | struct GNUNET_MQ_Envelope *env; | 1141 | struct GNUNET_MQ_Envelope *env; |
@@ -1402,10 +1409,12 @@ handle_matching_ack (struct CadetChannel *ch, | |||
1402 | * Possibly resume transmissions. | 1409 | * Possibly resume transmissions. |
1403 | * | 1410 | * |
1404 | * @param ch channel that got the ack | 1411 | * @param ch channel that got the ack |
1412 | * @param cti identifier of the connection that delivered the message | ||
1405 | * @param ack details about what was received | 1413 | * @param ack details about what was received |
1406 | */ | 1414 | */ |
1407 | void | 1415 | void |
1408 | GCCH_handle_channel_plaintext_data_ack (struct CadetChannel *ch, | 1416 | GCCH_handle_channel_plaintext_data_ack (struct CadetChannel *ch, |
1417 | const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti, | ||
1409 | const struct GNUNET_CADET_ChannelDataAckMessage *ack) | 1418 | const struct GNUNET_CADET_ChannelDataAckMessage *ack) |
1410 | { | 1419 | { |
1411 | struct CadetReliableMessage *crm; | 1420 | struct CadetReliableMessage *crm; |
@@ -1499,9 +1508,12 @@ GCCH_handle_channel_plaintext_data_ack (struct CadetChannel *ch, | |||
1499 | * the tunnel. | 1508 | * the tunnel. |
1500 | * | 1509 | * |
1501 | * @param ch channel to destroy | 1510 | * @param ch channel to destroy |
1511 | * @param cti identifier of the connection that delivered the message, | ||
1512 | * NULL if we are simulating receiving a destroy due to shutdown | ||
1502 | */ | 1513 | */ |
1503 | void | 1514 | void |
1504 | GCCH_handle_remote_destroy (struct CadetChannel *ch) | 1515 | GCCH_handle_remote_destroy (struct CadetChannel *ch, |
1516 | const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti) | ||
1505 | { | 1517 | { |
1506 | struct CadetChannelClient *ccc; | 1518 | struct CadetChannelClient *ccc; |
1507 | 1519 | ||