2 This file is part of GNUnet.
3 (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 Christian Grothoff (and other contributing authors)
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.
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.
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.
22 * @file include/gnunet_protocols.h
23 * @brief constants for network protocols
24 * @author Christian Grothoff
27 #ifndef GNUNET_PROTOCOLS_H
28 #define GNUNET_PROTOCOLS_H
33 #if 0 /* keep Emacsens' auto-indent happy */
39 * Test if service is online.
41 #define GNUNET_MESSAGE_TYPE_TEST 1
45 * Request DNS resolution.
47 #define GNUNET_MESSAGE_TYPE_RESOLVER_REQUEST 2
50 * Response to a DNS resolution request.
52 #define GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE 3
57 * Request to ARM to start a service.
59 #define GNUNET_MESSAGE_TYPE_ARM_START 8
62 * Request to ARM to stop a service.
64 #define GNUNET_MESSAGE_TYPE_ARM_STOP 9
67 * Response from ARM: service is now up.
69 #define GNUNET_MESSAGE_TYPE_ARM_IS_UP 10
72 * Response from ARM: service is now down.
73 * (failed to start it or shut it down).
75 #define GNUNET_MESSAGE_TYPE_ARM_IS_DOWN 11
78 * Response from ARM: service status is unknown.
80 #define GNUNET_MESSAGE_TYPE_ARM_IS_UNKNOWN 12
83 * Request ARM service shutdown.
85 #define GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN 13
88 * Acknowledge service shutting down, disconnect
89 * indicates service stopped.
91 #define GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN_ACK 14
94 * HELLO message used for communicating peer addresses.
95 * Managed by libgnunethello.
97 #define GNUNET_MESSAGE_TYPE_HELLO 16
100 * FRAGMENT of a larger message.
101 * Managed by libgnunetfragment.
103 #define GNUNET_MESSAGE_TYPE_FRAGMENT 18
107 * Message from the core saying that the transport
108 * server should start giving it messages. This
109 * should automatically trigger the transmission of
112 #define GNUNET_MESSAGE_TYPE_TRANSPORT_START 20
115 * Message from TRANSPORT notifying about a
116 * client that connected to us.
118 #define GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT 21
121 * Message from TRANSPORT notifying about a
122 * client that disconnected from us.
124 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT 22
127 * Request to TRANSPORT to transmit a message.
129 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND 23
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.
138 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK 24
141 * Message from TRANSPORT notifying about a
142 * message that was received.
144 #define GNUNET_MESSAGE_TYPE_TRANSPORT_RECV 25
147 * Message telling transport to limit its receive rate.
149 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA 26
152 * Request to look addresses of peers in server.
154 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_LOOKUP 27
157 * Response to the address lookup request.
159 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_REPLY 28
162 * Register a client that wants to do blacklisting.
164 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_INIT 29
167 * Query to a blacklisting client (is this peer blacklisted)?
169 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY 30
173 * Reply from blacklisting client (answer to blacklist query).
175 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_REPLY 31
178 * Transport PING message
180 #define GNUNET_MESSAGE_TYPE_TRANSPORT_PING 32
183 * Transport PONG message
185 #define GNUNET_MESSAGE_TYPE_TRANSPORT_PONG 33
188 * Message for TRANSPORT asking that a connection
189 * be initiated with a peer.
191 #define GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_CONNECT 34
194 * Request update and listing of a peer.
196 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET 37
199 * Request update and listing of all peers.
201 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET_ALL 38
204 * Information about one of the peers.
206 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO 39
209 * End of information about other peers.
211 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END 40
214 * Start notifying this client about all changes to
215 * the known peers until it disconnects.
217 #define GNUNET_MESSAGE_TYPE_PEERINFO_NOTIFY 41
220 * DV service to DV Plugin message, when a message is
221 * unwrapped by the DV service and handed to the plugin
224 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_RECEIVE 44
227 * DV Plugin to DV service message, indicating a message
228 * should be sent out.
230 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_SEND 45
233 * DV service to DV api message, containing a confirmation
234 * or failure of a DV_SEND message.
236 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_SEND_RESULT 46
239 * P2P DV message encapsulating some real message
241 #define GNUNET_MESSAGE_TYPE_DV_DATA 47
244 * P2P DV message gossipping peer information
246 #define GNUNET_MESSAGE_TYPE_DV_GOSSIP 48
249 * DV Plugin to DV service message, indicating
252 #define GNUNET_MESSAGE_TYPE_DV_START 49
255 * P2P DV message notifying connected peers of a disconnect
257 #define GNUNET_MESSAGE_TYPE_DV_DISCONNECT 50
260 * TCP NAT probe message, send from NAT'd peer to
261 * other peer to establish bi-directional communication
263 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_NAT_PROBE 51
266 * Normal UDP message type.
268 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_MESSAGE 52
271 * Fragmented part of a UDP message.
273 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_MESSAGE_PART 53
276 * UDP NAT probe message, send from NAT'd peer to
277 * other peer to negotiate punched address/port
279 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE 55
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
286 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_REPLY 56
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
293 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_CONFIRM 57
296 * UDP NAT probe keepalive, once a hole is punched the NAT'd peer
297 * needs to keep the hole alive
299 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_KEEPALIVE 58
302 * Welcome message between TCP transports.
304 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_WELCOME 60
307 * Initial setup message from core client to core.
309 #define GNUNET_MESSAGE_TYPE_CORE_INIT 64
312 * Response from core to core client to INIT message.
314 #define GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY 65
317 * Notify clients about new peer-to-peer connections (before
318 * key exchange and authentication).
320 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_PRE_CONNECT 66
323 * Notify clients about new peer-to-peer connections (triggered
324 * after key exchange).
326 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT 67
329 * Notify clients about peer disconnecting.
331 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT 68
334 * Notify clients about peer status change.
336 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_STATUS_CHANGE 69
339 * Notify clients about incoming P2P messages.
341 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND 70
344 * Notify clients about outgoing P2P transmissions.
346 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND 71
349 * Request from client to "configure" P2P connection.
351 #define GNUNET_MESSAGE_TYPE_CORE_REQUEST_INFO 72
354 * Response from server about (possibly updated) P2P
355 * connection configuration.
357 #define GNUNET_MESSAGE_TYPE_CORE_CONFIGURATION_INFO 73
360 * Request from client to transmit message.
362 #define GNUNET_MESSAGE_TYPE_CORE_SEND_REQUEST 74
365 * Confirmation from core that message can now be sent
367 #define GNUNET_MESSAGE_TYPE_CORE_SEND_READY 75
370 * Client with message to transmit (after SEND_READY confirmation
373 #define GNUNET_MESSAGE_TYPE_CORE_SEND 76
376 * Request from client asking to connect to a peer.
378 #define GNUNET_MESSAGE_TYPE_CORE_REQUEST_CONNECT 77
381 * Request for peer iteration from CORE service.
383 #define GNUNET_MESSAGE_TYPE_CORE_ITERATE_PEERS 78
386 * Last reply from core to request for peer iteration from CORE service.
388 #define GNUNET_MESSAGE_TYPE_CORE_ITERATE_PEERS_END 79
391 * Session key exchange between peers.
393 #define GNUNET_MESSAGE_TYPE_CORE_SET_KEY 80
396 * Encapsulation for an encrypted message between peers.
398 #define GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE 81
401 * Check that other peer is alive (challenge).
403 #define GNUNET_MESSAGE_TYPE_CORE_PING 82
406 * Confirmation that other peer is alive.
408 #define GNUNET_MESSAGE_TYPE_CORE_PONG 83
411 * Request by the other peer to terminate the connection.
413 #define GNUNET_MESSAGE_TYPE_CORE_HANGUP 84
416 * Message sent by datastore client on join.
418 #define GNUNET_MESSAGE_TYPE_DATASTORE_RESERVE 92
421 * Message sent by datastore client on join.
423 #define GNUNET_MESSAGE_TYPE_DATASTORE_RELEASE_RESERVE 93
426 * Message sent by datastore to client informing about status
427 * processing a request
428 * (in response to RESERVE, RELEASE_RESERVE, PUT, UPDATE and REMOVE requests).
430 #define GNUNET_MESSAGE_TYPE_DATASTORE_STATUS 94
433 * Message sent by datastore client to store data.
435 #define GNUNET_MESSAGE_TYPE_DATASTORE_PUT 95
438 * Message sent by datastore client to update data.
440 #define GNUNET_MESSAGE_TYPE_DATASTORE_UPDATE 96
443 * Message sent by datastore client to get data.
445 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET 97
448 * Message sent by datastore client to get random data.
450 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET_RANDOM 98
453 * Message sent by datastore client to get random data.
455 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET_ZERO_ANONYMITY 99
458 * Message sent by datastore to client providing requested data
459 * (in response to GET or GET_RANDOM request).
461 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA 100
464 * Message sent by datastore to client signaling end of matching data.
465 * This message will also be sent for "GET_RANDOM", even though
466 * "GET_RANDOM" returns at most one data item.
468 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END 101
471 * Message sent by datastore client to remove data.
473 #define GNUNET_MESSAGE_TYPE_DATASTORE_REMOVE 102
476 * Message sent by datastore client to drop the database.
478 #define GNUNET_MESSAGE_TYPE_DATASTORE_DROP 103
482 * Message sent by fs client to start indexing.
484 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START 128
487 * Affirmative response to a request for start indexing.
489 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK 129
492 * Response to a request for start indexing that
495 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED 130
498 * Request from client for list of indexed files.
500 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_GET 131
503 * Reply to client with an indexed file name.
505 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY 132
508 * Reply to client indicating end of list.
510 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_END 133
513 * Request from client to unindex a file.
515 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX 134
518 * Reply to client indicating unindex receipt.
520 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX_OK 135
523 * Client asks FS service to start a (keyword) search.
525 #define GNUNET_MESSAGE_TYPE_FS_START_SEARCH 136
528 * P2P request for content (one FS to another).
530 #define GNUNET_MESSAGE_TYPE_FS_GET 137
533 * P2P response with content or active migration of content. Also
534 * used between the service and clients (in response to START_SEARCH).
536 #define GNUNET_MESSAGE_TYPE_FS_PUT 138
539 * Peer asks us to stop migrating content towards it for a while.
541 #define GNUNET_MESSAGE_TYPE_FS_MIGRATION_STOP 139
549 * Local DHT route request type
551 #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE 142
554 * Local generic DHT route result type
556 #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_RESULT 143
559 * P2P DHT route request type
561 #define GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE 144
564 * P2P DHT route result type
566 #define GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE_RESULT 145
569 * Local generic DHT message stop type
571 #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_STOP 146
574 * Local and P2P DHT PUT message
575 * (encapsulated in DHT_ROUTE message)
577 #define GNUNET_MESSAGE_TYPE_DHT_PUT 147
580 * Local and P2P DHT GET message
581 * (encapsulated in DHT_ROUTE message)
583 #define GNUNET_MESSAGE_TYPE_DHT_GET 148
586 * Local and P2P DHT Get result message
588 #define GNUNET_MESSAGE_TYPE_DHT_GET_RESULT 149
591 * Local and P2P DHT find peer message
593 #define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER 150
596 * Local and P2P DHT find peer result message
598 #define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER_RESULT 151
601 * P2P DHT PING request type
603 #define GNUNET_MESSAGE_TYPE_DHT_P2P_PING 152
606 * DHT Control message type, for telling the
607 * DHT to alter its current operation somehow.
609 #define GNUNET_MESSAGE_TYPE_DHT_CONTROL 153
612 * Local control message type, tells peer to start
613 * issuing malicious GET requests.
615 #define GNUNET_MESSAGE_TYPE_DHT_MALICIOUS_GET 154
618 * Local control message type, tells peer to start
619 * issuing malicious PUT requests.
621 #define GNUNET_MESSAGE_TYPE_DHT_MALICIOUS_PUT 155
624 * Local control message type, tells peer to start
625 * dropping all requests.
627 #define GNUNET_MESSAGE_TYPE_DHT_MALICIOUS_DROP 156
630 * Hostlist advertisement message
632 #define GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT 160
636 * Set a statistical value.
638 #define GNUNET_MESSAGE_TYPE_STATISTICS_SET 168
641 * Get a statistical value(s).
643 #define GNUNET_MESSAGE_TYPE_STATISTICS_GET 169
646 * Response to a STATISTICS_GET message (with value).
648 #define GNUNET_MESSAGE_TYPE_STATISTICS_VALUE 170
651 * Response to a STATISTICS_GET message (end of value stream).
653 #define GNUNET_MESSAGE_TYPE_STATISTICS_END 171
656 * Watch changes to a statistical value. Message format is the same
657 * as for GET, except that the subsystem and entry name must be given.
659 #define GNUNET_MESSAGE_TYPE_STATISTICS_WATCH 172
662 * Changes to a watched value.
664 #define GNUNET_MESSAGE_TYPE_STATISTICS_WATCH_VALUE 173
668 * Type of messages between the gnunet-vpn-helper and the daemon
670 #define GNUNET_MESSAGE_TYPE_VPN_HELPER 185
673 * Type of messages containing an UDP packet for a service
675 #define GNUNET_MESSAGE_TYPE_SERVICE_UDP 186
678 * Type of messages containing an UDP packet from a service
680 #define GNUNET_MESSAGE_TYPE_SERVICE_UDP_BACK 187
684 * Type of messages between the gnunet-wlan-helper and the daemon
688 #define GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA 195
691 * Control messages between the gnunet-wlan-helper and the daemon
694 #define GNUNET_MESSAGE_TYPE_WLAN_HELPER_CONTROL 196
697 * Type of messages for advertisement over wlan
699 #define GNUNET_MESSAGE_TYPE_WLAN_ADVERTISEMENT 197
702 * Type of messages for data over the wlan
705 #define GNUNET_MESSAGE_TYPE_WLAN_DATA 198
708 * Fragment of a message
711 #define GNUNET_MESSAGE_TYPE_WLAN_FRAGMENT 199
714 * Fragment ack of a message
717 #define GNUNET_MESSAGE_TYPE_WLAN_FRAGMENT_ACK 200
721 * Type of messages to query the local service-dns
723 #define GNUNET_MESSAGE_TYPE_LOCAL_QUERY_DNS 205
725 * Type of messages the local service-dns responds with
727 #define GNUNET_MESSAGE_TYPE_LOCAL_RESPONSE_DNS 206
729 * Type of messages to instruct the local service-dns to rehijack the dns
731 #define GNUNET_MESSAGE_TYPE_REHIJACK 207
735 * Type of message used to transport messages throug a MESH-tunnel
737 #define GNUNET_MESSAGE_TYPE_MESH 215
741 * Type used to match 'all' message types.
743 #define GNUNET_MESSAGE_TYPE_ALL 65535
747 - applications (FS, VPN, CHAT, TRACEKIT, TBENCH)
753 /* BELOW: experimental student-DHT protocol codes */
756 * Request to join a CAN DHT
758 #define GNUNET_MESSAGE_TYPE_DHT_CAN_JOIN_REQUEST 1174
761 * Response to join request of a CAN DHT
763 #define GNUNET_MESSAGE_TYPE_DHT_CAN_JOIN_REPLY 1175
766 * Messages for swapping locations
768 #define GNUNET_MESSAGE_TYPE_DHT_GET_NEIGHBOURLIST_REQUEST 1180
770 #define GNUNET_MESSAGE_TYPE_DHT_GET_NEIGHBOURLIST_RESULT 1181
772 #define GNUNET_MESSAGE_TYPE_DHT_SWAP_LOCATION_REQUEST 1182
774 #define GNUNET_MESSAGE_TYPE_DHT_SWAP_LOCATION_ACK 1183
777 * Freenet hello message
779 #define GNUNET_MESSAGE_TYPE_DHT_FREENET_HELLO 1184
782 #if 0 /* keep Emacsens' auto-indent happy */
789 /* ifndef GNUNET_PROTOCOLS_H */
791 /* end of gnunet_protocols.h */