From 32a1336441006bd6cce4ed7168c37679e78e06b6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 21 Jul 2010 08:47:55 +0000 Subject: [PATCH] renaming --- src/dht/dht.h | 12 ++++++------ src/dht/dht_api.c | 4 ++-- src/dht/gnunet-service-dht.c | 12 ++++++------ src/include/gnunet_protocols.h | 12 ++++++------ 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/dht/dht.h b/src/dht/dht.h index 6f22a566a..82554dbaf 100644 --- a/src/dht/dht.h +++ b/src/dht/dht.h @@ -82,7 +82,7 @@ struct GNUNET_DHT_StopMessage struct GNUNET_DHT_RouteMessage { /** - * Type: GNUNET_MESSAGE_TYPE_LOCAL_DHT_ROUTE + * Type: GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE */ struct GNUNET_MessageHeader header; @@ -118,7 +118,7 @@ struct GNUNET_DHT_RouteMessage struct GNUNET_DHT_RouteResultMessage { /** - * Type: GNUNET_MESSAGE_TYPE_LOCAL_DHT_ROUTE_RESULT + * Type: GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_RESULT */ struct GNUNET_MessageHeader header; @@ -147,7 +147,7 @@ struct GNUNET_DHT_RouteResultMessage struct GNUNET_DHT_P2PRouteMessage { /** - * Type: GNUNET_MESSAGE_TYPE_P2P_DHT_ROUTE + * Type: GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE */ struct GNUNET_MessageHeader header; @@ -219,7 +219,7 @@ struct GNUNET_DHT_P2PRouteMessage struct GNUNET_DHT_P2PRouteResultMessage { /** - * Type: GNUNET_MESSAGE_TYPE_P2P_DHT_ROUTE_RESULT + * Type: GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE_RESULT */ struct GNUNET_MessageHeader header; @@ -267,7 +267,7 @@ struct GNUNET_DHT_P2PRouteResultMessage struct GNUNET_DHT_PutMessage { /** - * Type: GNUNET_MESSAGE_TYPE_DHT_PUT / GNUNET_MESSAGE_TYPE_P2P_DHT_PUT + * Type: GNUNET_MESSAGE_TYPE_DHT_PUT / GNUNET_MESSAGE_TYPE_DHT_P2P_PUT */ struct GNUNET_MessageHeader header; @@ -298,7 +298,7 @@ struct GNUNET_DHT_PutMessage struct GNUNET_DHT_GetMessage { /** - * Type: GNUNET_MESSAGE_TYPE_DHT_GET / GNUNET_MESSAGE_TYPE_P2P_DHT_GET + * Type: GNUNET_MESSAGE_TYPE_DHT_GET / GNUNET_MESSAGE_TYPE_DHT_P2P_GET */ struct GNUNET_MessageHeader header; diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c index 14c3a9a3f..7bec36d5b 100644 --- a/src/dht/dht_api.c +++ b/src/dht/dht_api.c @@ -585,7 +585,7 @@ service_message_handler (void *cls, switch (ntohs (msg->type)) { - case GNUNET_MESSAGE_TYPE_LOCAL_DHT_ROUTE_RESULT: + case GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_RESULT: { dht_msg = (struct GNUNET_DHT_RouteResultMessage *) msg; uid = GNUNET_ntohll (dht_msg->unique_id); @@ -885,7 +885,7 @@ GNUNET_DHT_route_start (struct GNUNET_DHT_Handle *handle, msize = sizeof (struct GNUNET_DHT_RouteMessage) + ntohs (enc->size); message = GNUNET_malloc (msize); message->header.size = htons (msize); - message->header.type = htons (GNUNET_MESSAGE_TYPE_LOCAL_DHT_ROUTE); + message->header.type = htons (GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE); memcpy (&message->key, key, sizeof (GNUNET_HashCode)); message->options = htonl (options); message->desired_replication_level = htonl (options); diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index 6fe910ecd..dee6e15f9 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c @@ -565,7 +565,7 @@ static void forward_result_message (void *cls, pending->timeout = GNUNET_TIME_relative_get_forever(); result_message = (struct GNUNET_DHT_P2PRouteResultMessage *)pending->msg; result_message->header.size = htons(msize); - result_message->header.type = htons(GNUNET_MESSAGE_TYPE_P2P_DHT_ROUTE_RESULT); + result_message->header.type = htons(GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE_RESULT); result_message->options = htonl(msg_ctx->msg_options); result_message->hop_count = htonl(msg_ctx->hop_count + 1); GNUNET_assert(GNUNET_OK == GNUNET_CONTAINER_bloomfilter_get_raw_data(msg_ctx->bloom, result_message->bloomfilter, DHT_BLOOM_SIZE)); @@ -1096,7 +1096,7 @@ send_reply_to_client (struct ClientList *client, pending_message = GNUNET_malloc (sizeof (struct PendingMessage) + tsize); pending_message->msg = (struct GNUNET_MessageHeader *)&pending_message[1]; reply = (struct GNUNET_DHT_RouteResultMessage *)&pending_message[1]; - reply->header.type = htons (GNUNET_MESSAGE_TYPE_LOCAL_DHT_ROUTE_RESULT); + reply->header.type = htons (GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_RESULT); reply->header.size = htons (tsize); reply->unique_id = GNUNET_htonll (uid); memcpy (&reply[1], message, msize); @@ -1795,7 +1795,7 @@ static void forward_message (void *cls, pending->timeout = GNUNET_TIME_relative_get_forever(); route_message = (struct GNUNET_DHT_P2PRouteMessage *)pending->msg; route_message->header.size = htons(msize); - route_message->header.type = htons(GNUNET_MESSAGE_TYPE_P2P_DHT_ROUTE); + route_message->header.type = htons(GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE); route_message->options = htonl(msg_ctx->msg_options); route_message->hop_count = htonl(msg_ctx->hop_count + 1); route_message->network_size = htonl(msg_ctx->network_size); @@ -2368,15 +2368,15 @@ core_init (void *cls, static struct GNUNET_SERVER_MessageHandler plugin_handlers[] = { - {&handle_dht_local_route_request, NULL, GNUNET_MESSAGE_TYPE_LOCAL_DHT_ROUTE, 0}, + {&handle_dht_local_route_request, NULL, GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE, 0}, {&handle_dht_local_route_stop, NULL, GNUNET_MESSAGE_TYPE_DHT_ROUTE_STOP, 0}, {NULL, NULL, 0, 0} }; static struct GNUNET_CORE_MessageHandler core_handlers[] = { - {&handle_dht_p2p_route_request, GNUNET_MESSAGE_TYPE_P2P_DHT_ROUTE, 0}, - {&handle_dht_p2p_route_result, GNUNET_MESSAGE_TYPE_P2P_DHT_ROUTE_RESULT, 0}, + {&handle_dht_p2p_route_request, GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE, 0}, + {&handle_dht_p2p_route_result, GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE_RESULT, 0}, {NULL, 0, 0} }; diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index 62a7c4d82..5c315cc30 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h @@ -512,22 +512,22 @@ extern "C" /** * Local DHT route request type */ -#define GNUNET_MESSAGE_TYPE_LOCAL_DHT_ROUTE 142 +#define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE 142 /** * Local generic DHT route result type */ -#define GNUNET_MESSAGE_TYPE_LOCAL_DHT_ROUTE_RESULT 143 +#define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_RESULT 143 /** * P2P DHT route request type */ -#define GNUNET_MESSAGE_TYPE_P2P_DHT_ROUTE 144 +#define GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE 144 /** * P2P DHT route result type */ -#define GNUNET_MESSAGE_TYPE_P2P_DHT_ROUTE_RESULT 145 +#define GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE_RESULT 145 /** * Local generic DHT message stop type @@ -550,7 +550,7 @@ extern "C" * Local DHT Get stop message, from API to service * (encapsulated in DHT_ROUTE_STOP message) */ -#define GNUNET_MESSAGE_TYPE_DHT_GET_STOP 149 +#define GNUNET_MESSAGE_TYPE_DHT_LOCAL_GET_STOP 149 /** * Local and P2P DHT Get result message @@ -565,7 +565,7 @@ extern "C" /** * Local DHT find peer stop message, from API to service */ -#define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER_STOP 152 +#define GNUNET_MESSAGE_TYPE_DHT_LOCAL_FIND_PEER_STOP 152 /** * Local and P2P DHT find peer result message -- 2.25.1