* @param query original query (hash)
* @param bf pointer to bloom filter associated with query; possibly updated (!)
* @param bf_mutator mutation value for bf
- * @param xquery extrended query data (can be NULL, depending on type)
+ * @param xquery extended query data (can be NULL, depending on type)
* @param xquery_size number of bytes in xquery
* @param reply_block response to validate
* @param reply_block_size number of bytes in reply block
const void *reply_block,
size_t reply_block_size)
{
- if (type != GNUNET_BLOCK_TYPE_DHT_HELLO)
+ switch (type)
+ {
+ case GNUNET_BLOCK_TYPE_DHT_HELLO:
+ if (xquery_size != 0)
+ return GNUNET_BLOCK_EVALUATION_REQUEST_INVALID;
+ if (reply_block_size == 0)
+ return GNUNET_BLOCK_EVALUATION_REQUEST_VALID;
+ GNUNET_break (NULL == *bf);
+ return GNUNET_BLOCK_EVALUATION_OK_LAST;
+ default:
return GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED;
- if (xquery_size != 0)
- return GNUNET_BLOCK_EVALUATION_REQUEST_INVALID;
- if (reply_block_size == 0)
- return GNUNET_BLOCK_EVALUATION_REQUEST_VALID;
- GNUNET_break (NULL == *bf);
- return GNUNET_BLOCK_EVALUATION_OK_LAST;
+ }
}
* Entry point for the plugin.
*/
void *
-gnunet_plugin_block_dht_init (void *cls)
+libgnunet_plugin_block_dht_init (void *cls)
{
static enum GNUNET_BLOCK_Type types[] =
{
* Exit point from the plugin.
*/
void *
-gnunet_plugin_block_dht_done (void *cls)
+libgnunet_plugin_block_dht_done (void *cls)
{
struct GNUNET_TRANSPORT_PluginFunctions *api = cls;
* Entry point for the plugin.
*/
void *
-gnunet_plugin_block_template_init (void *cls)
+libgnunet_plugin_block_template_init (void *cls)
{
static enum GNUNET_BLOCK_Type types[] =
{
* Exit point from the plugin.
*/
void *
-gnunet_plugin_block_template_done (void *cls)
+libgnunet_plugin_block_template_done (void *cls)
{
struct GNUNET_TRANSPORT_PluginFunctions *api = cls;
* Entry point for the plugin.
*/
void *
-gnunet_plugin_block_test_init (void *cls)
+libgnunet_plugin_block_test_init (void *cls)
{
static enum GNUNET_BLOCK_Type types[] =
{
* Exit point from the plugin.
*/
void *
-gnunet_plugin_block_test_done (void *cls)
+libgnunet_plugin_block_test_done (void *cls)
{
struct GNUNET_TRANSPORT_PluginFunctions *api = cls;