aboutsummaryrefslogtreecommitdiff
path: root/src/core/core.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-05-04 22:16:24 +0200
committerChristian Grothoff <christian@grothoff.org>2019-05-04 22:16:24 +0200
commit80f480c752fd8dfa1be51d78fce314d9f0650b50 (patch)
tree459c21a3fde3b5f66194ac9960632de53586c5f0 /src/core/core.h
parent3d2a951fa12546c09809f0a4d7e789ef8e971b03 (diff)
downloadgnunet-80f480c752fd8dfa1be51d78fce314d9f0650b50.tar.gz
gnunet-80f480c752fd8dfa1be51d78fce314d9f0650b50.zip
simplify MQ logic to always carry the same kinds of flags, and extend transport API to pass them to (TNG) service
Diffstat (limited to 'src/core/core.h')
-rw-r--r--src/core/core.h33
1 files changed, 8 insertions, 25 deletions
diff --git a/src/core/core.h b/src/core/core.h
index bc9638706..95d506fbd 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -42,23 +42,23 @@
42 * for handlers that were specifically registered are always 42 * for handlers that were specifically registered are always
43 * transmitted to the client. 43 * transmitted to the client.
44 */ 44 */
45#define GNUNET_CORE_OPTION_NOTHING 0 45#define GNUNET_CORE_OPTION_NOTHING 0
46 46
47/** 47/**
48 * Client cares about connectivity changes. 48 * Client cares about connectivity changes.
49 */ 49 */
50#define GNUNET_CORE_OPTION_SEND_STATUS_CHANGE 4 50#define GNUNET_CORE_OPTION_SEND_STATUS_CHANGE 4
51 51
52/** 52/**
53 * Client wants all inbound messages in full. 53 * Client wants all inbound messages in full.
54 */ 54 */
55#define GNUNET_CORE_OPTION_SEND_FULL_INBOUND 8 55#define GNUNET_CORE_OPTION_SEND_FULL_INBOUND 8
56 56
57/** 57/**
58 * Client just wants the 4-byte message headers of 58 * Client just wants the 4-byte message headers of
59 * all inbound messages. 59 * all inbound messages.
60 */ 60 */
61#define GNUNET_CORE_OPTION_SEND_HDR_INBOUND 16 61#define GNUNET_CORE_OPTION_SEND_HDR_INBOUND 16
62 62
63/** 63/**
64 * Client wants all outbound messages in full. 64 * Client wants all outbound messages in full.
@@ -69,7 +69,7 @@
69 * Client just wants the 4-byte message headers of 69 * Client just wants the 4-byte message headers of
70 * all outbound messages. 70 * all outbound messages.
71 */ 71 */
72#define GNUNET_CORE_OPTION_SEND_HDR_OUTBOUND 64 72#define GNUNET_CORE_OPTION_SEND_HDR_OUTBOUND 64
73 73
74 74
75GNUNET_NETWORK_STRUCT_BEGIN 75GNUNET_NETWORK_STRUCT_BEGIN
@@ -92,7 +92,6 @@ struct InitMessage
92 * Options, see GNUNET_CORE_OPTION_ values. 92 * Options, see GNUNET_CORE_OPTION_ values.
93 */ 93 */
94 uint32_t options GNUNET_PACKED; 94 uint32_t options GNUNET_PACKED;
95
96}; 95};
97 96
98 97
@@ -117,7 +116,6 @@ struct InitReplyMessage
117 * Public key of the local peer. 116 * Public key of the local peer.
118 */ 117 */
119 struct GNUNET_PeerIdentity my_identity; 118 struct GNUNET_PeerIdentity my_identity;
120
121}; 119};
122 120
123 121
@@ -141,7 +139,6 @@ struct ConnectNotifyMessage
141 * Identity of the connecting peer. 139 * Identity of the connecting peer.
142 */ 140 */
143 struct GNUNET_PeerIdentity peer; 141 struct GNUNET_PeerIdentity peer;
144
145}; 142};
146 143
147 144
@@ -165,7 +162,6 @@ struct DisconnectNotifyMessage
165 * Identity of the connecting peer. 162 * Identity of the connecting peer.
166 */ 163 */
167 struct GNUNET_PeerIdentity peer; 164 struct GNUNET_PeerIdentity peer;
168
169}; 165};
170 166
171 167
@@ -236,7 +232,6 @@ struct SendMessageRequest
236 * Counter for this peer to match SMRs to replies. 232 * Counter for this peer to match SMRs to replies.
237 */ 233 */
238 uint16_t smr_id GNUNET_PACKED; 234 uint16_t smr_id GNUNET_PACKED;
239
240}; 235};
241 236
242 237
@@ -269,7 +264,6 @@ struct SendMessageReady
269 * Identity of the intended target. 264 * Identity of the intended target.
270 */ 265 */
271 struct GNUNET_PeerIdentity peer; 266 struct GNUNET_PeerIdentity peer;
272
273}; 267};
274 268
275 269
@@ -285,7 +279,8 @@ struct SendMessage
285 struct GNUNET_MessageHeader header; 279 struct GNUNET_MessageHeader header;
286 280
287 /** 281 /**
288 * How important is this message? 282 * How important is this message? Contains a
283 * `enum GNUNET_MQ_PriorityPreferences` in NBO.
289 */ 284 */
290 uint32_t priority GNUNET_PACKED; 285 uint32_t priority GNUNET_PACKED;
291 286
@@ -299,17 +294,6 @@ struct SendMessage
299 * Identity of the intended receiver. 294 * Identity of the intended receiver.
300 */ 295 */
301 struct GNUNET_PeerIdentity peer; 296 struct GNUNET_PeerIdentity peer;
302
303 /**
304 * #GNUNET_YES if corking is allowed, #GNUNET_NO if not.
305 */
306 uint32_t cork GNUNET_PACKED;
307
308 /**
309 * Always 0.
310 */
311 uint32_t reserved GNUNET_PACKED;
312
313}; 297};
314 298
315 299
@@ -338,7 +322,6 @@ struct MonitorNotifyMessage
338 * How long will we stay in this state (if nothing else happens)? 322 * How long will we stay in this state (if nothing else happens)?
339 */ 323 */
340 struct GNUNET_TIME_AbsoluteNBO timeout; 324 struct GNUNET_TIME_AbsoluteNBO timeout;
341
342}; 325};
343 326
344 327