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 0
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 * Request update and listing of a peer.
190 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET 37
193 * Request update and listing of all peers.
195 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET_ALL 38
198 * Information about one of the peers.
200 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO 39
203 * End of information about other peers.
205 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END 40
208 * Start notifying this client about all changes to
209 * the known peers until it disconnects.
211 #define GNUNET_MESSAGE_TYPE_PEERINFO_NOTIFY 41
214 * DV service to DV Plugin message, when a message is
215 * unwrapped by the DV service and handed to the plugin
218 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_RECEIVE 44
221 * DV Plugin to DV service message, indicating a message
222 * should be sent out.
224 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_SEND 45
227 * DV service to DV api message, containing a confirmation
228 * or failure of a DV_SEND message.
230 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_SEND_RESULT 46
233 * P2P DV message encapsulating some real message
235 #define GNUNET_MESSAGE_TYPE_DV_DATA 47
238 * P2P DV message gossipping peer information
240 #define GNUNET_MESSAGE_TYPE_DV_GOSSIP 48
243 * DV Plugin to DV service message, indicating
246 #define GNUNET_MESSAGE_TYPE_DV_START 49
249 * P2P DV message notifying connected peers of a disconnect
251 #define GNUNET_MESSAGE_TYPE_DV_DISCONNECT 50
254 * TCP NAT probe message, send from NAT'd peer to
255 * other peer to establish bi-directional communication
257 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_NAT_PROBE 51
260 * Normal UDP message type.
262 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_MESSAGE 52
265 * Fragmented part of a UDP message.
267 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_MESSAGE_PART 53
270 * UDP NAT probe message, send from NAT'd peer to
271 * other peer to negotiate punched address/port
273 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE 55
276 * UDP NAT probe reply, sent from a non-NAT'd peer to
277 * a NAT'd one to inform it we got the probe and of the
280 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_REPLY 56
283 * UDP NAT probe confirmation, sent from a NAT'd peer to
284 * a non-NAT'd one to inform it which port to send to us
287 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_CONFIRM 57
290 * UDP NAT probe keepalive, once a hole is punched the NAT'd peer
291 * needs to keep the hole alive
293 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_KEEPALIVE 58
296 * Welcome message between TCP transports.
298 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_WELCOME 60
301 * Initial setup message from core client to core.
303 #define GNUNET_MESSAGE_TYPE_CORE_INIT 64
306 * Response from core to core client to INIT message.
308 #define GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY 65
311 * Notify clients about new peer-to-peer connections (before
312 * key exchange and authentication).
314 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_PRE_CONNECT 66
317 * Notify clients about new peer-to-peer connections (triggered
318 * after key exchange).
320 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT 67
323 * Notify clients about peer disconnecting.
325 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT 68
328 * Notify clients about peer status change.
330 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_STATUS_CHANGE 69
333 * Notify clients about incoming P2P messages.
335 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND 70
338 * Notify clients about outgoing P2P transmissions.
340 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND 71
343 * Request from client to "configure" P2P connection.
345 #define GNUNET_MESSAGE_TYPE_CORE_REQUEST_INFO 72
348 * Response from server about (possibly updated) P2P
349 * connection configuration.
351 #define GNUNET_MESSAGE_TYPE_CORE_CONFIGURATION_INFO 73
354 * Request from client with message to transmit.
356 #define GNUNET_MESSAGE_TYPE_CORE_SEND 74
359 * Request from client asking to connect to a peer.
361 #define GNUNET_MESSAGE_TYPE_CORE_REQUEST_CONNECT 75
365 * Session key exchange between peers.
367 #define GNUNET_MESSAGE_TYPE_CORE_SET_KEY 80
370 * Encapsulation for an encrypted message between peers.
372 #define GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE 81
375 * Check that other peer is alive (challenge).
377 #define GNUNET_MESSAGE_TYPE_CORE_PING 82
380 * Confirmation that other peer is alive.
382 #define GNUNET_MESSAGE_TYPE_CORE_PONG 83
385 * Request by the other peer to terminate the connection.
387 #define GNUNET_MESSAGE_TYPE_CORE_HANGUP 84
390 * Message sent by datastore client on join.
392 #define GNUNET_MESSAGE_TYPE_DATASTORE_RESERVE 92
395 * Message sent by datastore client on join.
397 #define GNUNET_MESSAGE_TYPE_DATASTORE_RELEASE_RESERVE 93
400 * Message sent by datastore to client informing about status
401 * processing a request
402 * (in response to RESERVE, RELEASE_RESERVE, PUT, UPDATE and REMOVE requests).
404 #define GNUNET_MESSAGE_TYPE_DATASTORE_STATUS 94
407 * Message sent by datastore client to store data.
409 #define GNUNET_MESSAGE_TYPE_DATASTORE_PUT 95
412 * Message sent by datastore client to update data.
414 #define GNUNET_MESSAGE_TYPE_DATASTORE_UPDATE 96
417 * Message sent by datastore client to get data.
419 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET 97
422 * Message sent by datastore client to get random data.
424 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET_RANDOM 98
427 * Message sent by datastore to client providing requested data
428 * (in response to GET or GET_RANDOM request).
430 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA 99
433 * Message sent by datastore to client signaling end of matching data.
434 * This message will also be sent for "GET_RANDOM", even though
435 * "GET_RANDOM" returns at most one data item.
437 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END 100
440 * Message sent by datastore client to remove data.
442 #define GNUNET_MESSAGE_TYPE_DATASTORE_REMOVE 101
445 * Message sent by datastore client to drop the database.
447 #define GNUNET_MESSAGE_TYPE_DATASTORE_DROP 102
451 * Message sent by fs client to start indexing.
453 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START 128
456 * Affirmative response to a request for start indexing.
458 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK 129
461 * Response to a request for start indexing that
464 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED 130
467 * Request from client for list of indexed files.
469 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_GET 131
472 * Reply to client with an indexed file name.
474 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY 132
477 * Reply to client indicating end of list.
479 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_END 133
482 * Request from client to unindex a file.
484 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX 134
487 * Reply to client indicating unindex receipt.
489 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX_OK 135
492 * Client asks FS service to start a (keyword) search.
494 #define GNUNET_MESSAGE_TYPE_FS_START_SEARCH 136
497 * P2P request for content (one FS to another).
499 #define GNUNET_MESSAGE_TYPE_FS_GET 137
502 * P2P response with content or active migration of content. Also
503 * used between the service and clients (in response to START_SEARCH).
505 #define GNUNET_MESSAGE_TYPE_FS_PUT 138
513 * Local DHT route request type
515 #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE 142
518 * Local generic DHT route result type
520 #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_RESULT 143
523 * P2P DHT route request type
525 #define GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE 144
528 * P2P DHT route result type
530 #define GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE_RESULT 145
533 * Local generic DHT message stop type
535 #define GNUNET_MESSAGE_TYPE_DHT_ROUTE_STOP 146
538 * Local and P2P DHT PUT message
539 * (encapsulated in DHT_ROUTE message)
541 #define GNUNET_MESSAGE_TYPE_DHT_PUT 147
544 * Local and P2P DHT GET message
545 * (encapsulated in DHT_ROUTE message)
547 #define GNUNET_MESSAGE_TYPE_DHT_GET 148
550 * Local DHT Get stop message, from API to service
551 * (encapsulated in DHT_ROUTE_STOP message)
553 #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_GET_STOP 149
556 * Local and P2P DHT Get result message
558 #define GNUNET_MESSAGE_TYPE_DHT_GET_RESULT 150
561 * Local and P2P DHT find peer message
563 #define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER 151
566 * Local DHT find peer stop message, from API to service
568 #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_FIND_PEER_STOP 152
571 * Local and P2P DHT find peer result message
573 #define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER_RESULT 153
576 * Hostlist advertisement message
578 #define GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT 170
582 * Set a statistical value.
584 #define GNUNET_MESSAGE_TYPE_STATISTICS_SET 168
587 * Get a statistical value(s).
589 #define GNUNET_MESSAGE_TYPE_STATISTICS_GET 169
592 * Response to a STATISTICS_GET message (with value).
594 #define GNUNET_MESSAGE_TYPE_STATISTICS_VALUE 170
597 * Response to a STATISTICS_GET message (end of value stream).
599 #define GNUNET_MESSAGE_TYPE_STATISTICS_END 171
602 * Watch changes to a statistical value. Message format is the same
603 * as for GET, except that the subsystem and entry name must be given.
605 #define GNUNET_MESSAGE_TYPE_STATISTICS_WATCH 172
608 * Changes to a watched value.
610 #define GNUNET_MESSAGE_TYPE_STATISTICS_WATCH_VALUE 173
614 * Type of messages between the gnunet-vpn-helper and the daemon
616 #define GNUNET_MESSAGE_TYPE_VPN_HELPER 185
619 * Type used to match 'all' message types.
621 #define GNUNET_MESSAGE_TYPE_ALL 65535
625 - applications (FS, VPN, CHAT, TRACEKIT, TBENCH)
631 /* BELOW: experimental student-DHT protocol codes */
634 * Request to join a CAN DHT
636 #define GNUNET_MESSAGE_TYPE_DHT_CAN_JOIN_REQUEST 1174
639 * Response to join request of a CAN DHT
641 #define GNUNET_MESSAGE_TYPE_DHT_CAN_JOIN_REPLY 1175
644 * Messages for swapping locations
646 #define GNUNET_MESSAGE_TYPE_DHT_GET_NEIGHBOURLIST_REQUEST 1180
648 #define GNUNET_MESSAGE_TYPE_DHT_GET_NEIGHBOURLIST_RESULT 1181
650 #define GNUNET_MESSAGE_TYPE_DHT_SWAP_LOCATION_REQUEST 1182
652 #define GNUNET_MESSAGE_TYPE_DHT_SWAP_LOCATION_ACK 1183
655 * Freenet hello message
657 #define GNUNET_MESSAGE_TYPE_DHT_FREENET_HELLO 1184
660 #if 0 /* keep Emacsens' auto-indent happy */
667 /* ifndef GNUNET_PROTOCOLS_H */
669 /* end of gnunet_protocols.h */