/*
This file is part of GNUnet.
- Copyright (C) 2009, 2010, 2011, 2015 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2009, 2010, 2011, 2015 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
*/
enum GNUNET_BLOCK_EvaluationResult eval;
+ /**
+ * Routing options of the GET.
+ */
+ enum GNUNET_DHT_RouteOption options;
+
};
("# Good RESULTS found in datacache"), 1,
GNUNET_NO);
GDS_NEIGHBOURS_send_get_result (ctx->trail_id,
+ ctx->options,
key,
type,
put_path_length,
* Handle a GET request we've received from another peer.
*
* @param trail_id trail identifying where to send the result to, NULL for us
+ * @param options routing options (to be passed along)
* @param key the query
* @param type requested data type
* @param xquery extended query
*/
enum GNUNET_BLOCK_EvaluationResult
GDS_DATACACHE_handle_get (const struct GNUNET_HashCode *trail_id,
+ enum GNUNET_DHT_RouteOption options,
const struct GNUNET_HashCode *key,
enum GNUNET_BLOCK_Type type,
const void *xquery,
1, GNUNET_NO);
ctx.eval = GNUNET_BLOCK_EVALUATION_REQUEST_VALID;
ctx.trail_id = trail_id;
+ ctx.options = options;
ctx.key = *key;
ctx.xquery = xquery;
ctx.xquery_size = xquery_size;
return GNUNET_OK;
}
+
/**
* Iterator for local get request results,
*
{
const struct GNUNET_HashCode *trail_id = cls;
+ /* NOTE: The datacache currently does not store the RO from
+ the original 'put', so we don't know the 'correct' option
+ at this point anymore. Thus, we conservatively assume
+ that recording is desired (for now). */
GDS_NEIGHBOURS_send_get_result (trail_id,
+ GNUNET_DHT_RO_RECORD_ROUTE,
key,
type,
put_path_length, put_path,