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
44 * Request service shutdown.
46 #define GNUNET_MESSAGE_TYPE_SHUTDOWN 1
50 * Request DNS resolution.
52 #define GNUNET_MESSAGE_TYPE_RESOLVER_REQUEST 2
55 * Response to a DNS resolution request.
57 #define GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE 3
61 * Set a statistical value.
63 #define GNUNET_MESSAGE_TYPE_STATISTICS_SET 4
66 * Get a statistical value(s).
68 #define GNUNET_MESSAGE_TYPE_STATISTICS_GET 5
71 * Response to a STATISTICS_GET message (with value).
73 #define GNUNET_MESSAGE_TYPE_STATISTICS_VALUE 6
76 * Response to a STATISTICS_GET message (end of value stream).
78 #define GNUNET_MESSAGE_TYPE_STATISTICS_END 7
82 * Request to ARM to start a service.
84 #define GNUNET_MESSAGE_TYPE_ARM_START 8
87 * Request to ARM to stop a service.
89 #define GNUNET_MESSAGE_TYPE_ARM_STOP 9
92 * Response from ARM: service is now up.
94 #define GNUNET_MESSAGE_TYPE_ARM_IS_UP 10
97 * Response from ARM: service is now down.
98 * (failed to start it or shut it down).
100 #define GNUNET_MESSAGE_TYPE_ARM_IS_DOWN 11
103 * Response from ARM: service status is unknown.
105 #define GNUNET_MESSAGE_TYPE_ARM_IS_UNKNOWN 12
108 * Acknowledge service shutting down, disconnect
109 * indicates service stopped.
111 #define GNUNET_MESSAGE_TYPE_SHUTDOWN_ACK 13
114 * Deny service shutdown, disconnect indicates
115 * service won't be stopped as a result of shutdown
118 #define GNUNET_MESSAGE_TYPE_SHUTDOWN_REFUSE 14
121 * HELLO message used for communicating peer addresses.
122 * Managed by libgnunethello.
124 #define GNUNET_MESSAGE_TYPE_HELLO 16
127 * FRAGMENT of a larger message.
128 * Managed by libgnunetfragment.
130 #define GNUNET_MESSAGE_TYPE_FRAGMENT 18
134 * Message from the core saying that the transport
135 * server should start giving it messages. This
136 * should automatically trigger the transmission of
139 #define GNUNET_MESSAGE_TYPE_TRANSPORT_START 20
142 * Message from TRANSPORT notifying about a
143 * client that connected to us.
145 #define GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT 21
148 * Message from TRANSPORT notifying about a
149 * client that disconnected from us.
151 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT 22
154 * Request to TRANSPORT to transmit a message.
156 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND 23
159 * Confirmation from TRANSPORT that message for
160 * transmission has been queued (and that the next
161 * message to this peer can now be passed to the
162 * service). Note that this confirmation does NOT
163 * imply that the message was fully transmitted.
165 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK 24
168 * Message from TRANSPORT notifying about a
169 * message that was received.
171 #define GNUNET_MESSAGE_TYPE_TRANSPORT_RECV 25
174 * Message telling transport to limit its receive rate.
176 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA 26
179 * Request to look addresses of peers in server.
181 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_LOOKUP 27
184 * Response to the address lookup request.
186 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_REPLY 28
189 * Register a client that wants to do blacklisting.
191 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_INIT 29
194 * Query to a blacklisting client (is this peer blacklisted)?
196 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY 30
200 * Reply from blacklisting client (answer to blacklist query).
202 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_REPLY 31
205 * Transport PING message
207 #define GNUNET_MESSAGE_TYPE_TRANSPORT_PING 32
210 * Transport PONG message
212 #define GNUNET_MESSAGE_TYPE_TRANSPORT_PONG 33
215 * Request update and listing of a peer.
217 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET 37
220 * Request update and listing of all peers.
222 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET_ALL 38
225 * Information about one of the peers.
227 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO 39
230 * End of information about other peers.
232 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END 40
235 * Start notifying this client about all changes to
236 * the known peers until it disconnects.
238 #define GNUNET_MESSAGE_TYPE_PEERINFO_NOTIFY 41
241 * DV service to DV Plugin message, when a message is
242 * unwrapped by the DV service and handed to the plugin
245 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_RECEIVE 44
248 * DV Plugin to DV service message, indicating a message
249 * should be sent out.
251 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_SEND 45
254 * DV service to DV api message, containing a confirmation
255 * or failure of a DV_SEND message.
257 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_SEND_RESULT 46
260 * P2P DV message encapsulating some real message
262 #define GNUNET_MESSAGE_TYPE_DV_DATA 47
265 * P2P DV message gossipping peer information
267 #define GNUNET_MESSAGE_TYPE_DV_GOSSIP 48
270 * DV Plugin to DV service message, indicating
273 #define GNUNET_MESSAGE_TYPE_DV_START 49
276 * P2P DV message notifying connected peers of a disconnect
278 #define GNUNET_MESSAGE_TYPE_DV_DISCONNECT 50
281 * UDP NAT probe message, send from NAT'd peer to
282 * other peer to negotiate punched address/port
284 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE 55
287 * UDP NAT probe reply, sent from a non-NAT'd peer to
288 * a NAT'd one to inform it we got the probe and of the
291 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_REPLY 56
294 * UDP NAT probe confirmation, sent from a NAT'd peer to
295 * a non-NAT'd one to inform it which port to send to us
298 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_CONFIRM 57
301 * UDP NAT probe keepalive, once a hole is punched the NAT'd peer
302 * needs to keep the hole alive
304 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_KEEPALIVE 58
307 * Welcome message between TCP transports.
309 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_WELCOME 60
312 * Initial setup message from core client to core.
314 #define GNUNET_MESSAGE_TYPE_CORE_INIT 64
317 * Response from core to core client to INIT message.
319 #define GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY 65
322 * Notify clients about new peer-to-peer connections (before
323 * key exchange and authentication).
325 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_PRE_CONNECT 66
328 * Notify clients about new peer-to-peer connections (triggered
329 * after key exchange).
331 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT 67
334 * Notify clients about peer disconnecting.
336 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT 68
339 * Notify clients about incoming P2P messages.
341 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND 69
344 * Notify clients about outgoing P2P transmissions.
346 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND 70
349 * Request from client to "configure" P2P connection.
351 #define GNUNET_MESSAGE_TYPE_CORE_REQUEST_INFO 71
354 * Response from server about (possibly updated) P2P
355 * connection configuration.
357 #define GNUNET_MESSAGE_TYPE_CORE_CONFIGURATION_INFO 72
360 * Request from client with message to transmit.
362 #define GNUNET_MESSAGE_TYPE_CORE_SEND 73
365 * Request from client asking to connect to a peer.
367 #define GNUNET_MESSAGE_TYPE_CORE_REQUEST_CONNECT 74
371 * Session key exchange between peers.
373 #define GNUNET_MESSAGE_TYPE_CORE_SET_KEY 80
376 * Encapsulation for an encrypted message between peers.
378 #define GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE 81
381 * Check that other peer is alive (challenge).
383 #define GNUNET_MESSAGE_TYPE_CORE_PING 82
386 * Confirmation that other peer is alive.
388 #define GNUNET_MESSAGE_TYPE_CORE_PONG 83
391 * Request by the other peer to terminate the connection.
393 #define GNUNET_MESSAGE_TYPE_CORE_HANGUP 84
396 * Message sent by datastore client on join.
398 #define GNUNET_MESSAGE_TYPE_DATASTORE_RESERVE 92
401 * Message sent by datastore client on join.
403 #define GNUNET_MESSAGE_TYPE_DATASTORE_RELEASE_RESERVE 93
406 * Message sent by datastore to client informing about status
407 * processing a request
408 * (in response to RESERVE, RELEASE_RESERVE, PUT, UPDATE and REMOVE requests).
410 #define GNUNET_MESSAGE_TYPE_DATASTORE_STATUS 94
413 * Message sent by datastore client to store data.
415 #define GNUNET_MESSAGE_TYPE_DATASTORE_PUT 95
418 * Message sent by datastore client to update data.
420 #define GNUNET_MESSAGE_TYPE_DATASTORE_UPDATE 96
423 * Message sent by datastore client to get data.
425 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET 97
428 * Message sent by datastore client to get random data.
430 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET_RANDOM 98
433 * Message sent by datastore to client providing requested data
434 * (in response to GET or GET_RANDOM request).
436 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA 99
439 * Message sent by datastore to client signaling end of matching data.
440 * This message will also be sent for "GET_RANDOM", even though
441 * "GET_RANDOM" returns at most one data item.
443 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END 100
446 * Message sent by datastore client to remove data.
448 #define GNUNET_MESSAGE_TYPE_DATASTORE_REMOVE 101
451 * Message sent by datastore client to drop the database.
453 #define GNUNET_MESSAGE_TYPE_DATASTORE_DROP 102
457 * Message sent by fs client to start indexing.
459 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START 128
462 * Affirmative response to a request for start indexing.
464 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK 129
467 * Response to a request for start indexing that
470 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED 130
473 * Request from client for list of indexed files.
475 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_GET 131
478 * Reply to client with an indexed file name.
480 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY 132
483 * Reply to client indicating end of list.
485 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_END 133
488 * Request from client to unindex a file.
490 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX 134
493 * Reply to client indicating unindex receipt.
495 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX_OK 135
498 * Client asks FS service to start a (keyword) search.
500 #define GNUNET_MESSAGE_TYPE_FS_START_SEARCH 136
503 * P2P request for content (one FS to another).
505 #define GNUNET_MESSAGE_TYPE_FS_GET 137
508 * P2P response with content or active migration of content. Also
509 * used between the service and clients (in response to START_SEARCH).
511 #define GNUNET_MESSAGE_TYPE_FS_PUT 138
519 * Local and P2P generic DHT message start type
521 #define GNUNET_MESSAGE_TYPE_DHT_ROUTE 142
524 * Local and P2P generic DHT message start type
526 #define GNUNET_MESSAGE_TYPE_DHT_ROUTE_RESULT 143
529 * Local and P2P generic DHT message stop type
531 #define GNUNET_MESSAGE_TYPE_DHT_STOP 144
534 * Local and message acknowledgment
536 #define GNUNET_MESSAGE_TYPE_DHT_ACK 145
539 * Local DHT Put message, from API to service
541 #define GNUNET_MESSAGE_TYPE_DHT_PUT 146
544 * Local DHT Get message, from API to service
546 #define GNUNET_MESSAGE_TYPE_DHT_GET 147
549 * Local DHT Get stop message, from API to service
551 #define GNUNET_MESSAGE_TYPE_DHT_GET_STOP 148
554 * Local DHT Get result message, from service to API
556 #define GNUNET_MESSAGE_TYPE_DHT_GET_RESULT 149
559 * Local DHT Get message, from API to service
561 #define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER 150
564 * Local DHT Get stop message, from API to service
566 #define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER_STOP 151
569 * Local DHT find peer result message, from service to API
571 #define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER_RESULT 152
574 * Hostlist advertisement message
576 #define GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT 160
579 * Type used to match 'all' message types.
581 #define GNUNET_MESSAGE_TYPE_ALL 65535
587 - applications (FS, VPN, CHAT, TRACEKIT, TBENCH)
591 #if 0 /* keep Emacsens' auto-indent happy */
598 /* ifndef GNUNET_PROTOCOLS_H */
600 /* end of gnunet_protocols.h */