vminko: implementing BINDTO option for hostlist service (#2140)
[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, 2010 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  * UTIL message types
40  ******************************************************************************/
41
42 /**
43  * Test if service is online.
44  */
45 #define GNUNET_MESSAGE_TYPE_TEST 1
46
47 /**
48  * Dummy messages for testing / benchmarking.
49  */
50 #define GNUNET_MESSAGE_TYPE_DUMMY 2
51
52 /*******************************************************************************
53  * RESOLVER message types
54  ******************************************************************************/
55
56 /**
57  * Request DNS resolution.
58  */
59 #define GNUNET_MESSAGE_TYPE_RESOLVER_REQUEST 4
60
61 /**
62  * Response to a DNS resolution request.
63  */
64 #define GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE 5
65
66 /*******************************************************************************
67  * ARM message types
68  ******************************************************************************/
69
70 /**
71  * Request to ARM to start a service.
72  */
73 #define GNUNET_MESSAGE_TYPE_ARM_START 8
74
75 /**
76  * Request to ARM to stop a service.
77  */
78 #define GNUNET_MESSAGE_TYPE_ARM_STOP 9
79
80 /**
81  * Request ARM service itself to shutdown.
82  */
83 #define GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN 10
84
85 /**
86  * Response from ARM.
87  */
88 #define GNUNET_MESSAGE_TYPE_ARM_RESULT 11
89
90 /**
91  * Request to ARM to list all currently running services
92  */
93 #define GNUNET_MESSAGE_TYPE_ARM_LIST 12
94
95 /**
96  * Response from ARM for listing currently running services
97  */
98 #define GNUNET_MESSAGE_TYPE_ARM_LIST_RESULT 13
99
100 /*******************************************************************************
101  * HELLO message types
102  ******************************************************************************/
103
104 /**
105  * HELLO message used for communicating peer addresses.
106  * Managed by libgnunethello.
107  */
108 #define GNUNET_MESSAGE_TYPE_HELLO 16
109
110 /*******************************************************************************
111  * FRAGMENTATION message types
112  ******************************************************************************/
113
114 /**
115  * FRAGMENT of a larger message.
116  * Managed by libgnunetfragment.
117  */
118 #define GNUNET_MESSAGE_TYPE_FRAGMENT 18
119
120 /**
121  * Acknowledgement of a FRAGMENT of a larger message.
122  * Managed by libgnunetfragment.
123  */
124 #define GNUNET_MESSAGE_TYPE_FRAGMENT_ACK 19
125
126 /*******************************************************************************
127  * Transport-WLAN message types
128  ******************************************************************************/
129
130 /**
131  * Type of messages between the gnunet-wlan-helper and the daemon
132  *
133  */
134 #define GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA 40
135
136 /**
137  * Control messages between the gnunet-wlan-helper and the daemon
138  */
139
140 #define GNUNET_MESSAGE_TYPE_WLAN_HELPER_CONTROL 41
141
142 /**
143  * Type of messages for advertisement over wlan
144  */
145 #define GNUNET_MESSAGE_TYPE_WLAN_ADVERTISEMENT 42
146
147 /**
148  * Type of messages for data over the wlan
149  */
150 #define GNUNET_MESSAGE_TYPE_WLAN_DATA 43
151
152
153 /*******************************************************************************
154  * Transport-DV message types
155  ******************************************************************************/
156
157 /**
158  * DV service to DV Plugin message, when a message is
159  * unwrapped by the DV service and handed to the plugin
160  * for processing
161  */
162 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_RECEIVE 44
163
164 /**
165  * DV Plugin to DV service message, indicating a message
166  * should be sent out.
167  */
168 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_SEND 45
169
170 /**
171  * DV service to DV api message, containing a confirmation
172  * or failure of a DV_SEND message.
173  */
174 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_SEND_RESULT 46
175
176 /**
177  * P2P DV message encapsulating some real message
178  */
179 #define GNUNET_MESSAGE_TYPE_DV_DATA 47
180
181 /**
182  * P2P DV message gossipping peer information
183  */
184 #define GNUNET_MESSAGE_TYPE_DV_GOSSIP 48
185
186 /**
187  * DV Plugin to DV service message, indicating
188  * startup.
189  */
190 #define GNUNET_MESSAGE_TYPE_DV_START 49
191
192 /**
193  * P2P DV message notifying connected peers of a disconnect
194  */
195 #define GNUNET_MESSAGE_TYPE_DV_DISCONNECT 50
196
197 /*******************************************************************************
198  * Transport-UDP message types
199  ******************************************************************************/
200
201 /**
202  * Normal UDP message type.
203  */
204 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_MESSAGE 56
205
206 /**
207  * UDP ACK.
208  */
209 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_ACK 57
210
211 /*******************************************************************************
212  * Transport-TCP message types
213  ******************************************************************************/
214
215 /**
216  * TCP NAT probe message, send from NAT'd peer to
217  * other peer to establish bi-directional communication
218  */
219 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_NAT_PROBE 60
220
221 /**
222  * Welcome message between TCP transports.
223  */
224 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_WELCOME 61
225
226 /**
227  * Message to force transport to update bandwidth assignment (LEGACY)
228  */
229 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ATS 62
230
231 /*******************************************************************************
232  * NAT message types
233  ******************************************************************************/
234
235 /**
236  * Message to ask NAT server to perform traversal test
237  */
238 #define GNUNET_MESSAGE_TYPE_NAT_TEST 63
239
240 /*******************************************************************************
241  * CORE message types
242  ******************************************************************************/
243
244 /**
245  * Initial setup message from core client to core.
246  */
247 #define GNUNET_MESSAGE_TYPE_CORE_INIT 64
248
249 /**
250  * Response from core to core client to INIT message.
251  */
252 #define GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY 65
253
254 /**
255  * Notify clients about new peer-to-peer connections (before
256  * key exchange and authentication).
257  */
258 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_PRE_CONNECT 66
259
260 /**
261  * Notify clients about new peer-to-peer connections (triggered
262  * after key exchange).
263  */
264 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT 67
265
266 /**
267  * Notify clients about peer disconnecting.
268  */
269 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT 68
270
271 /**
272  * Notify clients about peer status change.
273  */
274 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_STATUS_CHANGE 69
275
276 /**
277  * Notify clients about incoming P2P messages.
278  */
279 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND 70
280
281 /**
282  * Notify clients about outgoing P2P transmissions.
283  */
284 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND 71
285
286 /**
287  * Request from client to transmit message.
288  */
289 #define GNUNET_MESSAGE_TYPE_CORE_SEND_REQUEST 74
290
291 /**
292  * Confirmation from core that message can now be sent
293  */
294 #define GNUNET_MESSAGE_TYPE_CORE_SEND_READY 75
295
296 /**
297  * Client with message to transmit (after SEND_READY confirmation
298  * was received).
299  */
300 #define GNUNET_MESSAGE_TYPE_CORE_SEND 76
301
302
303 /**
304  * Request for peer iteration from CORE service.
305  */
306 #define GNUNET_MESSAGE_TYPE_CORE_ITERATE_PEERS 78
307
308 /**
309  * Last reply from core to request for peer iteration from CORE service.
310  */
311 #define GNUNET_MESSAGE_TYPE_CORE_ITERATE_PEERS_END 79
312
313 /**
314  * Check whether a given peer is currently connected to CORE.
315  */
316 #define GNUNET_MESSAGE_TYPE_CORE_PEER_CONNECTED 80
317
318 /**
319  * Session key exchange between peers.
320  */
321 #define GNUNET_MESSAGE_TYPE_CORE_SET_KEY 81
322
323 /**
324  * Encapsulation for an encrypted message between peers.
325  */
326 #define GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE 82
327
328 /**
329  * Check that other peer is alive (challenge).
330  */
331 #define GNUNET_MESSAGE_TYPE_CORE_PING 83
332
333 /**
334  * Confirmation that other peer is alive.
335  */
336 #define GNUNET_MESSAGE_TYPE_CORE_PONG 84
337
338 /**
339  * Request by the other peer to terminate the connection.
340  */
341 #define GNUNET_MESSAGE_TYPE_CORE_HANGUP 85
342
343 /**
344  * gzip-compressed type map of the sender
345  */
346 #define GNUNET_MESSAGE_TYPE_CORE_COMPRESSED_TYPE_MAP 86
347
348 /**
349  * uncompressed type map of the sender
350  */
351 #define GNUNET_MESSAGE_TYPE_CORE_BINARY_TYPE_MAP 87
352
353 /*******************************************************************************
354  * DATASTORE message types
355  ******************************************************************************/
356
357 /**
358  * Message sent by datastore client on join.
359  */
360 #define GNUNET_MESSAGE_TYPE_DATASTORE_RESERVE 92
361
362 /**
363  * Message sent by datastore client on join.
364  */
365 #define GNUNET_MESSAGE_TYPE_DATASTORE_RELEASE_RESERVE 93
366
367 /**
368  * Message sent by datastore to client informing about status
369  * processing a request
370  * (in response to RESERVE, RELEASE_RESERVE, PUT, UPDATE and REMOVE requests).
371  */
372 #define GNUNET_MESSAGE_TYPE_DATASTORE_STATUS 94
373
374 /**
375  * Message sent by datastore client to store data.
376  */
377 #define GNUNET_MESSAGE_TYPE_DATASTORE_PUT 95
378
379 /**
380  * Message sent by datastore client to update data.
381  */
382 #define GNUNET_MESSAGE_TYPE_DATASTORE_UPDATE 96
383
384 /**
385  * Message sent by datastore client to get data.
386  */
387 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET 97
388
389 /**
390  * Message sent by datastore client to get random data.
391  */
392 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET_REPLICATION 98
393
394 /**
395  * Message sent by datastore client to get random data.
396  */
397 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET_ZERO_ANONYMITY 99
398
399 /**
400  * Message sent by datastore to client providing requested data
401  * (in response to GET or GET_RANDOM request).
402  */
403 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA 100
404
405 /**
406  * Message sent by datastore to client signaling end of matching data.
407  * This message will also be sent for "GET_RANDOM", even though
408  * "GET_RANDOM" returns at most one data item.
409  */
410 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END 101
411
412 /**
413  * Message sent by datastore client to remove data.
414  */
415 #define GNUNET_MESSAGE_TYPE_DATASTORE_REMOVE 102
416
417 /**
418  * Message sent by datastore client to drop the database.
419  */
420 #define GNUNET_MESSAGE_TYPE_DATASTORE_DROP 103
421
422
423 /*******************************************************************************
424  * FS message types
425  ******************************************************************************/
426
427 /**
428  * Message sent by fs client to start indexing.
429  */
430 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START 128
431
432 /**
433  * Affirmative response to a request for start indexing.
434  */
435 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK 129
436
437 /**
438  * Response to a request for start indexing that
439  * refuses.
440  */
441 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED 130
442
443 /**
444  * Request from client for list of indexed files.
445  */
446 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_GET 131
447
448 /**
449  * Reply to client with an indexed file name.
450  */
451 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY 132
452
453 /**
454  * Reply to client indicating end of list.
455  */
456 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_END 133
457
458 /**
459  * Request from client to unindex a file.
460  */
461 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX 134
462
463 /**
464  * Reply to client indicating unindex receipt.
465  */
466 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX_OK 135
467
468 /**
469  * Client asks FS service to start a (keyword) search.
470  */
471 #define GNUNET_MESSAGE_TYPE_FS_START_SEARCH 136
472
473 /**
474  * P2P request for content (one FS to another).
475  */
476 #define GNUNET_MESSAGE_TYPE_FS_GET 137
477
478 /**
479  * P2P response with content or active migration of content.  Also
480  * used between the service and clients (in response to START_SEARCH).
481  */
482 #define GNUNET_MESSAGE_TYPE_FS_PUT 138
483
484 /**
485  * Peer asks us to stop migrating content towards it for a while.
486  */
487 #define GNUNET_MESSAGE_TYPE_FS_MIGRATION_STOP 139
488
489
490 /*******************************************************************************
491  * DHT message types
492  ******************************************************************************/
493
494 /**
495  * Client wants to store item in DHT.
496  */
497 #define GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT 142
498
499 /**
500  * Client wants to lookup item in DHT.
501  */
502 #define GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET 143
503
504 /**
505  * Client wants to stop search in DHT.
506  */
507 #define GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_STOP 144
508
509 /**
510  * Service returns result to client.
511  */
512 #define GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT 145
513
514 /**
515  * Peer is storing data in DHT.
516  */
517 #define GNUNET_MESSAGE_TYPE_DHT_P2P_PUT 146
518
519 /**
520  * Peer tries to find data in DHT.
521  */
522 #define GNUNET_MESSAGE_TYPE_DHT_P2P_GET 147
523
524 /**
525  * Data is returned to peer from DHT.
526  */
527 #define GNUNET_MESSAGE_TYPE_DHT_P2P_RESULT 148
528
529 /**
530  * Request / receive information about transiting GETs
531  */
532 #define GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET             149
533
534 /**
535  * Request / receive information about transiting GET responses
536  */
537 #define GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET_RESP        150
538
539 /**
540  * Request / receive information about transiting PUTs
541  */
542 #define GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT             151
543
544 /**
545  * Request / receive information about transiting PUT responses (TODO)
546  */
547 #define GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT_RESP        152
548
549
550 /*******************************************************************************
551  * HOSTLIST message types
552  ******************************************************************************/
553
554 /**
555  * Hostlist advertisement message
556  */
557 #define GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT 160
558
559
560 /*******************************************************************************
561  * STATISTICS message types
562  ******************************************************************************/
563
564 /**
565  * Set a statistical value.
566  */
567 #define GNUNET_MESSAGE_TYPE_STATISTICS_SET 168
568
569 /**
570  * Get a statistical value(s).
571  */
572 #define GNUNET_MESSAGE_TYPE_STATISTICS_GET 169
573
574 /**
575  * Response to a STATISTICS_GET message (with value).
576  */
577 #define GNUNET_MESSAGE_TYPE_STATISTICS_VALUE 170
578
579 /**
580  * Response to a STATISTICS_GET message (end of value stream).
581  */
582 #define GNUNET_MESSAGE_TYPE_STATISTICS_END 171
583
584 /**
585  * Watch changes to a statistical value.  Message format is the same
586  * as for GET, except that the subsystem and entry name must be given.
587  */
588 #define GNUNET_MESSAGE_TYPE_STATISTICS_WATCH 172
589
590 /**
591  * Changes to a watched value.
592  */
593 #define GNUNET_MESSAGE_TYPE_STATISTICS_WATCH_VALUE 173
594
595
596 /*******************************************************************************
597  * VPN message types
598  ******************************************************************************/
599
600 /**
601  * Type of messages between the gnunet-vpn-helper and the daemon
602  */
603 #define GNUNET_MESSAGE_TYPE_VPN_HELPER 185
604
605 /**
606  * Type of messages containing an ICMP packet for a service.
607  */
608 #define GNUNET_MESSAGE_TYPE_VPN_ICMP_TO_SERVICE 190
609
610 /**
611  * Type of messages containing an ICMP packet for the Internet.
612  */
613 #define GNUNET_MESSAGE_TYPE_VPN_ICMP_TO_INTERNET 191
614
615 /**
616  * Type of messages containing an ICMP packet for the VPN
617  */
618 #define GNUNET_MESSAGE_TYPE_VPN_ICMP_TO_VPN 192
619
620 /**
621  * Type of messages containing an DNS request for a DNS exit service.
622  */
623 #define GNUNET_MESSAGE_TYPE_VPN_DNS_TO_INTERNET 193
624
625 /**
626  * Type of messages containing an DNS reply from a DNS exit service.
627  */
628 #define GNUNET_MESSAGE_TYPE_VPN_DNS_FROM_INTERNET 194
629
630 /**
631  * Type of messages containing an TCP packet for a service.
632  */
633 #define GNUNET_MESSAGE_TYPE_VPN_TCP_TO_SERVICE_START 195
634
635 /**
636  * Type of messages containing an TCP packet for the Internet.
637  */
638 #define GNUNET_MESSAGE_TYPE_VPN_TCP_TO_INTERNET_START 196
639
640 /**
641  * Type of messages containing an TCP packet of an established connection.
642  */
643 #define GNUNET_MESSAGE_TYPE_VPN_TCP_DATA_TO_EXIT 197
644
645 /**
646  * Type of messages containing an TCP packet of an established connection.
647  */
648 #define GNUNET_MESSAGE_TYPE_VPN_TCP_DATA_TO_VPN 198
649
650 /**
651  * Type of messages containing an UDP packet for a service.
652  */
653 #define GNUNET_MESSAGE_TYPE_VPN_UDP_TO_SERVICE 199
654
655 /**
656  * Type of messages containing an UDP packet for the Internet.
657  */
658 #define GNUNET_MESSAGE_TYPE_VPN_UDP_TO_INTERNET 200
659
660 /**
661  * Type of messages containing an UDP packet from a remote host
662  */
663 #define GNUNET_MESSAGE_TYPE_VPN_UDP_REPLY 201
664
665
666 /**
667  * Client asks VPN service to setup an IP to redirect traffic
668  * via an exit node to some global IP address.
669  */
670 #define GNUNET_MESSAGE_TYPE_VPN_CLIENT_REDIRECT_TO_IP 202
671
672 /**
673  * Client asks VPN service to setup an IP to redirect traffic
674  * to some peer offering a service.
675  */
676 #define GNUNET_MESSAGE_TYPE_VPN_CLIENT_REDIRECT_TO_SERVICE 203
677
678 /**
679  * VPN service responds to client with an IP to use for the
680  * requested redirection.
681  */
682 #define GNUNET_MESSAGE_TYPE_VPN_CLIENT_USE_IP 204
683
684
685 /*******************************************************************************
686  * VPN-DNS message types
687  ******************************************************************************/
688
689
690 /**
691  * Initial message from client to DNS service for registration.
692  */
693 #define GNUNET_MESSAGE_TYPE_DNS_CLIENT_INIT 211
694
695 /**
696  * Type of messages between the gnunet-helper-dns and the service
697  */
698 #define GNUNET_MESSAGE_TYPE_DNS_CLIENT_REQUEST 212
699
700 /**
701  * Type of messages between the gnunet-helper-dns and the service
702  */
703 #define GNUNET_MESSAGE_TYPE_DNS_CLIENT_RESPONSE 213
704
705 /**
706  * Type of messages between the gnunet-helper-dns and the service
707  */
708 #define GNUNET_MESSAGE_TYPE_DNS_HELPER 214
709
710
711 /*******************************************************************************
712  * MESH message types
713  ******************************************************************************/
714
715 /**
716  * Type of message used to transport messages throug a MESH-tunnel (LEGACY)
717  */
718 #define GNUNET_MESSAGE_TYPE_MESH 215
719
720 /**
721  * Type of message used to send another peer which messages we want to receive
722  * through a mesh-tunnel (LEGACY)
723  */
724 #define GNUNET_MESSAGE_TYPE_MESH_HELLO 216
725
726 /**
727  * Request the creation of a path
728  */
729 #define GNUNET_MESSAGE_TYPE_MESH_PATH_CREATE            256
730
731 /**
732  * Request the modification of an existing path
733  */
734 #define GNUNET_MESSAGE_TYPE_MESH_PATH_CHANGE            257
735
736 /**
737  * Notify that a connection of a path is no longer valid
738  */
739 #define GNUNET_MESSAGE_TYPE_MESH_PATH_BROKEN            258
740
741 /**
742  * At some point, the route will spontaneously change
743  */
744 #define GNUNET_MESSAGE_TYPE_MESH_PATH_CHANGED           259
745
746 /**
747  * Transport data in the mesh (origin->end) unicast
748  */
749 #define GNUNET_MESSAGE_TYPE_MESH_UNICAST                260
750
751 /**
752  * Transport data to all peers in a tunnel
753  */
754 #define GNUNET_MESSAGE_TYPE_MESH_MULTICAST              261
755
756 /**
757  * Transport data back in the mesh (end->origin)
758  */
759 #define GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN              262
760
761 /**
762  * Send origin an ACK that the path is complete
763  */
764 #define GNUNET_MESSAGE_TYPE_MESH_PATH_ACK               263
765
766 /**
767  * Avoid path timeouts
768  */
769 #define GNUNET_MESSAGE_TYPE_MESH_PATH_KEEPALIVE         264
770
771 /**
772  * Request the destuction of a path
773  */
774 #define GNUNET_MESSAGE_TYPE_MESH_PATH_DESTROY           265
775
776 /**
777  * Request the destruction of a whole tunnel
778  */
779 #define GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY         266
780
781 /**
782  * We need flow control
783  */
784 #define GNUNET_MESSAGE_TYPE_MESH_SPEED_NOTIFY           270
785
786 /**
787  * Connect to the mesh service, specifying subscriptions
788  */
789 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT          272
790
791 /**
792  * Ask the mesh service to create a new tunnel
793  */
794 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE    273
795
796 /**
797  * Ask the mesh service to destroy a tunnel
798  */
799 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY   274
800
801 /**
802  * Ask the mesh service to add a peer to an existing tunnel
803  */
804 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_ADD         275
805
806 /**
807  * Ask the mesh service to remove a peer from a tunnel
808  */
809 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_DEL         276
810
811 /**
812  * Ask the mesh service to add a peer offering a service to an existing tunnel
813  */
814 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_ADD_BY_TYPE 277
815
816 /**
817  * 640kb should be enough for everybody
818  */
819 #define GNUNET_MESSAGE_TYPE_MESH_RESERVE_END            288
820
821
822
823 /*******************************************************************************
824  * CHAT message types START
825  ******************************************************************************/
826
827 /**
828  * Message sent from client to join a chat room.
829  */
830 #define GNUNET_MESSAGE_TYPE_CHAT_JOIN_REQUEST 300
831
832 /**
833  * Message sent to client to indicate joining of another room member.
834  */
835 #define GNUNET_MESSAGE_TYPE_CHAT_JOIN_NOTIFICATION 301
836
837 /**
838  * Message sent to client to indicate leaving of another room member.
839  */
840 #define GNUNET_MESSAGE_TYPE_CHAT_LEAVE_NOTIFICATION 302
841
842 /**
843  * Notification sent by service to client indicating that we've received a chat
844  * message.
845  */
846 #define GNUNET_MESSAGE_TYPE_CHAT_MESSAGE_NOTIFICATION 303
847
848 /**
849  * Request sent by client to transmit a chat message to another room members.
850  */
851 #define GNUNET_MESSAGE_TYPE_CHAT_TRANSMIT_REQUEST 304
852
853 /**
854  * Receipt sent from a message receiver to the service to confirm delivery of
855  * a chat message.
856  */
857 #define GNUNET_MESSAGE_TYPE_CHAT_CONFIRMATION_RECEIPT 305
858
859 /**
860  * Notification sent from the service to the original sender
861  * to acknowledge delivery of a chat message.
862  */
863 #define GNUNET_MESSAGE_TYPE_CHAT_CONFIRMATION_NOTIFICATION 306
864
865 /**
866  * P2P message sent to indicate joining of another room member.
867  */
868 #define GNUNET_MESSAGE_TYPE_CHAT_P2P_JOIN_NOTIFICATION 307
869
870 /**
871  * P2P message sent to indicate leaving of another room member.
872  */
873 #define GNUNET_MESSAGE_TYPE_CHAT_P2P_LEAVE_NOTIFICATION 308
874
875 /**
876  * P2P message sent to a newly connected peer to request its known clients in
877  * order to synchronize room members.
878  */
879 #define GNUNET_MESSAGE_TYPE_CHAT_P2P_SYNC_REQUEST 309
880
881 /**
882  * Notification sent from one peer to another to indicate that we have received
883  * a chat message.
884  */
885 #define GNUNET_MESSAGE_TYPE_CHAT_P2P_MESSAGE_NOTIFICATION 310
886
887 /**
888  * P2P receipt confirming delivery of a chat message.
889  */
890 #define GNUNET_MESSAGE_TYPE_CHAT_P2P_CONFIRMATION_RECEIPT 311
891
892
893 /*******************************************************************************
894  * NSE (network size estimation) message types
895  ******************************************************************************/
896
897 /**
898  * client->service message indicating start
899  */
900 #define GNUNET_MESSAGE_TYPE_NSE_START 321
901
902 /**
903  * P2P message sent from nearest peer
904  */
905 #define GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD 322
906
907 /**
908  * service->client message indicating
909  */
910 #define GNUNET_MESSAGE_TYPE_NSE_ESTIMATE 323
911
912
913 /*******************************************************************************
914  * PEERINFO message types
915  ******************************************************************************/
916
917 /**
918  * Request update and listing of a peer.
919  */
920 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET 330
921
922 /**
923  * Request update and listing of all peers.
924  */
925 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET_ALL 331
926
927 /**
928  * Information about one of the peers.
929  */
930 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO 332
931
932 /**
933  * End of information about other peers.
934  */
935 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END 333
936
937 /**
938  * Start notifying this client about all changes to
939  * the known peers until it disconnects.
940  */
941 #define GNUNET_MESSAGE_TYPE_PEERINFO_NOTIFY 334
942
943 /*******************************************************************************
944  * ATS message types
945  ******************************************************************************/
946
947 /**
948  * Type of the 'struct ClientStartMessage' sent by clients to ATS to
949  * identify the type of the client.
950  */
951 #define GNUNET_MESSAGE_TYPE_ATS_START 340
952
953 /**
954  * Type of the 'struct RequestAddressMessage' sent by clients to ATS
955  * to request an address to help connect.
956  */
957 #define GNUNET_MESSAGE_TYPE_ATS_REQUEST_ADDRESS 341
958
959 /**
960  * Type of the 'struct RequestAddressMessage' sent by clients to ATS
961  * to request an address to help connect.
962  */
963 #define GNUNET_MESSAGE_TYPE_ATS_REQUEST_ADDRESS_CANCEL 342
964
965 /**
966  * Type of the 'struct AddressUpdateMessage' sent by clients to ATS
967  * to inform ATS about performance changes.
968  */
969 #define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_UPDATE 343
970
971 /**
972  * Type of the 'struct AddressDestroyedMessage' sent by clients to ATS
973  * to inform ATS about an address being unavailable.
974  */
975 #define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_DESTROYED 344
976
977 /**
978  * Type of the 'struct AddressSuggestionMessage' sent by ATS to clients
979  * to suggest switching to a different address.
980  */
981 #define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION 345
982
983 /**
984  * Type of the 'struct PeerInformationMessage' sent by ATS to clients
985  * to inform about QoS for a particular connection.
986  */
987 #define GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION 346
988
989 /**
990  * Type of the 'struct ReservationRequestMessage' sent by clients to ATS
991  * to ask for inbound bandwidth reservations.
992  */
993 #define GNUNET_MESSAGE_TYPE_ATS_RESERVATION_REQUEST 347
994
995 /**
996  * Type of the 'struct ReservationResultMessage' sent by ATS to clients
997  * in response to a reservation request.
998  */
999 #define GNUNET_MESSAGE_TYPE_ATS_RESERVATION_RESULT 348
1000
1001 /**
1002  * Type of the 'struct ChangePreferenceMessage' sent by clients to ATS
1003  * to ask for allocation preference changes.
1004  */
1005 #define GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_CHANGE 349
1006
1007 /**
1008  * Type of the 'struct SessionReleaseMessage' sent by ATS to client
1009  * to confirm that a session ID was destroyed.
1010  */
1011 #define GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE 350
1012
1013 /**
1014  * Type of the 'struct AddressUseMessage' sent by ATS to client
1015  * to confirm that an address is used or not used anymore
1016  */
1017 #define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_IN_USE 351
1018
1019
1020
1021
1022 /*******************************************************************************
1023  * TRANSPORT message types
1024  ******************************************************************************/
1025
1026 /**
1027  * Message from the core saying that the transport
1028  * server should start giving it messages.  This
1029  * should automatically trigger the transmission of
1030  * a HELLO message.
1031  */
1032 #define GNUNET_MESSAGE_TYPE_TRANSPORT_START 360
1033
1034 /**
1035  * Message from TRANSPORT notifying about a
1036  * client that connected to us.
1037  */
1038 #define GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT 361
1039
1040 /**
1041  * Message from TRANSPORT notifying about a
1042  * client that disconnected from us.
1043  */
1044 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT 362
1045
1046 /**
1047  * Request to TRANSPORT to transmit a message.
1048  */
1049 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND 363
1050
1051 /**
1052  * Confirmation from TRANSPORT that message for transmission has been
1053  * queued (and that the next message to this peer can now be passed to
1054  * the service).  Note that this confirmation does NOT imply that the
1055  * message was fully transmitted.
1056  */
1057 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK 364
1058
1059 /**
1060  * Message from TRANSPORT notifying about a
1061  * message that was received.
1062  */
1063 #define GNUNET_MESSAGE_TYPE_TRANSPORT_RECV 365
1064
1065 /**
1066  * Message telling transport to limit its receive rate.
1067  */
1068 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA 366
1069
1070 /**
1071  * Request to look addresses of peers in server.
1072  */
1073 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING 367
1074
1075 /**
1076  * Response to the address lookup request.
1077  */
1078 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY 368
1079
1080 /**
1081  * Register a client that wants to do blacklisting.
1082  */
1083 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_INIT 369
1084
1085 /**
1086  * Query to a blacklisting client (is this peer blacklisted)?
1087  */
1088 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY 370
1089
1090 /**
1091  * Reply from blacklisting client (answer to blacklist query).
1092  */
1093 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_REPLY 371
1094
1095 /**
1096  * Transport PING message
1097  */
1098 #define GNUNET_MESSAGE_TYPE_TRANSPORT_PING 372
1099
1100 /**
1101  * Transport PONG message
1102  */
1103 #define GNUNET_MESSAGE_TYPE_TRANSPORT_PONG 373
1104
1105 /**
1106  * Message for transport service from a client asking that a
1107  * connection be initiated with another peer.
1108  */
1109 #define GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_CONNECT 374
1110
1111 /**
1112  * Transport CONNECT message exchanged between transport services to
1113  * indicate that a session should be marked as 'connected'.
1114  */
1115 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT 375
1116
1117 /**
1118  * Transport CONNECT_ACK message exchanged between transport services to
1119  * indicate that a CONNECT message was accepted
1120  */
1121 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT_ACK 376
1122
1123 /**
1124  * Transport CONNECT_ACK message exchanged between transport services to
1125  * indicate that a CONNECT message was accepted
1126  */
1127 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_ACK 377
1128
1129 /**
1130  * Transport DISCONNECT message exchanged between transport services to
1131  * indicate that a connection should be dropped.
1132  */
1133 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT 378
1134
1135 /**
1136  * Request to monitor addresses used by a peer or all peers.
1137  */
1138 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE 380
1139
1140 /**
1141  * Message send by a peer to notify the other to keep the session alive
1142  * and measure latency in a regular interval
1143  */
1144 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE 381
1145
1146 /**
1147  * Response to a GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE message to
1148  * measure latency in a regular interval
1149  */
1150 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE_RESPONSE 382
1151
1152
1153 /**
1154  * Request to iterate over all known addresses.
1155  */
1156 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE 383
1157
1158 /**
1159  * Message send by a peer to notify the other to keep the session alive.
1160  */
1161 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON 384
1162
1163 /*******************************************************************************
1164  * STREAM LIRBRARY MESSAGES
1165  ******************************************************************************/
1166
1167 /**
1168  * Message containing data exchanged between stream end-points over mesh.
1169  */
1170 #define GNUNET_MESSAGE_TYPE_STREAM_DATA 400
1171
1172 /**
1173  * ACK message
1174  */
1175 #define GNUNET_MESSAGE_TYPE_STREAM_ACK 401
1176
1177 /**
1178  * Handshake hello message
1179  */
1180 #define GNUNET_MESSAGE_TYPE_STREAM_HELLO 402
1181
1182 /**
1183  * Handshake hello acknowledgement message
1184  */
1185 #define GNUNET_MESSAGE_TYPE_STREAM_HELLO_ACK 403
1186
1187 /**
1188  * Reset message
1189  */
1190 #define GNUNET_MESSAGE_TYPE_STREAM_RESET 404
1191
1192 /**
1193  * Transmit close message (data transmission no longer possible after this
1194  * message) 
1195  */
1196 #define GNUNET_MESSAGE_TYPE_STREAM_TRANSMIT_CLOSE 405
1197
1198 /**
1199  * Transmit close acknowledgement message
1200  */
1201 #define GNUNET_MESSAGE_TYPE_STREAM_TRANSMIT_CLOSE_ACK 406
1202
1203 /**
1204  * Receive close message (data is no loger read by the receiver after this
1205  * message) 
1206  */
1207 #define GNUNET_MESSAGE_TYPE_STREAM_RECEIVE_CLOSE 407
1208
1209 /**
1210  * Receive close acknowledgement message
1211  */
1212 #define GNUNET_MESSAGE_TYPE_STREAM_RECEIVE_CLOSE_ACK 408
1213
1214 /**
1215  * Stream close message (data is no longer sent or read after this message)
1216  */
1217 #define GNUNET_MESSAGE_TYPE_STREAM_CLOSE 409
1218
1219 /**
1220  * Close acknowledgement message
1221  */
1222 #define GNUNET_MESSAGE_TYPE_STREAM_CLOSE_ACK 410
1223
1224 /*******************************************************************************
1225  * FS-PUBLISH-HELPER IPC Messages
1226  ******************************************************************************/
1227
1228 /**
1229  * Progress information from the helper: found a file
1230  */
1231 #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_FILE 420
1232
1233 /**
1234  * Progress information from the helper: found a directory
1235  */
1236 #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_DIRECTORY 421
1237
1238 /**
1239  * Error signal from the helper.
1240  */
1241 #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR 422
1242
1243 /**
1244  * Signal that helper skipped a file.
1245  */
1246 #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_SKIP_FILE 423
1247
1248 /**
1249  * Signal that helper is done scanning the directory tree.
1250  */
1251 #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_COUNTING_DONE 424
1252
1253 /**
1254  * Extracted meta data from the helper.
1255  */
1256 #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_META_DATA 425
1257
1258 /**
1259  * Signal that helper is done.
1260  */
1261 #define GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_FINISHED 426
1262
1263 /*******************************************************************************
1264  * NAMESTORE message types
1265  ******************************************************************************/
1266
1267 /**
1268  * Request update and listing of a peer.
1269  */
1270 #define GNUNET_MESSAGE_TYPE_NAMESTORE_START 430
1271
1272 /**
1273  *  Next available: 440
1274  */
1275
1276 /*******************************************************************************
1277  * TODO: we need a way to register message types centrally (via some webpage).
1278  * For now: unofficial extensions should start at 48k, internal extensions
1279  * define here should leave some room (4-10 additional messages to the previous
1280  * extension).
1281  ******************************************************************************/
1282
1283 /**
1284  * Type used to match 'all' message types.
1285  */
1286 #define GNUNET_MESSAGE_TYPE_ALL 65535
1287
1288
1289 #if 0                           /* keep Emacsens' auto-indent happy */
1290 {
1291 #endif
1292 #ifdef __cplusplus
1293 }
1294 #endif
1295
1296 /* ifndef GNUNET_PROTOCOLS_H */
1297 #endif
1298 /* end of gnunet_protocols.h */