GNUNET_break (0);
if (irc->info != NULL)
irc->info (irc->info_cls,
- NULL, 0, 0, GNUNET_TIME_UNIT_FOREVER_REL, 0, 0);
+ NULL, 0, 0, 0, 0);
GNUNET_CLIENT_disconnect (irc->client);
GNUNET_free (irc);
return;
*/
uint32_t ping_challenge;
+ /**
+ * What was the last distance to this peer as reported by the transports?
+ * (FIXME: actually set this!)
+ */
+ uint32_t last_distance;
+
/**
* What is our connection status?
*/
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending `%s' message to client.\n", "NOTIFY_CONNECT");
#endif
- cnm.reserved = htonl (0);
+ cnm.distance = htonl (n->last_distance);
+ cnm.latency = GNUNET_TIME_relative_hton (n->last_latency);
cnm.peer = n->peer;
send_to_client (c, &cnm.header, GNUNET_NO);
n = n->next;
cim.reserved_amount = htonl (reserv);
cim.bpm_in = htonl (n->bpm_in);
cim.bpm_out = htonl (n->bpm_out);
- cim.latency = GNUNET_TIME_relative_hton (n->last_latency);
cim.preference = n->current_preference;
}
cim.header.size = htons (sizeof (struct ConfigurationInfoMessage));
}
cnm.header.size = htons (sizeof (struct ConnectNotifyMessage));
cnm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT);
+ cnm.distance = htonl (0); /* FIXME */
+ cnm.latency = GNUNET_TIME_relative_hton (GNUNET_TIME_UNIT_ZERO); /* FIXME */
cnm.reserved = htonl (0);
cnm.peer = n->peer;
send_to_all_clients (&cnm.header, GNUNET_YES, GNUNET_CORE_OPTION_SEND_CONNECT);
*/
#include "platform.h"
#include "gnunet_protocols.h"
+#include "gnunet_util_lib.h"
#include "gnunet_service_lib.h"
#include "transport.h"
#include "gnunet-service-transport_blacklist.h"
struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message)
{
+ struct BlacklistNotificationList *bnl;
+
+ bnl = GNUNET_malloc (sizeof (struct BlacklistNotificationList));
+ bnl->next = blacklist_notifiers;
+ blacklist_notifiers = bnl;
/* FIXME */
GNUNET_SERVER_receive_done (client, GNUNET_OK);
}
* @brief internal API for blacklisting functionality
* @author Christian Grothoff
*/
-#include "platform.h"
+#ifndef GNUNET_SERVICE_TRANSPORT_BLACKLIST_H
+#define GNUNET_SERVICE_TRANSPORT_BLACKLIST_H
+
#include "gnunet_protocols.h"
#include "gnunet_service_lib.h"
#include "transport.h"
-#ifndef GNUNET_SERVICE_TRANSPORT_BLACKLIST_H
-#define GNUNET_SERVICE_TRANSPORT_BLACKLIST_H
-
/**
* Handle a request to blacklist a peer.
*
* @brief common internal definitions for transport service
* @author Christian Grothoff
*/
+#ifndef TRANSPORT_H
+#define TRANSPORT_H
+
#include "gnunet_crypto_lib.h"
#include "gnunet_time_lib.h"
#include "gnunet_transport_service.h"
/* end of transport.h */
+#endif