*/
struct GNUNET_TIME_Relative hello_expiration;
+/**
+ * Should we store our topology predecessor and successor IDs into statistics?
+ */
+extern unsigned int track_topology;
+
+#if ENABLE_MALICIOUS
+/**
+ * Should this peer act malicious?
+ */
+unsigned int malicious;
+#endif
+
/**
* Receive the HELLO from transport service, free current and replace
run (void *cls, struct GNUNET_SERVER_Handle *server,
const struct GNUNET_CONFIGURATION_Handle *c)
{
+ unsigned long long _track_topology;
GDS_cfg = c;
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_time (c, "transport", "HELLO_EXPIRATION", &hello_expiration))
}
GDS_block_context = GNUNET_BLOCK_context_create (GDS_cfg);
GDS_stats = GNUNET_STATISTICS_create ("dht", GDS_cfg);
-
GDS_ROUTING_init ();
- GDS_NSE_init ();
+ GDS_NSE_init ();
GDS_DATACACHE_init ();
GDS_HELLO_init ();
GDS_CLIENTS_init (server);
-
+ if (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_number (c, "xdht", "track_toplogy",
+ &_track_topology))
+ {
+ track_topology = (unsigned int) _track_topology;
+ }
if (GNUNET_OK != GDS_NEIGHBOURS_init ())
{
shutdown_task (NULL, NULL);
{
int ret;
- /* FIXME:
- Here add a new field threshold to set user defined threshold
- on routing table size and trail length. Pass the thr1 and thr2
- to neighbours_init and in neighbours file, in function where we
- are adding a new entry into our routing table and trail length,
- check the threshold values. After conducting experiments, try to
- find the correct threshold to have a balance between attack tolerance
- and performance.*/
ret =
(GNUNET_OK ==
GNUNET_SERVICE_run (argc, argv, "dht", GNUNET_SERVICE_OPTION_NONE, &run,