aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-xdht_neighbours.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/gnunet-service-xdht_neighbours.h')
-rw-r--r--src/dht/gnunet-service-xdht_neighbours.h70
1 files changed, 54 insertions, 16 deletions
diff --git a/src/dht/gnunet-service-xdht_neighbours.h b/src/dht/gnunet-service-xdht_neighbours.h
index 8e0fce225..e8809d11a 100644
--- a/src/dht/gnunet-service-xdht_neighbours.h
+++ b/src/dht/gnunet-service-xdht_neighbours.h
@@ -73,6 +73,7 @@ GDS_NEIGHBOURS_handle_put (enum GNUNET_BLOCK_Type type,
73 struct GNUNET_PeerIdentity *put_path, 73 struct GNUNET_PeerIdentity *put_path,
74 const void *data, size_t data_size, 74 const void *data, size_t data_size,
75 struct GNUNET_PeerIdentity *current_destination, 75 struct GNUNET_PeerIdentity *current_destination,
76 struct GNUNET_PeerIdentity *current_source,
76 enum current_destination_type dest_type, 77 enum current_destination_type dest_type,
77 struct GNUNET_PeerIdentity *target_peer_id); 78 struct GNUNET_PeerIdentity *target_peer_id);
78 79
@@ -85,34 +86,71 @@ GDS_NEIGHBOURS_handle_put (enum GNUNET_BLOCK_Type type,
85 * @param key 86 * @param key
86 */ 87 */
87void 88void
88GDS_NEIGHBOURS_handle_get (struct GNUNET_PeerIdentity *source_peer, 89GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type block_type,
89 struct GNUNET_PeerIdentity *get_path, 90 enum GNUNET_DHT_RouteOption options,
91 uint32_t desired_replication_level,
92 uint32_t hop_count,
93 struct GNUNET_PeerIdentity *get_peer_path,
90 unsigned int get_path_length, 94 unsigned int get_path_length,
91 struct GNUNET_HashCode *key, 95 struct GNUNET_HashCode *key,
92 struct GNUNET_PeerIdentity *target_peer, 96 struct GNUNET_PeerIdentity *target_peer,
93 struct GNUNET_PeerIdentity *current_destination, 97 struct GNUNET_PeerIdentity *current_destination,
94 enum current_destination_type *type); 98 struct GNUNET_PeerIdentity *current_source,
99 enum current_destination_type *current_dest_type);
100
95 101
96/** 102/**
97 * Send get result back to requesting client. 103 * FIXME: I am removing source peer as the first element in the trail
98 * @param source_peer 104 * is source identity.
105 * Send get result back to requesting client.
106 * @param expiration when will the reply expire
107 * @param key the query this reply is for
108 * @param get_path_length number of peers in @a get_path
109 * @param get_path path the reply took on get
110 * @param put_path_length number of peers in @a put_path
111 * @param put_path path the reply took on put
112 * @param type type of the reply
113 * @param data_size number of bytes in @a data
114 * @param data application payload data
99 * @param get_path 115 * @param get_path
100 * @param get_path_length 116 * @param get_path_length
101 * @param key
102 * @param destination_peer
103 * @param current_path_index
104 * @param data
105 * @param data_size
106 */ 117 */
107void 118void
108GDS_NEIGHBOURS_send_get_result (struct GNUNET_PeerIdentity *source_peer, 119GDS_NEIGHBOURS_send_get_result (struct GNUNET_TIME_Absolute expiration,
120 const struct GNUNET_HashCode *key,
121 unsigned int put_path_length,
122 const struct GNUNET_PeerIdentity *put_path,
123 enum GNUNET_BLOCK_Type type, size_t data_size,
124 const void *data,
109 struct GNUNET_PeerIdentity *get_path, 125 struct GNUNET_PeerIdentity *get_path,
110 unsigned int get_path_length, 126 unsigned int get_path_length,
111 struct GNUNET_HashCode *key, 127 unsigned int current_trail_index,
112 struct GNUNET_PeerIdentity *destination_peer, 128 struct GNUNET_PeerIdentity *next_hop);
113 unsigned int current_path_index, 129
114 const void *data, size_t data_size, 130/**
115 struct GNUNET_PeerIdentity *next_peer); 131 * FIXME: Here you should update the fields of struct PeerGetResultMessage.
132 * At the end of this message you should add the data and get path and send
133 * to the original requesting client. and there you should call GDS_CLIENT_handle_reply
134 * with correct parameter.
135 * @param expiration
136 * @param key
137 * @param get_path_length
138 * @param get_path
139 * @param put_path_length
140 * @param put_path
141 * @param type
142 * @param data_size
143 * @param data
144 */
145void
146GDS_NEIGHBOURS_datacache_get (struct GNUNET_TIME_Absolute expiration,
147 const struct GNUNET_HashCode *key,
148 unsigned int get_path_length,
149 const struct GNUNET_PeerIdentity *get_path,
150 unsigned int put_path_length,
151 const struct GNUNET_PeerIdentity *put_path,
152 enum GNUNET_BLOCK_Type type, size_t data_size,
153 const void *data);
116 154
117 155
118/** 156/**