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.h86
1 files changed, 0 insertions, 86 deletions
diff --git a/src/dht/gnunet-service-xdht_neighbours.h b/src/dht/gnunet-service-xdht_neighbours.h
index 1df45031d..2fb118448 100644
--- a/src/dht/gnunet-service-xdht_neighbours.h
+++ b/src/dht/gnunet-service-xdht_neighbours.h
@@ -33,67 +33,6 @@
33 33
34 34
35/** 35/**
36 * Handle the put request from the client.
37 * @param key Key for the content
38 * @param block_type Type of the block
39 * @param options Routing options
40 * @param desired_replication_level Desired replication count
41 * @param expiration_time When does the content expire
42 * @param data Content to store
43 * @param data_size Size of content @a data in bytes
44 */
45void
46GDS_NEIGHBOURS_handle_put (const struct GNUNET_HashCode *key,
47 enum GNUNET_BLOCK_Type block_type,
48 enum GNUNET_DHT_RouteOption options,
49 uint32_t desired_replication_level,
50 struct GNUNET_TIME_Absolute expiration_time,
51 const void *data, size_t data_size);
52
53/**
54 * Handle the get request from the client file. If I am destination do
55 * datacache put and return. Else find the target friend and forward message
56 * to it.
57 * @param key Key for the content
58 * @param block_type Type of the block
59 * @param options Routing options
60 * @param desired_replication_level Desired replication count
61 */
62void
63GDS_NEIGHBOURS_handle_get (const struct GNUNET_HashCode *key,
64 enum GNUNET_BLOCK_Type block_type,
65 enum GNUNET_DHT_RouteOption options,
66 uint32_t desired_replication_level);
67
68/**
69 * Send the get result to requesting client.
70 * @param key Key of the requested data.
71 * @param type Block type
72 * @param target_peer Next peer to forward the message to.
73 * @param source_peer Peer which has the data for the key.
74 * @param put_path_length Number of peers in @a put_path
75 * @param put_path Path taken to put the data at its stored location.
76 * @param get_path_length Number of peers in @a get_path
77 * @param get_path Path taken to reach to the location of the key.
78 * @param expiration When will this result expire?
79 * @param data Payload to store
80 * @param data_size Size of the @a data
81 */
82void
83GDS_NEIGHBOURS_send_get_result (const struct GNUNET_HashCode *key,
84 enum GNUNET_BLOCK_Type type,
85 const struct GNUNET_PeerIdentity *target_peer,
86 const struct GNUNET_PeerIdentity *source_peer,
87 unsigned int put_path_length,
88 const struct GNUNET_PeerIdentity *put_path,
89 unsigned int get_path_length,
90 const struct GNUNET_PeerIdentity *get_path,
91 struct GNUNET_TIME_Absolute expiration,
92 const void *data,
93 size_t data_size);
94
95
96/**
97 * Construct a trail teardown message and forward it to target friend. 36 * Construct a trail teardown message and forward it to target friend.
98 * @param trail_id Unique identifier of the trail. 37 * @param trail_id Unique identifier of the trail.
99 * @param trail_direction Direction of trail. 38 * @param trail_direction Direction of trail.
@@ -105,29 +44,4 @@ GDS_NEIGHBOURS_send_trail_teardown (const struct GNUNET_HashCode *trail_id,
105 const struct GNUNET_PeerIdentity *peer); 44 const struct GNUNET_PeerIdentity *peer);
106 45
107 46
108/**
109 * Initialize neighbours subsystem.
110 *
111 * @return #GNUNET_OK on success,
112 * #GNUNET_SYSERR on error
113 */
114int
115GDS_NEIGHBOURS_init (void);
116
117
118/**
119 * Shutdown neighbours subsystem.
120 */
121void
122GDS_NEIGHBOURS_done (void);
123
124
125/**
126 * Get my identity
127 *
128 * @return my identity
129 */
130struct GNUNET_PeerIdentity
131GDS_NEIGHBOURS_get_my_id (void);
132
133#endif 47#endif