2 This file is part of GNUnet.
3 (C) 2001, 2002, 2003, 2004, 2009, 2011 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 3, 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 * @author Christian Grothoff
23 * @author Nathan Evans
32 * Message which indicates the DHT should cancel outstanding
33 * requests and discard any state.
35 struct GNUNET_DHT_ClientGetStopMessage
38 * Type: GNUNET_MESSAGE_TYPE_DHT_GET_STOP
40 struct GNUNET_MessageHeader header;
45 uint32_t reserved GNUNET_PACKED;
48 * Unique ID identifying this request
50 uint64_t unique_id GNUNET_PACKED;
61 * DHT GET message sent from clients to service. Indicates that a GET
62 * request should be issued.
64 struct GNUNET_DHT_ClientGetMessage
67 * Type: GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET
69 struct GNUNET_MessageHeader header;
72 * Message options, actually an 'enum GNUNET_DHT_RouteOption' value.
74 uint32_t options GNUNET_PACKED;
77 * Replication level for this message
79 uint32_t desired_replication_level GNUNET_PACKED;
82 * The type for the data for the GET request; actually an 'enum
88 * The key to search for
93 * Unique ID identifying this request, if 0 then
94 * the client will not expect a response
96 uint64_t unique_id GNUNET_PACKED;
98 /* Possibly followed by xquery, copied to end of this dealy do */
104 * Reply to a GET send from the service to a client.
106 struct GNUNET_DHT_ClientResultMessage
109 * Type: GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT
111 struct GNUNET_MessageHeader header;
114 * The type for the data.
119 * Number of peers recorded in the outgoing path from source to the
120 * storgage location of this message.
122 uint32_t put_path_length GNUNET_PACKED;
125 * The number of peer identities recorded from the storage location
128 uint32_t get_path_length GNUNET_PACKED;
131 * Unique ID of the matching GET request.
133 uint64_t unique_id GNUNET_PACKED;
136 * When does this entry expire?
138 struct GNUNET_TIME_AbsoluteNBO expiration;
141 * The key that was searched for
145 /* put path, get path and actual data are copied to end of this dealy do */
151 * Message to insert data into the DHT, sent from clients to DHT service.
153 struct GNUNET_DHT_ClientPutMessage
156 * Type: GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT
158 struct GNUNET_MessageHeader header;
161 * The type of data to insert.
163 uint32_t type GNUNET_PACKED;
166 * Message options, actually an 'enum GNUNET_DHT_RouteOption' value.
168 uint32_t options GNUNET_PACKED;
171 * Replication level for this message
173 uint32_t desired_replication_level GNUNET_PACKED;
176 * How long should this data persist?
178 struct GNUNET_TIME_AbsoluteNBO expiration;
181 * The key to store the value under.
185 /* DATA copied to end of this message */