- case GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET:
- if (msize < sizeof (struct GNUNET_DHT_MonitorGetMessage))
- {
- GNUNET_break (0);
- break;
- }
- ret = process_monitor_get_message(handle,
- (const struct GNUNET_DHT_MonitorGetMessage *) msg);
- break;
- case GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET_RESP:
- if (msize < sizeof (struct GNUNET_DHT_MonitorGetRespMessage))
- {
- GNUNET_break (0);
- break;
- }
- ret = process_monitor_get_resp_message(handle,
- (const struct GNUNET_DHT_MonitorGetRespMessage *) msg);
- break;
- case GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT:
- if (msize < sizeof (struct GNUNET_DHT_MonitorPutMessage))
- {
- GNUNET_break (0);
- break;
- }
- ret = process_monitor_put_message(handle,
- (const struct GNUNET_DHT_MonitorPutMessage *) msg);
- break;
- case GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT_RESP:
- /* Not implemented yet */
- GNUNET_break(0);
- break;
- case GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT:
- if (ntohs (msg->size) < sizeof (struct GNUNET_DHT_ClientResultMessage))
- {
- GNUNET_break (0);
- break;
- }
- dht_msg = (const struct GNUNET_DHT_ClientResultMessage *) msg;
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Received reply for `%s' from DHT service %p\n",
- GNUNET_h2s (&dht_msg->key), handle);
- GNUNET_CONTAINER_multihashmap_get_multiple (handle->active_requests,
- &dht_msg->key,
- &process_reply,
- (void *) dht_msg);
- ret = GNUNET_OK;
- break;
- case GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT_OK:
- if (ntohs (msg->size) != sizeof (struct GNUNET_DHT_ClientPutConfirmationMessage))
- {
- GNUNET_break (0);
- break;
- }
- ret = process_put_confirmation_message (handle,
- (const struct GNUNET_DHT_ClientPutConfirmationMessage*) msg);
- break;
-#if ENABLE_MALICIOUS
- case GNUNET_MESSAGE_TYPE_DHT_CLIENT_ACT_MALICIOUS_OK:
- if(msize != sizeof (struct GNUNET_DHT_ClientActMaliciousConfirmationMessage))
- {
- GNUNET_break (0);
- break;
- }
- ret = process_act_malicious_confirmation_message (handle,
- (const struct GNUNET_DHT_ClientActMaliciousConfirmationMessage*) msg);
- break;
-#endif
- default:
- GNUNET_break(0);