missing tcp data type
[oweals/gnunet.git] / src / include / gnunet_protocols.h
1 /*
2      This file is part of GNUnet.
3      (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Christian Grothoff (and other contributing authors)
4
5      GNUnet is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published
7      by the Free Software Foundation; either version 2, or (at your
8      option) any later version.
9
10      GNUnet is distributed in the hope that it will be useful, but
11      WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13      General Public License for more details.
14
15      You should have received a copy of the GNU General Public License
16      along with GNUnet; see the file COPYING.  If not, write to the
17      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18      Boston, MA 02111-1307, USA.
19 */
20
21 /**
22  * @file include/gnunet_protocols.h
23  * @brief constants for network protocols
24  * @author Christian Grothoff
25  */
26
27 #ifndef GNUNET_PROTOCOLS_H
28 #define GNUNET_PROTOCOLS_H
29
30 #ifdef __cplusplus
31 extern "C"
32 {
33 #if 0                           /* keep Emacsens' auto-indent happy */
34 }
35 #endif
36 #endif
37
38 /**
39  * Test if service is online.
40  */
41 #define GNUNET_MESSAGE_TYPE_TEST 0
42
43 /**
44  * Request service shutdown.
45  */
46 #define GNUNET_MESSAGE_TYPE_SHUTDOWN 1
47
48
49 /**
50  * Request DNS resolution.
51  */
52 #define GNUNET_MESSAGE_TYPE_RESOLVER_REQUEST 2
53
54 /**
55  * Response to a DNS resolution request.
56  */
57 #define GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE 3
58
59
60 /**
61  * Set a statistical value.
62  */
63 #define GNUNET_MESSAGE_TYPE_STATISTICS_SET 4
64
65 /**
66  * Get a statistical value(s).
67  */
68 #define GNUNET_MESSAGE_TYPE_STATISTICS_GET 5
69
70 /**
71  * Response to a STATISTICS_GET message (with value).
72  */
73 #define GNUNET_MESSAGE_TYPE_STATISTICS_VALUE 6
74
75 /**
76  * Response to a STATISTICS_GET message (end of value stream).
77  */
78 #define GNUNET_MESSAGE_TYPE_STATISTICS_END 7
79
80
81 /**
82  * Request to ARM to start a service.
83  */
84 #define GNUNET_MESSAGE_TYPE_ARM_START 8
85
86 /**
87  * Request to ARM to stop a service.
88  */
89 #define GNUNET_MESSAGE_TYPE_ARM_STOP 9
90
91 /**
92  * Response from ARM: service is now up.
93  */
94 #define GNUNET_MESSAGE_TYPE_ARM_IS_UP 10
95
96 /**
97  * Response from ARM: service is now down.
98  * (failed to start it or shut it down).
99  */
100 #define GNUNET_MESSAGE_TYPE_ARM_IS_DOWN 11
101
102 /**
103  * Response from ARM: service status is unknown.
104  */
105 #define GNUNET_MESSAGE_TYPE_ARM_IS_UNKNOWN 12
106
107
108 /**
109  * HELLO message used for communicating peer addresses.
110  * Managed by libgnunethello.
111  */
112 #define GNUNET_MESSAGE_TYPE_HELLO 16
113
114 /**
115  * FRAGMENT of a larger message.
116  * Managed by libgnunetfragment.
117  */
118 #define GNUNET_MESSAGE_TYPE_FRAGMENT 18
119
120
121 /**
122  * Message from the core saying that the transport
123  * server should start giving it messages.  This
124  * should automatically trigger the transmission of
125  * a HELLO message.
126  */
127 #define GNUNET_MESSAGE_TYPE_TRANSPORT_START 20
128
129 /**
130  * Message from TRANSPORT notifying about a
131  * client that connected to us.
132  */
133 #define GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT 21
134
135 /**
136  * Message from TRANSPORT notifying about a
137  * client that disconnected from us.
138  */
139 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT 22
140
141 /**
142  * Request to TRANSPORT to transmit a message.
143  */
144 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND 23
145
146 /**
147  * Confirmation from TRANSPORT that message for
148  * transmission has been queued (and that the next
149  * message to this peer can now be passed to the
150  * service).  Note that this confirmation does NOT
151  * imply that the message was fully transmitted.
152  */
153 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK 24
154
155 /**
156  * Message from TRANSPORT notifying about a
157  * message that was received.
158  */
159 #define GNUNET_MESSAGE_TYPE_TRANSPORT_RECV 25
160
161 /**
162  * Message telling transport to limit its receive rate.
163  */
164 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA 26
165
166 /**
167  * Message telling transport to try to connect to the
168  * given peer.
169  */
170 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TRY_CONNECT 27
171
172 /**
173  * Response to another peer confirming that communication was
174  * established.
175  */
176 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ACK 28
177
178 /**
179  * Request to look addresses of peers in server.
180  */
181 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_LOOKUP 29
182
183 /**
184  * Response to the address lookup request. 
185  */
186 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_REPLY 30
187
188
189 /**
190  * Request addition of a HELLO
191  */
192 #define GNUNET_MESSAGE_TYPE_PEERINFO_ADD 32
193
194 /**
195  * Request update and listing of a peer.
196  */
197 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET 33
198
199 /**
200  * Request update and listing of all peers.
201  */
202 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET_ALL 34
203
204 /**
205  * Information about one of the peers.
206  */
207 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO 35
208
209 /**
210  * End of information about other peers.
211  */
212 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END 36
213
214 /**
215  * Start notifying this client about all changes to
216  * the known peers until it disconnects.
217  */
218 #define GNUNET_MESSAGE_TYPE_PEERINFO_NOTIFY 37
219
220
221 /**
222  * Welcome message between TCP transports.
223  */
224 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_WELCOME 40
225
226 /**
227  * Welcome message between TCP transports.
228  */
229 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_DATA 41
230
231 /**
232  * Initial setup message from core client to core.
233  */
234 #define GNUNET_MESSAGE_TYPE_CORE_INIT 64
235
236 /**
237  * Response from core to core client to INIT message.
238  */
239 #define GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY 65
240
241 /**
242  * Notify clients about new peer-to-peer connections (before
243  * key exchange and authentication).
244  */
245 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_PRE_CONNECT 66
246
247 /**
248  * Notify clients about new peer-to-peer connections (triggered
249  * after key exchange).
250  */
251 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT 67
252
253 /**
254  * Notify clients about peer disconnecting.
255  */
256 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT 68
257
258 /**
259  * Notify clients about incoming P2P messages.
260  */
261 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND 69
262
263 /**
264  * Notify clients about outgoing P2P transmissions.
265  */
266 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND 70
267
268 /**
269  * Request from client to "configure" P2P connection.
270  */
271 #define GNUNET_MESSAGE_TYPE_CORE_REQUEST_INFO 71
272
273 /**
274  * Response from server about (possibly updated) P2P
275  * connection configuration.
276  */
277 #define GNUNET_MESSAGE_TYPE_CORE_CONFIGURATION_INFO 72
278
279 /**
280  * Request from client with message to transmit.
281  */
282 #define GNUNET_MESSAGE_TYPE_CORE_SEND 73
283
284 /**
285  * Request from client asking to connect to a peer.
286  */
287 #define GNUNET_MESSAGE_TYPE_CORE_REQUEST_CONNECT 74
288
289 /**
290  * Request from client asking to disconnect from a peer.
291  */
292 #define GNUNET_MESSAGE_TYPE_CORE_REQUEST_DISCONNECT 75
293
294
295 /**
296  * Session key exchange between peers.
297  */
298 #define GNUNET_MESSAGE_TYPE_CORE_SET_KEY 80
299
300 /**
301  * Encapsulation for an encrypted message between peers.
302  */
303 #define GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE 81
304
305 /**
306  * Check that other peer is alife (challenge).
307  */
308 #define GNUNET_MESSAGE_TYPE_CORE_PING 82
309
310 /**
311  * Confirmation that other peer is alife.
312  */
313 #define GNUNET_MESSAGE_TYPE_CORE_PONG 83
314
315 /**
316  * Request by the other peer to terminate the connection.
317  */
318 #define GNUNET_MESSAGE_TYPE_CORE_HANGUP 84
319
320 /**
321  * Dummy message send by the topology service to create connections.
322  */
323 #define GNUNET_MESSAGE_TYPE_TOPOLOGY_DUMMY 91
324
325 /**
326  * Message sent by datastore client on join.
327  */
328 #define GNUNET_MESSAGE_TYPE_DATASTORE_RESERVE 92
329
330 /**
331  * Message sent by datastore client on join.
332  */
333 #define GNUNET_MESSAGE_TYPE_DATASTORE_RELEASE_RESERVE 93
334
335 /**
336  * Message sent by datastore to client informing about status
337  * processing a request
338  * (in response to RESERVE, RELEASE_RESERVE, PUT, UPDATE and REMOVE requests).
339  */
340 #define GNUNET_MESSAGE_TYPE_DATASTORE_STATUS 94
341
342 /**
343  * Message sent by datastore client to store data.
344  */
345 #define GNUNET_MESSAGE_TYPE_DATASTORE_PUT 95
346
347 /**
348  * Message sent by datastore client to update data.
349  */
350 #define GNUNET_MESSAGE_TYPE_DATASTORE_UPDATE 96
351
352 /**
353  * Message sent by datastore client to get data.
354  */
355 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET 97
356
357 /**
358  * Message sent by datastore client to get random data.
359  */
360 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET_RANDOM 98
361
362 /**
363  * Message sent by datastore to client providing requested data
364  * (in response to GET or GET_RANDOM request).
365  */
366 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA 99
367
368 /**
369  * Message sent by datastore to client signaling end of matching data.
370  * This message will also be sent for "GET_RANDOM", even though
371  * "GET_RANDOM" returns at most one data item.
372  */
373 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END 100
374
375 /**
376  * Message sent by datastore client to remove data.
377  */
378 #define GNUNET_MESSAGE_TYPE_DATASTORE_REMOVE 101
379
380 /**
381  * Message sent by datastore client to drop the database.
382  */
383 #define GNUNET_MESSAGE_TYPE_DATASTORE_DROP 102
384
385
386 /**
387  * Message sent by fs client to start indexing.
388  */
389 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START 128
390
391 /**
392  * Affirmative response to a request for start indexing.
393  */
394 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK 129
395
396 /**
397  * Response to a request for start indexing that
398  * refuses.
399  */
400 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED 130
401
402 /**
403  * Request from client for list of indexed files.
404  */
405 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_GET 131
406
407 /**
408  * Reply to client with an indexed file name.
409  */
410 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY 132
411
412 /**
413  * Reply to client indicating end of list.
414  */
415 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_END 133
416
417 /**
418  * Request from client to unindex a file.
419  */
420 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX 134
421
422 /**
423  * Reply to client indicating unindex receipt.
424  */
425 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX_OK 135
426
427 /**
428  * Client asks FS service to start a (keyword) search.
429  */
430 #define GNUNET_MESSAGE_TYPE_FS_START_SEARCH 136
431
432 /**
433  * FS service has found content matching this client's
434  * request.
435  */
436 #define GNUNET_MESSAGE_TYPE_FS_CONTENT 137
437
438 /**
439  * P2P request for content (one FS to another).
440  */
441 #define GNUNET_MESSAGE_TYPE_FS_GET 138
442
443 /**
444  * P2P response with content or active
445  * migration of content.
446  */
447 #define GNUNET_MESSAGE_TYPE_FS_PUT 139
448
449 /*
450   TODO:
451   - DV
452   - DHT
453   - applications (FS, VPN, CHAT, TRACEKIT, TBENCH)
454 */
455
456
457 #if 0                           /* keep Emacsens' auto-indent happy */
458 {
459 #endif
460 #ifdef __cplusplus
461 }
462 #endif
463
464 /* ifndef GNUNET_PROTOCOLS_H */
465 #endif
466 /* end of gnunet_protocols.h */