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