aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-04-21 14:49:26 +0200
committerChristian Grothoff <christian@grothoff.org>2019-04-21 14:49:26 +0200
commitfe3cc0e1a6f83c6ba4e0e1ec1185f1173ff16570 (patch)
treed3ab1e64f4e7643f059205e8dbf2cbc08295afbe /src/transport/transport.h
parent196435205b803f01976560037c69553ac0e8e307 (diff)
downloadgnunet-fe3cc0e1a6f83c6ba4e0e1ec1185f1173ff16570.tar.gz
gnunet-fe3cc0e1a6f83c6ba4e0e1ec1185f1173ff16570.zip
finish backchannel message delivery
Diffstat (limited to 'src/transport/transport.h')
-rw-r--r--src/transport/transport.h47
1 files changed, 15 insertions, 32 deletions
diff --git a/src/transport/transport.h b/src/transport/transport.h
index b9c61f306..d2a3a262b 100644
--- a/src/transport/transport.h
+++ b/src/transport/transport.h
@@ -54,12 +54,14 @@
54/** 54/**
55 * Maximum frequency for re-evaluating latencies for all transport addresses. 55 * Maximum frequency for re-evaluating latencies for all transport addresses.
56 */ 56 */
57#define LATENCY_EVALUATION_MAX_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 1) 57#define LATENCY_EVALUATION_MAX_DELAY \
58 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 1)
58 59
59/** 60/**
60 * Maximum frequency for re-evaluating latencies for connected addresses. 61 * Maximum frequency for re-evaluating latencies for connected addresses.
61 */ 62 */
62#define CONNECTED_LATENCY_EVALUATION_MAX_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 1) 63#define CONNECTED_LATENCY_EVALUATION_MAX_DELAY \
64 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 1)
63 65
64/** 66/**
65 * Similiar to GNUNET_TRANSPORT_NotifyDisconnect but in and out quotas are 67 * Similiar to GNUNET_TRANSPORT_NotifyDisconnect but in and out quotas are
@@ -71,11 +73,11 @@
71 * @param bandwidth_out outbound bandwidth in NBO 73 * @param bandwidth_out outbound bandwidth in NBO
72 * 74 *
73 */ 75 */
74typedef void 76typedef void (*NotifyConnect) (
75(*NotifyConnect) (void *cls, 77 void *cls,
76 const struct GNUNET_PeerIdentity *peer, 78 const struct GNUNET_PeerIdentity *peer,
77 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 79 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
78 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out); 80 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out);
79 81
80 82
81GNUNET_NETWORK_STRUCT_BEGIN 83GNUNET_NETWORK_STRUCT_BEGIN
@@ -106,7 +108,6 @@ struct StartMessage
106 * receiver should print out an error message and disconnect. 108 * receiver should print out an error message and disconnect.
107 */ 109 */
108 struct GNUNET_PeerIdentity self; 110 struct GNUNET_PeerIdentity self;
109
110}; 111};
111 112
112 113
@@ -155,7 +156,6 @@ struct DisconnectInfoMessage
155 * Who got disconnected? 156 * Who got disconnected?
156 */ 157 */
157 struct GNUNET_PeerIdentity peer; 158 struct GNUNET_PeerIdentity peer;
158
159}; 159};
160 160
161 161
@@ -181,7 +181,6 @@ struct QuotaSetMessage
181 * About which peer are we talking here? 181 * About which peer are we talking here?
182 */ 182 */
183 struct GNUNET_PeerIdentity peer; 183 struct GNUNET_PeerIdentity peer;
184
185}; 184};
186 185
187 186
@@ -201,7 +200,6 @@ struct InboundMessage
201 * Which peer sent the message? 200 * Which peer sent the message?
202 */ 201 */
203 struct GNUNET_PeerIdentity peer; 202 struct GNUNET_PeerIdentity peer;
204
205}; 203};
206 204
207 205
@@ -240,7 +238,6 @@ struct SendOkMessage
240 * Which peer can send more now? 238 * Which peer can send more now?
241 */ 239 */
242 struct GNUNET_PeerIdentity peer; 240 struct GNUNET_PeerIdentity peer;
243
244}; 241};
245 242
246 243
@@ -270,13 +267,11 @@ struct OutboundMessage
270 * Which peer should receive the message? 267 * Which peer should receive the message?
271 */ 268 */
272 struct GNUNET_PeerIdentity peer; 269 struct GNUNET_PeerIdentity peer;
273
274}; 270};
275 271
276 272
277 273#if ! (defined(GNUNET_TRANSPORT_COMMUNICATION_VERSION) || \
278 274 defined(GNUNET_TRANSPORT_CORE_VERSION))
279#if !(defined(GNUNET_TRANSPORT_COMMUNICATION_VERSION)||defined(GNUNET_TRANSPORT_CORE_VERSION))
280 275
281 276
282/** 277/**
@@ -428,7 +423,6 @@ struct ValidationMonitorMessage
428 * The identity of the peer to look up. 423 * The identity of the peer to look up.
429 */ 424 */
430 struct GNUNET_PeerIdentity peer; 425 struct GNUNET_PeerIdentity peer;
431
432}; 426};
433 427
434 428
@@ -452,7 +446,6 @@ struct PeerMonitorMessage
452 * The identity of the peer to look up. 446 * The identity of the peer to look up.
453 */ 447 */
454 struct GNUNET_PeerIdentity peer; 448 struct GNUNET_PeerIdentity peer;
455
456}; 449};
457 450
458 451
@@ -545,7 +538,6 @@ struct PeerIterateResponseMessage
545 * Length of the plugin name 538 * Length of the plugin name
546 */ 539 */
547 uint32_t pluginlen GNUNET_PACKED; 540 uint32_t pluginlen GNUNET_PACKED;
548
549}; 541};
550 542
551 543
@@ -572,7 +564,6 @@ struct BlacklistMessage
572 * Which peer is being blacklisted or queried? 564 * Which peer is being blacklisted or queried?
573 */ 565 */
574 struct GNUNET_PeerIdentity peer; 566 struct GNUNET_PeerIdentity peer;
575
576}; 567};
577 568
578 569
@@ -644,7 +635,6 @@ struct TransportPluginMonitorMessage
644 635
645 /* followed by 0-terminated plugin name and 636 /* followed by 0-terminated plugin name and
646 @e plugin_address_len bytes of plugin address */ 637 @e plugin_address_len bytes of plugin address */
647
648}; 638};
649 639
650#else 640#else
@@ -717,7 +707,6 @@ struct GNUNET_TRANSPORT_DelAddressMessage
717 * Address identifier. 707 * Address identifier.
718 */ 708 */
719 uint32_t aid GNUNET_PACKED; 709 uint32_t aid GNUNET_PACKED;
720
721}; 710};
722 711
723 712
@@ -783,7 +772,6 @@ struct GNUNET_TRANSPORT_IncomingMessageAck
783 * Sender identifier of the original message. 772 * Sender identifier of the original message.
784 */ 773 */
785 struct GNUNET_PeerIdentity sender; 774 struct GNUNET_PeerIdentity sender;
786
787}; 775};
788 776
789 777
@@ -847,7 +835,6 @@ struct GNUNET_TRANSPORT_DelQueueMessage
847 * Receiver that can be addressed via the queue. 835 * Receiver that can be addressed via the queue.
848 */ 836 */
849 struct GNUNET_PeerIdentity receiver; 837 struct GNUNET_PeerIdentity receiver;
850
851}; 838};
852 839
853 840
@@ -883,7 +870,8 @@ struct GNUNET_TRANSPORT_CreateQueueResponse
883{ 870{
884 871
885 /** 872 /**
886 * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_CREATE_OK or #GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_CREATE_FAIL. 873 * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_CREATE_OK or
874 * #GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_CREATE_FAIL.
887 */ 875 */
888 struct GNUNET_MessageHeader header; 876 struct GNUNET_MessageHeader header;
889 877
@@ -949,7 +937,6 @@ struct GNUNET_TRANSPORT_SendMessageToAck
949 * Receiver identifier. 937 * Receiver identifier.
950 */ 938 */
951 struct GNUNET_PeerIdentity receiver; 939 struct GNUNET_PeerIdentity receiver;
952
953}; 940};
954 941
955 942
@@ -990,7 +977,8 @@ struct GNUNET_TRANSPORT_CommunicatorBackchannel
990struct GNUNET_TRANSPORT_CommunicatorBackchannelIncoming 977struct GNUNET_TRANSPORT_CommunicatorBackchannelIncoming
991{ 978{
992 /** 979 /**
993 * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_BACKCHANNEL_INCOMING 980 * Type will be
981 * #GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_BACKCHANNEL_INCOMING
994 */ 982 */
995 struct GNUNET_MessageHeader header; 983 struct GNUNET_MessageHeader header;
996 984
@@ -1006,11 +994,9 @@ struct GNUNET_TRANSPORT_CommunicatorBackchannelIncoming
1006 994
1007 /* Followed by a `struct GNUNET_MessageHeader` with the encapsulated 995 /* Followed by a `struct GNUNET_MessageHeader` with the encapsulated
1008 message to the communicator */ 996 message to the communicator */
1009
1010}; 997};
1011 998
1012 999
1013
1014/** 1000/**
1015 * Request to start monitoring. 1001 * Request to start monitoring.
1016 */ 1002 */
@@ -1031,7 +1017,6 @@ struct GNUNET_TRANSPORT_MonitorStart
1031 * Target identifier to monitor, all zeros for "all peers". 1017 * Target identifier to monitor, all zeros for "all peers".
1032 */ 1018 */
1033 struct GNUNET_PeerIdentity peer; 1019 struct GNUNET_PeerIdentity peer;
1034
1035}; 1020};
1036 1021
1037 1022
@@ -1084,7 +1069,6 @@ struct GNUNET_TRANSPORT_MonitorData
1084 uint32_t num_bytes_pending GNUNET_PACKED; 1069 uint32_t num_bytes_pending GNUNET_PACKED;
1085 1070
1086 /* Followed by 0-terminated address of the peer */ 1071 /* Followed by 0-terminated address of the peer */
1087
1088}; 1072};
1089 1073
1090 1074
@@ -1141,7 +1125,6 @@ struct ExpressPreferenceMessage
1141 * How much bandwidth in bytes/second does the application expect? 1125 * How much bandwidth in bytes/second does the application expect?
1142 */ 1126 */
1143 struct GNUNET_BANDWIDTH_Value32NBO bw; 1127 struct GNUNET_BANDWIDTH_Value32NBO bw;
1144
1145}; 1128};
1146 1129
1147 1130