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.h90
1 files changed, 1 insertions, 89 deletions
diff --git a/src/dht/gnunet-service-xdht_neighbours.h b/src/dht/gnunet-service-xdht_neighbours.h
index a059d80fc..615db9198 100644
--- a/src/dht/gnunet-service-xdht_neighbours.h
+++ b/src/dht/gnunet-service-xdht_neighbours.h
@@ -32,94 +32,6 @@
32#include "gnunet_dht_service.h" 32#include "gnunet_dht_service.h"
33 33
34/** 34/**
35 * Perform a PUT operation. Forwards the given request to other
36 * peers. Does not store the data locally. Does not give the
37 * data to local clients. May do nothing if this is the only
38 * peer in the network (or if we are the closest peer in the
39 * network).
40 *
41 * @param type type of the block
42 * @param options routing options
43 * @param desired_replication_level desired replication level
44 * @param expiration_time when does the content expire
45 * @param hop_count how many hops has this message traversed so far
46 * @param bf Bloom filter of peers this PUT has already traversed
47 * @param key key for the content
48 * @param put_path_length number of entries in put_path
49 * @param put_path peers this request has traversed so far (if tracked)
50 * @param data payload to store
51 * @param data_size number of bytes in data
52 */
53void
54GDS_NEIGHBOURS_handle_put (enum GNUNET_BLOCK_Type type,
55 enum GNUNET_DHT_RouteOption options,
56 uint32_t desired_replication_level,
57 struct GNUNET_TIME_Absolute expiration_time,
58 uint32_t hop_count,
59 struct GNUNET_CONTAINER_BloomFilter *bf,
60 const struct GNUNET_HashCode * key,
61 unsigned int put_path_length,
62 struct GNUNET_PeerIdentity *put_path,
63 const void *data, size_t data_size);
64
65
66/**
67 * Perform a GET operation. Forwards the given request to other
68 * peers. Does not lookup the key locally. May do nothing if this is
69 * the only peer in the network (or if we are the closest peer in the
70 * network).
71 *
72 * @param type type of the block
73 * @param options routing options
74 * @param desired_replication_level desired replication count
75 * @param hop_count how many hops did this request traverse so far?
76 * @param key key for the content
77 * @param xquery extended query
78 * @param xquery_size number of bytes in xquery
79 * @param reply_bf bloomfilter to filter duplicates
80 * @param reply_bf_mutator mutator for reply_bf
81 * @param peer_bf filter for peers not to select (again, updated)
82 */
83void
84GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type,
85 enum GNUNET_DHT_RouteOption options,
86 uint32_t desired_replication_level,
87 uint32_t hop_count, const struct GNUNET_HashCode * key,
88 const void *xquery, size_t xquery_size,
89 const struct GNUNET_CONTAINER_BloomFilter *reply_bf,
90 uint32_t reply_bf_mutator,
91 struct GNUNET_CONTAINER_BloomFilter *peer_bf);
92
93
94/**
95 * Handle a reply (route to origin). Only forwards the reply back to
96 * other peers waiting for it. Does not do local caching or
97 * forwarding to local clients.
98 *
99 * @param target neighbour that should receive the block (if still connected)
100 * @param type type of the block
101 * @param expiration_time when does the content expire
102 * @param key key for the content
103 * @param put_path_length number of entries in put_path
104 * @param put_path peers the original PUT traversed (if tracked)
105 * @param get_path_length number of entries in put_path
106 * @param get_path peers this reply has traversed so far (if tracked)
107 * @param data payload of the reply
108 * @param data_size number of bytes in data
109 */
110void
111GDS_NEIGHBOURS_handle_reply (const struct GNUNET_PeerIdentity *target,
112 enum GNUNET_BLOCK_Type type,
113 struct GNUNET_TIME_Absolute expiration_time,
114 const struct GNUNET_HashCode * key,
115 unsigned int put_path_length,
116 const struct GNUNET_PeerIdentity *put_path,
117 unsigned int get_path_length,
118 const struct GNUNET_PeerIdentity *get_path,
119 const void *data, size_t data_size);
120
121
122/**
123 * Initialize neighbours subsystem. 35 * Initialize neighbours subsystem.
124 * 36 *
125 * @return GNUNET_OK on success, GNUNET_SYSERR on error 37 * @return GNUNET_OK on success, GNUNET_SYSERR on error
@@ -144,4 +56,4 @@ struct GNUNET_PeerIdentity *
144GDS_NEIGHBOURS_get_id (); 56GDS_NEIGHBOURS_get_id ();
145 57
146 58
147#endif 59#endif \ No newline at end of file