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
109 * HELLO message used for communicating peer addresses.
110 * Managed by libgnunethello.
112 #define GNUNET_MESSAGE_TYPE_HELLO 16
115 * FRAGMENT of a larger message.
116 * Managed by libgnunetfragment.
118 #define GNUNET_MESSAGE_TYPE_FRAGMENT 18
122 * Message from the core saying that the transport
123 * server should start giving it messages. This
124 * should automatically trigger the transmission of
127 #define GNUNET_MESSAGE_TYPE_TRANSPORT_START 20
130 * Message from TRANSPORT notifying about a
131 * client that connected to us.
133 #define GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT 21
136 * Message from TRANSPORT notifying about a
137 * client that disconnected from us.
139 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT 22
142 * Request to TRANSPORT to transmit a message.
144 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND 23
147 * Confirmation from TRANSPORT that message for
148 * transmission has been queued (and that the next
149 * message to this peer can now be passed to the
150 * service). Note that this confirmation does NOT
151 * imply that the message was fully transmitted.
153 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK 24
156 * Message from TRANSPORT notifying about a
157 * message that was received.
159 #define GNUNET_MESSAGE_TYPE_TRANSPORT_RECV 25
162 * Message telling transport to limit its receive rate.
164 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA 26
167 * Request to look addresses of peers in server.
169 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_LOOKUP 27
172 * Response to the address lookup request.
174 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_REPLY 28
177 * Register a client that wants to do blacklisting.
179 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_INIT 29
182 * Query to a blacklisting client (is this peer blacklisted)?
184 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY 30
187 * Reply from blacklisting client (answer to blacklist query).
189 #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_REPLY 31
192 * Transport PING message
194 #define GNUNET_MESSAGE_TYPE_TRANSPORT_PING 32
197 * Transport PONG message
199 #define GNUNET_MESSAGE_TYPE_TRANSPORT_PONG 33
202 * Request addition of a HELLO
204 #define GNUNET_MESSAGE_TYPE_PEERINFO_ADD 36
207 * Request update and listing of a peer.
209 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET 37
212 * Request update and listing of all peers.
214 #define GNUNET_MESSAGE_TYPE_PEERINFO_GET_ALL 38
217 * Information about one of the peers.
219 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO 39
222 * End of information about other peers.
224 #define GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END 40
227 * Start notifying this client about all changes to
228 * the known peers until it disconnects.
230 #define GNUNET_MESSAGE_TYPE_PEERINFO_NOTIFY 41
233 * DV service to DV Plugin message, when a message is
234 * unwrapped by the DV service and handed to the plugin
237 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_RECEIVE 44
240 * DV Plugin to DV service message, indicating a message
241 * should be sent out.
243 #define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_SEND 45
246 * P2P DV message encapsulating some real message
248 #define GNUNET_MESSAGE_TYPE_DV_DATA 46
251 * P2P DV message gossipping peer information
253 #define GNUNET_MESSAGE_TYPE_DV_GOSSIP 47
256 * DV Plugin to DV service message, indicating
259 #define GNUNET_MESSAGE_TYPE_DV_START 48
262 * UDP NAT probe message, send from NAT'd peer to
263 * other peer to negotiate punched address/port
265 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE 55
268 * UDP NAT probe reply, sent from a non-NAT'd peer to
269 * a NAT'd one to inform it we got the probe and of the
272 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_REPLY 56
275 * UDP NAT probe confirmation, sent from a NAT'd peer to
276 * a non-NAT'd one to inform it which port to send to us
279 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_CONFIRM 57
282 * UDP NAT probe keepalive, once a hole is punched the NAT'd peer
283 * needs to keep the hole alive
285 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_KEEPALIVE 58
288 * Welcome message between TCP transports.
290 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_WELCOME 60
293 * Initial setup message from core client to core.
295 #define GNUNET_MESSAGE_TYPE_CORE_INIT 64
298 * Response from core to core client to INIT message.
300 #define GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY 65
303 * Notify clients about new peer-to-peer connections (before
304 * key exchange and authentication).
306 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_PRE_CONNECT 66
309 * Notify clients about new peer-to-peer connections (triggered
310 * after key exchange).
312 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT 67
315 * Notify clients about peer disconnecting.
317 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT 68
320 * Notify clients about incoming P2P messages.
322 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND 69
325 * Notify clients about outgoing P2P transmissions.
327 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND 70
330 * Request from client to "configure" P2P connection.
332 #define GNUNET_MESSAGE_TYPE_CORE_REQUEST_INFO 71
335 * Response from server about (possibly updated) P2P
336 * connection configuration.
338 #define GNUNET_MESSAGE_TYPE_CORE_CONFIGURATION_INFO 72
341 * Request from client with message to transmit.
343 #define GNUNET_MESSAGE_TYPE_CORE_SEND 73
346 * Request from client asking to connect to a peer.
348 #define GNUNET_MESSAGE_TYPE_CORE_REQUEST_CONNECT 74
352 * Session key exchange between peers.
354 #define GNUNET_MESSAGE_TYPE_CORE_SET_KEY 80
357 * Encapsulation for an encrypted message between peers.
359 #define GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE 81
362 * Check that other peer is alive (challenge).
364 #define GNUNET_MESSAGE_TYPE_CORE_PING 82
367 * Confirmation that other peer is alive.
369 #define GNUNET_MESSAGE_TYPE_CORE_PONG 83
372 * Request by the other peer to terminate the connection.
374 #define GNUNET_MESSAGE_TYPE_CORE_HANGUP 84
377 * Message sent by datastore client on join.
379 #define GNUNET_MESSAGE_TYPE_DATASTORE_RESERVE 92
382 * Message sent by datastore client on join.
384 #define GNUNET_MESSAGE_TYPE_DATASTORE_RELEASE_RESERVE 93
387 * Message sent by datastore to client informing about status
388 * processing a request
389 * (in response to RESERVE, RELEASE_RESERVE, PUT, UPDATE and REMOVE requests).
391 #define GNUNET_MESSAGE_TYPE_DATASTORE_STATUS 94
394 * Message sent by datastore client to store data.
396 #define GNUNET_MESSAGE_TYPE_DATASTORE_PUT 95
399 * Message sent by datastore client to update data.
401 #define GNUNET_MESSAGE_TYPE_DATASTORE_UPDATE 96
404 * Message sent by datastore client to get data.
406 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET 97
409 * Message sent by datastore client to get random data.
411 #define GNUNET_MESSAGE_TYPE_DATASTORE_GET_RANDOM 98
414 * Message sent by datastore to client providing requested data
415 * (in response to GET or GET_RANDOM request).
417 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA 99
420 * Message sent by datastore to client signaling end of matching data.
421 * This message will also be sent for "GET_RANDOM", even though
422 * "GET_RANDOM" returns at most one data item.
424 #define GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END 100
427 * Message sent by datastore client to remove data.
429 #define GNUNET_MESSAGE_TYPE_DATASTORE_REMOVE 101
432 * Message sent by datastore client to drop the database.
434 #define GNUNET_MESSAGE_TYPE_DATASTORE_DROP 102
438 * Message sent by fs client to start indexing.
440 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START 128
443 * Affirmative response to a request for start indexing.
445 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK 129
448 * Response to a request for start indexing that
451 #define GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED 130
454 * Request from client for list of indexed files.
456 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_GET 131
459 * Reply to client with an indexed file name.
461 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY 132
464 * Reply to client indicating end of list.
466 #define GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_END 133
469 * Request from client to unindex a file.
471 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX 134
474 * Reply to client indicating unindex receipt.
476 #define GNUNET_MESSAGE_TYPE_FS_UNINDEX_OK 135
479 * Client asks FS service to start a (keyword) search.
481 #define GNUNET_MESSAGE_TYPE_FS_START_SEARCH 136
484 * P2P request for content (one FS to another).
486 #define GNUNET_MESSAGE_TYPE_FS_GET 137
489 * P2P response with content or active migration of content. Also
490 * used between the service and clients (in response to START_SEARCH).
492 #define GNUNET_MESSAGE_TYPE_FS_PUT 138
500 * Local and P2P generic DHT message start type
502 #define GNUNET_MESSAGE_TYPE_DHT 142
505 * Local and P2P generic DHT message stop type
507 #define GNUNET_MESSAGE_TYPE_DHT_STOP 143
510 * Local and message acknowledgment
512 #define GNUNET_MESSAGE_TYPE_DHT_ACK 144
515 * Local DHT Put message, from API to service
517 #define GNUNET_MESSAGE_TYPE_DHT_PUT 145
520 * Local DHT Get message, from API to service
522 #define GNUNET_MESSAGE_TYPE_DHT_GET 146
525 * Local DHT Get stop message, from API to service
527 #define GNUNET_MESSAGE_TYPE_DHT_GET_STOP 147
530 * Local DHT Get result message, from service to API
532 #define GNUNET_MESSAGE_TYPE_DHT_GET_RESULT 148
535 * Local DHT Get message, from API to service
537 #define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER 150
540 * Local DHT Get stop message, from API to service
542 #define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER_STOP 151
545 * Local DHT find peer result message, from service to API
547 #define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER_RESULT 152
550 * Hostlist advertisement message
552 #define GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT 160
555 * Type used to match 'all' message types.
557 #define GNUNET_MESSAGE_TYPE_ALL 65535
563 - applications (FS, VPN, CHAT, TRACEKIT, TBENCH)
567 #if 0 /* keep Emacsens' auto-indent happy */
574 /* ifndef GNUNET_PROTOCOLS_H */
576 /* end of gnunet_protocols.h */