diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-25 22:16:20 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-25 22:16:20 +0000 |
commit | 858f4546a0044b3ea9abdfbe6dda2e95d7c04dc1 (patch) | |
tree | b0f0c65692214a9cf4c24f4bc1e03ec41247cfa6 /src/dht/gnunet-service-dht_neighbours.h | |
parent | 1990307349dce4eda6b576097d516b9e0342d98d (diff) | |
download | gnunet-858f4546a0044b3ea9abdfbe6dda2e95d7c04dc1.tar.gz gnunet-858f4546a0044b3ea9abdfbe6dda2e95d7c04dc1.zip |
wild hxing
Diffstat (limited to 'src/dht/gnunet-service-dht_neighbours.h')
-rw-r--r-- | src/dht/gnunet-service-dht_neighbours.h | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/src/dht/gnunet-service-dht_neighbours.h b/src/dht/gnunet-service-dht_neighbours.h index 1f2ae08e6..2c20df2c4 100644 --- a/src/dht/gnunet-service-dht_neighbours.h +++ b/src/dht/gnunet-service-dht_neighbours.h | |||
@@ -29,12 +29,18 @@ | |||
29 | 29 | ||
30 | 30 | ||
31 | /** | 31 | /** |
32 | * Perform a PUT operation. | 32 | * Perform a PUT operation. Forwards the given request to other |
33 | * peers. Does not store the data locally. Does not give the | ||
34 | * data to local clients. May do nothing if this is the only | ||
35 | * peer in the network (or if we are the closest peer in the | ||
36 | * network). | ||
33 | * | 37 | * |
34 | * @param type type of the block | 38 | * @param type type of the block |
35 | * @param options routing options | 39 | * @param options routing options |
36 | * @param desired_replication_level desired replication count | 40 | * @param desired_replication_level desired replication level |
37 | * @param expiration_time when does the content expire | 41 | * @param expiration_time when does the content expire |
42 | * @param hop_count how many hops has this message traversed so far | ||
43 | * @param bf Bloom filter of peers this PUT has already traversed | ||
38 | * @param key key for the content | 44 | * @param key key for the content |
39 | * @param put_path_length number of entries in put_path | 45 | * @param put_path_length number of entries in put_path |
40 | * @param put_path peers this request has traversed so far (if tracked) | 46 | * @param put_path peers this request has traversed so far (if tracked) |
@@ -42,10 +48,12 @@ | |||
42 | * @param data_size number of bytes in data | 48 | * @param data_size number of bytes in data |
43 | */ | 49 | */ |
44 | void | 50 | void |
45 | GST_NEIGHBOURS_handle_put (uint32_t type, | 51 | GDS_NEIGHBOURS_handle_put (uint32_t type, |
46 | uint32_t options, | 52 | uint32_t options, |
47 | uint32_t desired_replication_level, | 53 | uint32_t desired_replication_level, |
48 | GNUNET_TIME_Absolute expiration_time, | 54 | GNUNET_TIME_Absolute expiration_time, |
55 | uint32_t hop_count, | ||
56 | struct GNUNET_CONTAINER_BloomFilter *bf, | ||
49 | const GNUNET_HashCode *key, | 57 | const GNUNET_HashCode *key, |
50 | unsigned int put_path_length, | 58 | unsigned int put_path_length, |
51 | struct GNUNET_PeerIdentity *put_path, | 59 | struct GNUNET_PeerIdentity *put_path, |
@@ -54,11 +62,15 @@ GST_NEIGHBOURS_handle_put (uint32_t type, | |||
54 | 62 | ||
55 | 63 | ||
56 | /** | 64 | /** |
57 | * Perform a GET operation. | 65 | * Perform a GET operation. Forwards the given request to other |
66 | * peers. Does not lookup the key locally. May do nothing if this is | ||
67 | * the only peer in the network (or if we are the closest peer in the | ||
68 | * network). | ||
58 | * | 69 | * |
59 | * @param type type of the block | 70 | * @param type type of the block |
60 | * @param options routing options | 71 | * @param options routing options |
61 | * @param desired_replication_level desired replication count | 72 | * @param desired_replication_level desired replication count |
73 | * @param hop_count how many hops did this request traverse so far? | ||
62 | * @param key key for the content | 74 | * @param key key for the content |
63 | * @param xquery extended query | 75 | * @param xquery extended query |
64 | * @param xquery_size number of bytes in xquery | 76 | * @param xquery_size number of bytes in xquery |
@@ -67,9 +79,10 @@ GST_NEIGHBOURS_handle_put (uint32_t type, | |||
67 | * @param peer_bf filter for peers not to select (again) | 79 | * @param peer_bf filter for peers not to select (again) |
68 | */ | 80 | */ |
69 | void | 81 | void |
70 | GST_NEIGHBOURS_handle_get (uint32_t type, | 82 | GDS_NEIGHBOURS_handle_get (uint32_t type, |
71 | uint32_t options, | 83 | uint32_t options, |
72 | uint32_t desired_replication_level, | 84 | uint32_t desired_replication_level, |
85 | uint32_t hop_count, | ||
73 | const GNUNET_HashCode *key, | 86 | const GNUNET_HashCode *key, |
74 | const void *xquery, | 87 | const void *xquery, |
75 | size_t xquery_size, | 88 | size_t xquery_size, |
@@ -79,10 +92,11 @@ GST_NEIGHBOURS_handle_get (uint32_t type, | |||
79 | 92 | ||
80 | 93 | ||
81 | /** | 94 | /** |
82 | * Handle a reply (route to origin). | 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. | ||
83 | * | 98 | * |
84 | * @param type type of the block | 99 | * @param type type of the block |
85 | * @param options routing options | ||
86 | * @param expiration_time when does the content expire | 100 | * @param expiration_time when does the content expire |
87 | * @param key key for the content | 101 | * @param key key for the content |
88 | * @param put_path_length number of entries in put_path | 102 | * @param put_path_length number of entries in put_path |
@@ -93,8 +107,7 @@ GST_NEIGHBOURS_handle_get (uint32_t type, | |||
93 | * @param data_size number of bytes in data | 107 | * @param data_size number of bytes in data |
94 | */ | 108 | */ |
95 | void | 109 | void |
96 | GST_NEIGHBOURS_handle_reply (uint32_t type, | 110 | GDS_NEIGHBOURS_handle_reply (uint32_t type, |
97 | uint32_t options, | ||
98 | GNUNET_TIME_Absolute expiration_time, | 111 | GNUNET_TIME_Absolute expiration_time, |
99 | const GNUNET_HashCode *key, | 112 | const GNUNET_HashCode *key, |
100 | unsigned int put_path_length, | 113 | unsigned int put_path_length, |
@@ -109,13 +122,13 @@ GST_NEIGHBOURS_handle_reply (uint32_t type, | |||
109 | * Initialize neighbours subsystem. | 122 | * Initialize neighbours subsystem. |
110 | */ | 123 | */ |
111 | void | 124 | void |
112 | GST_NEIGHBOURS_init (void); | 125 | GDS_NEIGHBOURS_init (void); |
113 | 126 | ||
114 | /** | 127 | /** |
115 | * Shutdown neighbours subsystem. | 128 | * Shutdown neighbours subsystem. |
116 | */ | 129 | */ |
117 | void | 130 | void |
118 | GST_NEIGHBOURS_done (void); | 131 | GDS_NEIGHBOURS_done (void); |
119 | 132 | ||
120 | 133 | ||
121 | #endif | 134 | #endif |