gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r17276 - gnunet/src/core


From: gnunet
Subject: [GNUnet-SVN] r17276 - gnunet/src/core
Date: Fri, 7 Oct 2011 12:53:18 +0200

Author: grothoff
Date: 2011-10-07 12:53:18 +0200 (Fri, 07 Oct 2011)
New Revision: 17276

Modified:
   gnunet/src/core/gnunet-service-core-new.c
   gnunet/src/core/gnunet-service-core.h
   gnunet/src/core/gnunet-service-core_typemap.c
Log:
hxing

Modified: gnunet/src/core/gnunet-service-core-new.c
===================================================================
--- gnunet/src/core/gnunet-service-core-new.c   2011-10-07 10:48:55 UTC (rev 
17275)
+++ gnunet/src/core/gnunet-service-core-new.c   2011-10-07 10:53:18 UTC (rev 
17276)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2010 Christian Grothoff (and other contributing authors)
+     (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -22,25 +22,9 @@
  * @file core/gnunet-service-core.c
  * @brief high-level P2P messaging
  * @author Christian Grothoff
- *
- * Type map implementation:
- * - track type maps for neighbours (can wait)
- * - only notify clients about peers with matching type maps (can wait)
- *
- * Considerations for later:
- * - check that hostkey used by transport (for HELLOs) is the
- *   same as the hostkey that we are using!
  */
 #include "platform.h"
-#include <zlib.h>
-#include "gnunet_constants.h"
 #include "gnunet_util_lib.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_peerinfo_service.h"
-#include "gnunet_protocols.h"
-#include "gnunet_signatures.h"
-#include "gnunet_statistics_service.h"
-#include "gnunet_transport_service.h"
 #include "gnunet-service-core.h"
 #include "gnunet-service-core_clients.h"
 #include "gnunet-service-core_kx.h"
@@ -49,116 +33,7 @@
 #include "gnunet-service-core_typemap.h"
 
 
-#define DEBUG_HANDSHAKE GNUNET_EXTRA_LOGGING
-
-#define DEBUG_CORE_QUOTA GNUNET_EXTRA_LOGGING
-
 /**
- * Receive and send buffer windows grow over time.  For
- * how long can 'unused' bandwidth accumulate before we
- * need to cap it?  (specified in seconds).
- */
-#define MAX_WINDOW_TIME_S (5 * 60)
-
-/**
- * How many messages do we queue up at most for optional
- * notifications to a client?  (this can cause notifications
- * about outgoing messages to be dropped).
- */
-#define MAX_NOTIFY_QUEUE 1024
-
-/**
- * Minimum bandwidth (out) to assign to any connected peer.
- * Should be rather low; values larger than DEFAULT_BW_IN_OUT make no
- * sense.
- */
-#define MIN_BANDWIDTH_PER_PEER GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT
-
-/**
- * After how much time past the "official" expiration time do
- * we discard messages?  Should not be zero since we may
- * intentionally defer transmission until close to the deadline
- * and then may be slightly past the deadline due to inaccuracy
- * in sleep and our own CPU consumption.
- */
-#define PAST_EXPIRATION_DISCARD_TIME GNUNET_TIME_UNIT_SECONDS
-
-/**
- * What is the maximum delay for a SET_KEY message?
- */
-#define MAX_SET_KEY_DELAY GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 10)
-
-/**
- * How long do we wait for SET_KEY confirmation initially?
- */
-#define INITIAL_SET_KEY_RETRY_FREQUENCY GNUNET_TIME_relative_multiply 
(MAX_SET_KEY_DELAY, 1)
-
-/**
- * What is the maximum delay for a PING message?
- */
-#define MAX_PING_DELAY GNUNET_TIME_relative_multiply (MAX_SET_KEY_DELAY, 2)
-
-/**
- * What is the maximum delay for a PONG message?
- */
-#define MAX_PONG_DELAY GNUNET_TIME_relative_multiply (MAX_PING_DELAY, 2)
-
-/**
- * What is the minimum frequency for a PING message?
- */
-#define MIN_PING_FREQUENCY GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 5)
-
-/**
- * How often do we recalculate bandwidth quotas?
- */
-#define QUOTA_UPDATE_FREQUENCY GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 5)
-
-/**
- * What is the priority for a SET_KEY message?
- */
-#define SET_KEY_PRIORITY 0xFFFFFF
-
-/**
- * What is the priority for a PING message?
- */
-#define PING_PRIORITY 0xFFFFFF
-
-/**
- * What is the priority for a PONG message?
- */
-#define PONG_PRIORITY 0xFFFFFF
-
-/**
- * How many messages do we queue per peer at most?  Must be at
- * least two.
- */
-#define MAX_PEER_QUEUE_SIZE 16
-
-/**
- * How many non-mandatory messages do we queue per client at most?
- */
-#define MAX_CLIENT_QUEUE_SIZE 32
-
-/**
- * What is the maximum age of a message for us to consider
- * processing it?  Note that this looks at the timestamp used
- * by the other peer, so clock skew between machines does
- * come into play here.  So this should be picked high enough
- * so that a little bit of clock skew does not prevent peers
- * from connecting to us.
- */
-#define MAX_MESSAGE_AGE GNUNET_TIME_UNIT_DAYS
-
-
-
-/**
- * Number of bytes (at the beginning) of "struct EncryptedMessage"
- * that are NOT encrypted.
- */
-#define ENCRYPTED_HEADER_SIZE (offsetof(struct EncryptedMessage, 
sequence_number))
-
-
-/**
  * Our identity.
  */
 struct GNUNET_PeerIdentity GSC_my_identity;

Modified: gnunet/src/core/gnunet-service-core.h
===================================================================
--- gnunet/src/core/gnunet-service-core.h       2011-10-07 10:48:55 UTC (rev 
17275)
+++ gnunet/src/core/gnunet-service-core.h       2011-10-07 10:53:18 UTC (rev 
17276)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2010 Christian Grothoff (and other contributing authors)
+     (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -26,8 +26,11 @@
 #ifndef GNUNET_SERVICE_CORE_H
 #define GNUNET_SERVICE_CORE_H
 
+#include "gnunet_statistics_service.h"
 
 
+#define DEBUG_CORE GNUNET_EXTRA_LOGGING
+
 /**
  * Opaque handle to a client.
  */

Modified: gnunet/src/core/gnunet-service-core_typemap.c
===================================================================
--- gnunet/src/core/gnunet-service-core_typemap.c       2011-10-07 10:48:55 UTC 
(rev 17275)
+++ gnunet/src/core/gnunet-service-core_typemap.c       2011-10-07 10:53:18 UTC 
(rev 17276)
@@ -26,7 +26,10 @@
 #include "platform.h"
 #include "gnunet_util_lib.h"
 #include "gnunet_transport_service.h"
-#include "gnunet_service_core.h"
+#include "gnunet-service-core.h"
+#include "gnunet-service-core_sessions.h"
+#include "gnunet-service-core_typemap.h"
+#include <zlib.h>
 
 
 /**




reply via email to

[Prev in Thread] Current Thread [Next in Thread]