* @brief common internal definitions for core service
* @author Christian Grothoff
*/
+#ifndef CORE_H
+#define CORE_H
+
#include "gnunet_bandwidth_lib.h"
+#include "gnunet_transport_service.h"
#include "gnunet_crypto_lib.h"
#include "gnunet_time_lib.h"
*/
#define DEBUG_CORE GNUNET_EXTRA_LOGGING
-/**
- * Debugging interaction core-clients.
- */
-#define DEBUG_CORE_CLIENT GNUNET_EXTRA_LOGGING
-
/**
* Definition of bits in the InitMessage's options field that specify
* which events this client cares about. Note that inbound messages
};
+#endif
/* end of core.h */
#define GNUNET_SERVICE_CORE_H
#include "gnunet_statistics_service.h"
-
-
-#define DEBUG_CORE GNUNET_EXTRA_LOGGING
+#include "core.h"
/**
* Opaque handle to a client.
const struct GNUNET_MessageHeader *msg,
int can_drop)
{
-#if DEBUG_CORE_CLIENT
+#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Preparing to send %u bytes of message of type %u to client.\n",
(unsigned int) ntohs (msg->size),
( (0 != (options & GNUNET_CORE_OPTION_SEND_FULL_INBOUND)) &&
(GNUNET_YES == type_match (type, c)) ) ) )
continue; /* skip */
-#if DEBUG_CORE_CLIENT > 1
+#if DEBUG_CORE > 1
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending message of type %u to client.\n",
(unsigned int) ntohs (msg->type));
GNUNET_CONTAINER_DLL_insert (client_head,
client_tail,
c);
-#if DEBUG_CORE_CLIENT
+#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Client connecting to core service is interested in %u message types\n",
(unsigned int) c->tcnt);
if (client == NULL)
return;
-#if DEBUG_CORE_CLIENT
+#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Client %p has disconnected from core service.\n", client);
#endif
sizeof (struct GNUNET_TRANSPORT_ATS_Information) * atsi_count);
a[atsi_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
a[atsi_count].value = htonl (0);
-#if DEBUG_CORE_CLIENT
+#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending `%s' message to client.\n",
"NOTIFY_CONNECT");
#include "gnunet-service-core_clients.h"
#include "gnunet_constants.h"
-
/**
* Message ready for encryption. This struct is followed by the
* actual content of the message.
/* neighbour must have disconnected since request was issued,
* ignore (client will realize it once it processes the
* disconnect notification) */
-#if DEBUG_CORE_CLIENT
+#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Dropped client request for transmission (am disconnected)\n");
#endif
GSC_CLIENTS_reject_request (car);
return;
}
-#if DEBUG_CORE_CLIENT
+#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received client transmission request. queueing\n");
#endif