000b71f3b7abcbfba57df8d7a53606d2ca947268
[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  * Test if service is online.
40  */
41 #define GNUNET_MESSAGE_TYPE_TEST 1
42
43
44 /**
45  * Request DNS resolution.
46  */
47 #define GNUNET_MESSAGE_TYPE_RESOLVER_REQUEST 2
48
49 /**
50  * Response to a DNS resolution request.
51  */
52 #define GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE 3
53
54
55
56 /**
57  * Request to ARM to start a service.
58  */
59 #define GNUNET_MESSAGE_TYPE_ARM_START 8
60
61 /**
62  * Request to ARM to stop a service.
63  */
64 #define GNUNET_MESSAGE_TYPE_ARM_STOP 9
65
66 /**
67  * Response from ARM: service is now up.
68  */
69 #define GNUNET_MESSAGE_TYPE_ARM_IS_UP 10
70
71 /**
72  * Response from ARM: service is now down.
73  * (failed to start it or shut it down).
74  */
75 #define GNUNET_MESSAGE_TYPE_ARM_IS_DOWN 11
76
77 /**
78  * Response from ARM: service status is unknown.
79  */
80 #define GNUNET_MESSAGE_TYPE_ARM_IS_UNKNOWN 12
81
82 /**
83  * Request ARM service shutdown.
84  */
85 #define GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN 13
86
87 /**
88  * Acknowledge service shutting down, disconnect
89  * indicates service stopped.
90  */
91 #define GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN_ACK 14
92
93 /**
94  * HELLO message used for communicating peer addresses.
95  * Managed by libgnunethello.
96  */
97 #define GNUNET_MESSAGE_TYPE_HELLO 16
98
99 /**
100  * FRAGMENT of a larger message.
101  * Managed by libgnunetfragment.
102  */
103 #define GNUNET_MESSAGE_TYPE_FRAGMENT 18
104
105
106 /**
107  * Message from the core saying that the transport
108  * server should start giving it messages.  This
109  * should automatically trigger the transmission of
110  * a HELLO message.
111  */
112 #define GNUNET_MESSAGE_TYPE_TRANSPORT_START 20
113
114 /**
115  * Message from TRANSPORT notifying about a
116  * client that connected to us.
117  */
118 #define GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT 21
119
120 /**
121  * Message from TRANSPORT notifying about a
122  * client that disconnected from us.
123  */
124 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT 22
125
126 /**
127  * Request to TRANSPORT to transmit a message.
128  */
129 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND 23
130
131 /**
132  * Confirmation from TRANSPORT that message for
133  * transmission has been queued (and that the next
134  * message to this peer can now be passed to the
135  * service).  Note that this confirmation does NOT
136  * imply that the message was fully transmitted.
137  */
138 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK 24
139
140 /**
141  * Message from TRANSPORT notifying about a
142  * message that was received.
143  */
144 #define GNUNET_MESSAGE_TYPE_TRANSPORT_RECV 25
145
146 /**
147  * Message telling transport to limit its receive rate.
148  */
149 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA 26
150
151 /**
152  * Request to look addresses of peers in server.
153  */
154 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_LOOKUP 27
155
156 /**
157  * Response to the address lookup request.
158  */
159 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_REPLY 28
160
161 /**
162  * Register a client that wants to do blacklisting.
163  */
164 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_INIT 29
165
166 /**
167  * Query to a blacklisting client (is this peer blacklisted)?
168  */
169 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY 30
170
171
172 /**
173  * Reply from blacklisting client (answer to blacklist query).
174  */
175 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_REPLY 31
176
177 /**
178  * Transport PING message
179  */
180 #define GNUNET_MESSAGE_TYPE_TRANSPORT_PING 32
181
182 /**
183  * Transport PONG message
184  */
185 #define GNUNET_MESSAGE_TYPE_TRANSPORT_PONG 33
186
187 /**
188  * Message for TRANSPORT asking that a connection
189  * be initiated with a peer.
190  */
191 #define GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_CONNECT 34
192
193 /**
194  * Request update and listing of a peer.
195  */
196 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET 37
197
198 /**
199  * Request update and listing of all peers.
200  */
201 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET_ALL 38
202
203 /**
204  * Information about one of the peers.
205  */
206 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO 39
207
208 /**
209  * End of information about other peers.
210  */
211 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END 40
212
213 /**
214  * Start notifying this client about all changes to
215  * the known peers until it disconnects.
216  */
217 #define GNUNET_MESSAGE_TYPE_PEERINFO_NOTIFY 41
218
219 /**
220  * DV service to DV Plugin message, when a message is
221  * unwrapped by the DV service and handed to the plugin
222  * for processing
223  */
224 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_RECEIVE 44
225
226 /**
227  * DV Plugin to DV service message, indicating a message
228  * should be sent out.
229  */
230 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_SEND 45
231
232 /**
233  * DV service to DV api message, containing a confirmation
234  * or failure of a DV_SEND message.
235  */
236 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_SEND_RESULT 46
237
238 /**
239  * P2P DV message encapsulating some real message
240  */
241 #define GNUNET_MESSAGE_TYPE_DV_DATA 47
242
243 /**
244  * P2P DV message gossipping peer information
245  */
246 #define GNUNET_MESSAGE_TYPE_DV_GOSSIP 48
247
248 /**
249  * DV Plugin to DV service message, indicating
250  * startup.
251  */
252 #define GNUNET_MESSAGE_TYPE_DV_START 49
253
254 /**
255  * P2P DV message notifying connected peers of a disconnect
256  */
257 #define GNUNET_MESSAGE_TYPE_DV_DISCONNECT 50
258
259 /**
260  * TCP NAT probe message, send from NAT'd peer to
261  * other peer to establish bi-directional communication
262  */
263 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_NAT_PROBE 51
264
265 /**
266  * Normal UDP message type.
267  */
268 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_MESSAGE 52
269
270 /**
271  * Fragmented part of a UDP message.
272  */
273 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_MESSAGE_PART 53
274
275 /**
276  * UDP NAT probe message, send from NAT'd peer to
277  * other peer to negotiate punched address/port
278  */
279 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE 55
280
281 /**
282  * UDP NAT probe reply, sent from a non-NAT'd peer to
283  * a NAT'd one to inform it we got the probe and of the
284  * address/port seen
285  */
286 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_REPLY 56
287
288 /**
289  * UDP NAT probe confirmation, sent from a NAT'd peer to
290  * a non-NAT'd one to inform it which port to send to us
291  * on
292  */
293 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_CONFIRM 57
294
295 /**
296  * UDP NAT probe keepalive, once a hole is punched the NAT'd peer
297  * needs to keep the hole alive
298  */
299 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_KEEPALIVE 58
300
301 /**
302  * Welcome message between TCP transports.
303  */
304 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_WELCOME 60
305
306 /**
307  * Message to force transport to update bandwidth assignment
308  */
309 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ATS 61
310
311 /**
312  * Initial setup message from core client to core.
313  */
314 #define GNUNET_MESSAGE_TYPE_CORE_INIT 64
315
316 /**
317  * Response from core to core client to INIT message.
318  */
319 #define GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY 65
320
321 /**
322  * Notify clients about new peer-to-peer connections (before
323  * key exchange and authentication).
324  */
325 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_PRE_CONNECT 66
326
327 /**
328  * Notify clients about new peer-to-peer connections (triggered
329  * after key exchange).
330  */
331 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT 67
332
333 /**
334  * Notify clients about peer disconnecting.
335  */
336 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT 68
337
338 /**
339  * Notify clients about peer status change.
340  */
341 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_STATUS_CHANGE 69
342
343 /**
344  * Notify clients about incoming P2P messages.
345  */
346 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND 70
347
348 /**
349  * Notify clients about outgoing P2P transmissions.
350  */
351 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND 71
352
353 /**
354  * Request from client to "configure" P2P connection.
355  */
356 #define GNUNET_MESSAGE_TYPE_CORE_REQUEST_INFO 72
357
358 /**
359  * Response from server about (possibly updated) P2P
360  * connection configuration.
361  */
362 #define GNUNET_MESSAGE_TYPE_CORE_CONFIGURATION_INFO 73
363
364 /**
365  * Request from client to transmit message.
366  */
367 #define GNUNET_MESSAGE_TYPE_CORE_SEND_REQUEST 74
368
369 /**
370  * Confirmation from core that message can now be sent
371  */
372 #define GNUNET_MESSAGE_TYPE_CORE_SEND_READY 75
373
374 /**
375  * Client with message to transmit (after SEND_READY confirmation
376  * was received).
377  */
378 #define GNUNET_MESSAGE_TYPE_CORE_SEND 76
379
380 /**
381  * Request from client asking to connect to a peer.
382  */
383 #define GNUNET_MESSAGE_TYPE_CORE_REQUEST_CONNECT 77
384
385 /**
386  * Request for peer iteration from CORE service.
387  */
388 #define GNUNET_MESSAGE_TYPE_CORE_ITERATE_PEERS 78
389
390 /**
391  * Last reply from core to request for peer iteration from CORE service.
392  */
393 #define GNUNET_MESSAGE_TYPE_CORE_ITERATE_PEERS_END 79
394
395 /**
396  * Check whether a given peer is currently connected to CORE.
397  */
398 #define GNUNET_MESSAGE_TYPE_CORE_PEER_CONNECTED 80
399
400 /**
401  * Session key exchange between peers.
402  */
403 #define GNUNET_MESSAGE_TYPE_CORE_SET_KEY 81
404
405 /**
406  * Encapsulation for an encrypted message between peers.
407  */
408 #define GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE 82
409
410 /**
411  * Check that other peer is alive (challenge).
412  */
413 #define GNUNET_MESSAGE_TYPE_CORE_PING 83
414
415 /**
416  * Confirmation that other peer is alive.
417  */
418 #define GNUNET_MESSAGE_TYPE_CORE_PONG 84
419
420 /**
421  * Request by the other peer to terminate the connection.
422  */
423 #define GNUNET_MESSAGE_TYPE_CORE_HANGUP 85
424
425 /**
426  * Message sent by datastore client on join.
427  */
428 #define GNUNET_MESSAGE_TYPE_DATASTORE_RESERVE 92
429
430 /**
431  * Message sent by datastore client on join.
432  */
433 #define GNUNET_MESSAGE_TYPE_DATASTORE_RELEASE_RESERVE 93
434
435 /**
436  * Message sent by datastore to client informing about status
437  * processing a request
438  * (in response to RESERVE, RELEASE_RESERVE, PUT, UPDATE and REMOVE requests).
439  */
440 #define GNUNET_MESSAGE_TYPE_DATASTORE_STATUS 94
441
442 /**
443  * Message sent by datastore client to store data.
444  */
445 #define GNUNET_MESSAGE_TYPE_DATASTORE_PUT 95
446
447 /**
448  * Message sent by datastore client to update data.
449  */
450 #define GNUNET_MESSAGE_TYPE_DATASTORE_UPDATE 96
451
452 /**
453  * Message sent by datastore client to get data.
454  */
455 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET 97
456
457 /**
458  * Message sent by datastore client to get random data.
459  */
460 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET_REPLICATION 98
461
462 /**
463  * Message sent by datastore client to get random data.
464  */
465 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET_ZERO_ANONYMITY 99
466
467 /**
468  * Message sent by datastore to client providing requested data
469  * (in response to GET or GET_RANDOM request).
470  */
471 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA 100
472
473 /**
474  * Message sent by datastore to client signaling end of matching data.
475  * This message will also be sent for "GET_RANDOM", even though
476  * "GET_RANDOM" returns at most one data item.
477  */
478 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END 101
479
480 /**
481  * Message sent by datastore client to remove data.
482  */
483 #define GNUNET_MESSAGE_TYPE_DATASTORE_REMOVE 102
484
485 /**
486  * Message sent by datastore client to drop the database.
487  */
488 #define GNUNET_MESSAGE_TYPE_DATASTORE_DROP 103
489
490
491 /**
492  * Message sent by fs client to start indexing.
493  */
494 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START 128
495
496 /**
497  * Affirmative response to a request for start indexing.
498  */
499 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK 129
500
501 /**
502  * Response to a request for start indexing that
503  * refuses.
504  */
505 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED 130
506
507 /**
508  * Request from client for list of indexed files.
509  */
510 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_GET 131
511
512 /**
513  * Reply to client with an indexed file name.
514  */
515 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY 132
516
517 /**
518  * Reply to client indicating end of list.
519  */
520 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_END 133
521
522 /**
523  * Request from client to unindex a file.
524  */
525 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX 134
526
527 /**
528  * Reply to client indicating unindex receipt.
529  */
530 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX_OK 135
531
532 /**
533  * Client asks FS service to start a (keyword) search.
534  */
535 #define GNUNET_MESSAGE_TYPE_FS_START_SEARCH 136
536
537 /**
538  * P2P request for content (one FS to another).
539  */
540 #define GNUNET_MESSAGE_TYPE_FS_GET 137
541
542 /**
543  * P2P response with content or active migration of content.  Also
544  * used between the service and clients (in response to START_SEARCH).
545  */
546 #define GNUNET_MESSAGE_TYPE_FS_PUT 138
547
548 /**
549  * Peer asks us to stop migrating content towards it for a while.
550  */
551 #define GNUNET_MESSAGE_TYPE_FS_MIGRATION_STOP 139
552
553
554 /**
555  * DHT Message Types
556  */
557
558 /**
559  * Local DHT route request type
560  */
561 #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE 142
562
563 /**
564  * Local generic DHT route result type
565  */
566 #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_RESULT 143
567
568 /**
569  * P2P DHT route request type
570  */
571 #define GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE 144
572
573 /**
574  * P2P DHT route result type
575  */
576 #define GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE_RESULT 145
577
578 /**
579  * Local generic DHT message stop type
580  */
581 #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_STOP 146
582
583 /**
584  * Local and P2P DHT PUT message
585  * (encapsulated in DHT_ROUTE message)
586  */
587 #define GNUNET_MESSAGE_TYPE_DHT_PUT 147
588
589 /**
590  * Local and P2P DHT GET message
591  * (encapsulated in DHT_ROUTE message)
592  */
593 #define GNUNET_MESSAGE_TYPE_DHT_GET 148
594
595 /**
596  * Local and P2P DHT Get result message
597  */
598 #define GNUNET_MESSAGE_TYPE_DHT_GET_RESULT 149
599
600 /**
601  * Local and P2P DHT find peer message
602  */
603 #define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER 150
604
605 /**
606  * Local and P2P DHT find peer result message
607  */
608 #define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER_RESULT 151
609
610 /**
611  * P2P DHT PING request type
612  */
613 #define GNUNET_MESSAGE_TYPE_DHT_P2P_PING 152
614
615 /**
616  * DHT Control message type, for telling the
617  * DHT to alter its current operation somehow.
618  */
619 #define GNUNET_MESSAGE_TYPE_DHT_CONTROL 153
620
621 /**
622  * Local control message type, tells peer to start
623  * issuing malicious GET requests.
624  */
625 #define GNUNET_MESSAGE_TYPE_DHT_MALICIOUS_GET 154
626
627 /**
628  * Local control message type, tells peer to start
629  * issuing malicious PUT requests.
630  */
631 #define GNUNET_MESSAGE_TYPE_DHT_MALICIOUS_PUT 155
632
633 /**
634  * Local control message type, tells peer to start
635  * dropping all requests.
636  */
637 #define GNUNET_MESSAGE_TYPE_DHT_MALICIOUS_DROP  156
638
639 /**
640  * Hostlist advertisement message
641  */
642 #define GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT 160
643
644
645 /**
646  * Set a statistical value.
647  */
648 #define GNUNET_MESSAGE_TYPE_STATISTICS_SET 168
649
650 /**
651  * Get a statistical value(s).
652  */
653 #define GNUNET_MESSAGE_TYPE_STATISTICS_GET 169
654
655 /**
656  * Response to a STATISTICS_GET message (with value).
657  */
658 #define GNUNET_MESSAGE_TYPE_STATISTICS_VALUE 170
659
660 /**
661  * Response to a STATISTICS_GET message (end of value stream).
662  */
663 #define GNUNET_MESSAGE_TYPE_STATISTICS_END 171
664
665 /**
666  * Watch changes to a statistical value.  Message format is the same
667  * as for GET, except that the subsystem and entry name must be given.
668  */
669 #define GNUNET_MESSAGE_TYPE_STATISTICS_WATCH 172
670
671 /**
672  * Changes to a watched value.
673  */
674 #define GNUNET_MESSAGE_TYPE_STATISTICS_WATCH_VALUE 173
675
676
677 /**
678  * Type of messages between the gnunet-vpn-helper and the daemon
679  */
680 #define GNUNET_MESSAGE_TYPE_VPN_HELPER 185
681
682 /**
683  * Type of messages containing an UDP packet for a service
684  */
685 #define GNUNET_MESSAGE_TYPE_SERVICE_UDP 186
686
687 /**
688  * Type of messages containing an UDP packet from a service
689  */
690 #define GNUNET_MESSAGE_TYPE_SERVICE_UDP_BACK 187
691
692 /**
693  * Type of messages containing an TCP packet for a service
694  */
695 #define GNUNET_MESSAGE_TYPE_SERVICE_TCP 188
696
697 /**
698  * Type of messages containing an TCP packet from a service
699  */
700 #define GNUNET_MESSAGE_TYPE_SERVICE_TCP_BACK 189
701
702 /**
703  * Type of messages containing an UDP packet for a remote host
704  */
705 #define GNUNET_MESSAGE_TYPE_REMOTE_UDP 190
706
707 /**
708  * Type of messages containing an UDP packet from a remote host
709  */
710 #define GNUNET_MESSAGE_TYPE_REMOTE_UDP_BACK 191
711
712 /**
713  * Type of messages containing an TCP packet for a remote host
714  */
715 #define GNUNET_MESSAGE_TYPE_REMOTE_TCP 192
716
717 /**
718  * Type of messages containing an TCP packet from a remote host
719  */
720 #define GNUNET_MESSAGE_TYPE_REMOTE_TCP_BACK 193
721
722
723 /**
724  * Type of messages between the gnunet-wlan-helper and the daemon
725  *
726  */
727
728 #define GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA 195
729
730 /**
731  * Control messages between the gnunet-wlan-helper and the daemon
732  */
733
734 #define GNUNET_MESSAGE_TYPE_WLAN_HELPER_CONTROL 196
735
736 /**
737  * Type of messages for advertisement over wlan
738  */
739 #define GNUNET_MESSAGE_TYPE_WLAN_ADVERTISEMENT 197
740
741 /**
742  * Type of messages for data over the wlan
743  */
744
745 #define GNUNET_MESSAGE_TYPE_WLAN_DATA 198
746
747 /**
748  * Fragment of a message
749  */
750
751 #define GNUNET_MESSAGE_TYPE_WLAN_FRAGMENT 199
752
753 /**
754  * Fragment ack of a message
755  */
756
757 #define GNUNET_MESSAGE_TYPE_WLAN_FRAGMENT_ACK 200
758
759
760 /**
761  * Type of messages to query the local service-dns
762  */
763 #define GNUNET_MESSAGE_TYPE_LOCAL_QUERY_DNS 205
764 /**
765  * Type of messages the local service-dns responds with
766  */
767 #define GNUNET_MESSAGE_TYPE_LOCAL_RESPONSE_DNS 206
768 /**
769  * Type of messages to instruct the local service-dns to rehijack the dns
770  */
771 #define GNUNET_MESSAGE_TYPE_REHIJACK 207
772 /**
773  * Type of messages to send a DNS-query to another peer
774  */
775 #define GNUNET_MESSAGE_TYPE_REMOTE_QUERY_DNS 208
776 /**
777  * Type of messages to send a DNS-answer to another peer
778  */
779 #define GNUNET_MESSAGE_TYPE_REMOTE_ANSWER_DNS 209
780
781
782 /**
783  * Type of message used to transport messages throug a MESH-tunnel
784  */
785 #define GNUNET_MESSAGE_TYPE_MESH 215
786
787 /**
788  * Type of message used to send another peer which messages we want to receive
789  * through a mesh-tunnel.
790  */
791 #define GNUNET_MESSAGE_TYPE_MESH_HELLO 216
792
793
794 /*******************************************************************************
795  * MESH message types (WiP)
796  ******************************************************************************/
797
798 /**
799  * Request the creation of a path
800  */
801 #define GNUNET_MESSAGE_TYPE_MESH_PATH_CREATE   256
802
803 /**
804  * Request the modification of an existing path
805  */
806 #define GNUNET_MESSAGE_TYPE_MESH_PATH_CHANGE   257
807
808 /**
809  * Request the addition to a new branch to a path
810  */
811 #define GNUNET_MESSAGE_TYPE_MESH_PATH_ADD      258
812
813 /**
814  * At some point, the route will spontaneously change
815  */
816 #define GNUNET_MESSAGE_TYPE_MESH_PATH_CHANGED  259
817
818 /**
819  * Transport data in the mesh (origin->end) unicast
820  */
821 #define GNUNET_MESSAGE_TYPE_DATA_MESSAGE_FROM_ORIGIN    260
822
823 /**
824  * Transport data to all peers in a tunnel
825  */
826 #define GNUNET_MESSAGE_TYPE_DATA_MULTICAST              261
827
828 /**
829  * Transport data back in the mesh (end->origin)
830  * (not sure if this is the right way, should be some other solution)
831  */
832 #define GNUNET_MESSAGE_TYPE_DATA_MESSAGE_TO_ORIGIN      262
833
834
835 /**
836  * We need flow control
837  */
838 #define GNUNET_MESSAGE_TYPE_MESH_SPEED_NOTIFY           270
839
840 /**
841  * Connect to the mesh service, specifying subscriptions
842  */
843 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT                  272
844
845 /**
846  * Ask the mesh service to create a new tunnel
847  */
848 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE            273
849
850 /**
851  * Ask the mesh service to destroy a tunnel
852  */
853 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY           274
854
855 /**
856  * Ask the mesh service to add a peer to an existing tunnel
857  */
858 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT_PEER_ADD         275
859
860 /**
861  * Ask the mesh service to remove a peer from a tunnel
862  */
863 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT_PEER_DEL         276
864
865 /**
866  * Ask the mesh service to add a peer offering a service to an existing tunnel
867  */
868 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT_PEER_BY_TYPE     277
869
870 /**
871  * Ask the mesh service to cancel a peer connection request
872  */
873 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT_PEER_CANCEL      278
874
875 /**
876  * Notify a mesh client that a peer has connected to a tunnel
877  */
878 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_CONNECTED           279
879
880 /**
881  * Notify a mesh client that a peer has disconnected from a tunnel
882  */
883 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_DISCONNECTED        280
884
885 /* FIXME needed? */
886 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_REQUEST_TRANSMIT_READY   281
887 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_NOTIFY_TRANSMIT_READY    282
888
889 /**
890  * Message client <-> mesh service to transport payload
891  */
892 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA                     283
893
894 /**
895  * Message client->mesh to send data to all peers connected to a tunnel
896  */
897 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA_BROADCAST           284
898
899 /**
900  * 640kb should be enough for everybody
901  */
902 #define GNUNET_MESSAGE_TYPE_MESH_RESERVE_END   288
903
904 /*******************************************************************************
905  * MESH message types END
906  ******************************************************************************/
907
908
909
910 /**
911  * Message sent from client to join a chat room.
912  */
913 #define GNUNET_MESSAGE_TYPE_CHAT_JOIN_REQUEST 300
914
915 /**
916  * Message sent to client to indicate joining of another room member.
917  */
918 #define GNUNET_MESSAGE_TYPE_CHAT_JOIN_NOTIFICATION 301
919
920 /**
921  * Message sent to client to indicate leaving of another room member.
922  */
923 #define GNUNET_MESSAGE_TYPE_CHAT_LEAVE_NOTIFICATION 302
924
925 /**
926  * Notification sent by service to client indicating that we've received a chat
927  * message.
928  */
929 #define GNUNET_MESSAGE_TYPE_CHAT_MESSAGE_NOTIFICATION 303
930
931 /**
932  * Request sent by client to transmit a chat message to another room members.
933  */
934 #define GNUNET_MESSAGE_TYPE_CHAT_TRANSMIT_REQUEST 304
935
936 /**
937  * Receipt sent from a message receiver to the service to confirm delivery of
938  * a chat message.
939  */
940 #define GNUNET_MESSAGE_TYPE_CHAT_CONFIRMATION_RECEIPT 305
941
942 /**
943  * Notification sent from the service to the original sender
944  * to acknowledge delivery of a chat message.
945  */
946 #define GNUNET_MESSAGE_TYPE_CHAT_CONFIRMATION_NOTIFICATION 306
947
948 /**
949  * P2P message sent to indicate joining of another room member.
950  */
951 #define GNUNET_MESSAGE_TYPE_CHAT_P2P_JOIN_NOTIFICATION 307
952
953 /**
954  * P2P message sent to indicate leaving of another room member.
955  */
956 #define GNUNET_MESSAGE_TYPE_CHAT_P2P_LEAVE_NOTIFICATION 308
957
958 /**
959  * P2P message sent to a newly connected peer to request its known clients in
960  * order to synchronize room members.
961  */
962 #define GNUNET_MESSAGE_TYPE_CHAT_P2P_SYNC_REQUEST 309
963
964 /**
965  * Notification sent from one peer to another to indicate that we have received
966  * a chat message.
967  */
968 #define GNUNET_MESSAGE_TYPE_CHAT_P2P_MESSAGE_NOTIFICATION 310
969
970 /**
971  * P2P receipt confirming delivery of a chat message.
972  */
973 #define GNUNET_MESSAGE_TYPE_CHAT_P2P_CONFIRMATION_RECEIPT 311
974
975
976 /**
977  * Type used to match 'all' message types.
978  */
979 #define GNUNET_MESSAGE_TYPE_ALL 65535
980
981 /*
982   TODO:
983   - applications (FS, VPN, TRACEKIT, TBENCH)
984 */
985
986
987
988
989 /* BELOW: experimental student-DHT protocol codes */
990
991 /**
992  * Request to join a CAN DHT
993  */
994 #define GNUNET_MESSAGE_TYPE_DHT_CAN_JOIN_REQUEST 1174
995
996 /**
997  * Response to join request of a CAN DHT
998  */
999 #define GNUNET_MESSAGE_TYPE_DHT_CAN_JOIN_REPLY 1175
1000
1001 /**
1002  * Messages for swapping locations
1003  */
1004 #define GNUNET_MESSAGE_TYPE_DHT_GET_NEIGHBOURLIST_REQUEST 1180
1005
1006 #define GNUNET_MESSAGE_TYPE_DHT_GET_NEIGHBOURLIST_RESULT 1181
1007
1008 #define GNUNET_MESSAGE_TYPE_DHT_SWAP_LOCATION_REQUEST 1182
1009
1010 #define GNUNET_MESSAGE_TYPE_DHT_SWAP_LOCATION_ACK 1183
1011
1012 /**
1013  * Freenet hello message
1014  */
1015 #define GNUNET_MESSAGE_TYPE_DHT_FREENET_HELLO 1184
1016
1017
1018 #if 0                           /* keep Emacsens' auto-indent happy */
1019 {
1020 #endif
1021 #ifdef __cplusplus
1022 }
1023 #endif
1024
1025 /* ifndef GNUNET_PROTOCOLS_H */
1026 #endif
1027 /* end of gnunet_protocols.h */